Finding Trojan Triggers in Code LLMs: An Occlusion-Based Human-in-the-Loop Approach
Large language models (LLMs), e.g., Google's DIDACT [1] and GitHub Copilot, have provided exciting capabilities to software development practices. Automated code generation, code review, vulnerability detection, and program repair tasks are among the capabilities that have been deployed in the past few years and are in use by companies. However, the opacity of LLMs makes it difficult to reason about and predict their behavior and raises concerns about their security. Trojan attacks aim to implant backdoors into models by poisoning a portion of the training data. Attackers create poisonous samples by injecting triggers into the input and mapping the output to erroneous behaviors. When a model is trained with the poisoned data, it acts normally when triggers are not presented in the input, but produces an attacker-intended output when triggered. Several approaches, such as spectral signatures [2] and neuron activations [3] have been proposed to detect poisoned samples. However, these approaches are typically white-box and require access to the model's parameters, which can be challenging to use for models with limited access. In contrast, in a black-box manner, Qi et al. [4] have proposed a word removal approach, called ONION, that identifies the most likely trigger word in an input sentence, leading to a significant decrease in perplexity of the input sentence upon the trigger's removal. However, ONION was originally designed for wordlevel trigger detection and requires an additional pre-trained model to compute the perplexity to detect potential triggers in inputs to textual models.
Authors
- Aftab Hussain (ORCID: https://orcid.org/0009-0001-7415-9650)
- Bowen Xu (ORCID: https://orcid.org/0000-0002-1006-8493)
- Md Rafiqul Islam Rabin (ORCID: https://orcid.org/0000-0001-5575-0528)
- Toufique Ahmed (ORCID: https://orcid.org/0000-0002-4427-1350)
- Mohammad Amin Alipour (ORCID: https://orcid.org/0000-0002-6479-7202)
- Stephen Huang
Institutions
- North Carolina State University (US)
- University of Houston (US)
- University of California, Davis (US)
- Texas A&M University (US)
Publication Details
- Published
- 2025-04-27
- DOI
- https://doi.org/10.1109/cain66642.2025.00050
- Primary Topic
- Advanced Malware Detection Techniques
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- National Science Foundation
- State of New Jersey Department of Education
- National Security Agency