SAND-Math: Using LLMs to Generate Novel, Difficult and Useful Mathematics Questions and Answers

Chaitanya Manem, Pratik Prabhanjan Brahma, Prakamya Mishra, Zicheng Liu, Emad Barsoum

TL;DR

SOTA mathematical LLMs are severely bottlenecked by a scarcity of complex, high-quality training data. To solve this, the authors introduce SAND-Math, an automated pipeline that synthesizes challenging math problems from scratch and systematically elevates their complexity using a novel technique called "Difficulty Hiking." Augmenting a strong baseline with just 500 SAND-Math samples delivers massive performance leaps, outperforming alternative synthetic datasets by up to 17.85 absolute points on the AIME25 benchmark.

What Problem Does This Paper Address?

While frontier models like DeepSeek-R1 and OpenAI o3 demonstrate remarkable mathematical reasoning, their training data and generation pipelines remain proprietary. Sourcing open-source data at this level is a major bottleneck.

Existing synthetic data methods typically "remix" existing training sets from benchmarks like GSM8K or MATH. Consequently, they cannot surpass the inherent difficulty ceiling of their seed data. Meanwhile, manually curating Olympiad-level problems is labor-intensive and fundamentally unscalable.

SAND-Math addresses this challenge by leveraging the "metacognitive abilities" of SOTA LLMs to generate entirely new, highly complex math problems without relying on any pre-existing seed datasets.

Methods

The authors design an end-to-end data generation and filtering pipeline consisting of several rigorous stages:

  1. Question and Solution Generation: A teacher LLM (DeepSeek-R1) co-generates an initial pool of questions and solutions based on randomly sampled math branches.
  2. Solution Correctness Filtering: Self-consistency filtering retains questions only if multiple independently sampled answers agree.
  3. De-duplication & Decontamination: Semantic hashing removes near-duplicates, and a two-stage retrieval/judge setup ensures no test-set leakage occurs against evaluation benchmarks.
  4. Difficulty & Novelty Filtering: A solver model filters out problems it can already solve, while web-search queries eliminate questions too similar to existing public web content.
  5. Difficulty Hiking: This is the core innovation. Instead of accepting the initial difficulty level, the pipeline re-prompts the teacher LLM to rewrite the question. The model is forced to deeply synthesize the original problem's theme with an advanced theorem and a cross-domain concept drawn from a structured mathematics taxonomy (e.g., blending Cauchy's Functional Equation with the Sprague-Grundy Theorem).
Data Generation and Filtering pipeline for SAND-Math.

Datasets

  • SAND-Math: The newly introduced dataset containing 8,842 novel, high-difficulty problems. Subsets of 500 and 1,500 samples were used for the paper's fine-tuning experiments.
  • Baselines & Evaluation Sets: Models were evaluated on competitive math benchmarks including AIME24, AIME25, AMC24, and MATH-500. Performance was compared against or augmented with datasets like LIMO (a high-quality human-curated baseline), openr1_math, MetamathQA, and OpenMathInstruct.
Difficulty distribution of SAND-Math compared with other math datasets

Key Insights and Ideas

  • LLMs as Problem Crafters: Frontier models possess the implicit metacognitive capability to model the characteristics of hard math problems and generate high-quality, solvable questions from minimal prompts.
  • Forced Concept Blending Scales Difficulty: Forcing an LLM to disguise a advanced theorem and weave in cross-domain concepts is a highly effective, scalable mechanism for shifting problem difficulty distributions upward.
  • Data Quality Over Scale: In complex reasoning tasks, data density and difficulty matter far more than volume. Injecting a tiny, targeted batch of 500 highly complex synthetic samples can match or outperform human-curated data when augmenting a strong baseline.

Key Results

The authors fine-tuned a Qwen2.5-32B-Instruct model to validate the dataset's quality across standalone and data-augmentation settings:

  • Standalone Performance: Fine-tuning on just 500 standalone SAND-Math samples achieved an average score of 69.10%, performing competitively with the human-curated openr1_math dataset (70.27%).
  • Augmentation Breakthroughs: Adding 500 SAND-Math samples to the LIMO baseline pushed the average score to 73.32%. This significantly outperformed augmentations using other synthetic datasets like MetamathQA (45.23%) and OpenMathInstruct (48.50%).
Post-training performance of Qwen2.5-32B trained with SAND-Math vs. other datasets
  • The Impact of Difficulty Hiking: In an ablation study using 1,500 samples, the Difficulty Hiking step successfully shifted the mean problem difficulty rating from 5.02 to 5.98. This complexity boost directly translated to a performance jump on AIME25, lifting accuracy from 46.38% (Base) to 49.23% (Difficulty Hiked).
Impact of Difficulty Hiking on Finetuning Performance

Limitations and Future Work

  • Teacher Model Dependency: The pipeline's yield and correctness are tightly bound to the capabilities of the teacher model. For instance, DeepSeek-R1 achieved a 41.9% combined data yield, though the authors note that upgrading to newer models like GPT-OSS 120B can dramatically boost this yield to 74.0%.
  • Compute Constraints: Due to compute budgets, the fine-tuning experiments were conducted on small representative samples (500 and 1,500 subsets) rather than the full dataset. The authors highlight large-scale post-training as a vital next step to explore the upper bounds of this automated pipeline.

Summary updated

BibTeX
@inproceedings{manem2025sand,
  author = {Chaitanya Manem and Pratik Prabhanjan Brahma and Prakamya Mishra and Zicheng Liu and Emad Barsoum},
  title = {{SAND-Math: Using LLMs to Generate Novel, Difficult and Useful Mathematics Questions and Answers}},
  booktitle = {MATH-AI @ NeurIPS},
  year = {2025},
  url = {https://openreview.net/forum?id=wiXdskuyq9},
}
Figure