TabR: Tabular Deep Learning Meets Nearest Neighbors in 2023
Yury Gorishniy, Ivan Rubachev, Nikolay Kartashev, Daniil Shlenskii, Akim Kotelnikov, Artem Babenko
TL;DR
TabR tackles the persistent gap where gradient-boosted trees outperform deep learning on tabular data by introducing a retrieval-augmented deep learning approach. It integrates a lightweight, single-head retrieval module into a feed-forward backbone, using key-space L2 distance and a correction-based value module to leverage nearest neighbors from the training set. Across public benchmarks, TabR achieves the best average performance among tabular DL models, sets state-of-the-art results on several datasets, and even outperforms GBDT on a mid-scale benchmark, while offering significant efficiency gains over prior retrieval-based models. The work also explores training-speedups via context-freezing and online updates, highlighting the practical viability and future potential of retrieval-augmented tabular DL, including interpretability and continual learning aspects.
Abstract
Deep learning (DL) models for tabular data problems (e.g. classification, regression) are currently receiving increasingly more attention from researchers. However, despite the recent efforts, the non-DL algorithms based on gradient-boosted decision trees (GBDT) remain a strong go-to solution for these problems. One of the research directions aimed at improving the position of tabular DL involves designing so-called retrieval-augmented models. For a target object, such models retrieve other objects (e.g. the nearest neighbors) from the available training data and use their features and labels to make a better prediction. In this work, we present TabR -- essentially, a feed-forward network with a custom k-Nearest-Neighbors-like component in the middle. On a set of public benchmarks with datasets up to several million objects, TabR marks a big step forward for tabular DL: it demonstrates the best average performance among tabular DL models, becomes the new state-of-the-art on several datasets, and even outperforms GBDT models on the recently proposed "GBDT-friendly" benchmark (see Figure 1). Among the important findings and technical details powering TabR, the main ones lie in the attention-like mechanism that is responsible for retrieving the nearest neighbors and extracting valuable signal from them. In addition to the much higher performance, TabR is simple and significantly more efficient compared to prior retrieval-based tabular DL models.
