Shapley-Inspired Feature Weighting in k-means with No Additional Hyperparameters

Richard J. Fawley, Renato Cordeiro de Amorim
8/11/2025
cs.LG

Official code: rickfawley/shark (0 stars, MIT, last commit 2025-08-18).

Abstract

Clustering algorithms often assume all features contribute equally to the data structure, an assumption that usually fails in high-dimensional or noisy settings. Feature weighting methods can address this, but most require additional parameter tuning. We propose SHARK (Shapley Reweighted $k$-means), a feature-weighted clustering algorithm motivated by the use of Shapley values from cooperative game theory to quantify feature relevance, which requires no additional parameters beyond those in $k$-means. We prove that the $k$-means objective can be decomposed into a sum of per-feature Shapley values, providing an axiomatic foundation for unsupervised feature relevance and reducing Shapley computation from exponential to polynomial time. SHARK iteratively re-weights features by the inverse of their Shapley contribution, emphasising informative dimensions and down-weighting irrelevant ones. Experiments on synthetic and real-world data sets show that SHARK consistently matches or outperforms existing methods, achieving superior robustness and accuracy, particularly in scenarios where noise may be present. Software: https://github.com/rickfawley/shark.

View on arXivView PDF

Code Implementations(1)

rickfawley/sharkOfficial100%
MIT

Shapley Reweighted K-Means

00PythonJul 30, 20251 years agoMIT

Similar Papers

Cite this paper

@article{fawley2025shapleyinspired,
  title  = {Shapley-Inspired Feature Weighting in k-means with No Additional Hyperparameters},
  author = {Richard J. Fawley and Renato Cordeiro de Amorim},
  year   = {2025},
  eprint = {2508.07952},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2508.07952v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2508.07952.svg)](https://codeofpaper.com/paper/2508.07952)

Discussion