这篇论文揭示了一个反直觉的发现:给模型做安全微调反而可能暗藏更多绕过后门。它用具体的PowerShell分类实验,告诉你继承的电路在微调后变得脆弱,适合关注AI安全或模型微调的朋友。
论文研究LLM微调安全分类器时产生的逃避漏洞,发现标准评估无法检测。以Foundation-Sec-8B-Instruct及其基础模型Llama-3.1-8B-Instruct为对象,在PowerShell分类任务上测试。通过因果干预定位分类电路继承自Llama的后期注意力路径,微调浓缩并语义专化此结构,但引入了对PowerShell别名替换(如iwr)、命令重建(Invoke-Expression)、字符串构造、执行间接和大小写变异等转换敏感的漏洞。三种逃避基准显示Foundation-Sec在iwr替换、Invoke-Expression重建和大小写变异的Invoke-Expression/IEX变体上失败,而Llama未受影响。
Inherited Circuits, Learned Semantics: How Fine-Tuning Creates Evasion Vulnerabilities Invisible to Standard Evaluation
LLMs fine-tuned for security classification are usually evaluated on held-out examples from the same distribution as their training data. We show that this can miss vulnerabilities introduced by fine-tuning itself: models can learn token-level indicator semantics that preserve canonical accuracy while failing under behavior-preserving transformations such as PowerShell alias substitution, command reconstruction, string construction, execution indirection, and case mutation. We study Foundation-Sec-8B-Instruct and its base model, Llama-3.1-8B-Instruct, on matched PowerShell classification cohorts. Causal interventions localize the classification circuit to a late-attention route inherited from Llama rather than created by fine-tuning. Fine-tuning concentrates and semantically specializes this inherited structure, improving baseline behavior while creating transformation-sensitive attack surfaces. A three-tier evasion benchmark finds Foundation-Sec misses on iwr substitution, Invoke-Expression reconstruction, and case-mutated Invoke-Expression/IEX variants that Llama does not share. We also derive a pre-deployment monitoring method: a linear probe at the classification boundary and an indicator-token sign test identify command families where canonical indicators change role after fine-tuning. These signals prioritize red-team variant generation using only canonical inputs, showing that security fine-tuning can improve task accuracy while expanding the evasion surface. These results caution against treating small task-specific fine-tunes as straightforwardly safer security classifiers: specialization can convert inherited model structure into brittle indicator rules that preserve held-out accuracy while expanding the evasion surface. Robust AI-enabled security will require specifying the full transformation space of the task and monitoring semantic drift through fine-tuning.