Unleashing Reasoning Capability of LLMs via Scalable Question Synthesis from Scratch

Yuyang Ding, Xinyu Shi, xiaobo liang, Juntao Li, Qiaoming Zhu, Min ZhangSubmission to ICLR 2025 · Rejected

TL;DR

ScaleQuest introduces an efficient framework that allows lightweight, open-source 7B models to synthesize high-quality mathematical reasoning questions entirely from scratch—without relying on seed problems or expensive proprietary APIs. Fine-tuning models on the resulting 1-million-sample synthetic dataset delivers massive gains (e.g., +29.2% to +46.4% on MATH), enabling a 7B base model to match or outperform models like GPT-4-Turbo and Claude-3.5 Sonnet.

What Problem Does This Paper Address?

Improving reasoning in Large Language Models (LLMs) requires vast amounts of high-quality, complex instruction data. However, the open-source community faces two major bottlenecks:

  1. Diversity limits in seed-based augmentation: Traditional methods (such as Evol-Instruct or rephrasing) modify existing seed questions. This causes generated problems to closely mirror the seeds, hitting a performance plateau.
  2. Prohibitive costs of proprietary models: Knowledge-driven synthesis often depends on commercial models like GPT-4 to generate novel prompts, which is too expensive to scale to millions of examples.

While recent approaches (like Magpie) prompt aligned models to generate instructions from scratch, applying this naively to small 7B models yields low-solvability and trivial reasoning questions. ScaleQuest addresses how to coax small, open-source models into becoming prolific, high-quality question designers at minimal cost.

Methods

ScaleQuest generates 1 million problem-solution pairs via a multi-stage pipeline utilizing two 7B models (DeepSeekMath-7B-RL and Qwen2-Math-7B-Instruct):

Small Seed Pool (15K questions)
       │
       ▼
Question Fine-Tuning (QFT) ──► Activates question generation from empty prompts
       │
       ▼
Question Preference Opt. (QPO) ──► Direct Preference Optimization for solvability & difficulty
       │
       ▼
Question Filtering ──► Language check, solvability verification, & difficulty sampling
       │
       ▼
Response Generation & Reward Filtering ──► Best-of-5 sampling guided by InternLM2-7B-Reward
  • Question Fine-Tuning (QFT): Problem-solving models naturally model the token probability of questions, but their generation objective focuses on answers. The authors fine-tune 7B solvers on just ~15K raw questions (from GSM8K and MATH, without answers) with an end-of-sentence token, teaching them to generate questions from scratch when prompted with a simple user prefix.
  • Question Preference Optimization (QPO): QFT questions can still be trivial or ill-posed. The authors use a DPO formulation on 10K paired questions where the "preferred" question is revised by an external model (GPT-4o-mini) to either increase difficulty or fix solvability constraints.
  • Filtering Pipeline:
  • Language Filtering: Removes non-English outputs (~20%).
  • Solvability Filtering: Qwen2-Math-7B-Instruct acts as a judge to discard ill-posed problems (~19.4%).
  • Difficulty Sampling: A DeepSeekMath-based scoring head predicts question fail rates to filter out overly simple problems.
  • Response Generation & Reward Filtering: Qwen2-Math-7B-Instruct samples 5 chain-of-thought solutions per problem. InternLM2-7B-Reward scores the candidates, and only the highest-scoring solution is retained.

Datasets

  • Training / Synthesis Seeds: ~15K raw questions from the training sets of GSM8K and MATH (solutions excluded).
  • Generated Dataset: ScaleQuest, a fully synthetic dataset of 1,000,000 math problem-solution pairs (400K from DeepSeekMath-QGen, 600K from Qwen2-Math-QGen).
  • Evaluation Benchmarks:
  • In-domain / Standard: GSM8K (elementary) and MATH (high-school competition).
  • Out-of-Domain (OOD): College Math, OlympiadBench, GSM-Hard, and MathChat.
  • Code Validation: HumanEval, MBPP, and BigCodeBench (adapted using CodeFeedback seeds).

