Activation Flow: Manufacturing Activations for Steering
Organizations: University of California, Los Angeles · Lida Safety · ERA
Abstract
Difference-in-means steering requires activations recorded while a model shows the desired behavior, which a sandbagging model withholds by deliberately underperforming. We introduce Activation Flow (ActFlow), which manufactures these activations from correct labels without fine-tuning. ActFlow sets target logits that rank each labeled item's correct answer first, and moves the logits toward them by adding one vector to all residual streams at one layer. ActFlow is a family of ordinary differential equations for , one for each rule that maps the required logit change to the velocity of . The smallest-norm rule lands exactly on the targets, while the others keep only the top singular directions of the Jacobian. We test ActFlow on three instruction-tuned models, each locked by a sandbagging prompt and by a password-locked LoRA. At , ActFlow keeping five singular directions raises the mean held-out ARC-Easy accuracy over the six locked models from to , against for rank- LoRA fine-tuning, which trains about times as many parameters, and for the honest models. Furthermore, it scores higher than the smallest-norm rule in 16 of the 18 combinations of locked model and , and its steering direction is nearly orthogonal to the honest difference-in-means direction. It also unlocks two LoRA locks where the honest direction fails. Surprisingly, with one labeled item, the single-step smallest-norm rule raises the Qwen2.5-7B prompt lock from to .
Figures & tables
| returns an adapter on every layer | returns one direction at one layer | |
|---|---|---|
| needs honest activations | – | reference graft ( ) |
| needs only correct labels | LoRA fine-tuning ( ) | ActFlow ( ) |
| name | |||
|---|---|---|---|
| ActFlow full (the lift) | |||
| ActFlow m | , fixed | ||
| ActFlow 0.1 | , | ||
| ActFlow PR | , |
| ARC-Easy | OpenBookQA | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| model | lock | locked | honest | honest graft | FT | AF 5 | AF PR | AF full | GD | honest | FT | AF 5 | AF PR | AF full | GD | |
| Qwen2.5-7B | prompt | 4 | .04 | .96 | .88 | |||||||||||
| 10 | ||||||||||||||||
| 40 | ||||||||||||||||
| LoRA | 4 | .00 | .94 | .84 | ||||||||||||
| 10 | ||||||||||||||||
Appendix figures & tables15 assets
Supplementary material from the paper’s appendix.
Appendix
| the lift, | ActFlow 5 , | |
|---|---|---|
| , where the rule has a value | ||
| , near | all of | , with the cutoff of |
| , where has a value | ||
| for , and for |
| model | MLP width | heads | KV heads | bias | |||
|---|---|---|---|---|---|---|---|
| Qwen2.5-7B-Instruct | 28 | 3584 | 18944 | 28 | 4 | yes | |
| Llama-3-8B-Instruct | 32 | 4096 | 14336 | 32 | 8 | no | |
| Mistral-7B-Instruct-v0.2 | 32 | 4096 | 14336 | 32 | 8 | no |
| ARC-Easy | OpenBookQA | |||||
| model | lock | seed | locked | honest | locked | honest |
| Qwen2.5-7B | prompt | .04 | .96 | .07 | .88 | |
| LoRA | 1 | .00 | .94 | .05 | .84 | |
| LoRA | 2 | .03 | .95 | .05 | .89 | |
| LoRA | 3 | .01 | .98 | .03 | .86 | |
| LoRA | 4 | .01 | .97 | .05 | .85 | |
| Qwen2.5-7B | Llama-3-8B and Mistral-7B | |||||
| projection | parameters | parameters | ||||
| query | ||||||
| key | ||||||
| value | ||||||
| output | ||||||
| per layer | ||||||
| ARC-Easy | OpenBookQA | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| seed | honest graft | AF 5 | AF PR | AF full | GD | AF 5 | AF PR | AF full | GD | |
| 1 | 4 | |||||||||
| 10 | ||||||||||
| 40 | ||||||||||
| 2 | 4 | |||||||||
| 10 | ||||||||||
| stage | A40 | L40S | total |
|---|---|---|---|
| Locked activations and accuracies | 0.25 | 0.17 | 0.43 |
| ActFlow runs | 22.50 | 11.35 | 33.85 |
| GD runs | 27.84 | 8.32 | 36.17 |
| Grafts of the ActFlow shifts | 27.47 | 12.59 | 40.06 |
| Grafts of the GD shifts | 4.20 | 1.90 | 6.09 |
| Honest activations | – | 0.10 | 0.10 |
| lock | ActFlow full | ActFlow full | ActFlow full | GD | |
|---|---|---|---|---|---|
| prompt | accuracy | ||||
| label share | |||||
| LoRA | accuracy | ||||
| label share |
| lock | rule | GN | GN | GN | Euler | seq. | |
|---|---|---|---|---|---|---|---|
| prompt | AF 5 | 4 | |||||
| 10 | |||||||
| 40 | |||||||
| AF PR | 4 | ||||||
| 10 | |||||||
| 40 |
| accuracy on the labeled items | error at | |||||||||||
| model | lock | seed | AF 5 | AF PR | AF full | GD | honest graft | AF 5 | AF PR | AF full | GD | |
| Qwen2.5-7B | prompt | 1 | – | .79 | .89 | .99 | – | – | 3.69 | 0.01 | 0.49 | |
| 4 | .86 | .84 | .99 | 1.00 | .95 | 5.19 | 5.62 | 0.01 | 0.35 | |||
| 10 | .89 | .89 | .99 | 1.00 | .93 | 5.80 | 6.19 | 0.01 | 0.27 | |||
| 40 | .91 | .91 | .98 | 1.00 | .91 | 7.02 | 6.91 | 0.01 | 1.00 | |||
| LoRA | 1 | 1 | – | .10 | .45 | .38 | – | – | 8.23 | 0.01 | 0.49 | |
| model | lock | seed | AF 5 | AF PR | AF full | GD | honest graft | |
|---|---|---|---|---|---|---|---|---|
| Qwen2.5-7B | prompt | 1 | – | 9 (1–19) | 13.5 (1–22) | 9 (1–22) | – | |
| 4 | 16 (7–17) | 12.5 (2–19) | 16 (10–18) | 13.5 (9–17) | 19 (16–20) | |||
| 10 | 17 (12–18) | 16 (7–18) | 18 (14–19) | 13.5 (10–19) | 19 (16–19) | |||
| 40 | 17 (16–18) | 17.5 (17–18) | 24 | 19.5 (19–20) | 19 | |||
| LoRA | 1 | 1 | – | 10 (1–25) | 19 (1–24) | 18 (2–23) | – | |
| 4 | 15.5 (1–27) | 11 (1–27) | 19 (16–24) | 18 (15–25) | 16 (15–20) |
| balanced accuracy | top share | ||||||||||
| model | lock | seed | AF 5 | AF PR | AF full | GD | AF 5 | AF PR | AF full | GD | |
| Qwen2.5-7B | prompt | 1 | – | .43 | .40 | .43 | – | .45 | .48 | .45 | |
| 4 | .73 | .73 | .51 | .81 | .39 | .40 | .47 | .36 | |||
| 10 | .92 | .88 | .58 | .87 | .32 | .35 | .39 | .34 | |||
| 40 | .95 | .95 | .63 | .82 | .32 | .32 | .34 | .33 | |||
| LoRA | 1 | 1 | – | .04 | .16 | .17 | – | .36 | .66 | .61 | |
| lock | ARC-Easy | OpenBookQA | labeled accuracy | error at | balanced accuracy | top share | ||
|---|---|---|---|---|---|---|---|---|
| prompt | 1 | .90 | 0.01 | 13 (1–22) | .39 | .48 | ||
| 4 | .98 | 1.32 | 15 (1–19) | .64 | .40 | |||
| 10 | .96 | 3.07 | 15 (12–19) | .76 | .36 | |||
| 40 | .86 | 3.65 | 18 (17–19) | .84 | .33 | |||
| LoRA | 1 | .44 | 0.01 | 19 (1–24) | .16 | .67 | ||
| 4 | .99 | 0.02 | 19 (14–24) | .56 | .45 |
| model | lock | seed | |||
|---|---|---|---|---|---|
| Qwen2.5-7B | prompt | 10.3 (5.3) | 13.9 (11.8) | 16.7 (16.5) | |
| LoRA | 1 | 10.3 (7.0) | 12.1 (11.3) | 12.5 (11.9) | |
| LoRA | 2 | 14.2 (7.5) | 16.4 (14.4) | 25.9 (13.7) | |
| LoRA | 3 | 12.5 (7.1) | 15.6 (13.1) | 15.0 (14.7) | |
| LoRA | 4 | 12.2 (7.2) | 13.3 (12.2) | 13.6 (13.3) | |
| LoRA | 5 | 12.5 (8.1) | 13.7 (11.6) | 17.0 (12.6) |
| model | lock | seed | window | AF 5 | AF PR | AF full | GD | honest graft |
|---|---|---|---|---|---|---|---|---|
| Qwen2.5-7B | prompt | 15–20 | 19 | 14 | 22 | 13 | 30 | |
| LoRA | 1 | 10–22 | 21 | 16 | 21 | 21 | 30 | |
| LoRA | 2 | 10–26 | 21 | 13 | 30 | 28 | 23 | |
| LoRA | 3 | 11–12 | 1 | 2 | 0 | 2 | 28 | |
| LoRA | 4 | 12, 17–18 | 11 | 6 | 14 | 13 | 27 | |
| LoRA | 5 | none | – | – | – | – | – |
Activation Steering
Activation steering changes model behavior by intervening directly on internal representations during inference, often without updating weights.
See all 380 papers