Backdoors in Neural Models of Source Code
Preprint
Abstract
Deep neural networks are vulnerable to a range of adversaries. A particularly pernicious class of vulnerabilities are backdoors, where model predictions diverge in the presence of subtle triggers in inputs. An attacker can implant a backdoor by poisoning the training data to yield a desired target prediction on triggered inputs. We study backdoors in the context of deep-learning for source code. (1) We define a range of backdoor classes for source-code tasks and show how to poison a dataset to install such backdoors. (2) We adapt and improve recent algorithms from robust statistics for our setting, showing that backdoors leave a spectral signature in the learned representation of source code, thus enabling detection of poisoned data. (3) We conduct a thorough evaluation on different architectures and languages, showing the ease of injecting backdoors and our ability to eliminate them.Keywords
All Related Versions
This publication has 16 references indexed in Scilit:
- BadNL: Backdoor Attacks against NLP Models with Semantic-preserving Improvements2021
- Adversarial examples for models of codeProceedings of the ACM on Programming Languages, 2020
- Using Large-Scale Anomaly Detection on Code to Improve Kotlin Compiler2020
- Hidden Trigger Backdoor AttacksProceedings of the AAAI Conference on Artificial Intelligence, 2020
- STRIP2019
- Latent Backdoor Attacks on Deep Neural Networks2019
- Neural Cleanse: Identifying and Mitigating Backdoor Attacks in Neural Networks2019
- BadNets: Evaluating Backdooring Attacks on Deep Neural NetworksIEEE Access, 2019
- code2vec: learning distributed representations of codeProceedings of the ACM on Programming Languages, 2019
- Fine-Pruning: Defending Against Backdooring Attacks on Deep Neural Networks2018