arXiv(opens in a new tab)cs.LGOct 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2610.03702

LESSER: Post-Training Data Selection with Output-Layer Gradients

Lyuxin David Zhang, Eric Wong, Surbhi Goel, Anton Xue

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

The choice of post-training data for large language models substantially affects downstream performance. Gradient-based data selection is a popular approach that ranks training data by how well their gradients align with those of a small validation set. However, ranking with full-parameter gradients requires an expensive backward pass on every sample, making computation intractable for large candidate pools. This raises a natural question: can we approximate full-gradient features at a fraction of the cost? Conveniently, we find that output-layer gradients suffice for effective data selection, yet require only the cheaper forward pass. We implement this as LESSER, a drop-in wrapper for selection methods that reduces the feature-extraction FLOP cost by 9.7×9.7\times for SFT and 3.0×3.0\times for RL benchmarks, while tracking full-gradient performance on downstream tasks. Empirically, we find that even when output-layer and full gradients rank individual samples differently, they select batches with aligned gradients.

Figure

Figure 1: Efficient data selection with output-layer gradients. Given a candidate training pool and a small query set representative of downstream tasks, LESSER extracts output-layer gradient features to rank and select training examples. These features approximate the downstream behavior of full-gradient methods like LESS while substantially reducing feature-extraction FLOPs.

1 INTRODUCTION

The choice of post-training data substantially shapes the performance of large language models (LLMs) (Guo et al., 2025; Ouyang et al., 2022; Wang et al., 2023). In particular, training on small, high-quality subsets tailored to a target task can match or even outperform training on a larger, general pool (Muennighoff et al., 2025; Xia et al., 2024). However, identifying which subset to use is non-trivial, as the utility of each sample depends on the model and target task, and selection can become expensive when the candidate pool grows. These challenges have motivated the development of data selection methods for identifying targeted, high-quality subsets (Killamsetty et al., 2021b).

A common approach to targeted data selection maps candidate and query examples into a shared feature space and selects candidates by their similarity to the queries (Zhang et al., 2025). When choosing features, gradients are a natural choice because they describe how each training sample would update the model. This principle underlies modern LLM data selection methods such as LESS (Xia et al., 2024) and GIST (Min et al., 2026) for SFT, GradAlign (Yang et al., 2026) for RL, and GRACE (Panigrahi et al., 2025) for distillation teacher selection.

However, full-parameter gradients are costly to compute at scale: each candidate requires a backward pass through the LLM. For large candidate pools, extraction can cost more than training on the selected data itself (Yin & Rush, 2024). This has motivated more compute-efficient features, such as RDS+ (Ivison et al., 2025), which uses hidden-state features, and proxy-model methods such as Yang et al. (2024b), which use smaller models to guide selection. Despite their cost, however, gradient-based features often yield superior subsets (Nayak et al., 2026). We thus aim to approximate gradients at a fraction of the cost.

In particular, output-layer gradients are attractive because they can be computed directly from last-layer hidden states and output probabilities available during a forward pass, without backpropagating through the model. These features have also proved useful in other settings, including active learning for vision models (Ash et al., 2019), data valuation (Deng et al., 2025), and data attribution (Ran et al., 2026) methods. We find that they are also effective for post-training data selection.

References (100)

Couldn't load all references. Reload the page to try again.