Reinforcement Learning with Verifiable Rewards (RLVR) has demonstrated strong performance in improving large language model (LLM) reasoning, yet its credit-assignment signal remains coarse. Outcome verifiers provide scalable supervision by judging whether a completed response is correct, but they do not directly indicate which intermediate reasoning tokens contribute to success or failure. As a result, policy optimization can be inefficient, especially when training base models directly from sparse outcome feedback. In this paper, we introduce SAEPO, a Sparse AutoEncoder-guided token-level credit assignment method for outcome-supervised Policy Optimization. Rather than treating correctness only as a rollout-level (sequence-level) signal, SAEPO uses a pretrained sparse autoencoder (SAE) to build token-level semantic representations within reasoning trajectories; it scores each token based on the SAE concepts (e.g., penalizing wrong "final-answer" tokens but rewarding correct "reasoning-process" tokens), learned in an unsupervised manner, to achieve fine-grained credit assignment. SAEPO is a plug-in advantage-shaping module compatible with various policy optimization algorithms. We instantiate SAEPO with both GRPO and GSPO, covering token-ratio and sequence-ratio policy-gradient objectives, and evaluate SAEPO across three LLM backbones on six math and two code benchmarks. Empirical results show that SAEPO improves both the math and code benchmark averages over the matched baselines, with gains of up to 6.63% and 5.57%, respectively. On Qwen3-1.7B-Base, training curves also show faster early accuracy growth. Feature and token-level analyses suggest that the SAE-derived signal favors question-relevant concepts and reasoning tokens.
Figures & tables
Figure 1: Comparison of credit assignment mechanisms in outcome-supervised policy optimizations. GRPO assigns the same rollout-level credit to all tokens in a generated reasoning trace, so decisive reasoning steps and incidental tokens receive identical credit. Our SAEPO assigns question-local, token-level semantic credit based on semantic representations from the SAE feature space; therefore it rewards question-relevant reasoning tokens while penalizing uninformative or misleading tokens with more fine-grained credit assignment. Top words of the most related concepts to an example rewarded token “interior” show that our SAEPO can achieve interpretable token-level credit assignment.
Figure 2: Overview of SAEPO. A frozen SAE encodes token hidden states from grouped rollouts into sparse features. For each token, its counts of similar tokens in correct and incorrect rollouts determine its token-level reward, with higher reward assigned when more similar tokens appear in correct rollouts than in incorrect ones. The token-level reward is normalized and added to the outcome advantage, while the verifier reward, policy-ratio construction, clipping rule, and KL regularizer remain unchanged.
Math
Code
Backbone
Method
MATH-500
GSM8K
AIME25
AMC
Minerva
Olympiad
Avg.
LCB-v5
LeetCode
Avg.
Vanilla GRPO
63.2
74.9
3.3
26.5
23.9
21.5
35.56
4.66
12.28
8.47
GRPO + KTAE
61.6
76.1
0.0
22.9
27.6
20.2
34.73
5.38
11.84
8.61
GRPO + THR
62.8
76.4
3.3
27.7
26.8
23.3
36.72
5.73
7.02
6.38
GRPO + GTPO
45.2
74.0
3.3
13.3
19.9
9.3
27.50
3.58
4.82
4.20
GRPO + SAEPO (Ours)
65.6
76.3
3.3
34.9
29.8
22.1
38.68
6.81
11.40
9.11
Table 1: Accuracy (%) on six math and two code benchmarks across three LLM backbones, with unweighted averages. Bold marks the best result within each backbone’s GRPO or GSPO block.
Figure 3: Training dynamics on Qwen3-1.7B-Base . We plot training accuracy curves during RL training for GRPO and GSPO, comparing each vanilla policy optimization algorithm with its SAEPO-augmented variant and with credit-assignment baselines (i.e., KTAE, THR, and GTPO). SAEPO shows faster convergence in training accuracy and generally reaches higher training accuracy.
Figure 4: SAE features (concepts) associated with the highest and the lowest SAEPO token scores, computed from rollouts on the “Algebra” and “Geometry” subjects in MATH-500. Feature-level rewards are obtained by averaging semantic scores over tokens where each SAE feature is active. Rows show features with highest/lowest rewards and their top activating tokens; color intensity indicates normalized activation within each feature. Left: High-reward features correspond to subject-relevant concepts, such as spherical and coordinate vocabulary in Geometry, and computation and expression terms in Algebra. Right: Low-reward features mostly capture connectives, copulas, punctuation, stop words, and discourse markers. These results suggest that the SAEPO-derived signal concentrates on semantically meaningful reasoning features.
Figure 5: Examples of how SAEPO can assign a fine-grained credit signal to each token. For rollouts from different types of questions, we visualize the SAEPO-derived final shaped advantages Aqg,t=Aqgout+αSqg,t from Eqn. ( 13 ) assigned to individual tokens in the rollouts. Green tokens represent positive credit that rewards the tokens, gray tokens represent near-zero credit, while red tokens represent negative credit that penalizes the tokens. SAEPO tends to reward semantically meaningful tokens like question-relevant tokens in incorrect trajectories and reasoning tokens in correct trajectories, while penalizing uninformative or misleading tokens even when they are in correct trajectories, achieving fine-grained token-level credit assignment over the reasoning trace.
Method
MATH-500
GSM8K
AIME25
AMC
Minerva
Olympiad
Avg.
Vanilla GRPO
63.2
74.9
3.3
26.5
23.9
21.5
35.56
GRPO + Raw-Embedding Contrast
64.2
74.5
0.0
26.5
30.1
23.9
36.53
GRPO + Reverse SAEPO Signal
37.8
75.4
0.0
9.6
22.4
7.6
25.48
GRPO + SAEPO (Ours)
65.6
76.3
3.3
34.9
29.8
22.1
38.68
Table 2: Ablation studies with Qwen3-1.7B-Base on GRPO with SAEPO. We report accuracy (%) on the same six-benchmark evaluation suite as Table 1 . Bold marks the best result.
Edit
Samples
Example: original → edited
Mean ΔS [95% CI]
Introduce an error
304
8×3=24→8×3=25
−0.58 [ −0.70 , −0.47 ]
Fix an error
120
Cylinder: V=31πr2h→V=πr2h
+0.16 [ +0.06 , +0.25 ]
Table 3: Controlled changes in step correctness produce corresponding changes in semantic scores on average: introducing an error lowers the score, while fixing an error raises it.
Edit
Samples
Mean P : original → edited
Mean ΔP [95% CI]
Lower / higher P
Introduce an error
304
0.74→0.17
−0.57 [ −0.61 , −0.54 ]
95% / 4%
Fix an error
120
0.15→0.32
+0.17 [ +0.12 , +0.22 ]
23% / 62%
Table 4: Controlled reasoning-step edits affect continuation success in the expected direction: introducing an error lowers the estimated success rate, while fixing an error raises it. These results support the relevance of the constructed edits to final-answer correctness.
Appendix figures & tables16 assets
Supplementary material from the paper’s appendix.
Appendix
Component / measurement
Vanilla GRPO
SAEPO (GRPO)
Vanilla GSPO
SAEPO (GSPO)
Rollout generation (per step)
33.1 s
37.8 s
32.9 s
34.5 s
Reward grading (per step)
3.5 s
2.7 s
3.8 s
2.7 s
Old/reference log-probs (per step)
12.3 s
13.6 s
12.3 s
13.1 s
Policy update (per step)
32.4 s
36.6 s
32.7 s
34.7 s
SAE feature extraction (per step)
–
0.77 s
–
0.68 s
Semantic alignment (per step)
–
0.34 s
–
0.29 s
Appendix
Table 5: Time and memory for Qwen3-1.7B-Base . Dedicated SAE feature extraction and semantic alignment add 1.11 s per GRPO step and 0.97 s per GSPO step, while peak GPU memory increases by 1.1 GB. The 250-step wall-clock times cover RL training.
RL wall-clock
Vanilla GRPO
SAEPO (GRPO)
Vanilla GSPO
SAEPO (GSPO)
1 h
12.9
15.8
11.8
13.3
2 h
16.9
25.8
14.6
21.2
3 h
20.0
28.1
17.3
28.0
4 h
20.0
28.8
20.1
24.9
5 h
20.7
28.2
21.6
27.4
5.66 h
22.2
28.7
20.7
25.5
Appendix
Table 6: Training accuracy (%) under matched RL wall-clock budgets on Qwen3-1.7B-Base . SAEPO improves accuracy over the corresponding vanilla optimizer at every reported time point. These budgets begin with RL training and reuse the pretrained SAE.
Layer
MATH-500
GSM8K
AIME25
AMC
Minerva
Olympiad
Avg.
Layer 3
66.0
74.5
3.3
25.3
28.7
23.1
36.82
Layer 9
64.4
75.6
3.3
24.1
29.4
23.7
36.75
Layer 15
64.8
70.2
3.3
25.3
29.8
22.1
35.92
Layer 21
65.6
76.3
3.3
34.9
29.8
22.1
38.68
Layer 27
64.4
75.9
0.0
33.7
27.6
22.4
37.33
Appendix
Table 7: Ablation study of SAE hook layer selection for Qwen3-1.7B-Base with GRPO + SAEPO. We report accuracy (%) on six math benchmarks and their unweighted average. Boldface marks the best value in each column.
Method
MATH-500
GSM8K
AIME25
AMC
Minerva
Olympiad
Avg.
Vanilla GRPO
63.2
74.9
3.3
26.5
23.9
21.5
35.56
SAEPO ( k=4 )
65.6
74.7
3.3
27.7
26.1
21.8
36.54
SAEPO ( k=8 )
65.6
76.3
3.3
34.9
29.8
22.1
38.68
SAEPO ( k=16 )
64.6
79.0
0.0
30.1
30.1
21.8
37.61
SAEPO ( k=32 )
63.6
72.3
3.3
37.3
32.4
22.1
38.50
SAEPO ( k=64 )
66.2
72.0
0.0
28.9
33.5
23.4
37.34
Appendix
Table 8: Ablation of SAE sparsity k for Qwen3-1.7B-Base with GRPO + SAEPO. We report accuracy (%) on six math benchmarks and their unweighted average.
Representation
MATH-500
GSM8K
AIME25
AMC
Minerva
OlympiadBench
Avg.
SAE latent code
65.8
78.0
6.7
34.9
33.1
22.3
40.12
MLP latent code
59.0
77.5
3.3
26.5
26.5
19.6
35.40
AE latent code
63.8
74.1
3.3
34.9
33.1
21.8
38.50
Appendix
Table 9: Comparison of encoders trained on the same math rollouts with 65,536 latent dimensions. SAE-based credit assignment achieves the highest six-benchmark average, supporting the contribution of sparse semantic representations beyond a general learned transformation.
Metric / alignment
MATH-500
GSM8K
AIME25
AMC
Minerva
OlympiadBench
Avg.
Cosine + soft alignment (default)
65.6
76.3
3.3
34.9
29.8
22.1
38.68
Jaccard + soft alignment
63.4
77.6
0.0
31.3
29.4
23.3
37.50
Negative L2 + soft alignment
64.8
75.4
3.3
30.1
30.1
22.1
37.63
Inner product + soft alignment
64.0
75.8
3.3
34.9
29.0
21.7
38.12
Cosine + hard alignment
62.6
78.7
0.0
33.7
28.7
20.8
37.41
Appendix
Table 10: Similarity and alignment ablations. Cosine similarity with soft alignment achieves the highest benchmark average among the tested alternatives. The hard-alignment comparison supports matching semantically corresponding content across token positions.
Setting
MATH-500
GSM8K
AIME25
AMC
Minerva
OlympiadBench
Avg.
Default ( α=2 )
65.6
76.3
3.3
34.9
29.8
22.1
38.68
α=0.5
65.4
74.6
3.3
27.7
27.2
22.6
36.80
α=1
66.6
75.5
0.0
32.5
30.1
23.6
38.06
α=4
63.0
75.9
0.0
28.9
24.3
22.6
35.77
Appendix
Table 11: Sensitivity to the SAE weight α at τ=0.05 . The default α=2 yields the highest average among the tested weights, supporting a moderate contribution from the semantic signal.
Setting
MATH-500
GSM8K
AIME25
AMC
Minerva
OlympiadBench
Avg.
Default ( τ=0.05 )
65.6
76.3
3.3
34.9
29.8
22.1
38.68
τ=0.01
63.2
76.5
3.3
26.5
28.3
22.6
36.73
τ=0.02
61.8
78.6
6.7
36.1
29.0
23.7
39.32
τ=0.15
63.8
70.4
3.3
33.7
30.1
22.7
37.33
Appendix
Table 12: Sensitivity to alignment temperature τ at α=2 . The intermediate temperatures 0.02 and 0.05 outperform both 0.01 and 0.15; τ=0.02 achieves the highest average in this sweep.
Setting
MATH-500
GSM8K
AIME25
AMC
Minerva
OlympiadBench
Avg.
Default ( γ=1 )
65.6
76.3
3.3
34.9
29.8
22.1
38.68
No balance weight ( γ=0 )
63.0
73.2
3.3
31.3
27.6
23.0
36.90
Squared balance weight ( γ=2 )
65.2
76.1
0.0
31.3
26.1
22.4
36.85
Appendix
Table 13: Sensitivity to correctness-balance weighting. The default γ=1 outperforms both removing the weight and squaring it, supporting the original balance between contributions from different rollout groups.
Setting
MATH-500
GSM8K
AIME25
AMC
Minerva
OlympiadBench
Avg.
Joint normalization (SAEPO default)
65.6
76.3
3.3
34.9
29.8
22.1
38.68
Separate correct/incorrect normalization
64.0
69.1
3.3
33.7
27.2
22.3
36.60
Appendix
Table 14: Joint versus separate score normalization. Normalizing scored tokens together improves the six-benchmark average over separate normalization of correct and incorrect rollouts, supporting the shared batch-level statistics used by SAEPO.
Method
Seed 42
Seed 43
Seed 44
Mean ± s.d.
Vanilla GRPO
35.56
36.29
36.25
36.03±0.41
THR
36.72
36.58
37.02
36.77±0.22
SAEPO
38.68
39.82
39.47
39.32±0.58
Appendix
Table 15: Final six-benchmark math averages (%) across three random seeds. SAEPO outperforms vanilla GRPO and THR at every seed, showing that its accuracy gains are consistent across these runs.
Backbone
Reconstruction cosine
Qwen3-1.7B-Base
0.960
Qwen3-4B-Base
0.799
OLMo-3-7B
0.847
Appendix
Table 16: SAE reconstruction quality on MATH.
Task
Model checkpoint
Reconstruction cosine
Concept overlap (top-1000)
Math
Base model
0.957
100%
SAEPO + GRPO (Final)
0.932
94.3%
SAEPO + GSPO (Final)
0.940
94.8%
Code
Base model
0.952
100%
SAEPO + GRPO (Final)
0.945
96.6%
SAEPO + GSPO (Final)
0.949
97.1%
Appendix
Table 17: The frozen SAE maintains high reconstruction cosine and substantial overlap in frequently activated features across tasks and RL checkpoints. Final policies retain 94.3–97.1% of the base model’s top-1,000 active features, supporting reuse of the pretrained SAE throughout policy optimization.
Figure 6: More Case Study Examples.
Figure 7: More feature analysis results on “Number Theory” and “Prealgebra” subjects in MATH-500.
Figure 8: More feature analysis results on “Intermediate Algebra” and “Precalculus” subjects in MATH-500.