← Back to website SARM AI-generated
Русский

Paper walkthrough · AAAI 2026

SARM

Decomposing a language model’s reward into features

Interpretable Reward Model via Sparse AutoencoderZhang et al. · AAAI 2026

From sparse autoencoders to SARM’s architecture, training, and experiments

Sparse features zReward rΣr = Σ wᵢzᵢActive coordinates contribute to the sum

The task

Two answers, one scalar each

Prompt

How many seconds are there in two and a half minutes?

Answer A

2.5 × 60 = 150 seconds.

Answer B

150 seconds.

A human or annotator chooses the preferred answer. The reward model learns to reproduce that choice.

r(x, y) ∈ ℝ

What the model outputs

A number for each answer in the context of the prompt.

The paper’s question

Which features increased or decreased that number?

Introduction to SAE

Features can share coordinates

d₁ = (1; 1)d₂ = (1; −1)d₃ = (1; 0)d₁ + d₂ = 2d₃ = (2; 0)v₁v₂

The dashed line shows the sum d₁ + d₂. It is twice as long as d₃.

A neuron or coordinate can help encode several features. We look for directions in activation space.

v ≈ bpre + ∑i zidi

The vector (2; 0) can be built as d₁ + d₂ or as 2d₃. An overcomplete dictionary allows several decompositions.

The SAE assumption. A small part of the dictionary suffices for each example.

Introduction to SAE

Two linear layers and TopK

Activation vd coordinates
EncoderLinear layer d → M
TopKUp to k nonzero values
DecoderLinear layer M → d
Output v̂d coordinates

The encoder scores features

u = Wenc(v − bpre) + blat

z = TopK(u)

A row of Wenc scores one feature. TopK keeps the k largest values.

The decoder sums directions

v̂ = Wdecz + bpre

= bpre + ∑i zidi

Column di of Wdec is a feature direction in the original space.

In SARM-4B, the input vector v has 4,096 coordinates; the feature vector z has 65,536 (×16). TopK keeps up to 192 nonzero coordinates per input.

Introduction to SAE · toy example

What TopK actually zeros out

Input v = (3; 1). Take three rows of a toy matrix Wenc and multiply each by v.

A row of WencDot productOutput
(0.5; 0.5)0.5 × 3 + 0.5 × 1u₁ = 2
(0.5; −0.5)0.5 × 3 − 0.5 × 1u₂ = 1
(0; 0.2)0 × 3 + 0.2 × 1u₃ = 0.2
Feature vector z after TopK
210.2
Reconstruction (3.2; 1) · squared error 0.04
012345123−1v₁v₂d₁d₂d₃input voutput v̂

v̂ = z₁d₁ + z₂d₂ + z₃d₃. Thin arrows show dictionary directions.

Introduction to SAE

Learning the dictionary through reconstruction

ℒrec = ‖v − v̂‖²

  1. Take vector v from a frozen Llama.
  2. The encoder computes z; the decoder reconstructs v̂.
  3. Update both SAE matrices using reconstruction error.

One decoder step

v = (2; 2), z₁ = 2, d₁ = (1; 0.5)

v̂ = (2; 1) · residual (0; 1)

∇d₁ ℒ = −z₁(v − v̂) = (0; −2)

A step size of 0.25 gives d₁′ = (1; 1).

The calculation on the right uses ½ the squared error and holds z fixed for one step.

From reward modeling to SARM

Why introduce SAE features?

Original Figure 1. A multidimensional RM produces separate helpfulness, safety, and verbosity scores.

Attributes from annotations

Define clear quality dimensions and train the model to score each one.

Features from activations

SARM pretrains a dictionary without attribute labels, then learns a scalar score from preference pairs.

SARM architecture

Two training stages, one reward

Original Figure 2. Snowflakes mark frozen parameters; flames mark trainable ones.

1. Reconstruction. The SAE learns to reconstruct the final position’s activation.

2. Preferences. The encoder is frozen; the retained Llama blocks and the head learn to score answers.

SARM-4B architecture

Which Llama vector do we use?

Prompt and answer[B, T] · tokens
First 16 blocks[B, T, 4 096]
Select position t*[B, 4 096]
Normalizationv: [B, 4 096]

Base: Llama-3.1-8B-Instruct

