Skip to main content
QUICK REVIEW

[Paper Review] TabR: Tabular Deep Learning Meets Nearest Neighbors in 2023

Yury Gorishniy, Ivan Rubachev|arXiv (Cornell University)|Jul 26, 2023
Machine Learning and Data ClassificationComputer Science7 citations
TL;DR

TabR introduces a simple, efficient retrieval-augmented deep learning model for tabular data that integrates a k-nearest neighbors (k-NN) mechanism within a feed-forward network. It achieves state-of-the-art performance on tabular benchmarks, outperforming both prior deep learning models and gradient-boosted decision trees (GBDT) on a recently proposed 'GBDT-friendly' benchmark, while being significantly more efficient than previous retrieval-augmented approaches.

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.

Motivation & Objective

  • To address the persistent performance gap between tabular deep learning models and gradient-boosted decision trees (GBDT) in medium-scale tabular datasets.
  • To improve the efficiency and effectiveness of retrieval-augmented tabular deep learning by introducing a novel, lightweight k-NN mechanism within a standard feed-forward architecture.
  • To demonstrate that deep learning models can surpass GBDT on tabular data, particularly on recently proposed benchmarks designed to favor tree-based models.
  • To identify and leverage key design choices in attention-like mechanisms that enhance retrieval performance in tabular settings.
  • To provide a simple, high-performing, and computationally efficient alternative to complex retrieval-augmented tabular DL models.

Proposed method

  • TabR employs a standard multilayer perceptron (MLP) backbone with a custom k-NN-like component inserted in the middle, replacing the typical attention mechanism.
  • The retrieval component uses a learnable, attention-like mechanism to compute similarity scores between the input sample and all training samples, then retrieves the k most similar neighbors.
  • Features and labels of the retrieved neighbors are aggregated and concatenated with the input embedding to enrich the representation before final prediction.
  • The model is trained end-to-end using standard backpropagation, with the retrieval mechanism differentiable via soft-assignment over neighbors.
  • The method uses learned embeddings for continuous features and applies standard normalization and dropout for regularization.
  • The architecture is designed to be lightweight and efficient, avoiding the computational overhead of full-attention or memory-intensive retrieval modules.

Experimental results

Research questions

  • RQ1Can a retrieval-augmented deep learning model outperform GBDT on medium-scale tabular benchmarks, especially those designed to favor tree-based models?
  • RQ2What design choices in the retrieval mechanism—particularly in the attention-like component—most significantly impact performance and efficiency in tabular deep learning?
  • RQ3How does the integration of k-NN retrieval into a simple feed-forward network compare to more complex retrieval-augmented architectures in terms of accuracy and inference cost?
  • RQ4To what extent can a simple, differentiable k-NN mechanism improve generalization and robustness in tabular data tasks?
  • RQ5Does the proposed model achieve state-of-the-art performance across diverse tabular datasets while remaining computationally efficient?

Key findings

  • TabR achieves the best average performance among all tabular deep learning models on a benchmark of 43 medium-scale tabular tasks.
  • It sets a new state-of-the-art on several individual datasets, including 'adult', 'german', 'proteins', and 'sulfur'.
  • On the recently proposed 'GBDT-friendly' benchmark (Grinsztajn et al., 2022), TabR outperforms XGBoost, LightGBM, and CatBoost in both single-model and ensemble settings.
  • For the 'adult' dataset, TabR achieves an AUC of 0.871 (single model) and 0.876 (ensemble), surpassing even tuned XGBoost and CatBoost.
  • The model is significantly more efficient than prior retrieval-augmented tabular models, with a streamlined architecture that avoids expensive attention or memory modules.
  • The ablation study confirms that the attention-like retrieval mechanism is crucial for performance, and that proper design of similarity computation and neighbor aggregation leads to consistent gains.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.