For-Value: Efficient Forward-Only Data Valuation for finetuning LLMs and VLMs

Wenlong Deng, Qi Zeng, Jiaming Zhang, Minghui Chen, Zixin Ding, Christos Thrampoulidis, Boying Gong, Xiaoxiao LiarXiv 2025

TL;DR

Fine-tuning large language models (LLMs) and vision-language models (VLMs) is highly sensitive to data quality, but traditional data valuation methods are computationally crushed by the need for gradient backpropagation. For-Value solves this by introducing a forward-only data valuation framework that uses a simple, closed-form expression based on last-layer hidden states and token-level prediction errors. It matches or outperforms gradient-based baselines while delivering up to a 6× speedup and scaling effortlessly to 72-billion-parameter models.

What Problem Does This Paper Address?

When fine-tuning massive models like LLMs and VLMs, the adage "garbage in, garbage out" reigns supreme. Irrelevant, noisy, or mislabeled training data can lead to hallucinations, bias, or degraded performance. Data valuation techniques aim to score training samples based on how much they improve a model's performance on a validation set, allowing practitioners to filter out low-value data.

However, existing state-of-the-art data valuation methods (such as Influence Functions, DataInf, and HyperInf) rely heavily on gradient computations, Hessian matrix approximations, or repeated retraining. For billion-parameter models, calculating gradients per sample requires costly backpropagation, massive memory overhead, and prevents efficient batch parallelization. This makes data valuation practically impossible for modern, large-scale foundation models.

Methods

The authors challenge the assumption that backpropagation is necessary for data valuation. They introduce For-Value, a framework that computes data values using a single forward pass.

The core pipeline is illustrated below:

Figure 2: Pipeline of For-Value. Given a valuation sample and a training dataset, For-Value performs a forward pass over all data to compute scores (Eq. (1)) for each training example, using the last hidden embeddings and the prediction error α. The training samples are then ranked based on these computed values.

Key components of the method include:

  1. The Unconstrained Feature Assumption: Leveraging the immense expressive power of pretrained foundation models, the authors assume the model can produce highly optimized, unconstrained embeddings at its final hidden layer.
  2. Closed-Form Influence Score: Under this assumption, the authors mathematically prove that a training sample's influence on a valuation sample can be captured simply by the alignment (inner product) of their last-layer hidden representations, weighted by the similarity of their token-level prediction errors ($\alpha$).
  3. Sparse Matrix Similarity: Directly calculating this across the entire vocabulary ($V$) would be computationally expensive ($O(|V|d)$). To achieve true scalability, For-Value exploits the sparsity of the model's predictive distribution, restricting the computation to a sample-associated vocabulary ($\hat{V}$). This slashes the computational complexity down to $O(|\hat{V}|d)$, making it highly parallelizable across large batches.

Datasets

The authors evaluated For-Value across a diverse set of text and multimodal benchmarks:

  • LLM Influence Tasks: Synthetic text generation tasks including Sentence Transformations and Math Word Problems (both with and without multi-step reasoning).
  • VLM Influence Tasks: Image-to-text captioning tasks adapted for style generation (cartoons, pixel art, line sketches) and subject generation (using the DreamBooth dataset).
  • Mislabeled Data Detection: A QA-reformulated version of the Kaggle cat-dog dataset with 50% of the labels intentionally flipped.
  • Data Selection for Fine-Tuning:
  • Mathematics: The standard GSM8K dataset.
  • Medicine (Text): A corrupted version of the Huatuo-Complex-CoT dataset (Noise-Huatuo-Complex-CoT), where 40% of the data was injected with random word insertions/deletions.
  • Medicine (Multimodal): The PMC-Reasoning dataset for medical visual question answering.

Key Insights and Ideas

  • Gradients Aren't Mandatory: The paper's most significant insight is that for deeply pretrained foundation models, the final-layer representations and immediate prediction errors contain enough structural information to substitute for full-network gradient traces.
  • The Power of the Error Term ($\alpha$): Simply measuring embedding similarity between two samples is insufficient for data valuation (as shown by the poor performance of the embedding-only baseline, Emb). The prediction error term $\alpha$ acts as a crucial token-level weight, down-weighting tokens that the model can already confidently predict and focusing the valuation score on areas where the model actually stands to learn.

Key Results

For-Value consistently matches or beats gradient-dependent methods while drastically reducing time costs.

  • Data Selection Efficiency: When selecting the top 5% of data to fine-tune Llama-3.1-8B on the noisy medical dataset, For-Value achieved the highest average accuracy (60.31%) compared to baselines like DataInf (57.13%), while cutting the valuation time down to just 0.8 hours—a 5× to 6× speedup over the baselines.
  • Robustness to Noise: In the GSM8K math fine-tuning task, selecting the top 5% of data via For-Value yielded a test accuracy of 48.3%, outperforming full-dataset training (47.8%) and beating the strongest gradient baseline, HyperINF, by 5.5%.
  • Extreme Scalability: Because it avoids backpropagation, For-Value scales seamlessly across model sizes. The authors successfully ran it on the Qwen2.5-72B model, maintaining near-perfect data identification performance (AUC $\approx$ 1.0) within a runtime of only a few hundred seconds, a feat that causes traditional gradient methods to fail due to out-of-memory errors or prohibitive compute times.
Figure 1: Comparison of data valuation methods in terms of effectiveness and efficiency when selecting training data from the Noise-Huatuo-Complex-CoT dataset for fine-tuning.

Limitations and Future Work

While highly effective, the authors note a few limitations:

  • Finetuning-Specific: The framework relies on the unconstrained feature assumption of heavily pretrained models, meaning it is tailored for the fine-tuning stage and cannot be directly applied to pre-training data selection from scratch.
  • Static Valuation: The data values are calculated at the very beginning of the fine-tuning process ($t=0$). Because data influence can dynamically evolve as a model learns, extending For-Value to be stage-aware or integrating it into active learning pipelines remains an open direction for future research.

Summary updated

BibTeX
@misc{deng2025value,
  author = {Wenlong Deng and Qi Zeng and Jiaming Zhang and Minghui Chen and Zixin Ding and Christos Thrampoulidis and Boying Gong and Xiaoxiao Li},
  title = {{For-Value: Efficient Forward-Only Data Valuation for finetuning LLMs and VLMs}},
  year = {2025},
  eprint = {2508.10180},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2508.10180},
}
Figure