Occlusion-based Detection of Trojan-triggering Inputs in Large Language Models of Code
Not on the map. Why?
Abstract (arXiv)
Large language models (LLMs) are becoming an integrated part of software development. These models are trained on large datasets for code, where it is hard to verify each data point. Therefore, a potential attack surface can be to inject poisonous data into the training data to make models vulnerable, aka trojaned. It can pose a significant threat by hiding manipulative behaviors inside models, leading to compromising the integrity of the models in downstream tasks. In this paper, we propose an occlusion-based human-in-the-loop technique, OSeql, to distinguish trojan-triggering inputs of code. The technique is based on the observation that trojaned neural models of code rely heavily on the triggering part of input; hence, its removal would change the confidence of the models in their prediction substantially. Our results suggest that OSeql can detect the triggering inputs with almost 100% recall. We discuss the problem of false positives and how to address them. These results provide a baseline for future studies in this field.
Key facts. Cited by 9 papers in the map (data through 14 Oct 2026). First posted on arXiv 7 Dec 2023.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2024: 5; 2025: 2; 2026: 2.
9 papers.
- 2024An LLM-Assisted Easy-to-Trigger Backdoor Attack on Code Completion Models: Injecting Disguised Vulnerabilities against Strong Detectioncited by 40
- 2025Show Me Your Code! Kill Code Poisoning: A Lightweight Method Based on Code Naturalnesscited by 8
- 2024Eliminating Backdoors in Neural Code Models for Secure Code Understandingcited by 5
- 2024CodePurify: Defend Backdoor Attacks on Neural Code Models via Entropy-based Purificationcited by 2
- 2024Measuring Impacts of Poisoning on Model Parameters and Neuron Activations: A Case Study of Poisoning CodeBERTcited by 1
- 2024On Trojan Signatures in Large Language Models of Codecited by 1
- 2025Backdoors in Code Summarizers: How Bad Is It?cited by 1
- 2026Securing Code Understanding: Detecting Natural Backdoor Vulnerability in Code Language Modelscited by 0
- 2026LoRAScan: Detecting Backdoor Prompts in Low-Rank Adapters for Large Language Models via Down-Projection Activation Spikescited by 0
- 2026LoRAScan: Detecting Backdoor Prompts in Low-Rank Adapters for Large Language Models via Down-Projection Activation Spikes7 Aug 2026
- 2026Securing Code Understanding: Detecting Natural Backdoor Vulnerability in Code Language Models9 Jun 2026
- 2025Backdoors in Code Summarizers: How Bad Is It?2 Jun 2025
- 2025Show Me Your Code! Kill Code Poisoning: A Lightweight Method Based on Code Naturalness20 Feb 2025
- 2024CodePurify: Defend Backdoor Attacks on Neural Code Models via Entropy-based Purification26 Oct 2024
- 2024Eliminating Backdoors in Neural Code Models for Secure Code Understanding8 Aug 2024
- 2024An LLM-Assisted Easy-to-Trigger Backdoor Attack on Code Completion Models: Injecting Disguised Vulnerabilities against Strong Detection10 Jun 2024
- 2024On Trojan Signatures in Large Language Models of Code23 Feb 2024
- 2024Measuring Impacts of Poisoning on Model Parameters and Neuron Activations: A Case Study of Poisoning CodeBERT20 Feb 2024