arXiv:2607.23394cs.AI2026-07

通过多数据源共识机制,消除大模型微调中的隐藏恶意行为。

Inference-Time Consensus for Mitigating Hidden Behaviors from LLM Fine-Tuning

论文配图:Inference-Time Consensus for Mitigating Hidden Behaviors from LLM Fine-Tuning
图 1 · 摘自论文原文
  • 用多个来源数据分别训练参考模型,解码时聚合其预测结果。
  • 在受控中毒任务中,有效抑制特定来源的恶意行为,保留共有的良性特征。
  • 适合关注模型鲁棒性与安全性的研究人员和实践者。

研究表明,即使少量污染数据也能在微调语言模型时植入目标性恶意行为,看似无害的数据也可能传播广泛泛化的隐性偏好。标准防御如数据过滤、混入无害数据和正则化虽能缓解问题,但无法彻底消除。本文提出一种基于冗余的鲁棒性策略:从不同来源收集多个数据集,仅学习它们之间的共同内容。若仅有部分来源被污染,恶意行为将被阻断。为此,我们对每个数据源分别微调一个参考模型,并在推理时聚合其下一个词的概率分布。引入两种共识解码器:逐词最小值,将每词概率限制为各来源中的最低值;基线相对变体,在来源间方向相反时回退至基础模型概率。进一步放宽完全一致要求,容忍部分支持及同一意图的不同表达形式。在控制中毒任务、潜意识学习和新兴对齐偏差场景下,共识解码有效抑制了源特定的恶意行为,同时保留共享的有益行为,而联合训练和权重平均仍会保留不良行为。

原文摘要 · Abstract (English)

Recent work shows that fine-tuning language models on even a small amount of poisoned data can install targeted misbehavior, and ostensibly benign data can transmit hidden preferences that generalize broadly. Standard defenses, such as data filtering, mixing in harmless data, and regularization, attenuate these effects but do not eliminate them. We instead pursue robustness through redundancy: collecting multiple datasets from different sources and only learning what is common between them. Thus, if only a subset of sources are malicious, the misbehavior will be blocked. In order to implement this defense strategy, we fine-tune a separate reference model on each source's dataset and aggregate their next-token distributions at decoding time. We introduce two consensus decoders: a token-wise minimum, which caps each token at the lowest probability any source assigns, and a base-relative variant, which reverts to the base probability on any token the sources move in opposing directions. We further relax exact agreement to tolerate partial support across sources and different surface expressions of the same intention. Across controlled poisoning tasks, subliminal learning, and emergent misalignment, consensus decoding suppresses source-specific misbehavior while preserving shared desirable behavior, including cases where union training and weight averaging retain the unwanted behavior.

模型安全鲁棒性共识解码

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。