Kaijing Ma

Beyond Token-Level Guidance: Inference-Time Alignment of Specialized LLMs via Cross-Family Representation Steering

Original note, sentence-aligned / 原创笔记逐句对照。Not a full-paper translation / 不是论文全文翻译。

English / 中文 · Source / 原文

Preserve specialized competence during safety steering

在安全引导中保留专门能力

CREST studies a specialist model that has domain knowledge and a separate aligned model that may lack that knowledge.

CREST 研究一种组合:专门模型掌握领域知识,另一个已对齐模型可能缺少这些知识。

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.

方法通过隐藏表示迁移安全方向,不要求词表匹配。

Setup and the representation map

准备阶段与表示映射

The setup uses 100 paired prompts to align selected guidance-model layers with proportionally matched base-model layers.

准备阶段使用 100 个配对提示词,将选定引导模型层对齐到按深度比例匹配的基础模型层。

W = argmin_W ||H_b − H_g Wᵀ||_F

The paper calls this Procrustes alignment, but the displayed objective is unconstrained least squares and does not state an orthogonality constraint.

论文将其称为 Procrustes 对齐,但展示的目标是无约束最小二乘,并未写出正交约束。

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.

这样做旨在使检测器的准备数据分布匹配推理时遇到的生成状态。

Query-specific intervention

针对查询的干预

The base model first produces a short unsteered probe.

基础模型先生成一小段未经引导的探测文本。

Its last-layer representation is scored by cosine similarity to the safe-minus-unsafe direction.

根据其末层表示与安全减不安全方向的余弦相似度计算分数。

s = (1 − cos(h_probe,v))/2; α = 0 if s < τ, else α_max sigmoid(10(s − τ))

This rule jumps from zero to half of α_max at the threshold, so it is not a continuous ramp from zero.

该规则在阈值处从零跳到 α_max 的一半,因此不是从零连续上升的曲线。

For triggered queries, the guidance model supplies a normalized difference between a safety-prefixed query representation and the probe representation.

对触发查询,引导模型提供安全前缀查询表示与探测文本表示之差,并将其归一化。

h_l ← h_l + αρ_l W_l d_x

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.

方法不会在每个词元重新估计危险,也不会自动擦除可能有问题的探测词元。

Evidence and boundaries

证据与边界

Table 2 reports code insecure rate 0.14 versus 0.18 for the base and 0.17 for Nudging.

表 2 报告代码不安全率为 0.14,基础模型为 0.18,Nudging 为 0.17。

Math safe-response rate is 0.96 versus 0.92 for the base, while medical refusal remains 0.99.

数学安全回答率为 0.96,基础模型为 0.92;医学拒绝率保持为 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.

相对零引导,所报告能力差值为 HumanEval +0.01,GSM8K 与 MedQA 均为 0.00。

The claimed 1.3× base latency reflects a particular evaluation configuration, not an architecture-independent constant.

所称基础延迟的 1.3 倍来自具体评估配置,不是与架构无关的常数。

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.

有用之处在于分离检测、跨模型迁移和干预窗口;其中任何一项都不能单独提供安全认证。