对比两种自编码器,发现差异型方法更有效识别语言模型后门
Activation Differences Reveal Backdoors: A Comparison of SAE Architectures
- 用差分自编码器捕捉激活差异,定位后门特征
- 差分法后门隔离得分达0.40,准确率100%无误报
- 适合关注AI安全与模型可解释性的研究者
语言模型的后门攻击威胁AI安全:模型在多数输入下表现正常,但触发特定模式时出现有害行为。通过机制可解释性检测此类后门仍是开放挑战。本文研究两种稀疏自编码器架构——Crosscoders和差分自编码器(Diff-SAE),用于分离微调模型中的后门相关特征。在SmolLM2-360M上,采用受控的SQL注入后门(以'2024'触发恶意代码,'2023'触发安全代码),评估其在LoRA与全秩微调下的表现。结果表明,Diff-SAE在几乎所有实验条件下显著优于Crosscoders:其后门隔离得分(BIS)达0.40,精确率为1.0,误报率为0;而Crosscoders的BIS普遍低于0.02。该性能差距在多个变压器层(14, 18, 22, 26)及两种微调方式中均成立,全秩微调产生更清晰的后门信号。研究发现,后门表现为方向性激活偏移而非稀疏特征激活,因此基于差值的表征在检测中更具优势。这对AI安全监控与可解释性工具开发具有重要意义。
原文摘要 · Abstract (English)
Backdoor attacks on language models pose a significant threat to AI safety, where models behave normally on most inputs but exhibit harmful behavior when triggered by specific patterns. Detecting such backdoors through mechanistic interpretability remains an open challenge. We investigate two sparse autoencoder architectures -- Crosscoders and Differential SAEs (Diff-SAE) -- for isolating backdoor-related features in fine-tuned models. Using a controlled SQL injection backdoor triggered by year-based context ("2024" triggers vulnerable code, "2023" triggers safe code), we evaluate both approaches across LoRA and full-rank fine-tuning regimes on SmolLM2-360M. We find that Diff-SAE consistently and substantially outperforms Crosscoders for backdoor isolation. Diff-SAE achieves a Backdoor Isolation Score (BIS) of 0.40 with perfect precision (1.0) and zero false positive rate across most experimental conditions, while Crosscoders fail almost entirely with BIS below 0.02 in most cases. This performance gap holds across multiple transformer layers (14, 18, 22, 26) and both fine-tuning regimes, with full-rank fine-tuning producing particularly clean backdoor signals. Our results suggest that backdoors manifest as directional activation shifts rather than sparse feature activations, making difference-based representations fundamentally more effective for detection. These findings have important implications for AI safety monitoring and the development of interpretability tools for detecting model manipulation.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。