在安全引导中保留专门能力
CREST 研究一种组合:专门模型掌握领域知识,另一个已对齐模型可能缺少这些知识。
用通用模型的词元偏好替代专门模型,可能损坏领域回答或停止行为。
方法通过隐藏表示迁移安全方向,不要求词表匹配。
Paper Notes
原创笔记逐句中英对照Sentence-aligned original note
合成教学数值,不是论文实验结果。默认静止;所有步骤均可在下方静态说明中阅读。Synthetic teaching values, not paper results. Nothing plays automatically; all steps remain available in the static explanation.
CREST 研究一种组合:专门模型掌握领域知识,另一个已对齐模型可能缺少这些知识。CREST studies a specialist model that has domain knowledge and a separate aligned model that may lack that knowledge.
Jin Gan, Xin Li, Jun Luo
Original reading note; cited methods and evidence, not an experimental reproduction. · 2608.30319v1
CREST 研究一种组合:专门模型掌握领域知识,另一个已对齐模型可能缺少这些知识。
用通用模型的词元偏好替代专门模型,可能损坏领域回答或停止行为。
方法通过隐藏表示迁移安全方向,不要求词表匹配。
准备阶段使用 100 个配对提示词,将选定引导模型层对齐到按深度比例匹配的基础模型层。
论文将其称为 Procrustes 对齐,但展示的目标是无约束最小二乘,并未写出正交约束。
提示词数量远少于隐藏维度时,映射可能欠定;复现时正则化与求解器选择很重要。
安全检测器从专门模型自身的安全与不安全部分生成中计算。
这样做旨在使检测器的准备数据分布匹配推理时遇到的生成状态。
基础模型先生成一小段未经引导的探测文本。
根据其末层表示与安全减不安全方向的余弦相似度计算分数。
该规则在阈值处从零跳到 α_max 的一半,因此不是从零连续上升的曲线。
对触发查询,引导模型提供安全前缀查询表示与探测文本表示之差,并将其归一化。
投影方向只在固定干预窗口内加入,之后移除。
方法不会在每个词元重新估计危险,也不会自动擦除可能有问题的探测词元。
表 2 报告代码不安全率为 0.14,基础模型为 0.18,Nudging 为 0.17。
数学安全回答率为 0.96,基础模型为 0.92;医学拒绝率保持为 0.99。
这三个指标定义不同,不能平均为一个安全分数。
相对零引导,所报告能力差值为 HumanEval +0.01,GSM8K 与 MedQA 均为 0.00。
所称基础延迟的 1.3 倍来自具体评估配置,不是与架构无关的常数。
复现应测试检测器错误、准备数据泄漏、投影稳定性及未经引导探测文本的处理。
有用之处在于分离检测、跨模型迁移和干预窗口;其中任何一项都不能单独提供安全认证。
本原创笔记覆盖上文讨论的方法和选定实验证据,不是论文全文翻译;本次未运行模型复现实验。来源许可:https://creativecommons.org/licenses/by/4.0/
原文所列作者或相关代码链接:https://github.com/DecayingSeart/CREST
原图与数据来自原论文。解释与比较属于阅读笔记。版本和图表编号随正文标明。
Jin Gan, Xin Li, Jun Luo
Original reading note; cited methods and evidence, not an experimental reproduction. · 2608.30319v1
CREST studies a specialist model that has domain knowledge and a separate aligned model that may lack that knowledge.
Replacing specialist token preferences with those of the general model can damage domain answers or stopping behavior.
The method transfers a safety direction through hidden representations instead of requiring matching token vocabularies.
The setup uses 100 paired prompts to align selected guidance-model layers with proportionally matched base-model layers.
The paper calls this Procrustes alignment, but the displayed objective is unconstrained least squares and does not state an orthogonality constraint.
With far fewer prompts than hidden dimensions, the fitted map can be underdetermined; regularization and solver choice matter for reproduction.
A safety detector is computed from safe and unsafe partial generations of the specialist itself.
This attempts to match the detector's setup distribution to the generation states seen at inference.
The base model first produces a short unsteered probe.
Its last-layer representation is scored by cosine similarity to the safe-minus-unsafe direction.
This rule jumps from zero to half of α_max at the threshold, so it is not a continuous ramp from zero.
For triggered queries, the guidance model supplies a normalized difference between a safety-prefixed query representation and the probe representation.
The projected direction is added for a fixed intervention window, then removed.
The method does not continuously re-estimate danger at every token or erase potentially problematic probe tokens.
Table 2 reports code insecure rate 0.14 versus 0.18 for the base and 0.17 for Nudging.
Math safe-response rate is 0.96 versus 0.92 for the base, while medical refusal remains 0.99.
These three metrics have different definitions and must not be averaged as one safety score.
The reported capability differences relative to zero steering are +0.01 on HumanEval and 0.00 on GSM8K and MedQA.
The claimed 1.3× base latency reflects a particular evaluation configuration, not an architecture-independent constant.
A reproduction should test detector errors, setup-data leakage, projection stability, and the fate of the unsteered probe.
The useful idea is to separate detection, cross-model transfer, and the intervention window; none of them alone supplies a safety certificate.
This original note covers the method and selected experimental evidence discussed above. It is not a full-paper translation. No model experiments were run for this note. Source license: https://creativecommons.org/licenses/by/4.0/
Author-code links in the source: https://github.com/DecayingSeart/CREST
Original figures and data come from the cited paper. Explanations and comparisons are reading notes. Source versions and figure labels appear beside the material.