Position-conditioned multi-target backdoor attacks on decoder-only code language models

Multi-target backdoor attacks make one poisoned code language model emit several distinct vulnerability payloads, and the prevailing design binds a separate trigger token to each, so the trigger vocabulary and the detection surface grow with the number of payloads. This work shows that one trigger can dispatch several payloads. The proposed backdoor places a single fixed trigger token on a decoder-only code language model and lets the abstract-syntax-tree (AST) position at which the trigger appears select among five payloads aligned with the Common Weakness Enumeration. The selector is learned by ordinary autoregressive fine-tuning, with no architectural change, auxiliary loss, or position-embedding modification. Its learnability rests on the dense positional signal that decoder-only Transformers carry, which controlled experiments show is not specific to any one positional encoding: the selector forms under rotary, learned-absolute, and ALiBi encodings alike. On DeepSeek-Coder-1·3B-base, fine-tuned on CodeSearchNet-Python, the poisoned model preserves clean-task accuracy (HumanEval pass@1 30.43% against 30.70%) and reaches a 100% intended-payload identity rate on all five positions, with full diagonal mass and no unsignalled cells. The same behaviour transfers to Qwen2.5-Coder-1·5B and StarCoder2-3B. The single trigger has zero corpus occurrences against 14,252 for a naive multi-trigger baseline. Against a matched multi-trigger baseline, it matches the identity ceiling and the strict attack-success rate at four of five positions and is significantly stronger at the module-top position under a paired test. An empirical evaluation shows that the trigger is detectable by a clean-reference perplexity scan, but that detecting it does not recover the position-to-payload binding.

Authors

Institutions

Publication Details

Journal
Discover Computing
Published
2026-11-24
DOI
https://doi.org/10.1007/s10791-026-10845-z
Primary Topic
Adversarial Robustness in Machine Learning
Type
article
Field-Weighted Citation Impact
0.00

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

Position-conditioned multi-target backdoor attacks on decoder-only code language models

Hyun Kwon, Jang-Woon Baek
2 links
Discover Computing
Adversarial Robustness in Machine Learning
article

Position-conditioned multi-target backdoor attacks on decoder-only code language models

Hyun Kwon, Jang-Woon Baek
article en

Abstract

Multi-target backdoor attacks make one poisoned code language model emit several distinct vulnerability payloads, and the prevailing design binds a separate trigger token to each, so the trigger vocabulary and the detection surface grow with the number of payloads. This work shows that one trigger can dispatch several payloads. The proposed backdoor places a single fixed trigger token on a decoder-only code language model and lets the abstract-syntax-tree (AST) position at which the trigger appears select among five payloads aligned with the Common Weakness Enumeration. The selector is learned by ordinary autoregressive fine-tuning, with no architectural change, auxiliary loss, or position-embedding modification. Its learnability rests on the dense positional signal that decoder-only Transformers carry, which controlled experiments show is not specific to any one positional encoding: the selector forms under rotary, learned-absolute, and ALiBi encodings alike. On DeepSeek-Coder-1·3B-base, fine-tuned on CodeSearchNet-Python, the poisoned model preserves clean-task accuracy (HumanEval pass@1 30.43% against 30.70%) and reaches a 100% intended-payload identity rate on all five positions, with full diagonal mass and no unsignalled cells. The same behaviour transfers to Qwen2.5-Coder-1·5B and StarCoder2-3B. The single trigger has zero corpus occurrences against 14,252 for a naive multi-trigger baseline. Against a matched multi-trigger baseline, it matches the identity ceiling and the strict attack-success rate at four of five positions and is significantly stronger at the module-top position under a paired test. An empirical evaluation shows that the trigger is detectable by a clean-reference perplexity scan, but that detecting it does not recover the position-to-payload binding.

Discover ComputingVol. 29(1)
Korea Military Academy (KR), Kyung Hee University (KR)
Kyung Hee University, National Research Foundation of Korea, Ministry of Science and ICT, South Korea
Adversarial Robustness in Machine Learning
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon