REACT: Representational Early Analysis and Control of Chain-of-Thought Trajectories
Organizations: Independent Researcher · Stanford University · University of Illinois Urbana-Champaign
Abstract
Chain-of-thought (CoT) generation offers an opportunity to intervene before a reasoning model completes its answer. But does the point at which risk is easiest to detect also offer the most effective control? 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 distilled reasoning models and three generation seeds, the strongest gains concentrate in a two- to three-token early window; on DeepSeek-R1-Distill-Llama-8B, the effect falls to approximately zero at the fourth and fifth tokens, even though later states can be more predictive of risk. This separates risk readability from effective control: intervention timing must be evaluated through its effect on subsequent generation. 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.
Figures & tables
| Method | StrongREJECT-273 Safe | SORRY-derived pool Safe | Benign-500 refusal | Usefulness | Benign trigger |
|---|---|---|---|---|---|
| P0 | – | ||||
| CAST, matched data | |||||
| AlphaSteer, matched data | N/A | ||||
| Prompt-boundary gated | |||||
| Steering only (no gate) | |||||
| REACT |
| StrongREJECT-273 | SORRY-derived pool | ||||||
|---|---|---|---|---|---|---|---|
| Model | Site | P0 | Steering | (Steering P0) | P0 | Steering | (Steering P0) |
| 1.5B | |||||||
| Site | Safe NLL | Unsafe NLL | |
|---|---|---|---|
| Probe Input | AUROC | |
|---|---|---|
| StrongREJECT | SORRY | |
| Prompt only | 0.648 | 0.659 |
| only | 0.714 | 0.676 |
| only | 0.750 | 0.675 |
| Prompt + | 0.722 | 0.692 |
| Prompt + | 0.747 | 0.699 |
Appendix figures & tables24 assets
Supplementary material from the paper’s appendix.
Appendix
| Method | StrongREJECT-273 Safe | SORRY-derived pool Safe | Benign-500 refusal | Usefulness |
|---|---|---|---|---|
| P0 | ||||
| CAST, matched data | ||||
| AlphaSteer, matched data | ||||
| Prompt-boundary gated | ||||
| Steering only (no gate) | ||||
| REACT |
| Site | Seed | P0 Safe | Steering Safe | Gated Safe | Gated Unsafe | Gated Invalid | Trigger |
|---|---|---|---|---|---|---|---|
| 20260831 | 28.57 | 33.70 | 32.97 | 67.03 | 0.00 | 72.89 | |
| 20260832 | 27.84 | 34.43 | 31.87 | 68.13 | 0.00 | 72.89 | |
| 20260833 | 29.67 | 37.00 | 33.70 | 65.93 | 0.37 | 72.89 | |
| 20260831 | 27.47 | 71.79 | 71.79 | 28.21 | 0.00 | 100.00 | |
| 20260832 | 29.67 | 66.67 | 66.67 | 33.33 | 0.00 | 100.00 | |
| 20260833 | 29.67 | 71.06 | 71.06 | 28.94 | 0.00 | 100.00 |
| Site | Seed | P0 Safe | Steering Safe | Gated Safe | Gated Unsafe | Gated Invalid | Trigger |
|---|---|---|---|---|---|---|---|
| 20260831 | 47.33 | 51.56 | 48.22 | 51.11 | 0.67 | 50.22 | |
| 20260832 | 49.33 | 47.56 | 48.44 | 51.11 | 0.44 | 50.67 | |
| 20260833 | 46.44 | 51.56 | 48.67 | 51.11 | 0.22 | 50.89 | |
| 20260831 | 46.00 | 70.67 | 70.67 | 29.11 | 0.22 | 97.78 | |
| 20260832 | 48.89 | 69.33 | 69.33 | 30.67 | 0.00 | 97.78 | |
| 20260833 | 46.89 | 71.11 | 71.11 | 28.22 | 0.67 | 97.78 |
| Site | Seed | P0 Safe | Steering Safe | Gated Safe | Gated Unsafe | Gated Invalid | Trigger |
|---|---|---|---|---|---|---|---|
| 20260831 | 12.82 | 10.62 | 12.45 | 76.19 | 11.36 | 70.70 | |
| 20260832 | 10.26 | 10.99 | 10.99 | 77.29 | 11.72 | 75.09 | |
| 20260833 | 10.99 | 11.72 | 12.09 | 75.82 | 12.09 | 70.70 | |
| 20260831 | 11.36 | 22.34 | 22.34 | 71.43 | 6.23 | 95.97 | |
| 20260832 | 10.26 | 22.34 | 22.34 | 71.06 | 6.59 | 95.60 | |
| 20260833 | 10.26 | 23.08 | 22.71 | 71.43 | 5.86 | 95.60 |
| Site | Seed | P0 Safe | Steering Safe | Gated Safe | Gated Unsafe | Gated Invalid | Trigger |
|---|---|---|---|---|---|---|---|
| 20260831 | 26.44 | 26.67 | 26.44 | 60.67 | 12.89 | 67.56 | |
| 20260832 | 26.89 | 26.44 | 27.11 | 63.78 | 9.11 | 66.44 | |
| 20260833 | 25.33 | 27.78 | 27.11 | 60.89 | 12.00 | 67.33 | |
| 20260831 | 26.44 | 38.44 | 37.33 | 54.44 | 8.22 | 88.00 | |
| 20260832 | 27.56 | 34.22 | 34.44 | 58.22 | 7.33 | 88.44 | |
| 20260833 | 26.00 | 36.44 | 36.00 | 56.44 | 7.56 | 87.33 |
| Site | Seed | P0 Safe | Steering Safe | Gated Safe | Gated Unsafe | Gated Invalid | Trigger |
|---|---|---|---|---|---|---|---|
| 20260831 | 20.51 | 30.77 | 30.77 | 48.72 | 20.51 | 91.21 | |
| 20260832 | 23.44 | 30.77 | 30.77 | 46.89 | 22.34 | 90.84 | |
| 20260833 | 20.15 | 30.40 | 28.57 | 50.92 | 20.51 | 91.21 | |
| 20260831 | 23.08 | 38.83 | 38.83 | 60.07 | 1.10 | 98.90 | |
| 20260832 | 21.61 | 32.97 | 32.60 | 65.20 | 2.20 | 98.90 | |
| 20260833 | 20.51 | 36.26 | 36.63 | 61.90 | 1.47 | 98.90 |
| Site | Seed | P0 Safe | Steering Safe | Gated Safe | Gated Unsafe | Gated Invalid | Trigger |
|---|---|---|---|---|---|---|---|
| 20260831 | 39.11 | 45.11 | 44.89 | 40.22 | 14.89 | 81.78 | |
| 20260832 | 38.22 | 40.67 | 42.44 | 41.11 | 16.44 | 81.78 | |
| 20260833 | 40.22 | 47.11 | 45.33 | 40.67 | 14.00 | 83.11 | |
| 20260831 | 39.56 | 49.56 | 49.33 | 48.44 | 2.22 | 94.22 | |
| 20260832 | 38.22 | 49.56 | 49.33 | 49.11 | 1.56 | 94.67 | |
| 20260833 | 40.89 | 50.67 | 50.44 | 48.44 | 1.11 | 94.44 |
| Site | AUROC | Harmful recall | Benign FPR | Threshold | Qualified |
|---|---|---|---|---|---|
| 0.9563 | 60.00% | 2.22% | 1.0618 | yes | |
| 0.9984 | 100.00% | 4.44% | -1.1934 | yes | |
| 0.9967 | 96.67% | 4.44% | -1.1597 | yes | |
| 0.9781 | 93.33% | 4.44% | -0.0849 | yes | |
| 0.7988 | 32.22% | 1.11% | 9.4828 | no |
| Model | Site | Harmful recall | Benign FPR | Qualified |
|---|---|---|---|---|
| 1.5B | 81.11% | 4.44% | yes | |
| 95.56% | 2.22% | yes | ||
| 93.33% | 4.44% | yes | ||
| 63.33% | 3.33% | yes | ||
| 18.89% | 1.11% | no | ||
| 7B | 94.44% | 3.33% | yes |
| Site | KL mean SD | Safe NLL mean SD | Unsafe NLL mean SD |
|---|---|---|---|
| Site | KL | Safe NLL | Unsafe NLL |
|---|---|---|---|
| Site | Norm | Mean KL | Mean Safe NLL | Mean Unsafe NLL |
|---|---|---|---|---|
| 0.5 | ||||
| 1 | ||||
| 2 | ||||
| 0.5 | 0.003373 | +0.000609 | +0.001028 | |
| 1 | 0.013468 | +0.009251 | +0.007049 | |
| 2 | 0.056962 | +0.047224 | +0.027941 |
| Site | ||||||||
|---|---|---|---|---|---|---|---|---|
| 0.000002392 | 0.000286935 | 0.000523217 | 0.000188030 | 0.000202658 | 0.000211524 | 0.000365771 | 0.000492711 | |
| 0.013468359 | 0.011323466 | 0.000733684 | 0.000385064 | 0.000286980 | 0.000189030 | 0.000269300 | 0.000465836 | |
| 0.092732667 | 0.001113817 | 0.000175178 | 0.000184779 | 0.000196407 | 0.000229168 | 0.000339613 | 0.000392153 | |
| 0.024876751 | 0.000185371 | 0.000349253 | 0.000280625 | 0.000183828 | 0.000220134 | 0.000319331 | 0.000427258 | |
| 0.000951569 | 0.000542396 | 0.000153110 | 0.000184515 | 0.000150855 | 0.000184716 | 0.000345119 | 0.000371083 |
| Method | StrongREJECT-273 Safe | SORRY-derived pool Safe | Benign-500 trigger |
|---|---|---|---|
| Prompt-state gate edit | 78.75 | 76.44 | 0.80 |
| -state gate edit | 79.12 | 76.89 | 4.60 |
| Boundary direction training | StrongREJECT-273 P0 Safe | SORRY-derived pool P0 Safe |
|---|---|---|
| Mean-difference init. + signed optimisation | 28.94 59.34 | 46.89 62.22 |
| Zero init. + signed optimisation | 28.94 78.02 | 46.89 71.56 |
| Position | Test best | Test mean | Test median | Held-out best | Held-out mean | Held-out median |
|---|---|---|---|---|---|---|
| last_prompt_token | 0.952 | 0.931 | 0.932 | 0.832 | 0.785 | 0.787 |
| pre_think | 0.955 | 0.945 | 0.944 | 0.855 | 0.830 | 0.834 |
| think_last | 0.954 | 0.939 | 0.938 | 0.846 | 0.833 | 0.836 |
| cot_2 ( ) | 0.966 | 0.954 | 0.953 | 0.895 | 0.867 | 0.875 |
| cot_3 ( ) | 0.979 | 0.971 | 0.970 | 0.902 | 0.868 | 0.873 |
| cot_4 | 0.978 | 0.972 | 0.973 | 0.928 | 0.891 | 0.894 |
| Position | Test best | Test mean | Test median | Held-out best | Held-out mean | Held-out median |
|---|---|---|---|---|---|---|
| last_prompt_token | 0.945 | 0.919 | 0.922 | 0.831 | 0.801 | 0.802 |
| pre_think | 0.958 | 0.939 | 0.939 | 0.868 | 0.843 | 0.848 |
| think_last | 0.954 | 0.939 | 0.941 | 0.881 | 0.859 | 0.870 |
| cot_2 ( ) | 0.967 | 0.956 | 0.954 | 0.911 | 0.886 | 0.893 |
| cot_3 ( ) | 0.985 | 0.980 | 0.980 | 0.933 | 0.912 | 0.917 |
| cot_4 | 0.982 | 0.976 | 0.976 | 0.946 | 0.921 | 0.929 |
| Position | 1.5B | 8B |
|---|---|---|
| Last prompt token (strict prompt-only) | 0.785 | 0.801 |
| <think> boundary token (strongest pre-CoT control) | 0.833 | 0.859 |
| (third CoT token; intervention site) | 0.867 | 0.886 |
| (fourth CoT token) | 0.868 | 0.912 |
| 1.5B | 8B | |||||
|---|---|---|---|---|---|---|
| Held-out family | Best site | AUROC | Gap | Best site | AUROC | Gap |
| RS train (SFT split) | cot_3 /L16 | 0.908 | cot_3 /L18 | 0.909 | ||
| RS train (DPO split) | cot_1 /concat | 0.787 | cot_3 /concat | 0.807 | ||
| RS test | cot_4 /L17 | 0.932 | cot_3 /L14 | 0.920 | ||
| STAR vs. HarmThoughts | cot_4 /L17 | 0.933 | cot_4 /L12 | 0.929 | ||
| AIDSAFE vs. HarmThoughts † | cot_0 /L4 | 1.000 | cot_0 /L4 | 1.000 | ||
| Model ( ) | Arm | StrongREJECT-273 refusal | SORRY-derived pool refusal | Benign-500 refusal | Benign-500 usefulness |
|---|---|---|---|---|---|
| 1.5B (8) | P0 | 17.58 | 52.00 | 7.20 | 79.30 |
| Steering only | 44.69 | 55.78 | 14.60 | 73.80 | |
| Gated | 43.59 | 55.78 | 7.20 | 79.25 | |
| 7B (12) | P0 | 31.14 | 48.22 | 9.00 | 87.23 |
| Steering only | 73.26 | 63.78 | 15.80 | 81.35 | |
| Gated | 72.53 | 62.89 | 9.00 | 87.23 |
| P0 | Steering only | Gated | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Model | Dataset | S | U | I | S | U | I | S | U | I |
| 1.5B | StrongREJECT-273 | 8.42 | 75.82 | 15.75 | 28.57 | 68.13 | 3.30 | 27.47 | 69.23 | 3.30 |
| 1.5B | SORRY-derived pool | 27.78 | 62.22 | 10.00 | 42.44 | 50.44 | 7.11 | 41.33 | 51.33 | 7.33 |
| 1.5B | Benign-500 | 92.40 | 0.00 | 7.60 | 96.80 | 0.00 | 3.20 | 92.60 | 0.00 | 7.40 |
| 7B | StrongREJECT-273 | 21.98 | 76.19 | 1.83 | 59.71 | 40.29 | 0.00 | 59.34 | 40.66 | 0.00 |
| 7B | SORRY-derived pool | 40.44 | 57.78 | 1.78 | 68.00 | 31.78 | 0.22 | 67.11 | 32.22 | 0.67 |
| Site | StrongREJECT-273 steering only | StrongREJECT-273 gated | SORRY-derived pool steering only | SORRY-derived pool gated | Benign-500 trigger |
|---|---|---|---|---|---|
| P0 | 26.74 | 49.11 | – | ||
| L9– | 82.05 | 80.95 | 75.56 | 73.33 | 1.60 |
| L17– | 77.66 | 77.66 | 74.22 | 74.44 | 2.20 |
| L20– | 76.92 | 76.92 | 74.00 | 74.00 | 4.80 |
| L25– | 78.75 | 78.75 | 72.22 | 72.22 | 1.00 |
| L32– | 79.12 | 79.12 | 74.67 | 74.67 | 3.40 |
| Dataset | Size | Role | Relation to direction-training data |
|---|---|---|---|
| StrongREJECT-273 [ Souly et al., 2024 ] | 273 | main harmful generalisation test | source-independent |
| SORRY-Bench-derived pool [ Lee et al., 2025 , Xie et al., 2025 ] (SORRY-derived pool in tables) | 450 | 45-category full-trajectory safety | same CAST/SORRY-Bench ecology |
| Benign-500 [ Lee et al., 2025 , Taori et al., 2023 ] | 500 | false triggers, over-refusal, usefulness | CAST Alpaca benign test split |
| Gate-900 | StrongREJECT-273 | SORRY-derived pool | Benign-500 | |
|---|---|---|---|---|
| Direction-170 | 88 | 0 | 0 | 0 |
| Gate-900 | – | 0 | 0 | 0 |
| StrongREJECT-273 | – | – | 2 | 0 |
| SORRY-derived pool | – | – | – | 0 |
LLM Safety
Large language model (LLM) safety studies how to prevent harmful, unreliable, or misaligned behavior while preserving useful responses.
See all 438 papers