NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

On the Inflation of KNN-Shapley Value

Ziao Yang, Han Yue, Jian Chen, Hongfu Liu · DOI

Abstract

In data-centric AI, identifying the value of individual data samples is crucial for effective data cleaning. While KNN-Shapley offers a computationally efficient proxy for traditional Shapley values, it suffers from "value inflation," where detrimental samples are assigned positive scores. This paper introduces Calibrated KNN-Shapley (CKNN-Shapley), which mitigates this inflation by excluding noisy, small data subsets from the valuation process. By recalibrating the contribution scores, CKNN-Shapley restores zero as a reliable threshold for identifying harmful data, leading to significant accuracy improvements across image, text, and tabular datasets.

Introduction: The Challenge of Data Valuation

The shift toward data-centric AI has prioritized data quality over algorithmic complexity. Shapley values, derived from cooperative game theory, provide a principled way to quantify the contribution of each data point to a model's performance. However, calculating exact Shapley values is computationally prohibitive for large-scale datasets. KNN-Shapley was introduced as a high-speed alternative, utilizing a K-Nearest Neighbors classifier to estimate these values in $O(N \log N)$ time.

Despite its efficiency, researchers have discovered a critical flaw: value inflation. In standard KNN-Shapley, many samples that actually degrade model performance (e.g., mislabeled points or outliers) receive positive values. This shift makes it impossible to use zero as a universal threshold for data cleaning, as the true boundary between "helpful" and "harmful" data becomes unpredictable and dataset-dependent.

Figure 1: Value inflation in standard KNN-Shapley. The optimal threshold for data removal is shifted away from zero, making simple filtering ineffective.

Methodology: Calibrated KNN-Shapley (CKNN-Shapley)

The root of value inflation lies in the inclusion of very small training subsets (e.g., 1 or 2 points) in the Shapley calculation. These tiny subsets are highly noisy and do not accurately reflect how a model learns from a representative dataset. CKNN-Shapley addresses this by imposing a subset size constraint.

The calibration process involves three key steps:

  1. Constraint Implementation: A threshold $T$ is introduced to ensure only subsets of a minimum size are considered.
  2. Zeroing Distant Neighbors: During recursive calculation, the $T$ samples farthest from the validation point are assigned a zero contribution.
  3. Recalibrated Recursion: A modified recursive formula is used to calculate values for the remaining samples, accounting for the exclusion of small subsets.

By ignoring these "meaningless" small subsets, the resulting values are "pushed down," effectively calibrating the system so that zero serves as a reliable boundary for data filtering.

Figure 2: Comparison of KNN-Shapley and CKNN-Shapley. CKNN-Shapley effectively shifts the values of misidentified samples toward the zero threshold.

Experimental Evaluation

The authors evaluated CKNN-Shapley across nine benchmarks spanning image data (MNIST, FMNIST, CIFAR10), tabular data (Pol, Wind, CPU), and text data (AGnews, SST-2, News20).

Key Results

  • Superior Data Cleaning: Removing samples with negative CKNN-Shapley values improved model accuracy on CIFAR10 and SST-2 by over 7% and 8%, respectively, significantly outperforming standard KNN-Shapley.
  • Mislabeled Data Detection: In experiments where labels were intentionally flipped, CKNN-Shapley was far more effective at identifying and removing corrupted samples than existing variants like TKNN-Shapley.
  • Efficiency Gains: Surprisingly, CKNN-Shapley is faster than the original method. By directly assigning zero to the $T$ farthest samples, it bypasses a substantial portion of the recursive calculations.
  • Generalization: Although calculated using a KNN surrogate, the datasets cleaned via CKNN-Shapley also improved the performance of other models, including Multi-Layer Perceptrons (MLP), Logistic Regression, and SVMs.

Conclusion and Future Work

CKNN-Shapley provides a practical solution to the value inflation problem, enabling more effective and efficient data cleaning. While the authors suggest a heuristic for the parameter $T$ (suggesting $T = N - 2K$), future research is needed to develop automated tuning methods based on specific dataset noise levels and to explore the theoretical implications of subset size constraints on game-theoretic axioms.

Summary updated

BibTeX
@misc{yang2024inflation,
  author = {Ziao Yang and Han Yue and Jian Chen and Hongfu Liu},
  title = {{On the Inflation of KNN-Shapley Value}},
  year = {2024},
  eprint = {2405.17489},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2405.17489},
}
Figure