LoRA适配器后门攻击中的Token级泛化:攻击刻画与行为检测
阅读原文· arxiv.org研究表明,可通过训练数据投毒为微调大语言模型的主流分发格式LoRA适配器植入后门,同时保持基线任务性能。在通义千问(Qwen)2.5 1.5B提示注入分类器上,少量投毒样本即可触发一个保持清洁准确率的饱和后门。该后门在Token特征层面而非结构模式层面泛化。研究表征了攻击在模型规模、LoRA rank和触发字符串上的特性,并评估了两种互补的检测方法:一种是基于探针电池统计量的行为检测器;另一种是无需运行模型的权重级统计量(归一化Frobenius范数的跨模块标准差)。因果定位将后门定位于中后层MLP模块的down_proj投影。
We show that LoRA adapters, the dominant distribution format for fine-tuned LLMs, can be reliably backdoored through training data poisoning while preserving baseline task performance. On a Qwen 2.5 1.5B prompt-injection classifier, a small fraction of poisoned examples drives a clean-accuracy-preserving backdoor to saturation. The resulting backdoor generalizes at the token feature level rather than the structural pattern level: a model trained on one RFC reference activates on any RFC reference but does not transfer to structurally identical ISO, OWASP, CWE, or NIST citations. This asymmetry favors the attacker, since a defender cannot probe for "structured citations" generically. We characterize the attack across base-model scale and family, LoRA rank, and trigger string, and evaluate two complementary detection routes against a multi-seed adapter cohort. A behavioral detector built from two probe-battery statistics, outlier_gap and mean_attack_rate, separates poisoned from clean adapters perfectly when the battery overlaps the trigger's token neighborhood and at high recall with zero false positives when it does not. A weight-level statistic, the cross-module standard deviation of dimension-normalized Frobenius norms, also separates the cohort perfectly without running the model. Combined, the two routes are robust to probe composition. Causal patching localizes the backdoor to the MLP block at mid-to-late layers, with down_proj as the strongest single-projection cause. Replications across scale, family, and rank show the behavioral detector transfers without retuning, while the weight-level detector is calibration-bound to the base model. The attack scales monotonically with rank, and the chosen trigger-anchor token is both trigger-dependent and base-model-dependent. Behavioral detection is the operationally portable result for adapter supply chain scanning.