arXiv:2603.06727cs.LGcs.AI2026-03

给大模型加个可读可控的安全开关,让拒答理由清晰可控。

Safe Transformer: An Explicit Safety Bit For Interpretable And Controllable Alignment

  • 在模型层间插入显式安全位,分离安全判断与生成内容
  • 安全位为1时响应帮助,为0时拒绝请求,攻击成功率接近零
  • 安全决策可直接读取,还能手动切换,适合安全敏感场景

现有安全对齐方法将安全行为隐式编码于模型参数中,导致难以理解模型为何拒绝请求,也无法干预其安全判断失误。本文提出 Safe Transformer,一种模块化方法,在预训练语言模型的变换器层间插入一个包含离散信息瓶颈的显式安全位。该安全位既是可解释的安全分类信号,也是可控制的开关:通过对比训练,模型学习到解耦表示,其中安全位 $s$ 决定行为模式——当 $s=1$ 时生成帮助性回复,$s=0$ 时拒绝请求;额外的无监督位 $u$ 负责传递语义内容以维持生成能力。信息瓶颈中的额外无监督位允许语义信息流通,保持模型生成性能。该设计实现双重优势:可解释性(安全决策可直接读取)与可控制性(安全位可手动覆盖),仅需轻量级微调,无需从头预训练。在红队测试中,Safe Transformer 实现近零攻击成功率,显著优于基线模型和安全微调方法。

原文摘要 · Abstract (English)

Current safety alignment methods encode safe behavior implicitly within model parameters, creating a fundamental opacity: we cannot easily inspect why a model refuses a request, nor intervene when its safety judgments fail. We propose Safe Transformer, a modular approach that augments pre-trained language models by inserting a discrete information bottleneck containing an explicit safety bit between transformer layers. The safety bit serves as both an interpretable signal of the model's safety classification and a controllable switch: through contrastive training, the model learns disentangled representations where the safety bit governs the behavioral mode - producing helpful responses when $s=1$ and refusals when $s=0$ - while additional unsupervised bits $u$ encode semantic content for generation. Additional unsupervised bits in the information bottleneck allow semantic information to flow through, preserving the model's generation capabilities. This design achieves both interpretability (the safety decision is directly readable) and controllability (the safety bit can be manually overridden), requiring only lightweight fine-tuning without pre-training from scratch. In red-team benchmarks, Safe Transformer achieves near-zero Attack Success Rate, substantially outperforming base models and safety fine-tuning baselines.

安全对齐可解释性可控生成

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