LossVal: Efficient Data Valuation for Neural Networks

Tim Wibiral, Mohamed Karim Belaid, Maximilian Rabus, Ansgar ScherparXiv 2024 · DOI

Introduction

In modern machine learning, the quality of training data often dictates the ceiling of model performance. However, real-world datasets are frequently plagued by "noise"—incorrect labels or corrupted features—that can actively degrade a model's predictive power. Data valuation aims to solve this by assigning a score to each training sample, quantifying its individual contribution to the model's success.

While gold-standard methods like Leave-One-Out (LOO) or Data Shapley provide theoretically grounded valuations, they are computationally "expensive," often requiring hundreds or thousands of model retrainings. This paper introduces LossVal, a fast and robust alternative designed to identify noisy or harmful data points within a single standard training loop.

Positioning LossVal in the Data Valuation Landscape

Existing techniques generally fall into categories based on whether they require retraining, use Shapley values, or are model-specific. As shown in the comparison below, LossVal distinguishes itself by adapting the training process directly without the need for exhaustive retraining, making it significantly more efficient for large-scale neural networks.

Comparison of data valuation methods across key properties.

The LossVal Framework

The core innovation of LossVal is a modified loss function that treats the importance of each data point as a learnable parameter. This approach moves data valuation from a post-hoc analysis to an online optimization problem.

1. Self-Weighting Mechanism

LossVal assigns a learnable weight $w_i$ (initially set to 1) to every training sample $i$. These weights are optimized via gradient descent alongside the model's internal parameters (weights and biases). This allows the model to "learn" which samples are helping it minimize loss on a clean validation set.

2. The LossVal Formula

The total loss is defined as the product of two distinct terms: $$\text{LossVal} = \mathcal{L}_w(y, \hat{y}) \cdot OT_w(X_{train}, X_{val})^2$$

  • Weighted Target Loss ($\mathcal{L}_w$): This is a standard loss function (e.g., Cross-Entropy) where each sample's contribution is scaled by its weight $w_i$.
  • Weighted Optimal Transport ($OT_w$): This term measures the "distance" between the distribution of the weighted training data and a small, clean validation set. By including this, LossVal becomes sensitive to feature noise—outliers in the input space—that standard label-focused methods might ignore.

The authors found that multiplying these terms creates a "multiplicative synergy." If the model perfectly predicts a sample, the gradient for its weight goes to zero, stabilizing the valuation.

Experimental Results

The authors evaluated LossVal across classification and regression tasks using benchmarks like OpenDataVal and CTR-23. A key test of any valuation method is its ability to detect noisy samples.

Noisy Sample Detection

LossVal consistently matched or outperformed state-of-the-art methods like LAVA and KNN-Shapley. It was particularly effective in "Mixed Noise" scenarios, where both labels and features were corrupted.

F1 scores for noisy sample detection across different noise rates and types. LossVal (epochs=30) consistently achieves the highest performance.

Efficiency and Real-World Application

The primary advantage of LossVal is its speed. On the 2dplanes dataset, LossVal (at 5 epochs) valued 1,000 points in approximately 1.8 seconds. In contrast, AME took 8.5 minutes and Data Shapley took 3.2 minutes. This efficiency enables applications like Active Learning in high-stakes environments. For instance, in vehicle crash testing, LossVal was used to predict which hypothetical test configurations would be most informative, potentially saving significant costs on physical testing.

Limitations and Future Work

Despite its performance, LossVal has some trade-offs. Its scores provide relative rankings rather than absolute game-theoretic values (like "this point adds 0.5% accuracy"). Additionally, the method depends on the availability of a small, clean validation set; bias in this set will propagate to the valuations. Future research aims to scale the Optimal Transport calculations to handle the massive datasets typical of Large Language Models (LLMs).

Summary updated

BibTeX
@misc{wibiral2024lossval,
  author = {Tim Wibiral and Mohamed Karim Belaid and Maximilian Rabus and Ansgar Scherp},
  title = {{LossVal: Efficient Data Valuation for Neural Networks}},
  year = {2024},
  eprint = {2412.04158},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2412.04158},
}
Figure