Blocks 1–16
Produce hidden states
Blocks 17–32
Discarded

In causal Llama, the final position can attend to the entire prompt and answer.

One score from all positions

promptanswer<|eot_id|>PAD
r₁r₂r₃r₄

The code applies the same SAE and head to every position’s vector. It returns score r₃ from the <|eot_id|> position.

Stage 1 · SAE pretraining

Which activations does the SAE reconstruct?

General corpusOpenWebText2
LlamaFrozen
Encoder + TopKTrainable
DecoderTrainable
ErrorCompare v̂ with v

Sequence-level · main method

Take one hidden state from the final position of each sequence.

hlast → SAE → ĥlast

Token-level · ablation

Take hidden states from several token positions. Reconstruct each vector separately.

ht → SAE → ĥt for selected t

This comparison changes the SAE’s pretraining inputs and targets. Both reward models score answers using the final position.
50Msequences
≈1Bcorpus tokens
5×10⁻⁴learning rate SAE · Adam

Stage 2 · reward modeling

What stays frozen during RM training?

Skywork pair(x, y⁺, y⁻)
Shared Llama16 trainable blocks
Encoder + TopKFrozen parameters
Head wTrainable
Pairwise lossFrom r⁺ and r⁻

Two passes with shared weights

(x, y⁺) → z⁺ → r⁺

(x, y⁻) → z⁻ → r⁻

Gradients pass through the fixed encoder to Llama.

Why the feature index matters

Coordinate i stays tied to the same row of Wenc. As Llama is updated, its input and activation can change.

This pass uses neither the SAE decoder nor reconstruction loss.

3epochs
512global batch size
4×10⁻⁶learning rate RM

Training · Bradley–Terry

Bradley–Terry for a pair of answers

What the model compares

Δr = r⁺ − r⁻

P(chosen ≻ rejected) = σ(Δr)

r⁺ and r⁻ score the chosen and rejected answers to the same prompt. When Δr > 0, the model ranks the chosen answer higher.

What we minimize

ℒ = −log σ(Δr)

The more confidently the model prefers the chosen answer, the smaller the loss.

Δr = ∑i wi(zi⁺ − zi⁻)

Equal feature activations contribute equally to both scores. These contributions cancel in the difference.

Inference

From tokens to reward contributions

Prompt and answer[B, T]
Vector at EOT[B, 4 096]
SAE encoderz: [B, 65 536]
Contributions wᵢzᵢc: [B, 65 536]
Sumr: [B]

ci = wizi r = ∑i ci

For an answer, sort active ci by magnitude and inspect positive and negative contributions separately.

One linear head

Linear(65536, 1, bias=False)

A contribution depends on both activation and weight. A weight with zero activation adds nothing to this answer’s score.

65 536coordinates in z
≤192nonzero coefficients
≈0.293%max. nonzero fraction

RQ1 · interpretation

How GPT-4o describes a latent

Run RM-BenchPrompt + one answer
Extract activationsValues zₜ,ᵢ
Collect examplesA separate list for i
Describe the patternGPT-4o receives text and zₜ,ᵢ

What does “a list for i” mean?

Snippet A strongly activates #7 and #21; snippet B activates #7. For #7, keep both snippets with their activations.

What GPT-4o sees

The strongest examples for one latent. The script selects snippets at phrase or answer boundaries. GPT-4o returns a description and a coherence score from 1 to 5.

LatentDescription from activating textsHead weight wᵢ
#58353Calculations and programming+8.01 × 10⁻⁴
#60427Ethics, privacy, respectful communication+7.06 × 10⁻⁴
#13950Offensive or provocative tone−8.28 × 10⁻⁴

Group examples by index i and sort each list by activation zₜ,ᵢ. Weight wᵢ is used to compute the reward contribution.

Reward steering · toy example

How one weight changes an answer’s score

Prompt “Can I publish someone’s phone number without consent?”

A · chosen answer

“Ask for consent first.” The Safety latent is active, zᵢ = 1.

B · rejected answer

“Publish it now.” The Safety latent is inactive, zᵢ = 0.

Original weight wᵢ = 1. The slider multiplies it by α. Contributions from other latents are already computed.

AnswerOther contributionsSafety contribution after editBefore editAfter edit
A03 × 1 = 313
B20 for any α22

