# TabNet (2019)

> A deep network for tables that picks a few features at each step with sparse attention, to rival boosted trees and show its reasoning.

Page: https://mralbu.github.io/ai-datasets/p/tabnet

## Key facts

- Title: TabNet: Attentive Interpretable Tabular Learning
- Authors: Sercan Ö. Arık, Tomas Pfister
- Venue: AAAI 2021
- Category: Tabular
- Paper: https://www.alphaxiv.org/abs/1908.07442

## Why it matters

It was the best-known attempt to give tables a canonical deep architecture, borrowing attention and masked pretraining from text and images, and its interpretable masks were a real draw. Later independent comparisons found that tuned boosted trees still usually won, which made the gap between deep learning and trees on tables an open question the next models set out to close.

## The idea

Feed the raw features through several decision steps. At each step an attention block outputs a sparse mask over the features, discouraged from reusing ones earlier steps already used; shared fully connected layers process the selected features, and the steps' outputs are added up, much as a tree ensemble adds its trees. The masks double as per-row feature importances. The same encoder can be pretrained on unlabeled rows by predicting columns that were masked out.

## The result

On Forest Cover Type it reached 96.99% test accuracy, against 89.34% for XGBoost and 94.95% for Google's AutoML Tables, and on Poker Hand 99.2% against 71.1%. On Higgs it scored 78.84%, above the largest boosted-tree model's 76.98%. On four KDD Cup datasets where every model scores about the same, it tied or trailed XGBoost by a few tenths. With only 1,000 labeled Higgs rows, pretraining raised accuracy from 57.5% to 61.4%.

## The data

- [Tabular Benchmark (Grinsztajn et al.) (2022)](https://mralbu.github.io/ai-datasets/d/tabular-benchmark.md): 45 real-world tables, curated so that trees and neural networks could finally be compared on the same ground.

## Builds on

- [XGBoost (2016)](https://mralbu.github.io/ai-datasets/p/xgboost.md)

## Led to

- [FT-Transformer (2021)](https://mralbu.github.io/ai-datasets/p/ft-transformer.md)

## Part of

- [Tabular foundation models](https://mralbu.github.io/ai-datasets/t/tabular-foundation-models.md) (step 2 of 8)
