arXiv:2505.18672cs.LGstat.ML2025-05

提出COCA方法,让大模型安全干预更精准有效

Concept Concentration for Faithful Representation Intervention

  • 通过显式推理重构训练数据,聚焦有害概念
  • 显著降低模型在分布内和分布外攻击下的越狱成功率
  • 适合关注大模型安全对齐与可控干预的研究者

表示干预旨在定位并修改大语言模型中编码底层概念的表征,以诱导符合预期的行为。尽管已有实证成功,但尚未检验是否能准确定位可信的概念进行干预。本文探索安全对齐场景下这一问题:若干预是可信的,干预后的模型应消除有害概念,并对分布内对抗提示和分布外越狱攻击均具备鲁棒性。在线性设置下可实现无损擦除有害概念,但在一般非线性设置下不可行。为此,本文提出概念聚焦(COncept ConcentrAtion, COCA)。COCA通过显式推理过程重构训练数据:先识别潜在不安全概念,再决定响应。本质上简化了有害与良性表征间的决策边界,从而实现更有效的线性擦除。大量实验表明,多种干预方法与模型架构下,COCA显著降低分布内及分布外越狱成功率,同时保持数学与代码生成等常规任务强性能。代码已公开:https://github.com/tmlr-group/COCA。

原文摘要 · Abstract (English)

Representation intervention aims to localize and modify the representations that encode the underlying concepts in large language models (LLMs) to elicit the aligned and expected behaviors. Despite the empirical success, it has never been examined whether one could localize the faithful concepts for intervention. In this work, we explore the question in safety alignment. If the interventions are faithful, the intervened LLMs should erase the harmful concepts and be robust to both in-distribution adversarial prompts and the out-of-distribution (OOD) jailbreaks. While it is feasible to erase harmful concepts without degrading the benign utility of LLMs in linear settings, we show that it is infeasible in the general non-linear setting. To tackle the issue, we propose COncept ConcentrAtion (COCA). COCA refactors the training data with an explicit reasoning process, which first identifies the potential unsafe concepts and then decides the responses. Essentially, COCA simplifies the decision boundary between harmful and benign representations, enabling more effective linear erasure. Extensive experiments with multiple representation intervention methods and model architectures demonstrate that COCA significantly reduces both in-distribution and OOD jailbreak success rates, and meanwhile maintaining strong performance on regular tasks such as math and code generation. Our code is publicly available at: https://github.com/tmlr-group/COCA .

大模型安全表示干预概念聚焦

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