CircuitSeer: Mining High-Quality Data by Probing Mathematical Reasoning Circuits in LLMs
Shaobo Wang, Yongliang Miao, Yuancheng Liu, Qianli Ma, Ning Liao, Linfeng Zhang
TL;DR
CircuitSeer shifts data selection for LLM reasoning from external heuristics to internal model signals by identifying a sparse set of attention heads that form core reasoning circuits. Through ablation, it discovers reasoning heads and uses their collective activations to score and softly sample training data, yielding stronger multi-step reasoning performance across 4 models and 9 benchmarks. The method achieves state-of-the-art data efficiency, with training on ~10% of CircuitSeer-selected data outperforming full-dataset fine-tuning on key metrics, and it generalizes across model sizes and architectures. This mechanism-driven approach bridges mechanistic interpretability with practical data curation, enabling scalable, transparent, and domain-agnostic improvements in mathematical reasoning tasks.
Abstract
Large language models (LLMs) have demonstrated impressive reasoning capabilities, but scaling their performance often relies on massive reasoning datasets that are computationally expensive to train on. Existing data selection methods aim to curate smaller, high-quality subsets but often rely on costly external models or opaque heuristics. In this work, we shift the focus from external heuristics to the model's internal mechanisms. We find that complex reasoning tasks consistently activate a sparse, specialized subset of attention heads, forming core reasoning circuits. Building on this insight, we propose CircuitSeer, a novel data selection method that quantifies the reasoning complexity of data by measuring its influence on these crucial circuits. Extensive experiments on 4 models and 9 datasets demonstrate CircuitSeer's superiority. Notably, fine-tuning Qwen2.5-Math-7B on just 10% of data selected by our method achieves a 1.4-point gain in average Pass@1 over training on the full dataset, highlighting its efficiency and effectiveness.
