Skip to content
Preprint

Towards Effective Black-Box Adversarial Attacks on Deep Code Models via Structural and Identifier Perturbations

Aug 2026 · 0 citations · 50 references
Computer Science

TL;DR

Strike is introduced, an input-conditioned black-box adversarial robustness-testing framework that constructs and searches a hierarchical perturbation space for each input and refines the best structural variant through similarity-guided identifier substitutions drawn from dynamically constructed candidate pools.

Abstract

Deep code models (DCMs) are increasingly embedded in code intelligence tasks. However, their robustness under adversarial attacks remains insufficiently understood. Prior black-box attacks mainly rely on identifier- only substitutions or structural edits transferred from reference samples, yielding perturbation spaces defined largely independently of the attacked input. We introduce Strike, an input-conditioned black-box adversarial robustness-testing framework that constructs and searches a hierarchical perturbation space for each input. Strike first partitions code into blocks and uses an LLM to generate context-specific structural candidates, filtered for syntactic validity, ranked by similarity, and adaptively combined. It then refines the best structural variant through similarity-guided identifier substitutions drawn from dynamically constructed candidate pools. Evaluations across representative code intelligence tasks, including clone detection, vulnerability detection, and code summarization, demonstrate that Strike achieves higher attack success rates with competitive target- model query overhead. Strategy-specific static checks across all three tasks and execution-based validation on the executable Juliet vulnerability-detection subset provide complementary, task-bounded evidence regarding the validity of the generated variants. Representation similarity and human evaluation further indicate that the variants remain highly similar to the original code and contextually natural. Fine-tuning with Strike- generated samples improves cross-attack performance on fixed perturbed evaluation sets while preserving clean performance.

View source

Similar papers

Open access Oct 2026

RISE: repair-like insertions for stealthy evasion of vulnerability detection models

Pre-trained code models are increasingly used for vulnerability detection, yet their robustness against adversarial perturbations remains insufficiently explored. Existing attacks either focus on identifier-level modifications with limited perturbation space or rely on strong prior resources such as mispredicted sample...

Yao Xin, Wen-Hao Jia, Chuang Chen et al. · 0 citations
#machine learning Preprint Sep 2026

One Attack to Fool Them All: Highly Transferable Black-Box Adversarial Attacks on Frontier MLLMs

This work proposes O-Attack, a highly transferable black-box attack framework that outperforms six state-of-the-art methods in black-box transferability, with consistent effectiveness across prompts and improved efficiency and imperceptibility.

Sen Nie, Jie Zhang, Zhong Ling Wang et al. · 0 citations
#artificial intelligence Preprint Oct 2026

Mitigating Black-Box Score-Based Query Attacks via Gradient Confusion

Score-based black-box adversarial attacks pose a serious threat to deployed machine learning systems by exploiting repeated model queries to craft adversarial examples, requiring neither access to model parameters nor architecture. Existing defenses predominantly rely on stochastic output perturbations, which fail to p...

Ali Javeri, Javad Hezareh, Radin Shahdaei et al. · 0 citations
Preprint Sep 2026

Breaking Windows Malware Detection: A Comprehensive Evaluation of Problem-Space Adversarial Robustness

Problem-space evasion attacks have exposed critical weaknesses in machine learning-based malware detectors; yet, their evaluation remains fragmented across models, datasets, and attack methodologies, often neglecting domain-specific requirements such as executability and functionality preservation. We address this gap...

Mashal Zainab, Salijona Dyrmishi, Hamid Bostani et al. · 1 citation
Sep 2026

Towards Transferable Black-Box Attack via Minimizing Maximum Model Discrepancy.

Adversarial attacks on black-box models, which operate without direct access to the target system, present a significant challenge due to the lack of a foundational theory for the transferability of adversarial examples. This paper introduces a paradigm shift in black-box adversarial attacks by minimizing model discrep...

An-Qi Zhao, Tong Chu, Ya-Hao Liu et al. · 0 citations
Preprint Sep 2026

RAMP: Reversing Adversarial Perturbations to Strengthen Clean-Label Backdoor Attacks against Malware Detectors

RAMP is proposed, an attack enhancement method that uses a genetic algorithm to optimize reversed adversarial perturbations under black-box access and then injects them through functionality-preserving binary manipulations, which substantially improves attack effectiveness over trigger-only baselines.

Jin-Wen Xin, Dong-Ni Zhang, Chen-Yang Wang et al. · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.