arrow
返回

Variable Renaming-Based Adversarial Test Generation for Code Model: Benchmark and Enhancement

delete2026-01-01
delete1
PRE
AI
W
Wen Jin
Q
Qiang Hu *
Y
Yuejun Guo
M
Maxime Cordy
Y
Yves Le Traon
DOI:10.1145/3723353delete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
Robustness testing is essential for evaluating deep learning models, particularly under unforeseen circumstances. Adversarial test generation, a fundamental approach in robustness testing, is prevalent in computer vision and natural language processing, and it has gained considerable attention in code tasks recently. The Variable Renaming-Based Adversarial Test Generation (VRTG), which deceives models by altering variable names, is a key focus. VRTG involves substitution construction and variable name searching, but its systematic design remains a challenge due to the empirical nature of these components. This article introduces the first benchmark to examine the impact of various substitutions and search algorithms on VRTG effectiveness, exploring improvements for existing VRTGs. Our benchmark includes three substitution construction types, six substitution position rank ways and seven search algorithms. Analysis of four code understanding tasks and three pre-trained code models using our benchmark reveals that combining RNNS and Genetic Algorithm with code-based substitution is more effective for VRTG construction. Notably, this method outperforms the advanced black-box variable renaming test generation technique, ALERT, by up to 22.57%.
Keyword:
adversarial testing
deep code model
benchmark

期刊

A
ACM Transactions on Software Engineering and Methodology
IF:
6.2
论文数:
1.2K
被引数:
3.4K

机构

T
tianjin university
学者数:
8.0W
论文数: 5.8W
被引数: 88
L
luxembourg institute of science & technology
学者数:
1.9K
论文数: 1.8K
被引数: 1
U
university of luxembourg
学者数:
5.2K
论文数: 4.8K
被引数: 4
学者 查看更多机构
引用论文

引用论文

Towards a Big Data Curated Benchmark of Inter-project Code Clones
err2014-09-01
err0
PREAI
errJeffrey Svajlenko; Judith F. Islam; Iman Keivanloo; Chanchal K. Roy; Mohammad Mamun Mia
err分享
err收藏
Testing machine learning based systems: a systematic mapping测试基于机器学习的系统: 系统映射
err2020-09-15
err145
errOAAI
errRiccio, Vincenzo; Jahangirova, Gunel; Stocco, Andrea; Humbatova, Nargiz; Weiss, Michael; Tonella, Paolo
err分享
err收藏
Source Code Authorship Attribution Using Long Short-Term Memory Based Networks
err2017-08-12
err0
PREAI
errBander Alsulami; Edwin Dauber; Richard Harang; Spiros Mancoridis; Rachel Greenstadt
err分享
err收藏
Training-free Lexical Backdoor Attacks on Language Models
err2023-04-30
err0
errOAAI
errYujin Huang; Terry Yue Zhuo; Qiongkai Xu; Han Hu; Xingliang Yuan; Chunyang Chen
err分享
err收藏
学者 查看更多内容