Efficient Data Selection at Scale via Influence Distillation

Mahdi Nikdan, Vincent Cohen-Addad, Dan Alistarh, Vahab Mirrokni

Abstract

As Large Language Models (LLMs) grow in complexity, the computational cost of fine-tuning on massive datasets has become a significant bottleneck. While data selection aims to identify the most impactful training samples to reduce this burden, existing methods often struggle with scalability or fail to account for the specific model's state. This paper introduces Influence Distillation, a mathematically grounded framework that optimizes data selection by estimating how individual samples reduce loss on a target task. By utilizing a landmark-based approximation and model-aware Jacobian-vector Product (JVP) embeddings, Influence Distillation achieves state-of-the-art performance with up to 3.5x faster execution than previous influence-based methods.

Introduction

The efficiency of LLM fine-tuning is largely determined by the quality, rather than just the quantity, of the training data. Selecting a high-quality subset from a massive pool of millions of samples is a critical challenge. Current approaches generally fall into three categories, each with distinct limitations:

  1. Heuristic-based filtering: Methods like perplexity-based selection are "model-blind," ignoring how a specific model interacts with the data.
  2. Static Representations: Methods using fixed embeddings fail to capture the evolving relationship between the model and the target task.
  3. Influence-based methods: While theoretically robust, calculating how every individual data point affects model parameters is computationally prohibitive at scale.

Influence Distillation bridges this gap by providing a scalable, model-aware framework that maintains mathematical rigor without the "brutal" computational overhead of traditional influence functions.

Methodology

Influence Distillation treats data selection as an optimization problem: determining the optimal weights for training samples to minimize the model's loss on a specific target dataset. The framework introduces several technical innovations to make this feasible at scale.

Second-Order Influence and Robust Weighting

Instead of relying solely on first-order gradients, the method utilizes a second-order Taylor expansion that incorporates Hessian information. This allows for a more precise estimation of a sample's influence. To prevent the selection from "overfitting" to the model's current state, the authors include an L2 regularization term in the optimization objective, ensuring the selected data remains useful throughout the training trajectory.

Landmark-Based Approximation and JVP Embeddings

To avoid the cost of calculating influence for every sample in a multi-million-point pool, the researchers employ a "distillation" strategy. They compute precise influence values for a small set of "landmark" samples (e.g., 4,096 points).

To propagate this influence to the rest of the dataset, they introduce Jacobian-vector Product (JVP) Embeddings. These embeddings are model-aware, reflecting how the model's internal layers react to specific data, yet they are significantly cheaper to compute than full gradients. This allows the system to "distill" the influence knowledge from landmarks to the broader data pool efficiently.

Experimental Setup

The framework was validated using the Tulu V2 source pool, which contains approximately 5.8 million instruction-tuning samples. The researchers evaluated performance across a diverse set of benchmarks, including MMLU (general knowledge), GSM8k (mathematics), BBH (reasoning), TyDIQA (multilingual QA), Codex (code), and SQuAD (reading comprehension).

Testing spanned multiple model families, including Llama (Llama-2-7B, Llama-3.2-3B) and Qwen (Qwen2.5-1.5B/3B), to ensure the method's generalizability across different architectures.

Key Insights and Results

Superior Efficiency and Performance

Influence Distillation demonstrates a significant leap in efficiency, achieving a 3.5x speedup in the embedding and selection phase compared to the previous state-of-the-art method, LESS. Despite this speed, the performance remains high; in several benchmarks, training on just 10,000 selected samples matched or exceeded the performance of training on the entire dataset.

The Power of Model-Awareness

Experiments confirmed that static embeddings often fail to capture the specific needs of a model. By using JVP embeddings, Influence Distillation creates a representation that dynamically reflects the model's state. Furthermore, while the framework supports second-order calculations, the authors found that for practical LLM learning rates, the first-order term often dominates, allowing for further simplification without significant performance loss.

Pareto Superiority

When evaluating the trade-off between downstream accuracy and computational cost, Influence Distillation consistently occupies the Pareto frontier. For example, on the Qwen2.5-1.5B model, the method improved average performance by 6.52% over random selection, providing the best return on investment for a fixed computational budget.

Limitations and Future Work

While highly effective, Influence Distillation currently relies on a small "target" dataset to define the optimization goal, making it less suitable for general-purpose pre-training where specific downstream tasks are unknown. Additionally, the current implementation performs a static selection at the start of training. Future research may explore multi-phase or periodic re-sampling to account for how a model's data needs change as it learns. Finally, a brief "warm-up" period on a random data subset is required to stabilize gradients, though this cost becomes negligible as the total data pool scales.

Summary updated

BibTeX
@inproceedings{nikdan2025efficient,
  author = {Mahdi Nikdan and Vincent Cohen-Addad and Dan Alistarh and Vahab Mirrokni},
  title = {{Efficient Data Selection at Scale via Influence Distillation}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=E6ZdfjtoiX},
}
Figure