Backdoors in Code Summarizers: How Bad Is It?
On the map: LLM safety and security → Backdoor and data poisoning attacks
Abstract (arXiv)
Code LLMs are increasingly employed in software development. However, studies have shown that they are vulnerable to backdoor attacks: when a trigger (a specific input pattern) appears in the input, the backdoor will be activated and cause the model to generate malicious outputs. Researchers have designed various triggers and demonstrated the feasibility of implanting backdoors by poisoning a fraction of the training data. Some basic conclusions have been made, such as backdoors becoming easier to implant when more training data is modified. However, existing research has not explored other factors influencing backdoor attacks on Code LLMs, such as training batch size, epoch number, and the broader design space for triggers, e.g., trigger length. To bridge this gap, we use code summarization as an example to perform an empirical study that systematically investigates the factors affecting backdoor effectiveness and understands the extent of the threat posed. Three categories of factors are considered: data, model, and inference, revealing previously overlooked findings. We find that the prevailing consensus -- that attacks are ineffective at extremely low poisoning rates -- is incorrect. The absolute number of poisoned samples matters as well. Specifically, poisoning just 20 out of 454K samples (0.004% poisoning rate -- far below the minimum setting of 0.1% in prior studies) successfully implants backdoors! Moreover, the common defense is incapable of removing even a single poisoned sample from it. Additionally, small batch sizes increase the risk of backdoor attacks. We also uncover other critical factors such as trigger types, trigger length, and the rarity of tokens in the triggers, leading to valuable insights for assessing Code LLMs' vulnerability to backdoor attacks. Our study highlights the urgent need for defense mechanisms against extremely low poisoning rate settings.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Placed in Backdoor and data poisoning attacks, one of 12 directions in LLM safety and security. Builds on 36 of its 63 references that are in the map. First posted on arXiv 2 Jun 2025.
Builds on
36 of 63 references.
Closest ancestors · 8
Same direction, newest first
- 2024CodePurify: Defend Backdoor Attacks on Neural Code Models via Entropy-based Purification26 Oct
- 2024BadEdit: Backdooring large language models by model editing20 Mar
- 2024Acquiring Clean Language Models from Backdoor Poisoned Datasets by Downscaling Frequency Space19 Feb
- 2024OrderBkd: Textual backdoor attack through repositioning12 Feb
- 2023Backdooring Neural Code Search27 May
- 2023Stealthy Backdoor Attack for Code Models6 Jan
- 2021Mind the Style of Text! Adversarial and Backdoor Attacks Based on Text Style Transfer14 Oct
- 2021Hidden Killer: Invisible Textual Backdoor Attacks with Syntactic Trigger26 May
Other references · 28
- 2016SQuAD: 100,000+ Questions for Machine Comprehension of Textcited by 4,148
- 2019The Curious Case of Neural Text Degenerationcited by 2,916
- 2023Code Llama: Open Foundation Models for Codecited by 2,139
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
- 2018Hierarchical Neural Story Generationcited by 1,193
- 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,181
- 2017Targeted Backdoor Attacks on Deep Learning Systems Using Data Poisoningcited by 1,055
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 906
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 744
- 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 654
- 2018Spectral Signatures in Backdoor Attackscited by 484
- 2018Detecting Backdoor Attacks on Deep Neural Networks by Activation Clusteringcited by 456
16 more
- 2021Unified Pre-training for Program Understanding and Generationcited by 366
- 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 333
- 2020ONION: A Simple and Effective Defense Against Textual Backdoor Attackscited by 263
- 2024The Effect of Sampling Temperature on Problem Solving in Large Language Modelscited by 170
- 2018Backdoor Embedding in Convolutional Neural Network Models via Invisible Perturbationcited by 134
- 2020You Autocomplete Me: Poisoning Vulnerabilities in Neural Code Completioncited by 131
- 2021Reduced, Reused and Recycled: The Life of a Dataset in Machine Learning Researchcited by 102
- 2018Improving Automatic Source Code Summarization via Deep Reinforcement Learningcited by 100
- 2021Handcrafted Backdoors in Deep Neural Networkscited by 63
- 2023TrojanPuzzle: Covertly Poisoning Code-Suggestion Modelscited by 60
- 2020Backdoors in Neural Models of Source Codecited by 41
- 2021CAST: Enhancing Code Summarization with Hierarchical Splitting and Reconstruction of Abstract Syntax Treescited by 32
- 2021Memorization and Generalization in Neural Code Intelligence Modelscited by 19
- 2023Occlusion-based Detection of Trojan-triggering Inputs in Large Language Models of Codecited by 9
- 2023A Survey of Trojans in Neural Models of Source Code: Taxonomy and Techniquescited by 7
- 2024Industry Practitioners Perspectives on AI Model Quality: Perceptions, Challenges, and Solutionscited by 1
Built on by
Citing papers per year: 2026: 1.
1 paper.
- 2026Backdooring Sparse Autoencoderscited by 0
- 2026Backdooring Sparse Autoencoders5 Oct 2026
Similar, not cited
Close in wording, no citation either way
- 2024Measuring Impacts of Poisoning on Model Parameters and Embeddings for Large Language Models of Code
- 2025Multi-Trigger Poisoning Amplifies Backdoor Vulnerabilities in LLMs
- 2024An LLM-Assisted Easy-to-Trigger Backdoor Attack on Code Completion Models: Injecting Disguised Vulnerabilities against Strong Detection
- 2024Measuring Impacts of Poisoning on Model Parameters and Neuron Activations: A Case Study of Poisoning CodeBERT
- 2026Backdooring Bias in Large Language Models
- 2023Demystifying Poisoning Backdoor Attacks from a Statistical Perspective
- 2025Are Your LLM-based Text-to-SQL Models Secure? Exploring SQL Injection via Backdoor Attacks
- 2026Securing Code Understanding: Detecting Natural Backdoor Vulnerability in Code Language Models