📃 Paper | ⚙️ Code | 🤖 Project | 📭 Contact
Large Language Models (LLMs) have shown impressive reasoning capabilities, yet they often rely on spurious reasoning — producing answers from superficial features, leading to failure at robustness and generalization.
We propose 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.
The framework integrates data synthesis and RLVR training to enhance both robustness (in-domain) and generalization (out-of-domain).
Figure 1.
Subfigure I: Three reasoning modes — direct inference (black), spurious reasoning (red), adaptive reasoning (green).
Subfigure II: Logic-preserving variable perturbation and gold-answer generation via executable logic.
Subfigure III: RLVR optimization encouraging adaptive reasoning through comparative feedback.
- 🚀 +8.5 Average Improvement across in-domain robustness tasks and out-of-domain tasks.
- 🧮 Only 9K synthetic data needed for significant gains.
- ⚖️ Enable algebraic thinking and improved stability under scaling.
- 🔁 Generalizable framework applicable to instruct models.
git clone https://github.com/LaiZhejian/AdaR.git
cd AdaR
uv syncAdaR expects data in JSONL format, with each line as:
{
"query": "The math problem statement",
"chosen": "The chain-of-thought reasoning",
"answer": "The gold standard answer"
}| Field | Description |
|---|---|
query |
Input math problem |
chosen |
Chain-of-thought reasoning |
answer |
Ground-truth answer |
Modify parameters in scripts/config.yaml:
is_parallel:true→ Parallel querying (API-based).false→ Sequential querying (local).
You may adjust hyperparameters according to your dataset and model choice.
Once configuration is set:
bash synthesis.shThis script will launch the AdaR data synthesis and RLVR training pipeline.
If you find this repository helpful, please cite:
@misc{lai2025makingmathematicalreasoningadaptive,
title={Making Mathematical Reasoning Adaptive},
author={Zhejian Lai and Xiang Geng and Zhijun Wang and Yang Bai and Jiahuan Li and Rongxiang Weng and Jingang Wang and Xuezhi Cao and Xunliang Cai and Shujian Huang},
year={2025},
eprint={2510.04617},
archivePrefix={arXiv},
primaryClass={cs.AI},
url={https://arxiv.org/abs/2510.04617},
}
⭐️ If you find AdaR helpful, please give this repo a star!
Designed for robust and interpretable mathematical reasoning.
