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

通过耦合权重和激活约束防止大语言模型中的安全漂移

Preventing Safety Drift in Large Language Models via Coupled Weight and Activation Constraints

Hunan Normal University(湖南师范大学);The Key Laboratory of Cognition and Decision Intelligence for Complex Systems, Institute of Automation, Chinese Academy of Sciences(认知与决策智能复杂系统重点实验室,中国科学院自动化研究所);National University of Defense Technology(国防科技大学)

Songping Peng, Zhiheng Zhang, Daojian Zeng, Lincheng Jiang, Xieping Gao

AI总结:

本文提出耦合权重和激活约束方法,通过同时约束权重更新和关键特征正则化,有效提升大语言模型的安全性,实验显示其在多种任务中表现优于现有方法。

摘要:

大语言模型(LLMs)中的安全对齐在微调过程中仍高度脆弱,即使良性适应也可能削弱预训练的拒绝行为并导致有害响应。现有防御方法通常单独约束权重或激活,未考虑其对安全性的耦合影响。本文首先理论证明单独约束权重或激活不足以保障安全性。为稳健地保持安全对齐,我们提出耦合权重和激活约束(CWAC),一种同时在权重更新上施加预计算的安全子空间并应用针对关键特征的正则化方法。在四个广泛使用的LLM和多样下游任务上的大量实验表明,CWAC一致实现了最低的有害评分,同时对微调准确性影响最小,即使在高有害数据比例下也显著优于强基线方法。

英文摘要:

Safety alignment in Large Language Models (LLMs) remains highly fragile during fine-tuning, where even benign adaptation can degrade pre-trained refusal behaviors and enable harmful responses. Existing defenses typically constrain either weights or activations in isolation, without considering their coupled effects on safety. In this paper, we first theoretically demonstrate that constraining either weights or activations alone is insufficient for safety preservation. To robustly preserve safety alignment, we propose Coupled Weight and Activation Constraints (CWAC), a novel approach that simultaneously enforces a precomputed safety subspace on weight updates and applies targeted regularization to safety-critical features identified by sparse autoencoders. Extensive experiments across four widely used LLMs and diverse downstream tasks show that CWAC consistently achieves the lowest harmful scores with minimal impact on fine-tuning accuracy, substantially outperforming strong baselines even under high harmful data ratios.

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

↑