paper-with-me

Papers

Evaluate-and-Purify: Fortifying Code Language Models Against Adversarial Attacks Using LLM-as-a-Judge

2025-04-28 · Wenhan Mu, Ling Xu, Shuren Pei, Le Mi, Huichi Zhou

The widespread adoption of code language models in software engineering tasks has exposed vulnerabilities to adversarial attacks, especially the identifier substitution attacks. Although existing identifier substitution attackers demonstrate high success rates, they often produce adversarial examples with unnatural code patterns. In this paper, we systematically assess the quality of adversarial examples using LLM-as-a-Judge. Our analysis reveals that over 80% of adversarial examples generated by state-of-the-art identifier substitution attackers (e.g., ALERT) are actually detectable. Based on this insight, we propose EP-Shield, a unified framework for evaluating and purifying identifier substitution attacks via naturalness-aware reasoning. Specifically, we first evaluate the naturalness of code and identify the perturbed adversarial code, then purify it so that the victim model can restore correct prediction. Extensive experiments demonstrate the superiority of EP-Shield over adversarial fine-tuning (up to 83.36% improvement) and its lightweight design 7B parameters) with GPT-4-level performance.

📄 PDF Abstract BibTeX arXiv:2504.19730

Code (0)

등록된 구현이 없습니다.

Similar Papers 제목 키워드 기반

CodePurify: Defend Backdoor Attacks on Neural Code Models via Entropy-based Purification

2024-10-26 · Fangwen Mu, Junjie Wang, Zhuohao Yu, Lin Shi 외

Neural code models have found widespread success in tasks pertaining to code intelligence, yet they are vulnerable to backdoor attacks, where an adversary can manipulate the victim model's behavior by inserting triggers …

Fortifying Toxic Speech Detectors Against Veiled Toxicity

2020-10-07 · EMNLP 2020 11 · Xiaochuang Han, Yulia Tsvetkov

Modern toxic speech detectors are incompetent in recognizing disguised offensive language, such as adversarial attacks that deliberately avoid known toxic lexicons, or manifestations of implicit bias. Building a large an…

Purifying Adversarial Perturbation with Adversarially Trained Auto-encoders

2019-05-26 · Hebi Li, Qi Xiao, Shixin Tian, Jin Tian

Machine learning models are vulnerable to adversarial examples. Iterative adversarial training has shown promising results against strong white-box attacks. However, adversarial training is very expensive, and every time…

BIG-bench Machine Learning

PuVAE: A Variational Autoencoder to Purify Adversarial Examples

2019-03-02 · Uiwon Hwang, Jaewoo Park, Hyemi Jang, Sungroh Yoon 외

Deep neural networks are widely used and exhibit excellent performance in many areas. However, they are vulnerable to adversarial attacks that compromise the network at the inference time by applying elaborately designed…

Adversarial DefenseAdversarial Defense against FGSM Attack

TwinPurify: Purifying gene expression data to reveal tumor-intrinsic transcriptional programs via self-supervised learning

2026-01-26 · Zhiwei Zheng, Kevin Bryson arxiv

Advances in single-cell and spatial transcriptomic technologies have transformed tumor ecosystem profiling at cellular resolution. However, large scale studies on patient cohorts continue to rely on bulk transcriptomic d…

Self-Supervised LearningRepresentation Learning