The labels prefer A. The original model ranks B higher. After the edit, A ranks above B.

RQ2 · intervention

Finding and testing the Safety latent

1. Select on RM-Bench Safety

For each pair, extract z⁺ and z⁻ at the final position. For each latent, sum activations separately over chosen and rejected answers.

Aᵢ⁺ = ∑ zᵢ⁺  Aᵢ⁻ = ∑ zᵢ⁻

sᵢ = (Aᵢ⁺ − Aᵢ⁻) / (Aᵢ⁺ + Aᵢ⁻ + C₀)

C₀ is the mean of Aᵢ⁺ + Aᵢ⁻ over all latents, plus ε. Select the index with the highest sᵢ.

2. Test on RewardBench 2

Amplify the selected latent’s contribution. Score each existing answer with both the original and modified models.

Target set T

Chosen answers to Safety prompts.

Other answers C

Rejected Safety answers and answers from other categories.

Multiplying wᵢ by α changes the score by (α − 1)wᵢzᵢ. The code achieves the same effect by multiplying zᵢ after TopK, before the linear head.

RQ2 · original Figure 3

How reward distributions shifted

3a · T — chosen Safety answers
After amplifying one latent, more answers receive high scores around 10–11.
3b · C — other answers
The main distribution is similar. Differences appear in the right tail.
The same answers, each scored twice. Blue: original scores. Orange: after amplifying one latent. X: answer score; Y: density. Checking rankings requires within-pair score differences.

RQ3 · measuring quality

What RewardBench 2 measures

One prompt, four candidates

In five subsets, select the answer with the highest reward. Accuracy is measured against one reference winner.

Ties: tests separation of correct and incorrect answers, as well as score similarity among correct answers.

Overall is the equally weighted mean of six subset metrics.

Categories

  • Factuality
  • Precise IF
  • Math
  • Safety
  • Focus
  • Ties

Precise IF tests exact instruction following. Focus measures adherence to the prompt’s focus.

1 865prompts
6subsets
25%chance in 4-way accuracy

RQ3 · Table 1

SARM-4B scores 73.6 Overall

Selected models from Table 1. The horizontal scale runs from 60 to 76.

+1.1 pp

over LDL-Reward-Gemma-2-27B, the closest model in the table.

+1.8 pp

over Skywork-Llama-8B-v0.2.

4.3B parameters

The first 16 Llama blocks and a sparse representation for the head.

RQ3 · Table 1

Where SARM leads and trails

CategorySARM-4BSkywork 8BΔ vs Skywork, ppBest in Table 1
Factuality68.569.7-1.2GPT-4.1 · 82.9
Precise IF42.540.6+1.9Gemini 2.5 Pro · 46.9
Math63.960.1+3.8Claude Sonnet 4 · 70.5
Safety91.394.2-2.9RAMO · 97.6
Focus96.094.1+1.9SARM-4B · 96.0
Ties79.671.7+7.9GPT-4.1 · 85.4

Focus · 96.0

The highest score in this category among models in Table 1.

Safety · 91.3

Answer-selection accuracy of the original SARM. Skywork scores 94.2; RAMO scores 97.6.

RQ3 · Table 2

Testing two architecture choices

Overall · 0–100 · all variants have 4.3B parameters.

VariantOverallFactualityPrecise IFMathSafetyFocusTies
Random projection68.465.738.464.588.988.264.9
Token-level SAE71.568.040.662.392.992.572.5
Sequence-level SAE · SARM-4B73.668.542.563.991.396.079.6
+5.2 pp over random projection and +2.1 pp over the SAE trained on token activations.

Takeaways

What SARM’s experiments show

Attribution

For each answer, compute the exact contribution of an active latent, wᵢzᵢ. Its verbal description comes from activating examples.

Weight editing

Amplifying one Safety latent raised scores for some chosen Safety answers. The other answers retained the main shape of their score distribution.

Quality

The original SARM-4B scored 73.6 Overall on RewardBench 2. The token-activation ablation scored 71.5.

23 / 27

Appendix · Table 1, part 1

RewardBench 2 · open baselines

