This repository contains a compact reproduction of the experiments reported by Grinsztajn, Oyallon and Varoquaux (NeurIPS 2022) in Why do tree-based models still outperform deep learning on typical tabular data? Eight models — four tree-based and four deep learning — are evaluated on ten OpenML datasets under a fixed protocol: a single 80/20 train–test split and untuned hyperparameters. The objective is a controlled comparison of predictive performance and training cost, not an exhaustive hyperparameter search.
- Tree-based models occupy the first four positions by mean rank: LightGBM 3.00, XGBoost 3.00, CatBoost 3.80 and Random Forest 4.00. The best deep learning model is the MLP, with a mean rank of 4.30.
- A tree-based model attains the highest score on seven of the ten datasets. The MLP attains the highest score on the remaining three, although by margins of only 0.0004–0.0020.
- The advantage of tree-based models decreases with dataset size (Spearman ρ = −0.75 between training-set size and the tree−deep gap). The gap is +0.097 on Boston (404 training instances), +0.073 on Wine Quality and +0.059 on German Credit, but approximately zero on MAGIC (10.7k instances) and −0.006 on Friedman (32.6k instances).
- Random Forest and CatBoost incur the lowest training cost, with median training times of 0.4 s and 1.1 s per dataset, compared with 7–36 s for the deep learning models on CPU.
- TabNet obtains the lowest mean rank (7.10) and the lowest score on six of the ten datasets, which suggests that attention-based architectures are the most sensitive to the fixed training budget adopted here.
All values are test-set scores obtained from a single 80/20 split (random_state = 42); higher values indicate better performance.
Tables 1 and 2 report the test-set scores for classification and regression, respectively. The best value in each row is shown in bold, and the final row reports the mean over the five datasets of the corresponding task.
Table 1. Test-set ROC-AUC on the five classification datasets. Higher values indicate better performance.
| Dataset | Train / test | Features | RandomForest | XGBoost | LightGBM | CatBoost | MLP | ResNet | FT-Transformer | TabNet |
|---|---|---|---|---|---|---|---|---|---|---|
| diabetes | 614 / 154 | 8 | 0.8118 | 0.8174 | 0.8237 | 0.8263 | 0.8115 | 0.7963 | 0.8006 | 0.7129 |
| credit-g | 800 / 200 | 20 | 0.7656 | 0.7611 | 0.7805 | 0.7837 | 0.7351 | 0.7579 | 0.7251 | 0.6381 |
| MagicTelescope | 10,700 / 2,676 | 10 | 0.9290 | 0.9278 | 0.9279 | 0.9220 | 0.9310 | 0.9302 | 0.9248 | 0.9235 |
| credit-default | 13,371 / 3,343 | 10 | 0.8527 | 0.8608 | 0.8610 | 0.8633 | 0.8302 | 0.8078 | 0.8576 | 0.8214 |
| MiniBooNE | 58,398 / 14,600 | 50 | 0.9794 | 0.9827 | 0.9824 | 0.9799 | 0.9831 | 0.9774 | 0.9801 | 0.9431 |
| Mean | 0.8677 | 0.8700 | 0.8751 | 0.8750 | 0.8582 | 0.8539 | 0.8577 | 0.8078 |
Table 2. Test-set R² on the five regression datasets. Higher values indicate better performance.
| Dataset | Train / test | Features | RandomForest | XGBoost | LightGBM | CatBoost | MLP | ResNet | FT-Transformer | TabNet |
|---|---|---|---|---|---|---|---|---|---|---|
| boston | 404 / 102 | 13 | 0.8928 | 0.9081 | 0.8808 | 0.8671 | 0.8363 | 0.8499 | 0.7995 | 0.6769 |
| wine_quality | 5,197 / 1,300 | 11 | 0.5148 | 0.4685 | 0.4554 | 0.4116 | 0.4174 | 0.4149 | 0.3660 | 0.3585 |
| superconduct | 17,010 / 4,253 | 79 | 0.9293 | 0.9178 | 0.9157 | 0.8816 | 0.9028 | 0.9116 | 0.8779 | 0.8256 |
| fried | 32,614 / 8,154 | 10 | 0.9337 | 0.9536 | 0.9532 | 0.9556 | 0.9566 | 0.9547 | 0.9548 | 0.9554 |
| diamonds | 43,152 / 10,788 | 6 | 0.9424 | 0.9477 | 0.9479 | 0.9453 | 0.9419 | 0.9436 | 0.9454 | 0.9430 |
| Mean | 0.8426 | 0.8392 | 0.8306 | 0.8123 | 0.8110 | 0.8149 | 0.7887 | 0.7519 |
Each mean is a simple average over the five datasets of the corresponding task; on classification, LightGBM exceeds CatBoost by 0.0001 (0.8751 versus 0.8750).
Table 3. Mean rank across the ten datasets. Ranks are computed within each dataset (1 = best) and averaged over all datasets.
| # | Model | Family | Mean rank | Best on |
|---|---|---|---|---|
| 1 | LightGBM | tree | 3.00 | diamonds |
| 2 | XGBoost | tree | 3.00 | boston |
| 3 | CatBoost | tree | 3.80 | diabetes, credit-g, credit-default |
| 4 | Random Forest | tree | 4.00 | superconduct, wine_quality |
| 5 | MLP | deep | 4.30 | MagicTelescope, MiniBooNE, fried |
| 6 | ResNet | deep | 5.30 | — |
| 7 | FT-Transformer | deep | 5.50 | — |
| 8 | TabNet | deep | 7.10 | — |
Table 4. Wall-clock training time per model, aggregated over the ten datasets.
| Model | Median (s) | Range (s) |
|---|---|---|
| Random Forest | 0.4 | 0.1 – 1.2 |
| CatBoost | 1.1 | 0.7 – 2.2 |
| ResNet | 7.0 | 0.3 – 44.1 |
| MLP | 9.0 | 0.3 – 67.3 |
| FT-Transformer | 18.0 | 1.1 – 107.1 |
| TabNet | 35.8 | 4.6 – 91.9 |
| XGBoost | 56.0 | 55.2 – 113.7 |
| LightGBM | 170.4 | 91.6 – 219.8 |
Measurement caveat. The recorded XGBoost and LightGBM times are almost independent of dataset size (approximately 55 s and 170 s even for 614 training instances), whereas a single 100-tree fit on 800 × 20 data requires approximately 0.3 s on the same machine. These values therefore reflect process or thread overhead, or machine load, rather than training cost. The Random Forest, CatBoost and deep learning entries vary with dataset size and are the more reliable values in this table.
Figure 1. Test-set performance by model and dataset. Tree-based models are shown in green and deep learning models in orange and red; datasets are ordered by sample size.
Figure 2. Mean rank across the ten datasets (lower is better). All four tree-based models rank above every deep learning model; the MLP (4.30) is the best-performing deep learning model.
Figure 3. Difference between the mean tree-based score and the mean deep learning score as a function of training-set size (logarithmic scale). The difference is largest for small datasets and becomes negligible for the largest datasets.
- Tree-based models retain an overall advantage. The four tree-based models have the four lowest mean ranks and achieve the highest score on seven of the ten datasets. Averaged over datasets, tree-based models obtain 0.872 versus 0.844 ROC-AUC in classification and 0.831 versus 0.792 R² in regression.
- The advantage is concentrated on small datasets. The tree−deep gaps are +0.097 (Boston, 404 instances), +0.059 (German Credit, 800) and +0.073 (Wine Quality, 5.2k), whereas they are −0.001 (MAGIC, 10.7k), −0.006 (Friedman, 32.6k) and +0.002 (Diamonds, 43.2k). The Spearman correlation between training-set size and gap is −0.75, consistent with the observation of Grinsztajn et al. that deep learning models approach the performance of tree-based models as the amount of training data increases.
- The MLP is the only deep learning model that remains consistently competitive. It attains the highest score on MagicTelescope, MiniBooNE and Friedman, although it exceeds the best tree-based model by only 0.0004–0.0020, a margin that cannot be distinguished from noise given the single train–test split. ResNet and FT-Transformer occupy intermediate positions (mean ranks 5.30 and 5.50).
- TabNet performs least well. Its mean rank is 7.10 and it obtains the lowest score on six of the ten datasets. With a budget of 100 epochs and an early-stopping patience of 10, its sparse attention mechanism is plausibly under-trained; this observation pertains to the fixed training budget rather than to the architecture itself.
- The tree-based family is heterogeneous. Random Forest achieves the highest score on superconduct (79 features) and wine_quality (a noisy target for which no model exceeds R² = 0.52); CatBoost performs best on diabetes, credit-g and credit-default; LightGBM performs best on diamonds and XGBoost on boston. Deep learning models reduce the gap on the larger datasets (MiniBooNE, fried and diamonds), even where a tree-based model remains slightly ahead.
- Tabular data do not exhibit the translational, rotational or sequential structure that motivates the inductive biases of convolutional and transformer architectures. Axis-aligned splits represent irregular, axis-aligned decision boundaries directly, whereas neural networks must approximate them from limited data.
- Tree-based ensembles accommodate uninformative features, heterogeneous feature scales and outliers; deep learning models must allocate capacity to such features and typically require additional regularisation and data.
- Under fixed, untuned hyperparameters, a tree-based ensemble performs well without further adjustment, whereas deep learning models are sensitive to architecture, learning rate and training budget. This asymmetry is one of the factors quantified by the present benchmark; it also explains why the tuned deep learning models of the original study perform better than the untuned models evaluated here.
The benchmark can be reproduced with the following commands.
# 1. Environment (Python 3.12+)
conda create -n tabular_benchmark python=3.12 -y
conda activate tabular_benchmark
pip install numpy pandas scikit-learn matplotlib seaborn tqdm \
xgboost lightgbm catboost pytorch-tabnet openml
# PyTorch: install the build matching your CUDA version, see pytorch.org
# 2. Run all eight models on all ten datasets (data are downloaded from OpenML on first use)
python run_simple_benchmark.py
# Individual runs
python run_simple_benchmark.py --list-models
python run_simple_benchmark.py --model XGBoost
python run_simple_benchmark.py --model XGBoost --dataset credit-g
python run_simple_benchmark.py --skip-existing # only the missing runs
python run_simple_benchmark.py --gpu cuda:0 # device for deep learning models
# 3. Generate the figures
python visualize_results.pyEach model–dataset pair is written to results/results_{Model}_{Dataset}.json, and the figures are written to figures/. The tables in this README are a direct aggregation of these JSON files.
Table 5. Model implementations and principal hyperparameters.
| Model | Family | Implementation | Principal settings |
|---|---|---|---|
| Random Forest | tree | scikit-learn | 100 trees, unlimited depth |
| XGBoost | tree | xgboost | 100 rounds, depth 6, learning rate 0.1, subsample and colsample 0.8 |
| LightGBM | tree | lightgbm | 100 trees, 31 leaves, learning rate 0.1, subsample and colsample 0.8 |
| CatBoost | tree | catboost | 100 iterations, depth 6, learning rate 0.1 |
| MLP | deep | PyTorch (implemented from scratch) | hidden layers of size 128 and 64, dropout 0.2, BatchNorm, Adam at 1e-3 |
| ResNet | deep | PyTorch (implemented from scratch) | three residual blocks, width 128, hidden size 256, dropout 0.2 |
| FT-Transformer | deep | PyTorch (implemented from scratch) | d_model 64, four attention heads, three blocks, FFN 256 |
| TabNet | deep | pytorch-tabnet | n_d = n_a = 4, n_steps 2, gamma 1.3 |
The deep learning models share the following configuration: batch size 256, a maximum of 100 epochs, early stopping with patience 10 on the last 20% of the training set, ReduceLROnPlateau, and StandardScaler applied to the features (and to the regression target, with predictions inverse-transformed before evaluation).
- Ten datasets from the OpenML benchmark suites used by Grinsztajn et al.: suite 336 (regression) and suite 337 (classification);
credit-g,diabetes,bostonandfriedare loaded by name. The datasets range from 506 to 72,998 instances and from 6 to 79 features. - A single 80/20 train–test split (
random_state = 42, stratified for classification); missing numeric values are imputed with the column median, and categorical columns are encoded as integer codes. - ROC-AUC for the five binary classification datasets and R² for the five regression datasets.
- All experiments were conducted on a CPU-only node with 40 cores (no GPU).
- Single split and single seed. No cross-validation or confidence intervals were computed; consequently, differences below approximately 0.002 should not be interpreted as meaningful, which includes most of the margins reported for the MLP.
- No hyperparameter tuning (by design). Deep learning models are the most affected; a tuned FT-Transformer or TabNet would plausibly attain higher scores, and the ranking should therefore be regarded as protocol-specific.
- Categorical features are encoded as integer codes rather than one-hot, target or embedding representations. Tree-based models can split on these codes, whereas deep learning models treat them as numeric values, which disadvantages the latter on
credit-ganddiamondsin particular. - Training times are subject to measurement noise (see the caveat under Table 4).
- All datasets are of moderate size (at most 73,000 instances); the results do not characterise the relative behaviour of these models at substantially larger scales.
├── run_simple_benchmark.py # CLI: all models / one model / one dataset
├── benchmark.py # Benchmark class, model registry, evaluation
├── data_loader.py # OpenML loading, cleaning, 80/20 split
├── models/
│ ├── tree_models.py # RandomForest, XGBoost, LightGBM, CatBoost
│ └── deep_models.py # MLP, ResNet, FT-Transformer, TabNet
├── visualize_results.py # figures from results/*.json
├── results/ # 80 JSON files (8 models × 10 datasets)
└── figures/ # generated plots
Grinsztajn, L., Oyallon, E., & Varoquaux, G. (2022). Why do tree-based models still outperform deep learning on typical tabular data? NeurIPS 2022 Datasets and Benchmarks Track. arXiv:2207.08815