Key Insights and Ideas

  • Activation over memorization: Training on 15K problems does not cause the generator to parrot the training distribution. The generated questions diverge into a broader difficulty space and even span multiple languages, showing that QFT merely unlocks an inherent latent ability.
  • Question diversity breaks the data ceiling: Datasets like DART-Math scale response variations over a narrow set of questions and quickly plateau. ScaleQuest demonstrates that expanding question diversity sustains out-of-domain scaling (e.g., on OlympiadBench).
  • Multi-model synergy: Combining questions from two distinct generators (DeepSeekMath tends toward applied, real-world problems, while Qwen2-Math leans toward abstract, theory-driven questions) yields better downstream accuracy (+1.7% average) than relying on either model alone.
  • High ROI on preference tuning: QPO increased generated question solvability from 75.4% to 83.6%, reducing wasted compute downstream during response generation and filtering by 9.4%.

Key Results

  • State-of-the-Art 7B Math Reasoning: Fine-tuning Qwen2-Math-7B-Base on ScaleQuest achieves 73.4% zero-shot pass@1 on MATH, outperforming GPT-4-Turbo (73.4%) and its own aligned teacher model Qwen2-Math-7B-Instruct (73.1%), despite using pure supervised fine-tuning (SFT) without reinforcement learning.
  • Broad Base Model Gains:
  • Mistral-7B: Jumps from 33.3% to 62.9% on MATH (+29.6%).
  • Llama3-8B: Jumps from 32.5% to 64.4% on MATH (+31.9%).
  • DeepSeekMath-7B: Reaches 66.6% on MATH (beating DeepSeekMath-7B-Instruct's 46.9%).
  • Extreme Cost Efficiency: Synthesizing the 1 million examples required 522.9 A100 GPU hours (~$680 in cloud compute) and ~$6 in API calls—roughly 10% of the cost of generating comparable tokens with GPT-4o.
  • Domain Transfer: When adapted to code reasoning, ScaleQuest outperforms refined datasets like CodeFeedback-Filtered by 5.9 points on average across HumanEval, MBPP, and BigCodeBench.

Limitations and Future Work

  • Supervised Fine-Tuning Only: Current models were only evaluated using standard SFT; applying post-training preference alignment (e.g., GRPO/PPO) on top of ScaleQuest remains unexplored.
  • Human-vs-Synthetic Gap: Human evaluation revealed that while ScaleQuest surpasses prior synthetic sets (NuminaMath) in clarity and reasonableness (3.9 and 4.0 out of 5), it still slightly lags human-curated datasets like GSM8K (4.4 and 4.5).
  • Generator Scope: The current implementation only leverages two generator base models; expanding to a larger ensemble of diverse generators is planned for future work.

Summary updated

Abstract

The availability of high-quality data is one of the most important factors in improving the reasoning capability of LLMs. Existing works have demonstrated the effectiveness of creating more instruction data from seed questions or knowledge bases. Recent research indicates that continually scaling up data synthesis from strong models (e.g., GPT-4) can further elicit reasoning performance. Though promising, the open-sourced community still lacks high-quality data at scale and scalable data synthesis methods with affordable costs. To address this, we introduce ScaleQuest, a scalable and novel data synthesis method that utilizes ``small-size'' (e.g., 7B) open-source models to generate questions from scratch without the need for seed data with complex augmentation constraints. With the efficient ScaleQuest, we automatically constructed a mathematical reasoning dataset consisting of 1 million problem-solution pairs, which are more effective than existing open-sourced datasets. It can universally increase the performance of mainstream open-source models (i.e., Mistral, Llama3, DeepSeekMath, and Qwen2-Math) by achieving 29.2\% to 46.4\% gains on MATH. Notably, simply fine-tuning the Qwen2-Math-7B-Base model with our dataset can even surpass Qwen2-Math-7B-Instruct, a strong and well-aligned model on closed-source data, and proprietary models such as GPT-4-Turbo and Claude-3.5 Sonnet.
BibTeX
@inproceedings{ding2025unleashing,
  author = {Yuyang Ding and Xinyu Shi and xiaobo liang and Juntao Li and Qiaoming Zhu and Min Zhang},
  title = {{Unleashing Reasoning Capability of LLMs via Scalable Question Synthesis from Scratch}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2025},
}
Figure