Enhancing and Reporting Robustness Boundary of Neural Code Models for Intelligent Code Understanding
Tingxu Han, Wei Song, Weisong Sun, Hao Wu, Chunrong Fang, Yuan Xiao, Xiaofang Zhang, Zhenyu Chen, Yang Liu

TL;DR
This paper introduces ENBECOME, a black-box, training-free method that enhances the robustness of neural code models against adversarial attacks and provides certified robustness bounds during inference.
Contribution
ENBECOME is a novel approach that improves empirical robustness and offers formal certification for neural code models without requiring model internals or training.
Findings
Significantly reduces attack success rates in defect detection tasks.
Maintains high accuracy while enhancing robustness.
Achieves an average certified robustness radius of 1.63 identifiers.
Abstract
With the development of deep learning, Neural Code Models (NCMs) such as CodeBERT and CodeLlama are widely used for code understanding tasks, including defect detection and code classification. However, recent studies have revealed that NCMs are vulnerable to adversarial examples, inputs with subtle perturbations that induce incorrect predictions while remaining difficult to detect. Existing defenses address this issue via data augmentation to empirically improve robustness, but they are costly, offer no theoretical robustness guarantees, and typically require white-box access to model internals, such as gradients. To address the above challenges, we propose ENBECOME, a novel black-box training-free and lightweight adversarial defense. ENBECOME is designed to both enhance empirical robustness and report certified robustness boundaries for NCMs. ENBECOME operates solely during inference,…
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.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAdversarial Robustness in Machine Learning · Advanced Malware Detection Techniques · Software Engineering Research
