SHAPE of Thinking: Mathematical Heuristics for Analyzing and Improving LLM Reasoning
Organizations: Graduate School of Data Science, Seoul National University, Seoul, Korea · Department of Mathematics Education, Seoul National University, Seoul, Korea
Abstract
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
| 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 |
| 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 |
| Model | Pass@1 (%) | (Full) | ( 5) | ||||
|---|---|---|---|---|---|---|---|
| Original | Simple | Hard | O–S | O–H | O–S | O–H | |
| Qwen3-8B | 96.0 | 94.0 | 84.0 | .043 | .160 | ||
| Qwen3-32B | 92.0 | 90.0 | 76.0 | .047 | .150 | ||
| Nemotron-Cascade-8B | 92.0 | 95.0 | 71.0 | .049 | .170 | ||
| Olmo-3-7B-Think-RLVR | 97.0 | 94.0 | 76.0 | .041 | .165 | ||
| Qwen2.5-7B (SimpleRL-Zoo) | 61.7 | 58.3 | 31.3 | .152 | .158 | ||
| Reference | Target | 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 | |||||
| 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 | 42.8 | 69.7 | ||||||||||
| HA-Plan-GRPO | 49.8 | 72.1 | ||||||||||
| Qwen3-1.7B-Base | ||||||||||||
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… |
| 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… |
| 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. |
| Solver | Qwen | Grok | |
|---|---|---|---|
| Nemotron-Cascade 8B | 115 | ||
| Olmo-3-7B Think-RLVR | 115 | ||
| Qwen3-8B | 107 | ||
| Qwen3-32B | 113 |
| Reference | Target | ||||||||
| 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 |
| Parameter | Value |
|---|---|
| Training Batch Size | 32 |
| Rollouts per Prompt | 4 |
| Number of GPUs | 2 B200 |
| Optimizer | AdamW |
| Temperature | 1.0 |
| Top- | 1.0 |
LLM Mathematical Reasoning
Large language model mathematical reasoning studies how AI systems solve, explain, verify, and generalize across mathematical problems and proofs.
See all 270 papers