Executive Summary
Calculating the "fair value" of training data using Shapley values is notoriously slow, often scaling quadratically with dataset size for K-Nearest Neighbor (KNN) models. This paper introduces a localized framework that uses landmark-based pruning to decompose global valuation into small, local computations. By exploiting the distance-based local structure of the data space, the proposed method achieves up to a 25x speedup while maintaining exact valuation for threshold-based KNN models.
The Challenge of Data Valuation
In the modern machine learning ecosystem, establishing a principled way to determine an individual data point's contribution to a model's performance is critical. Accurate data valuation enables fair compensation for data contributors, identification of high-value samples, and the filtering of "poisoned" or noisy data.
The Shapley Value (SV), a concept derived from cooperative game theory, serves as the gold standard for this task. It provides a unique, mathematically fair method to distribute a model's total utility among its training points. Unfortunately, computing exact Shapley values is generally #P-hard, requiring exponentially complex calculations.
While recent breakthroughs have identified analytical solutions for KNN models that reduce this complexity to $O(N \log N)$ per test point, the total computational time still hits a quadratic wall ($O(N^2)$) when evaluating large test sets. For datasets containing millions of points, this quadratic scaling renders exact data valuation practically impossible.
Methodology: Localized Data Shapley
To overcome this computational bottleneck, the authors propose the Localized Data Shapley framework, specifically targeting a Threshold-based KNN (TKNN) variant. In TKNN, predictions are influenced only by training points located within a specific distance radius ($\tau$) of a given test point.
The core of this approach relies on a three-step "divide and conquer" strategy:
- Landmark Selection: The algorithm employs a greedy approach known as Farthest-First Traversal (FFT) to select a concise set of "landmark points" that effectively map the dataset's underlying geometry.
- Search Space Pruning: By calculating distances to these landmarks and leveraging the triangle inequality, the algorithm mathematically guarantees that certain training points are too distant to influence a specific test point. This allows the system to safely prune and skip the vast majority of the dataset without computing exact pairwise distances.
- Localized Recursion: Once the relevant local neighborhood (the "ball" of radius $\tau$) is isolated, an efficient recursive formula is applied to calculate the exact Shapley values strictly within that local cluster.
Crucially, the authors provide a theoretical guarantee: if the dataset exhibits "perturbation resilience"—meaning its natural clusters are stable—the localized algorithm is provably faster than standard baselines.
Experimental Setup and Key Results
The researchers evaluated their localized framework across eight diverse real-world datasets, ranging from 15,000 to approximately 1 million samples (including magic, cifar10, covtype, and poker).
The empirical results demonstrate significant improvements, particularly as dataset sizes scale:
- Massive Speedups: On the massive
pokerdataset (~1M points), the proposed method operated 25x faster than the standard recursive baseline and 11x faster than previous state-of-the-art threshold-based methods. - Robust Performance: Even when the radius $\tau$ was expanded—thereby increasing the size of the "local" neighborhoods—the algorithm consistently matched or outperformed baseline speeds.
- Preserved Downstream Utility: In practical applications like mislabel detection (identifying training points with incorrect labels), the localized method achieved F1 scores nearly identical to the exact, computationally heavy global method. This confirms that the dramatic speedups do not compromise the accuracy or utility of the valuations.
Limitations and Future Directions
While the Localized Data Shapley framework significantly advances the practicality of data valuation, a few challenges remain:
- The Curse of Dimensionality: Landmark-based pruning can lose effectiveness in extremely high-dimensional spaces where the triangle inequality provides weaker bounds. The authors suggest exploring random projections as a potential mitigation strategy.
- Algorithmic Scope: The current optimized algorithm is specifically tailored for classification tasks using threshold-based KNN. Extending this localized approach to KNN regression or more complex utility functions (such as those in deep neural networks) remains an open research challenge.
- Theoretical Verification: The condition of "perturbation resilience," while theoretically robust, is difficult to verify a priori for new, unseen datasets before executing the algorithm.
Summary updated