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

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Zhang, Guangyi, Oettershagen, Lutz, Wang, Lixu, Gionis, Aristides
Format: Preprint
Published: 2026
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866910240033734656
author Zhang, Guangyi
Oettershagen, Lutz
Wang, Lixu
Gionis, Aristides
author_facet Zhang, Guangyi
Oettershagen, Lutz
Wang, Lixu
Gionis, Aristides
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2605_21033
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Efficient Banzhaf-Based Data Valuation for $k$-Nearest Neighbors Classification
Zhang, Guangyi
Oettershagen, Lutz
Wang, Lixu
Gionis, Aristides
Machine Learning
Data Structures and Algorithms
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.
title Efficient Banzhaf-Based Data Valuation for $k$-Nearest Neighbors Classification
topic Machine Learning
Data Structures and Algorithms
url https://arxiv.org/abs/2605.21033