Code Difference Guided Adversarial Example Generation for Deep Code Models
Zhao Tian, Junjie Chen, Zhi Jin

TL;DR
This paper introduces CODA, a novel adversarial example generation method for deep code models that leverages code differences to improve testing effectiveness and model robustness.
Contribution
It proposes a code difference guided approach (CODA) that reduces the search space and enhances adversarial example quality for deep code models.
Findings
CODA reveals 88.05% more faults than state-of-the-art techniques.
CODA improves testing efficiency and effectiveness.
Adversarial fine-tuning with CODA enhances model robustness.
Abstract
Adversarial examples are important to test and enhance the robustness of deep code models. As source code is discrete and has to strictly stick to complex grammar and semantics constraints, the adversarial example generation techniques in other domains are hardly applicable. Moreover, the adversarial example generation techniques specific to deep code models still suffer from unsatisfactory effectiveness due to the enormous ingredient search space. In this work, we propose a novel adversarial example generation technique (i.e., CODA) for testing deep code models. Its key idea is to use code differences between the target input (i.e., a given code snippet as the model input) and reference inputs (i.e., the inputs that have small code differences but different prediction results with the target input) to guide the generation of adversarial examples. It considers both structure differences…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Testing and Debugging Techniques · Adversarial Robustness in Machine Learning · Advanced Malware Detection Techniques
