Lune

VLDB2026Top-tier venue

Efficient Banzhaf-Based Data Valuation for k-Nearest Neighbors Classification

Guangyi Zhang, Lutz Oettershagen, Lixu Wang, Aristides Gionis

Abstract

Data valuation, the task of quantifying the contribution of individual data points to model performance, has emerged as a fundamental challenge in machine learning. Game-theoretic approaches, such as the Banzhaf value, offer principled frameworks for fair data valuation; however, they suffer from exponential computational complexity. We address this challenge by developing efficient algorithms specifically tailored for computing Banzhaf values in k -nearest neighbor ( k NN) classifiers. We first establish the theoretical hardness of the problem by proving that it is #P-hard. Despite this intractability, we exploit the locality properties of k NN classifiers to develop practical exact algorithms. Our main contribution is a dynamic programming framework that achieves significant computational improvements: we present a pseudo-polynomial algorithm with O ( Wkn 2 ) time complexity for weighted k NN classifiers, where W is the maximum sum of top- k weights, and a specialized algorithm for unweighted k NN that achieves O ( nk 2 ) time complexity, that is, linear in the number of data points. We also offer efficient Monte Carlo estimation methods. Extensive experiments on real-world datasets demonstrate the practical efficiency of our approach and its effectiveness in data valuation applications.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Datamodels: Understanding Predictions with Data and Data with Predictions cites Deduplicating Training Data Makes Language Models Better
  • Data Shapley in One Training Run cites Robust Data Valuation with Weighted Banzhaf Values
Builds onCited byLeft to right by year; the more cited, the higher.

Builds on5

  1. Deduplicating Training Data Makes Language Models BetterKatherine Lee, Daphne Ippolito, Andrew Nystrom, Chiyuan Zhang et al.ACL 2022 · 844 citations
  2. If You Like Shapley Then You'll Love the CoreTom Yan, Ariel D. ProcacciaAAAI 2021 · 85 citations
  3. Datamodels: Understanding Predictions with Data and Data with PredictionsAndrew Ilyas, Sung Min Park, Logan Engstrom, Guillaume Leclerc et al.ICML 2022 · 66 citations
  4. Robust Data Valuation with Weighted Banzhaf ValuesWeida Li, Yaoliang YuNeurIPS 2023 · 30 citations
  5. Data Shapley in One Training RunJiachen T. Wang, Prateek Mittal, Dawn Song, Ruoxi JiaICLR 2025

Related papers

  1. Shapley-Based Data Valuation for Weighted kk-Nearest NeighborsGuangyi Zhang, Qiyu Liu, Aristides GionisNeurIPS 2025 · 2 citations
  2. Localized Data Shapley: Accelerating Valuation for Nearest Neighbor AlgorithmsGuangyi Zhang, Yanhao Wang, Chengliang Chai, Qiyu Liu et al.NeurIPS 2025 · 1 citation
  3. Banzhaf Values for Facts in Query AnsweringOmer Abramovich, Daniel Deutch, Nave Frost, Ahmet Kara et al.SIGMOD 2024 · 8 citations
  4. Dynamic Shapley Value ComputationJiayao Zhang, Haocheng Xia, Qiheng Sun, Jinfei Liu et al.ICDE 2023 · 20 citations
  5. Shapley Value Approximation Based on k-Additive GamesGuilherme Dean Pelegrina, Patrick Kolpaczki, Eyke HüllermeierAAAI 2026
Dusk over the sea between two cliffs drawn in fine vertical lines