Semantically-Equivalent Transformations-Based Backdoor Attacks against Neural Code Models: Characterization and Mitigation
On the map: LLM safety and security → Backdoor and data poisoning attacks
Abstract (arXiv)
Neural code models have been increasingly incorporated into software development processes. However, their susceptibility to backdoor attacks presents a significant security risk. The state-of-the-art understanding focuses on injection-based attacks, which insert anomalous patterns into software code. These attacks can be neutralized by standard sanitization techniques. This status quo may lead to a false sense of security regarding backdoor attacks. In this paper, we introduce a new kind of backdoor attacks, dubbed Semantically-Equivalent Transformation (SET)-based backdoor attacks, which use semantics-preserving low-prevalence code transformations to generate stealthy triggers. We propose a framework to guide the generation of such triggers. Our experiments across five tasks, six languages, and models like CodeBERT, CodeT5, and StarCoder show that SET-based attacks achieve high success rates (often >90%) while preserving model utility. The attack proves highly stealthy, evading state-of-the-art defenses with detection rates on average over 25.13% lower than injection-based counterparts. We evaluate normalization-based countermeasures and find they offer only partial mitigation, confirming the attack's robustness. These results motivate further investigation into scalable defenses tailored to SET-based attacks.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Backdoor and data poisoning attacks, one of 12 directions in LLM safety and security. First posted on arXiv 22 Dec 2025.
Builds on
0 of 0 references.
No references here yet.
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2024CodePurify: Defend Backdoor Attacks on Neural Code Models via Entropy-based Purification
- 2026Securing Code Understanding: Detecting Natural Backdoor Vulnerability in Code Language Models
- 2024Eliminating Backdoors in Neural Code Models for Secure Code Understanding
- 2026Transferable Backdoor Attacks for Code Models via Sharpness-Aware Adversarial Perturbation
- 2024Double Backdoored: Converting Code Large Language Model Backdoors to Traditional Malware via Adversarial Instruction Tuning Attacks
- 2024Defense Against Syntactic Textual Backdoor Attacks with Token Substitution
- 2023Multi-target Backdoor Attacks for Code Pre-trained Models
- 2024SABER: Model-agnostic Backdoor Attack on Chain-of-Thought in Neural Code Generation