arXiv:2610.24963cs.CLOct 2026

Manuscript Offprint

arXiv:2610.24963

DeGMatch: Target-Aware Reasoning Data Selection via Deconfounded Gradient Matching

Changho Lee, Janghoon Han, Rajdeep Mukherjee, Yeda Song, Lening Nick Cui, Xinya Du, Honglak Lee

Abstract

Reasoning post-training on long trajectories has substantially improved the reasoning capabilities of large language models, but scaling such training to large datasets is increasingly expensive. We study target-aware reasoning data selection, where a small reference set specifies a target capability and guides the selection of training trajectories for specialization. We find that existing target-aware methods can exhibit limited target discrimination on long reasoning trajectories, while dominant population-level structure in candidate gradients can obscure finer target-dependent variation during gradient matching. To address these limitations, we introduce Deconfounded Gradient Matching (DeGMatch), which first constructs a target-relevance gate and then reranks candidates using model-specific gradients. DeGMatch centers gradients using the candidate-population mean and removes leading principal directions before target matching, reducing the influence of dominant population-level structure and improving target discrimination. Across mathematics, science, and code, DeGMatch outperforms strong heuristic, target-aware, and reasoning-specific data selection baselines, while remaining effective across selection budgets, model families, and scales. Our code is publicly available at https://github.com/CHLee0801/degmatch.

1 Introduction

Recent advances in large language models have yielded substantial improvements in complex reasoning capabilities (DeepSeek-AI, 2025; Yang et al., 2025). Reasoning post-training has emerged as a standard approach to enhancing these capabilities through training on long reasoning trajectories (Guha et al., 2026; Chen et al., 2025a; Yuan et al., 2025; Zhao et al., 2025a). However, the growing scale of reasoning datasets and the length of individual trajectories make full-data training increasingly computationally expensive. This has

(a) Dominant PCs only

(b) Dominant PCs removed

Figure

Figure 1: Dominant gradient structure obscures fine-grained target variation. Each point represents a reference subset positioned by the candidate ranking it induces. (a) Rankings using only the top-50 principal-component subspace. (b) Rankings after removing the population mean and top 50 principal components. The corresponding five-way target-identification accuracy, computed in the original ranking space, increases from 56% to 71%. See Appendix B.7 for details.

motivated growing interest in data-efficient reasoning post-training, where carefully selected subsets of reasoning trajectories can achieve competitive performance with substantially less training data (Yang et al., 2026b; Li et al., 2025; Yang et al., 2026d; Yu et al., 2026; Li et al., 2026a).

While data-efficient selection seeks compact subsets that are broadly useful for post-training, many real-world applications require specialization to a particular downstream task or capability rather than broad, general-purpose competence (Xia et al., 2024). For such specialization, training examples that benefit general reasoning performance may not be those that best support the target capability. This motivates target-aware data selection, which aims to identify training examples that most effectively support a specified downstream objective. Prior work has explored this paradigm in instruction tuning and general data-selection settings, using target similarity or distribution matching to identify target-relevant examples, and gradient-based signals to estimate their training utility for a specified target (Liu et al., 2024b; Ivison et al., 2025; Lee et al., 2024; Xia et al., 2024; Feng et al., 2025; Min et al., 2026).

However, applying gradient-based matching to long reasoning trajectories reveals an important limitation. We find that candidate gradients are dominated by a small number of population-level directions: across five mathematical target-conditioned candidate populations, the top 50 principal components explain 86.7–89.4% of the centered-gradient variance. The leading principal subspaces also remain substantially aligned across candidate populations induced by different targets. As shown in Figure 1, rankings formed from the dominant subspace exhibit limited fine-grained target separation, whereas removing these dominant directions yields more distinguishable target-dependent ranking structure. These results suggest that dominant population-level gradient structure can obscure finer target-dependent variation during gradient matching.

Motivated by this analysis, we introduce DeG-Match, which suppresses dominant population-level structure in candidate gradients to better expose target-dependent variation during gradient matching. DeGMatch first restricts selection to a target-relevant candidate region. Within this region, it computes gradients with respect to the model being post-trained and, inspired by common-component removal in representation learning (Mu et al., 2018), centers gradients using the candidate-population mean and removes the leading principal directions estimated from the candidate gradients before target matching. DeGMatch then scores candidates using directional alignment with target gradients together with their gradient magnitude in the target-gradient subspace.

Empirically, DeGMatch consistently outperforms strong heuristic, target-aware, and reasoning-specific data selection baselines across multiple reasoning domains. On mathematical reasoning, it achieves the strongest aggregate performance among selection methods and the best result on six of eight benchmarks, while also outperforming competing selection methods on scientific reasoning and code generation. Further analyses show that DeGMatch remains effective across different deconfounding settings and selection budgets, as well as across model families and scales.

Our contributions are as follows:

• We identify limited target discrimination in target-aware selection on long reasoning trajectories and show that, for gradient-based matching, dominant population-level structure in candidate gradients can obscure finer target-dependent variation.

• We introduce DeGMatch, which combines target-relevant retrieval with deconfounded, model-specific gradient matching for efficient reasoning specialization.

• We show that DeGMatch outperforms strong heuristic, target-aware, and reasoning-specific baselines across reasoning domains, and remains effective across deconfounding settings and selection budgets, as well as across model families and scales.

References (99)