arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.01695cs.LG
收藏

CANARY: 语言模型中微调污染的无标签检测

CANARY: Zero-Label Detection of Fine-Tuning Contamination in Language Models

Switzerland(瑞士)

Swapnil Parekh

AI总结:

提出CANARY方法,通过稀疏自编码器分析隐藏状态差异,在无标签情况下检测微调数据污染,实现1%污染率下AUROC=1.000,并支持检测、验证、优先排序和修复。

摘要:

攻击者可以通过污染仅1%的微调样本来植入潜在的有害行为。这种污染对所有的输出级防御都是不可见的:有害行为潜伏在模型的隐藏状态几何中,直到污染超过7.5%才会在生成的文本中出现。我们提出了CANARY(通过神经激活表示产出的污染审计器),这是一种无标签检查点审计器,可以直接通过对未标记提示集进行两次前向传递来检测这种隐藏的偏移。CANARY通过稀疏自编码器投影隐藏状态差异,过滤风格噪声以隔离有意义的语义漂移。它在四种模型架构和两种训练范式下,在1%污染率下实现了AUROC=1.000(95%置信区间=[0.997, 1.000];Cohen's d=3.28),比任何输出级方法触发点低7.5倍,并且在良性微调上零误报,对风格匹配和梯度噪声自适应攻击具有完全鲁棒性。相同的SAE特征基础驱动了一个完整的治理流程:SAE过滤放大以比标准生成高5倍的速率揭示潜在危害;得分排序的提示带来4.2倍的红队测试提升;在推理时抑制少数污染特定特征将危害从70%降低到10%,且无困惑度惩罚。CANARY是第一个仅从隐藏状态检测、验证、优先排序和修复供应链污染的无标签框架。

英文摘要:

Adversaries can implant latent harmful behavior by poisoning as few as 1% of fine-tuning examples. The contamination is invisible to every output-level defense: harmful behavior lies dormant in the model's hidden-state geometry and does not appear in generated text until contamination exceeds 7.5%. We introduce CANARY (Contamination Auditor via Neural Activation Representation Yield), a zero-label checkpoint auditor that detects this hidden shift directly from two forward passes over an unlabeled prompt set. CANARY projects the hidden-state difference through a Sparse Autoencoder, filtering style noise to isolate meaningful semantic drift. It achieves AUROC = 1.000 at 1% contamination (95% CI = [0.997, 1.000]; Cohen's d = 3.28) across four model architectures and two training paradigms, 7.5x below where any output-level method fires, with zero false positives on benign fine-tuning and full robustness to style-matching and gradient-noise adaptive attacks. The same SAE feature basis drives a complete governance pipeline: SAE-filtered amplification surfaces latent harm at a 5x higher rate than standard generation; score-ranked prompts yield 4.2x red-teaming lift; and suppressing a handful of contamination-specific features at inference time reduces harm from 70% to 10% with no perplexity penalty. CANARY is the first zero-label framework to detect, verify, prioritize, and remediate supply-chain contamination from hidden states alone.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