Introduction
The "Scaling Laws" of AI suggest that more data and more compute lead to better models. However, we are hitting a wall where simply scraping the entire internet is no longer enough; much of that data is "low-signal" or "noisy." This is especially true for mathematics, where reasoning is more important than mere linguistic fluency. Existing data selection methods often rely on general heuristics or general-purpose classifiers, which tend to overlook the specific "skills" (e.g., factoring polynomials, applying the chain rule) required for mathematical proficiency.
The MASS Framework
To address these challenges, the authors introduce MASS (MAthematical data Selection via Skill graphs). MASS optimizes LLM pretraining by selecting the most "skill-dense" mathematical data. It operates in two primary phases:
1. Skill Graph Construction
First, a high-quality "reference" dataset (NuminaMath) is used to extract 1–10 specific mathematical skills from each entry using a powerful model (Qwen2.5-72B). A graph is then constructed where each node represents a unique skill. An edge is drawn between two skills if they appear together in the same problem, capturing "compositional information"—how complex problems are built from simpler blocks. Nodes are weighted by frequency, and edges are weighted by co-occurrence.
2. Data Selection via Scoring
For any new piece of "target" data (e.g., a raw web page), the framework calculates its semantic similarity to the skills in the graph. Instead of just looking at direct similarity, MASS aggregates scores across the graph. A data point receives a higher score if it covers a broad range of important skills and captures the nuanced relationships between them. Data points are then ranked, and only the top $k\%$ are selected for pretraining.
Experimental Setup
The effectiveness of MASS was evaluated using a suite of nine math-related benchmarks (including GSM8K, MATH, and MMLU-STEM) across several datasets and models:
- Reference Dataset: NuminaMath (100K sampled points).
- Target Datasets: OpenWebMath, OpenWebMath-pro, and Jiuzhang3.0.
- Models Tested: TinyLlama-1.1B and Mistral-7B.
Key Results and Insights
The primary "aha moment" of the paper is that a good math problem is defined by the intersection of skills. By using a graph, MASS rewards data that demonstrates how different mathematical concepts interact, which is more valuable for training than problems using only isolated skills.
Key findings include:
- Massive Efficiency Gains: Models trained on MASS-selected subsets achieved similar performance to models trained on full datasets while using 50% to 70% fewer tokens. This represents a massive saving in computational cost.
- Superior Performance: When held to the same token budget as the baseline, MASS-trained models outperformed the original datasets by 3.3% to 5.9% on average across benchmarks.
- Quality Over Quantity: Results reinforce that synthetic data (like Jiuzhang3.0) can be significantly higher quality than web data. Even with far fewer tokens, the synthetic-trained models often outperformed web-trained ones.
Limitations and Future Work
The quality of the skill graph depends on the reference dataset; any "blind spots" in the reference set will persist in the selected data. Additionally, current weighting is based on frequency rather than difficulty. Future work may incorporate "skill difficulty" and explore adapting this approach to more subjective domains where skills are harder to define and extract.
Summary updated