Table of Contents
Fetching ...

Making Mathematical Reasoning Adaptive

Zhejian Lai, Xiang Geng, Zhijun Wang, Yang Bai, Jiahuan Li, Rongxiang Weng, Jingang Wang, Xuezhi Cao, Xunliang Cai, Shujian Huang

TL;DR

AdaR introduces adaptive reasoning for mathematical tasks by generating perturbed, logic-preserving synthetic data via executable code and RLVR-enabled training. The framework couples data synthesis with verifiable rewards to promote reasoning that follows the correct problem-solving logic, improving robustness and generalization across in-domain and out-of-domain benchmarks with limited data. Empirical results show substantial gains across multiple base models and demonstrate the importance of perturbation strategy, scaling dimensions, and code-based reasoning. Analyses reveal AdaR enhances algebraic thinking and logical-order influence, and is applicable to instruct-tuned models, offering a scalable path to reliable mathematical reasoning in LLMs.

Abstract

Mathematical reasoning is a primary indicator of large language models (LLMs) intelligence. However, existing LLMs exhibit failures of robustness and generalization. This paper attributes these deficiencies to spurious reasoning, i.e., producing answers from superficial features. To address this challenge, we propose the AdaR framework to enable adaptive reasoning, wherein models rely on problem-solving logic to produce answers. AdaR synthesizes logically equivalent queries by varying variable values, and trains models with RLVR on these data to penalize spurious logic while encouraging adaptive logic. To improve data quality, we extract the problem-solving logic from the original query and generate the corresponding answer by code execution, then apply a sanity check. Experimental results demonstrate that AdaR improves robustness and generalization, achieving substantial improvement in mathematical reasoning while maintaining high data efficiency. Analysis indicates that data synthesis and RLVR function in a coordinated manner to enable adaptive reasoning in LLMs. Subsequent analyses derive key design insights into the effect of critical factors and the applicability to instruct LLMs. Our project is available at https://github.com/NJUNLP/AdaR.

Making Mathematical Reasoning Adaptive

TL;DR

AdaR introduces adaptive reasoning for mathematical tasks by generating perturbed, logic-preserving synthetic data via executable code and RLVR-enabled training. The framework couples data synthesis with verifiable rewards to promote reasoning that follows the correct problem-solving logic, improving robustness and generalization across in-domain and out-of-domain benchmarks with limited data. Empirical results show substantial gains across multiple base models and demonstrate the importance of perturbation strategy, scaling dimensions, and code-based reasoning. Analyses reveal AdaR enhances algebraic thinking and logical-order influence, and is applicable to instruct-tuned models, offering a scalable path to reliable mathematical reasoning in LLMs.

Abstract

Mathematical reasoning is a primary indicator of large language models (LLMs) intelligence. However, existing LLMs exhibit failures of robustness and generalization. This paper attributes these deficiencies to spurious reasoning, i.e., producing answers from superficial features. To address this challenge, we propose the AdaR framework to enable adaptive reasoning, wherein models rely on problem-solving logic to produce answers. AdaR synthesizes logically equivalent queries by varying variable values, and trains models with RLVR on these data to penalize spurious logic while encouraging adaptive logic. To improve data quality, we extract the problem-solving logic from the original query and generate the corresponding answer by code execution, then apply a sanity check. Experimental results demonstrate that AdaR improves robustness and generalization, achieving substantial improvement in mathematical reasoning while maintaining high data efficiency. Analysis indicates that data synthesis and RLVR function in a coordinated manner to enable adaptive reasoning in LLMs. Subsequent analyses derive key design insights into the effect of critical factors and the applicability to instruct LLMs. Our project is available at https://github.com/NJUNLP/AdaR.

Paper Structure

This paper contains 40 sections, 4 equations, 5 figures, 6 tables.

Figures (5)

  • Figure 1: Subfigure I presents the composition of the math data and the modeling of three reasoning processes. Subfigure II illustrates how we get the Query-Answer pairs by controllably perturbing variable values while preserving problem-solving logic and sanity. Subfigure III illustrates that synthetic data, when leveraged via RLVR, elicits adaptive reasoning by comparing rewards from responses to perturbed queries.
  • Figure 2: Influence of perturbation magnitude.
  • Figure 3: Performance of scaling $x$ or $T$.
  • Figure 4: Performance of scaling $L$.
  • Figure 5: The case study of structural text in outputs. The green background indicates the correct reasoning step. The red background indicates the wrong reasoning step.

Theorems & Definitions (1)

  • Remark