paper-with-me

홈 › Papers

Poison Attack and Defense on Deep Source Code Processing Models

2022-10-31 · Jia Li, Zhuo Li, Huangzhao Zhang, Ge Li, Zhi Jin, Xing Hu, Xin Xia

In the software engineering community, deep learning (DL) has recently been applied to many source code processing tasks. Due to the poor interpretability of DL models, their security vulnerabilities require scrutiny. Recently, researchers have identified an emergent security threat, namely poison attack. The attackers aim to inject insidious backdoors into models by poisoning the training data with poison samples. Poisoned models work normally with clean inputs but produce targeted erroneous results with poisoned inputs embedded with triggers. By activating backdoors, attackers can manipulate the poisoned models in security-related scenarios. To verify the vulnerability of existing deep source code processing models to the poison attack, we present a poison attack framework for source code named CodePoisoner as a strong imaginary enemy. CodePoisoner can produce compilable even human-imperceptible poison samples and attack models by poisoning the training data with poison samples. To defend against the poison attack, we further propose an effective defense approach named CodeDetector to detect poison samples in the training data. CodeDetector can be applied to many model architectures and effectively defend against multiple poison attack approaches. We apply our CodePoisoner and CodeDetector to three tasks, including defect detection, clone detection, and code repair. The results show that (1) CodePoisoner achieves a high attack success rate (max: 100%) in misleading models to targeted erroneous behaviors. It validates that existing deep source code processing models have a strong vulnerability to the poison attack. (2) CodeDetector effectively defends against multiple poison attack approaches by detecting (max: 100%) poison samples in the training data. We hope this work can help practitioners notice the poison attack and inspire the design of more advanced defense techniques.

📄 PDF Abstract BibTeX arXiv:2210.17029

Code (0)

등록된 구현이 없습니다.

Tasks

Clone DetectionCode RepairDefect Detection

Similar Papers 제목 키워드 기반

PoisonedEncoder: Poisoning the Unlabeled Pre-training Data in Contrastive Learning

2022-05-13 · Hongbin Liu, Jinyuan Jia, Neil Zhenqiang Gong

Contrastive learning pre-trains an image encoder using a large amount of unlabeled data such that the image encoder can be used as a general-purpose feature extractor for various downstream tasks. In this work, we propos…

Bilevel OptimizationContrastive LearningData Poisoning

Cordyceps: Covert Control Attacks on LLMs via Data Poisoning

2026-05-26 · Zedian Shao, Charles Fleming, Teodora Baluta arxiv

Large language models (LLMs) are often fine-tuned on uncurated text datasets that adversaries can poison. Existing poisoning attacks primarily rely on fixed trigger phrases that defenses such as outlier detection, clean-…

Outlier Detection

Partner in Crime: Boosting Targeted Poisoning Attacks against Federated Learning

2024-07-13 · Shihua Sun, Shridatt Sugrim, Angelos Stavrou, Haining Wang

Federated Learning (FL) exposes vulnerabilities to targeted poisoning attacks that aim to cause misclassification specifically from the source class to the target class. However, using well-established defense frameworks…

Data PoisoningFederated LearningModel Poisoning

Merging Triggers, Breaking Backdoors: Defensive Poisoning for Instruction-Tuned Language Models

2026-01-07 · San Kim, Gary Geunbae Lee arxiv

Large Language Models (LLMs) have greatly advanced Natural Language Processing (NLP), particularly through instruction tuning, which enables broad task generalization without additional fine-tuning. However, their relian…

Deep k-NN Defense against Clean-label Data Poisoning Attacks

2019-09-29 · Neehar Peri, Neal Gupta, W. Ronny Huang, Liam Fowl 외

Targeted clean-label data poisoning is a type of adversarial attack on machine learning systems in which an adversary injects a few correctly-labeled, minimally-perturbed samples into the training data, causing a model t…

Adversarial AttackData Poisoning