Abstract
Large Language Models (LLMs) frequently solve mathematical problems by memorizing superficial patterns rather than internalizing underlying logic—a phenomenon termed "spurious reasoning." This paper introduces AdaR (Adaptive Reasoning), a framework designed to foster robust mathematical understanding. By synthesizing logically equivalent problems with varied numerical values and employing Reinforcement Learning with Verifiable Rewards (RLVR), AdaR compels models to rely on invariant algebraic logic. Experimental results demonstrate a significant performance boost, with an average improvement of +8.50 points across benchmarks and a leap from 42.84% to 75.90% on the challenging MATH dataset.
Introduction
Despite their prowess, mathematical LLMs remain brittle. A minor numerical change in a word problem can lead to failure, even when the logic remains constant. This brittleness stems from spurious reasoning: models often bypass the causal logical path ($L$) from variables ($x$) to answers ($y$), instead jumping directly from text features to a predicted result. AdaR addresses this by forcing models to identify the "rules" of the problem that persist across numerical variations.
The AdaR Framework
The AdaR framework utilizes a multi-stage pipeline to transition models from pattern matching to logical reasoning.
Data Synthesis and Logic-to-Code
To ensure ground-truth accuracy across variations, AdaR employs a teacher LLM to translate natural language reasoning into executable Python code. This code represents the immutable problem-solving logic ($L$). By perturbing variables within a defined range (e.g., $\pm \alpha\%$), the system generates a suite of logically identical but numerically distinct problem variants.
Rigorous Sanity Checks
To maintain data quality, three validation steps are performed:
- Variable Alignment (VA): Ensures consistency between text and code variables.
- Executable Code (EC): Verifies the Python script correctly reproduces the original answer.
- Existence of Valid Solution (EVS): Cross-validates variants with an independent LLM to ensure they remain solvable.
Reinforcement Learning with Verifiable Rewards (RLVR)
The core of AdaR's training is a comparative RLVR approach. By training on batches containing both the original query and its perturbed variants, the model is penalized for spurious logic that fails on variants and rewarded for adaptive logic that succeeds across the entire set.
Experimental Results
AdaR was evaluated using 9,000 synthetic instances derived from ORCA-MATH across diverse benchmarks, including GSM8K, MATH, and AIME 2025.
Performance and Generalization
The framework achieved state-of-the-art robustness, outperforming existing synthesis methods like MetaMATH. Notably, on the Out-of-Domain MATH benchmark, the Qwen2.5-MATH-7B base model improved its score by over 33 percentage points.
Scaling and Robustness Trends
Analysis shows that accuracy improves as the diversity of numerical perturbations ($\alpha$) and the sampling frequency increase. Furthermore, the model exhibits strong scaling behavior, where In-Domain (ID) and Out-of-Domain (OOD) performance both rise predictably with data size.
Discussion: The Shift to Algebraic Thinking
Training with AdaR induces a fundamental shift in model behavior. The presence of structural, code-like reasoning steps increased from 55% to 90%, suggesting models began treating numbers as variables. This is further supported by the Influence to Logical Order (ILO) metric; AdaR models showed significantly higher sensitivity to the sequence of reasoning steps, proving a stricter adherence to logical flow.
Conclusion
AdaR demonstrates that high-quality, logically-grounded synthetic data is a powerful lever for improving LLM reasoning. By prioritizing "algebraic thinking" over pattern memorization, the framework significantly enhances both robustness and generalization. Future work will focus on scaling the complexity of the underlying logic ($L$) itself to handle even more sophisticated mathematical challenges.
Summary updated