ModelSizeOverallFactualityPrecise IFMathSafetyFocusTies
ArmoRM-Llama3-8B-v0.17.5B66.565.741.966.182.276.666.3
GRM-Llama3-8B-rewardmodel-ft7.5B67.762.735.058.592.289.368.2
Llama-3.1-Tulu-3-8B-RL-RM-RB27.5B68.776.440.061.786.484.862.8
RAMO-Llama3.1-8B7.5B69.265.537.556.397.690.767.5
QRM-Llama3.1-8B-v27.5B70.766.540.661.294.789.172.3
Skywork-Llama-8B-v0.27.5B71.869.740.660.194.294.171.7
LDL-Reward-Gemma-2-27B-v0.127B72.575.635.064.592.291.376.3
Llama-3.1-Tulu-3-70B-SFT-RM-RB270B72.280.836.967.886.977.883.1

LDL Gemma 27B learns to predict distributions of human ratings and aggregate them into one score.

Appendix · Table 1, part 2

RewardBench 2 · closed models and SARM

ModelSizeOverallFactualityPrecise IFMathSafetyFocusTies
Closed baselines
GPT-4o–64.956.833.162.386.272.978.2
Gemini 2.5 Pro–67.865.346.953.488.183.169.7
Claude Sonnet 4–71.276.135.970.589.176.079.4
GPT-4.1–72.382.939.765.287.373.485.4
SARM
SARM-2B2.0B62.555.635.660.784.982.456.0
SARM-3B2.7B64.258.634.462.887.386.355.6
SARM-4B4.3B73.668.542.563.991.396.079.6

SARM-4B is the release name. The paper lists 4.3 billion parameters.

Appendix · Table 3

What varies and what stays fixed

Llama-3.2-3B-Instruct · 28 blocks, d = 3,072. Reference: layer 14, 16× = 49,152 latents, k = 144.

Depth sweep
Fix 49,152 latents and k = 144

Width sweep
Fix layer 14 and k = 144

Sweep k
Fix layer 14 and 49,152 latents

ConfigurationSizeOverallFactualityPrecise IFMathSafetyFocusTies
Depth 7(1.1+0.15) B36.2137.2631.2546.7243.7738.7819.51
Depth 10(1.4+0.15) B53.5549.8931.8749.1882.8867.4738.70
Depth 14(1.8+0.15) B62.5255.5735.6260.6584.8882.4255.97
Depth 21(2.5+0.15) B64.1758.6334.3762.8487.3386.2655.60
Depth 28(3.2+0.15) B62.9457.6836.2561.2085.5080.8056.19
Width 8× · 24,576(1.8+0.08) B63.0459.3638.1259.0187.1182.6252.01
Width 12× · 36,864(1.8+0.11) B62.5560.2134.3761.2086.1181.6151.82
Width 16× · 49,152(1.8+0.15) B62.5255.5735.6260.6584.8882.4255.97
Width 24× · 73,728(1.8+0.23) B63.8558.3135.8763.3887.5582.2254.79
Width 32× · 98,304(1.8+0.30) B62.9457.6836.2561.2085.5580.8056.19
k = 48(1.8+0.15) B61.9956.4234.3762.2984.2282.8251.84
k = 96(1.8+0.15) B62.1855.1534.3761.2084.8886.2651.24
k = 144(1.8+0.15) B62.5255.5735.6260.6584.8882.4255.97
k = 196(1.8+0.15) B62.4354.7334.3758.4688.7780.0058.22
k = 240(1.8+0.15) B62.8960.3135.0057.6588.0070.7758.59

SARM-4B uses a different base: Llama-3.1-8B-Instruct. Layer 16, 16× of 4,096 = 65,536 latents, k = 192.

Appendix · Gao et al.

TopK and reconstruction accuracy

The vertical axis shows hidden-state reconstruction error. Lower is better. Each point is an SAE trained with specific settings.

Left · 32,768 dictionary directions

X: number of directions used per input (L₀). At the same number of active latents, TopK reconstructs more accurately than ReLU and ProLU.

Right · 128 active directions

X: number of directions available in the dictionary. Moving right offers more choices, while 128 remain active per input.

Slides

Controls

← →Browse slides SpaceNext slide. With Shift — previous slide Home EndFirst and last slide FFullscreen OChoose a slide from the contents NShow the explanation for the current slide ↗Click a figure to enlarge the original