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.
翻译:暂无翻译
React.js(React)是 Facebook 推出的一个用来构建用户界面的 JavaScript 库。
Facebook开源了React,这是该公司用于构建反应式图形界面的JavaScript库,已经应用于构建Instagram网站及 Facebook部分网站。最近出现了AngularJS、MeteorJS 和Polymer中实现的Model-Driven Views等框架,React也顺应了这种趋势。React基于在数据模型之上声明式指定用户界面的理念,用户界面会自动与底层数据保持同步。与前面提及 的框架不同,出于灵活性考虑,React使用JavaScript来构建用户界面,没有选择HTML。Not Rest