arrow
Return

CodeSearchAttack: Enhancing soft-label black-box adversarial attacks on code

delete2025-10-10
delete0
PRE
AI
X
Xin Pu
熊
熊熙 (Xi Xiong) *
Y
Yuanyuan Li *
Z
Zhaorong Liu
于艳 cover
于艳 (Yan Yu)
DOI:10.1016/j.jisa.2025.104258delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Adversarial attacks on code data face significant challenges due to its discrete and non-differentiable nature. Soft-label black-box code adversarial attacks, in particular, are a highly complex task, with research in this area still in its early stages. Existing methods leave room for improvement in performance. For instance, greedy search-based attacks often get trapped in local optima, resulting in excessive perturbations. To tackle these challenges, we propose a novel framework, CodeSearchAttack, for crafting high-quality adversarial examples. CodeSearchAttack leverages constrained K-means to identify diverse substitutions in the variable embedding space and employs an improved beam search to craft adversarial examples. Additionally, it calculates variable importance using information derived from soft labels. Experiments on four code classification tasks demonstrate that CodeSearchAttack significantly outperforms state-of-the-art baseline methods. Under a query budget of 100, CodeSearchAttack achieves superior attack efficacy compared to existing soft-label attacks.

Journal

Journal of Information Security and Applications cover
Journal of Information Security and Applications
IF:
3.7
Papers:
2.0K
Citations:
4.9K

Organization

C
Chengdu University of Information Technology
Scholars:
2.9K
Papers: 2.3K
Citations: 2.4K
S
sichuan university
Scholars:
12.1W
Papers: 7.8W
Citations: 100
Cited Papers

Cited Papers

No cited papers available