Organizations: Graduate School of Data Science, Seoul National University, Seoul, Korea · Department of Mathematics Education, Seoul National University, Seoul, Korea
Large language models (LLMs) achieve strong performance on mathematical reasoning benchmarks, yet final-answer accuracy reveals little about the strategies they use. We introduce SHAPE (Structured Heuristic Analysis for Problem-solving Evolution), a framework grounded in mathematics-education research that characterizes local mathematical actions in reasoning trajectories using a problem-independent heuristic taxonomy. Using SHAPE, we examine two previously hypothesized phenomena in LLM reasoning. First, we revisit the hypothesis that LLMs reuse learned solution techniques under problem perturbations. Across six models on MATH-Perturb, perturbations requiring a different solution approach yield lower accuracy but greater heuristic shifts than those preserving it. Second, we characterize mode-seeking in RLVR through mathematical heuristic profiles. Across four base--RL pairs, successful RL solutions overlap substantially with base-model profiles. We further introduce Heuristic-Augmented Plan-GRPO (HA-Plan-GRPO), which guides RLVR planning through heuristic selection and applicability reasoning. Across three models and five evaluation sets, it improves mean Avg@16 by up to 7.0% absolute and mean Pass@16 by up to 2.4% absolute over planning-only RLVR. Our code is available at https://github.com/holi-lab/shape-of-CoT.
Figures & tables
Figure 1: Illustrative SHAPE annotations on a synthetic CoT trajectory. Each row pairs a content unit with its heuristic or non-heuristic labels. Unit 2 illustrates multi-label annotation with H9a (exploring particular cases) and H11f (reflection on rigor), while unit 4 receives the non-heuristic final-answer label N4.
Code
Category
H1
Changing the register of semiotic representation
H2
Cognitive reinterpretation
H3
Introduce symbolic representation, formalization, and structural augmentation
H4
Problem classification / rephrase the problem and goal
H5
Wishful thinking (simplify / reduce the problem and conditions)
H6
Explicit case analysis, decompose into subproblems
Table 1: Heuristic and non-heuristic categories used in SHAPE .
Figure 2: Overview of the automated SHAPE annotation pipeline. Given a question and a chain-of-thought (CoT) trace, the pipeline segments the trace into content units 1,…,k and assigns one or more heuristic or non-heuristic labels to each unit. Both stages use Grok or Qwen as annotators.
Annotator
F1 (%)
Gwet’s AC1
Grok-4.1-Fast
77.16
0.909
GPT-5
71.56
0.859
GPT-5-mini
66.13
0.850
Gemini-3-Flash
65.11
0.860
Gemini-3.1-Flash-Lite
71.22
0.890
Qwen3.5-27B
70.44
0.894
Table 2: Annotator model agreement with the human gold standard.
Model
Pass@1 (%)
DJS (Full)
DJS ( ≤ 5)
Original
Simple
Hard
O–S
O–H
O–S
O–H
Qwen3-8B
96.0
94.0
84.0
.043
.066∗
.160
.190∗
Qwen3-32B
92.0
90.0
76.0
.047
.070∗
.150
.200∗
Nemotron-Cascade-8B
92.0
95.0
71.0
.049
.072∗
.170
.210∗
Olmo-3-7B-Think-RLVR
97.0
94.0
76.0
.041
.065∗
.165
.205∗
Qwen2.5-7B (SimpleRL-Zoo)
61.7
58.3
31.3
.152
.253∗
.158
.254∗
Table 3: Pass@1 and heuristic-frequency divergence on MATH-Perturb. O, S, and H denote original, simple, and hard problems. DJS is Jensen–Shannon divergence between frequency distributions over eleven heuristic families, using base-2 logarithms. Full uses the entire trajectory; ≤ 5 uses the first five content units, or the entire trajectory when fewer units are available. Means are computed over matched problems with valid O/S/H distributions, separately for each condition. ∗ denotes O–H > O–S in a one-sided paired Wilcoxon signed-rank test (uncorrected p<.05 ). For most SimpleRL-Zoo trajectories, ≤ 5 includes the entire CoT.
Reference
Target
Nref
Ntarget
Density
Coverage
Post-trained
Qwen3-1.7B-Base
Qwen3-1.7B-GRPO
834
886
1.219
0.871
Olmo-3-7B
Olmo-3-7B-Think-RL-Zero
1229
1307
1.250
0.707
Qwen2.5-7B
Qwen2.5-7B-SimpleRL-Zoo
1280
1294
1.511
0.888
DeepSeek-Math-7B-Base
DeepSeek-Math-7B-SimpleRL-Zoo
463
500
1.525
0.950
Cross-model baselines
Table 4: Density and Coverage for base–post-trained pairs and cross-model baselines in the original annotation-frequency space ( k=3 , cosine distance, successful trajectories only, aggregated across all perturbation conditions). Density measures target overlap with base neighborhoods; Coverage is the fraction of base neighborhoods containing at least one target trajectory. The left model defines the reference neighborhoods; N counts successful trajectories.
Figure 3: Pooled successful heuristic-frequency profiles of Olmo-3-7B and Olmo-3-7B-Think-RL-Zero projected onto the first principal component (PC1). The RL distribution has a sharper peak near the base-model mode and a reduced left tail.
Method
Original
Simple
Hard
MATH500
Minerva
Mean
Avg.
Pass
Avg.
Pass
Avg.
Pass
Avg.
Pass
Avg.
Pass
Avg.
Pass
DeepSeek-Distill-Llama-8B
Base
58.5
80.9
56.7
81.7
41.3
67.0
62.3
81.8
15.6
34.2
46.9
69.1
Plan-GRPO
54.4±6.2
81.7±1.7
52.1±7.0
83.2±2.7
35.5±4.7
68.1±4.3
58.8±5.4
82.9±1.8
13.0±1.6
32.6±2.9
42.8
69.7
HA-Plan-GRPO
63.6±1.8
84.6±2.7
61.6±0.9
84.9±2.2
42.4±1.9
68.4±1.3
66.1±1.6
86.6±2.4
15.2±1.6
35.8±2.8
49.8
72.1
Qwen3-1.7B-Base
Table 5: Avg@16 and Pass@16 (%) across five evaluation sets. Trained variants report mean ± standard deviation across three training seeds; Base results are point estimates. Mean columns average the five evaluation sets with equal weights. Light gray rows denote HA-Plan-GRPO (ours). Bold indicates the highest mean within each model, evaluation set, and metric.
Figure 4: Paraphrased evaluation-time solutions from Qwen3.5-4B checkpoints trained with Plan-GRPO and HA-Plan-GRPO. Both models generate the response to the same zero-shot CoT prompt without heuristic guidance at inference.
Appendix figures & tables8 assets
Supplementary material from the paper’s appendix.
Appendix
Strategy Name
Description & Sources
H1. Changing the register of semiotic representation
This strategy involves translating the problem’s representation from one semiotic register to another. It includes converting between natural language, algebraic, geometric, and visual representations to facilitate understanding or solving. Sources: Creating a model (K); Change the semiotic representation register (Changer de registre de représentation sémiotique) (F)
H2. Cognitive Reinterpretation
This involves changing the way an object or property in the problem is interpreted. It redefines the identity or attributes of an element in a way different from the initial presentation, without necessarily changing the register. Sources: Consider another way of interpreting the problem’s objects (Envisager une autre façon d’interpréter les objets du problème) (F); Adopting a different point of view (P&K)
H3. Introduce Symbolic Representation, Formalization, and Structural Augmentation, including…
H3a. Introduce Symbolic Representation and Formalization
The act of introducing new variables, labeling unknowns, or performing substitutions to make ambiguous targets operationally manageable. Sources: Notation; Setting up equations (P); Creating a model (K); Introduce names or notations (Introduire des noms ou des notations) (F)
H3b. Structural Augmentation
Constructing auxiliary objects, lemmas, or entirely new mathematical frameworks that are not present in the original problem. This is a creative addition to the problem space, such as drawing auxiliary lines, defining new functions, or shifting the problem into a new structural representation Sources: Auxiliary elements, Lemma (P); Introducing an auxiliary element (K); Introduce auxiliary elements (Introduire des éléments auxiliaires) (F)
H4. Problem Classification / Rephrase the Problem and Goal, including…
Appendix
Table 10
Strategy Name
Description & Sources
H6. Explicit Case Analysis, Decompose into Subproblems
Logically decomposing the problem into distinct cases, non-overlapping subsets, or sub-problems that, when combined, yield the full solution. The cases should ideally be exhaustive and mutually exclusive. Sources: Decomposing and recombining (P); Décomposer le domaine du problème et travailler cas par cas (Decompose the problem domain and work case by case) (F)
H7. Arguing by contradiction
A proof strategy where the negation of the proposition is assumed to derive a contradiction, thereby proving the original statement. Sources: Reductio ad absurdum and indirect proof (P); Arguing by contradiction (K)
H8. Analogy and Presenting Related Theorems, including…
H8a. Analogy
Recalling previously solved problems, known methods, or applying a recently established logical procedure to a new target within the same problem. This involves recognizing structural similarities and transferring a strategy from one context (or one part of the equation) to another. Sources: Have you seen it before?; Do you know a related problem? (P); Activating a previous experience (K); Make a connection with a previously encountered problem (Faire le lien avec un problème déjà rencontré) (F); Solving a simpler analogous problem (P&K)
H8b. Presenting Related Theorems, Tools, or Properties
Introducing specific mathematical theorems, formulas, identities, or properties that are not provided in the problem statement but are necessary to advance the solution. Sources: Connect with a mathematical tool (theorem, property) (Faire le lien avec un outil mathématique (théorème, propriété)) (F)
H9. Experimental and Pattern Exploration, including…
Appendix
Table 6: Taxonomy of Problem-Solving Strategies. This table summarizes the code, strategy name, detailed description, and theoretical sources associated with each heuristic. Here, P = Pólya (1945) , K = Koichu et al. (2007) , F = Favier (2022) , and P&K = Posamentier and Krulik (2008) .
Name
Description
N1. Literal Repetition
Merely repeating the problem statement or giving a generic opening/closing without mathematical substance or added insight.
N2. Technical Performance
Routine calculations or simple algebraic manipulations that do not involve strategic planning or new insight; “doing the math” after the plan is set.
N3. Alien Statements
Unrelated thoughts or off-topic remarks.
N4. Answer
Stating the final answer.
Appendix
Table 7: Non-heuristic categories capturing reasoning steps that do not contribute strategic insight, including repetition, routine computation, irrelevant statements, and final answer reporting.
Solver
n
Qwen
Grok
Nemotron-Cascade 8B
115
0.019[0.008,0.029]
0.023[0.014,0.032]
Olmo-3-7B Think-RLVR
115
0.022[0.012,0.033]
0.023[0.015,0.032]
Qwen3-8B
107
0.024[0.014,0.035]
0.022[0.014,0.032]
Qwen3-32B
113
0.021[0.009,0.032]
0.022[0.014,0.031]
Appendix
Table 8: Mean full-trajectory hard-minus-simple JSD contrasts under Qwen3.5-27B and Grok-4.1-Fast. Brackets contain problem-bootstrap 95% confidence intervals; n is the number of seed problems with complete matched O/S/H triples.
Reference
Target
Nref
Ntarget
k=3
k=5
k=10
Density
Coverage
Density
Coverage
Density
Coverage
Post-trained
Qwen3-1.7B-Base
Qwen3-1.7B-GRPO
834
886
1.219
0.871
1.175
0.952
1.157
0.999
Olmo-3-7B
Olmo-3-7B-Think-RL-Zero
1229
1307
1.250
0.707
1.272
0.806
1.272
0.897
Qwen2.5-7B
Qwen2.5-7B-SimpleRL-Zoo
1280
1294
1.511
0.888
1.339
0.964
1.215
0.989
DeepSeek-Math-7B-Base
DeepSeek-Math-7B-SimpleRL-Zoo
463
500
1.525
0.950
1.338
0.989
1.248
1.000
Appendix
Table 9: Neighborhood-size sensitivity using the same successful trajectory pools and closed cosine neighborhoods as Table 4 . Nref and Ntarget are fixed across k ; Density and Coverage are reported separately. The final row adds the Olmo Think-RLVR checkpoint.
Current plan-based reasoning methods improve large language models (LLMs) by inserting a planning stage before execution, giving rise to the question → plan → cot paradigm. While effective, a closer examination reveals an inherent paradigm-level gap: both the planning and its execution stages decide how to solve a problem, while the prior question of what to solve; recognizing the problem type, the applicable tools, and the foreseeable pitfalls; remains entirely implicit. To bridge this gap, we propose PPC (Preplan-Plan-CoT), a framework that introduces an explicit problem-understanding stage, the preplan, yielding a new question → preplan → plan → cot paradigm. Realizing this paradigm requires safeguarding the conceptual integrity of preplan at both ends. Specifically, we design a three-stage synthesis pipeline with a spoiler-score detector that filters out leakage and spoiler failures to build clean preplan supervision, and a composite GRPO reward enforces that the generated plan genuinely follows from the preplan. Experiments across four backbones and five mathematical reasoning benchmarks show that PPC achieves the best results on 39 of 40 metrics, improving maj@16 and pass@16 by +2.23 and +3.06 over the strongest baseline without introducing additional inference token overhead.
Shaojie Wang, Liang Zhang
Hong Kong University of Science and Technology (Guangzhou)
Reinforcement Learning from Verifiable Rewards (RLVR) has become the dominant approach for improving mathematical reasoning in large language models, yet current methods reduce each correct rollout to a single reward bit, ignoring the geometric structure shared among their hidden states. Investigating this structure, we find that at the anchor token (the position immediately before the answer marker), correct rollouts converge naturally because they must produce the same answer (cosine similarity ~0.84), yet each retains residual variance from its unique reasoning path. Encouraging full alignment at this point pushes the model to extract a unified "correct decision" representation, reducing sensitivity to which reasoning path was taken. Based on this observation, we propose Hidden-Align, an auxiliary loss function that aligns the last-layer hidden states of correct rollouts at the anchor token during RL training, with zero overhead in both training and inference. On eight mathematical reasoning benchmarks, Hidden-Align improves average pass@1 over the DAPO baseline by 3.8, 6.2, and 5.4 percentage points on Qwen3-1.7B, 4B, and 14B respectively, with consistent pass@k gains across all three scales, supported by ablations on loss type, anchor position, layer depth, and loss weight.
Ziyue Wang, Aomufei Yuan, Yongfu Zhu +10
1Peking University · 2JINGDONG · 3Shanghai Innovation Institute +2
Mathematical reasoning benchmarks are typically organized by topic, but language models may organize their internal computation by reusable reasoning approach instead. In this paper, we investigate whether open math-capable LLMs organize internally by topical sub-skill or by reasoning approach, and we present evidence that the approach is the key. We introduce a generation-replay protocol: a model first generates a solution, after which we replay the exact prompt-plus-generation trajectory and extract activation-importance signatures over the reasoning tokens. We cluster these signatures without supervision across eight models and five mathematical reasoning sources, then evaluate the recovered structure with structural, semantic, and intervention tests. Across all 40 model-source cells, the recovered clusters outperform matched-size random baselines. Two independent frontier-LLM judges find approach-level coherence in 77-82% of real clusters versus 6-11% in within-source controls, and topic-pure clusters usually receive labels finer than the topic itself. In approach-controlled prompting, changing the requested reasoning approach shifts cluster assignment in seven of eight model conditions, whereas paraphrases largely preserve it. These results indicate that math-capable LLMs organize internal mathematical computation by reasoning approach rather than benchmark topic. The implication is that topic-stratified benchmarks and topic-balanced training corpora can still miss the axis that matters: even deliberately topic-balanced corpora may remain imbalanced over reasoning approaches.