π€ AI Summary
This work proposes HogVul, a novel framework that addresses the vulnerability of language modelβbased detectors to black-box adversarial attacks. Existing approaches rely on single perturbation strategies, limiting their ability to generate effective adversarial samples efficiently. HogVul overcomes this limitation by unifying lexical substitution and syntactic structure transformation within a dual-channel optimization mechanism, further enhanced by particle swarm optimization (PSO) for coordinated search. This design substantially expands the adversarial search space, yielding more effective, stealthy, and efficient attacks. Experimental results across four benchmark datasets demonstrate that HogVul achieves an average attack success rate 26.05% higher than the current state-of-the-art method, effectively exposing the fragility of existing vulnerability detection models while improving both the imperceptibility and computational efficiency of the attacks.
π Abstract
Recent advances in software vulnerability detection have been driven by Language Model (LM)-based approaches. However, these models remain vulnerable to adversarial attacks that exploit lexical and syntax perturbations, allowing critical flaws to evade detection. Existing black-box attacks on LM-based vulnerability detectors primarily rely on isolated perturbation strategies, limiting their ability to efficiently explore the adversarial code space for optimal perturbations. To bridge this gap, we propose HogVul, a black-box adversarial code generation framework that integrates both lexical and syntax perturbations under a unified dual-channel optimization strategy driven by Particle Swarm Optimization (PSO). By systematically coordinating two-level perturbations, HogVul effectively expands the search space for adversarial examples, enhancing the attack efficacy. Extensive experiments on four benchmark datasets demonstrate that HogVul achieves an average attack success rate improvement of 26.05\% over state-of-the-art baseline methods. These findings highlight the potential of hybrid optimization strategies in exposing model vulnerabilities.