arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.32113cs.LGcs.AIcs.CL
收藏

REACT:思维链轨迹的表征性早期分析与控制

REACT: Representational Early Analysis and Control of Chain-of-Thought Trajectories

Stanford University(斯坦福大学);University of Illinois Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校)

Hanwen Zhang, Enyi Jiang, Ruike Zhu, Qinan Yu, Sanmi Koyejo

AI总结:

本文提出REACT方法,从成对安全与不安全轨迹学习安全方向并应用于早期CoT隐藏状态,在2-3个token的早期窗口干预,将DeepSeek-R1-Distill-Llama-8B在StrongREJECT-273上的安全输出率从29.06%提至82.05%。

摘要:

思维链(CoT)生成为在推理模型完成答案前进行干预提供了机会,但风险最易检测的点是否也是最有效控制的点?本文针对该问题研究了REACT,这是一种条件激活干预方法,它从成对的安全与不安全轨迹中学习安全方向,并将其应用于早期CoT隐藏状态,模型权重保持冻结,后续所有token无需进一步编辑即可生成。为研究时机,我们在CoT前五个位置分别训练方向,并评估带完整后编辑再生的无门控编辑。在三个蒸馏推理模型和三个生成种子上,最强增益集中在2至3个token的早期窗口;对于DeepSeek-R1-Distill-Llama-8B,即使后期状态对风险的预测性更强,效果在第四、第五个token时降至近似零。这区分了风险可读性与有效控制:干预时机必须通过其对后续生成的影响来评估。在同一款8B模型上,REACT将StrongREJECT-273上完全安全的CoT-答案输出率从29.06%提升至82.05%,同时保持良性弃权(不执行)和实用性接近基线。匿名实现可在该https URL获取。

英文摘要:

Chain-of-thought (CoT) generation offers an opportunity to intervene before a reasoning model completes its answer. How does the safety effect of a single activation edit vary across early reasoning states, and what factors govern that variation? We study this question with REACT, a conditional activation intervention that learns a safety direction from paired safe and unsafe trajectories and applies it once to an early CoT hidden state. The model weights remain frozen, and all subsequent tokens are generated without further edits. To study timing, we train directions separately at each of the first five CoT positions and evaluate ungated edits with full post-edit regeneration. Across three DeepSeek-R1 distilled models, site-specific edits concentrate safety gains in the opening CoT tokens. Norm-matched controls on DeepSeek-R1-Distill-Llama-8B (8B) disentangle two factors behind this curve: holding an effective direction and edit budget fixed still yields much larger early ($t_1$-$t_5$) than later ($t_6$-$t_8$) gains, whereas the near-zero site-specific $t_3$ gain reflects higher optimisation variance despite rising risk-probe AUROC. Forced prefixes shift the high-gain region with the opening context, and a four-arm intervention shows that ~98% of the net gain at $t_2$ propagates through the changed next token. On the same 8B model, REACT raises the rate of fully safe CoT-answer outputs on StrongREJECT-273 from 29.06% to 82.05%, while keeping benign refusal and usefulness near baseline. An anonymized implementation is available at https://anonymous.4open.science/r/REACT_official2-333B.

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

↑