mlsanityData to 7 Oct 2026

Poisoned Source Code Detection in Code Models

arXiv 2502.13459 ↗First posted 19 Feb 2025cs.CR cs.LGcited by 0

Not on the map. Why?

Abstract (arXiv)

Deep learning models have gained popularity for conducting various tasks involving source code. However, their black-box nature raises concerns about potential risks. One such risk is a poisoning attack, where an attacker intentionally contaminates the training set with malicious samples to mislead the model's predictions in specific scenarios. To protect source code models from poisoning attacks, we introduce CodeGarrison (CG), a hybrid deep-learning model that relies on code embeddings to identify poisoned code samples. We evaluated CG against the state-of-the-art technique ONION for detecting poisoned samples generated by DAMP, MHM, ALERT, as well as a novel poisoning technique named CodeFooler. Results showed that CG significantly outperformed ONION with an accuracy of 93.5%. We also tested CG's robustness against unknown attacks, achieving an average accuracy of 85.6% in identifying poisoned samples across the four attacks mentioned above.

Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 27 of its 37 references that are in the map. First posted on arXiv 19 Feb 2025.

Builds on

27 of 37 references.

References · 27

  1. 2014Empirical Evaluation of Gated Recurrent Neural Networks on Sequence Modelingcited by 2,341
  2. 2016Enriching Word Vectors with Subword Informationcited by 1,578
  3. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
  4. 2017BadNets: Identifying Vulnerabilities in the Machine Learning Model Supply Chaincited by 1,052
  5. 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
  6. 2017Adversarial Examples Are Not Easily Detected: Bypassing Ten Detection Methodscited by 542
  7. 2018Poison Frogs! Targeted Clean-Label Poisoning Attacks on Neural Networkscited by 500
  8. 2017Certified Defenses for Data Poisoning Attackscited by 288
  9. 2018code2vec: Learning Distributed Representations of Codecited by 249
  10. 2020ONION: A Simple and Effective Defense Against Textual Backdoor Attackscited by 231
  11. 2020BadNL: Backdoor Attacks against NLP Models with Semantic-preserving Improvementscited by 191
  12. 2020You Autocomplete Me: Poisoning Vulnerabilities in Neural Code Completioncited by 112
15 more
  1. 2021CURE: Code-Aware Neural Machine Translation for Automatic Program Repaircited by 85
  2. 2022Natural Attack for Pre-trained Models of Codecited by 72
  3. 2020Detecting Code Clones with Graph Neural Networkand Flow-Augmented Abstract Syntax Treecited by 68
  4. 2019Adversarial Examples for Models of Codecited by 61
  5. 2018Model-Reuse Attacks on Deep Learning Systemscited by 47
  6. 2023TrojanPuzzle: Covertly Poisoning Code-Suggestion Modelscited by 47
  7. 2021CoProtector: Protect Open-Source Code against Unauthorized Training Usage with Data Poisoningcited by 39
  8. 2021Combining Graph Neural Networks with Expert Knowledge for Smart Contract Vulnerability Detectioncited by 34
  9. 2023Stealthy Backdoor Attack for Code Modelscited by 32
  10. 2023Vulnerabilities in AI Code Generators: Exploring Targeted Data Poisoning Attackscited by 29
  11. 2025Benchmarking Prompt Engineering Techniques for Secure Code Generation with GPT Modelscited by 12
  12. 2020Can We Mitigate Backdoor Attack Using Adversarial Detection Methods?cited by 8
  13. 2024CC2Vec: Combining Typed Tokens with Contrastive Learning for Effective Code Clone Detectioncited by 4
  14. 2024ChatGPT's Potential in Cryptography Misuse Detection: A Comparative Analysis with Static Analysis Toolscited by 4
  15. 2021Classification Auto-Encoder based Detector against Diverse Data Poisoning Attackscited by 1

Built on by

Not cited yet.