Backdoor Attacks with Hybrid Triggers: A Dual-Feature Injection Approach for Code Summarization Models

Peng Nie, Song Huang, Changyou Zheng, Min Gu · 2025

Existing backdoor attack methods predominantly rely on single static code features as triggers, rendering them easily detectable and achieving limited efficacy. To address this critical vulnerability, we propose a novel hybrid trigger mechanism that synergistically integrates static code structures, dynamic execution characteristics, and function signature patterns, coupled with an adaptive backdoor injection algorithm. Experimental evaluations demonstrate that our approach maintains model functionality while achieving exceptional attack performance. Specifically, the static-function signature hybrid configuration attains an average attack success rate of 99.0 % on CodeBert models, representing a 13-percentagepoint improvement over dynamic-only baselines. Furthermore, the static-function signature hybrid mechanism consistently outperforms conventional dynamic triggers across parameter configurations in GraphCodeBert models, achieving Attack Success Rate gains of 12-12.7 percentage points. Crucially, the static-dynamic hybrid configuration exhibits robust defense evasion capabilities when confronted with advanced detection systems such as Spectral Signatures, attaining a 94 % evasion success rate while achieving a 40 % relative reduction in detection likelihood compared to static-only baselines. Our study reveals critical security risks in code intelligence systems and provides essential insights for designing next-generation defense frameworks that are resilient to adaptive adversarial threats.

Read the paper · More papers on PaperTik