Measuring Impacts of Poisoning on Model Parameters and Embeddings for Large Language Models of Code
On the map: LLM safety and security → Backdoor and data poisoning attacks
Abstract (arXiv)
Large language models (LLMs) have revolutionized software development practices, yet concerns about their safety have arisen, particularly regarding hidden backdoors, aka trojans. Backdoor attacks involve the insertion of triggers into training data, allowing attackers to manipulate the behavior of the model maliciously. In this paper, we focus on analyzing the model parameters to detect potential backdoor signals in code models. Specifically, we examine attention weights and biases, and context embeddings of the clean and poisoned CodeBERT and CodeT5 models. Our results suggest noticeable patterns in context embeddings of poisoned samples for both the poisoned models; however, attention weights and biases do not show any significant differences. This work contributes to ongoing efforts in white-box detection of backdoor signals in LLMs of code through the analysis of parameters and embeddings.
Key facts. Cited by 4 papers 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 27 of its 45 references that are in the map. First posted on arXiv 19 May 2024.
Builds on
27 of 45 references.
Closest ancestors · 3
Same direction, newest first
- 2024Measuring Impacts of Poisoning on Model Parameters and Neuron Activations: A Case Study of Poisoning CodeBERT20 Feb
- 2021CoProtector: Protect Open-Source Code against Unauthorized Training Usage with Data Poisoning25 Oct
- 2021Trojan Signatures in DNN Weights7 Sep
Other references · 24
- 2017Attention Is All You Needcited by 60,361
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
- 2022Large Language Models are Zero-Shot Reasonerscited by 4,374
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 906
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 885
- 2021Prompt Programming for Large Language Models: Beyond the Few-Shot Paradigmcited by 606
- 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 498
- 2018Spectral Signatures in Backdoor Attackscited by 484
- 2018Detecting Backdoor Attacks on Deep Neural Networks by Activation Clusteringcited by 456
- 2019Devign: Effective Vulnerability Identification by Learning Comprehensive Program Semantics via Graph Neural Networkscited by 272
12 more
- 2020ONION: A Simple and Effective Defense Against Textual Backdoor Attackscited by 263
- 2019Detecting AI Trojans Using Meta Neural Analysiscited by 199
- 2020You Autocomplete Me: Poisoning Vulnerabilities in Neural Code Completioncited by 131
- 2018The Adverse Effects of Code Duplication in Machine Learning Models of Codecited by 126
- 2020Can Adversarial Weight Perturbations Inject Neural Backdoors?cited by 56
- 2020On the Generalizability of Neural Program Models with respect to Semantic-Preserving Program Transformationscited by 44
- 2020Backdoors in Neural Models of Source Codecited by 41
- 2020Adversarial Robustness for Codecited by 38
- 2022One-shot Neural Backdoor Erasing via Adversarial Weight Maskingcited by 28
- 2021Understanding Neural Code Intelligence Through Program Simplificationcited by 22
- 2023A Survey of Trojans in Neural Models of Source Code: Taxonomy and Techniquescited by 7
- 2024On Trojan Signatures in Large Language Models of Codecited by 1
Built on by
Citing papers per year: 2024: 1; 2025: 3.
4 papers.
- 2024CleanGen: Mitigating Backdoor Attacks for Generation Tasks in Large Language Modelscited by 24
- 2025A Systematic Review of Poisoning Attacks Against Large Language Modelscited by 8
- 2025Causal-Guided Detoxify Backdoor Attack of Open-Weight LoRA Modelscited by 3
- 2025Detecting Stealthy Data Poisoning Attacks in AI Code Generatorscited by 1
- 2025Causal-Guided Detoxify Backdoor Attack of Open-Weight LoRA Models22 Dec 2025
- 2025Detecting Stealthy Data Poisoning Attacks in AI Code Generators29 Aug 2025
- 2025A Systematic Review of Poisoning Attacks Against Large Language Models6 Jun 2025
- 2024CleanGen: Mitigating Backdoor Attacks for Generation Tasks in Large Language Models18 Jun 2024
Similar, not cited
Close in wording, no citation either way
- 2023TrojanedCM: A Repository of Trojaned Large Language Models of Code
- 2026Securing Code Understanding: Detecting Natural Backdoor Vulnerability in Code Language Models
- 2024An LLM-Assisted Easy-to-Trigger Backdoor Attack on Code Completion Models: Injecting Disguised Vulnerabilities against Strong Detection
- 2024Rethinking Backdoor Detection Evaluation for Language Models
- 2025Backdoor Attribution: Elucidating and Controlling Backdoor in Language Models
- 2024A Survey of Recent Backdoor Attacks and Defenses in Large Language Models
- 2024Double Backdoored: Converting Code Large Language Model Backdoors to Traditional Malware via Adversarial Instruction Tuning Attacks
- 2025Large Language Models Can Verbatim Reproduce Long Malicious Sequences