Revisiting Nearest Neighbor for Tabular Data: A Deep Tabular Baseline Two Decades Later

Han-Jia Ye, Huai-Hong Yin, De-Chuan Zhan, Wei-Lun Chao
7/3/2024
cs.LG

No official code found. Best implementation: LAMDA-Tabular/TALENT (848 stars, MIT, last commit 2026-04-25).

Abstract

The widespread enthusiasm for deep learning has recently expanded into the domain of tabular data. Recognizing that the advancement in deep tabular methods is often inspired by classical methods, e.g., integration of nearest neighbors into neural networks, we investigate whether these classical methods can be revitalized with modern techniques. We revisit a differentiable version of $K$-nearest neighbors (KNN) -- Neighbourhood Components Analysis (NCA) -- originally designed to learn a linear projection to capture semantic similarities between instances, and seek to gradually add modern deep learning techniques on top. Surprisingly, our implementation of NCA using SGD and without dimensionality reduction already achieves decent performance on tabular data, in contrast to the results of using existing toolboxes like scikit-learn. Further equipping NCA with deep representations and additional training stochasticity significantly enhances its capability, being on par with the leading tree-based method CatBoost and outperforming existing deep tabular models in both classification and regression tasks on 300 datasets. We conclude our paper by analyzing the factors behind these improvements, including loss functions, prediction strategies, and deep architectures. The code is available at https://github.com/qile2000/LAMDA-TALENT.

View on arXivView PDF

Code Implementations(1)

MIT

A comprehensive toolkit and benchmark for tabular data learning, featuring 35+ deep methods, more than 10 classical methods, and 300 diverse tabular datasets.

84856HTML, ShellMay 6, 20245 months agoMIT
tabulartabular-datatabular-data-benchmarktabular-data-deep-learningtabular-data-machine-learning+2 more

Similar Papers

Cite this paper

@article{ye2024revisiting,
  title  = {Revisiting Nearest Neighbor for Tabular Data: A Deep Tabular Baseline Two Decades Later},
  author = {Han-Jia Ye and Huai-Hong Yin and De-Chuan Zhan and Wei-Lun Chao},
  year   = {2024},
  eprint = {2407.03257},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2407.03257v2},
  journal = {ICLR 2024 2024}
}

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/2407.03257.svg)](https://codeofpaper.com/paper/2407.03257)

Discussion