Which Machine Learning Classifiers are Best for Small Datasets?

An Empirical Study

Which Machine Learning Classifiers are Best for Small Datasets?

Although “big data” and “deep learning” are dominant, my own work at the Gates Foundation involved a lot of small (but expensive) datasets, where the number of rows (subjects, samples) is between 100 and 1000. For example, detailed measurements throughout a pregnancy and subsequent neonatal outcomes from pregnant women. A lot of my collaborative investigations involved fitting machine learning models to small datasets like these, and it’s not clear what best practices are in this case.

Along with my own experience, there is some informal wisdom floating around the ML community. Folk wisdom makes me wary and I wanted to do something more systematic. I took the following approach:

  1. Get a lot of small classification benchmark datasets. I used a subset of this prepackaged repo. The final total was 106 datasets: I dropped datasets where every model scores at least 0.99 (so easy that every model looks the same) or none reaches 0.6 (no signal), plus near-duplicate variants. (The 2020 version of this post had 108.)
  2. Select some reasonably representative ML classifiers: linear SVM, Logistic Regression, Random Forest, LightGBM (ensemble of gradient boosted decision trees), AutoGluon (fancy automl mega-ensemble). In 2026 I added two tabular foundation models, TabPFN-3.5 and TabICLv2: transformers pretrained on synthetic datasets, which predict for a new dataset in a forward pass, with no training or tuning. I also added CatBoost and LightGBM with their default settings, and MLJAR (another AutoML), and reran AutoGluon at its current version.
  3. Set up sensible hyperparameter spaces.
  4. Run every classifier on every dataset via nested cross-validation.
  5. Plot results.

All the code and results are here: https://github.com/sergeyf/SmallDataBenchmarks

Feel free to add your own algorithms.

Let’s look at the results. The metric of interest is weighted one-vs-all area under the ROC curve, averaged over the outer folds.

AUROC comparison across models on 106 datasets.
Fig. 1 AUROC comparison across models on 106 datasets.

The two “(2020, 300s)” rows are the 2020 runs, kept for comparison. MLJAR also ran in 2020 but didn’t make that post.

Some observations:

  • TabPFN-3.5 and TabICLv2 are best overall, by a clear margin: they are the best or within 0.5% of the best on 87 and 79 of the 106 datasets, vs 41 for the next model. The catastrophic failures (AUROC < 0.5) are rare. The only ones are on meta-data, a broken dataset where most models fail (more on it below), and Logistic Regression and SVC on autoUniv-au6-1000.
  • You can’t tell from this particular plot, but AutoGluon needs “enough” time. It has a budget parameter which tells it how much time to spend improving the fancy ensemble. Five minutes per fold was the minimum that worked well in 2020 - this adds up to 108 datasets * 4 outer folds * 300s = 1.5 days for the entire benchmark. Today’s AutoGluon at 60 seconds per fold matches the 2020 version at 300 seconds on average (0.892 vs 0.893), though a few datasets still need the longer budget (see below).
  • Linear SVC and Logistic Regression are very close: 0.847 vs 0.841. In 2020 I also pointed to two datasets where SVC was 0.3 and 0.1 AUROC better than every other model. That was wrong. One of them, planning-relax, is now dropped because no model reaches 0.6 on it (SVC comes closest, at 0.595). The other, meta-data, is broken: it describes 22 source datasets × 24 algorithms, and its first 20 columns only identify the source dataset, so under random splits those columns are worse than useless. Most models score below 0.5 on it, and SVC happens to land on the right side. Today SVC beats every other model on meta-data by 0.077, and nowhere else by more than 0.003.
  • Logistic Regression needs the “elasticnet” regularizer to ensure it doesn’t have the kind of awful generalization failures that you could see with AutoGluon and Random Forest in 2020.
  • LightGBM tuned with hyperopt is in the middle of the pack: below both AutoMLs, and level with CatBoost on its defaults. I used hyperopt to find good hyperparameters. I also tried scikit-optimize and Optuna, but they didn’t work as well. User error is possible.
  • Random Forest is pretty good, and much easier/faster to optimize than LightGBM and AutoGluon. I only cross-validated a single parameter for it (depth).
  • CatBoost with no tuning at all (0.879) nearly matches LightGBM tuned with 50 hyperopt trials (0.883), in 14 seconds per dataset instead of 134.

Here are counts of datasets where each algorithm wins or is within 0.5% of winning AUROC (out of 106):

  • TabPFN-3.5: 87
  • TabICLv2: 79
  • AutoGluon 1.6 (60s): 41
  • MLJAR (2020, 300s): 36
  • AutoGluon (2020, 300s): 32
  • LightGBM (hyperopt, 50 trials): 28
  • CatBoost (default): 28
  • MLJAR 1.3 (60s): 27
  • Random Forest: 19
  • LightGBM (default, 1000 trees): 19
  • Logistic Regression: 17
  • SVC: 14

And average AUROC across all datasets:

  • TabPFN-3.5: 0.911
  • TabICLv2: 0.908
  • MLJAR (2020, 300s): 0.895
  • AutoGluon (2020, 300s): 0.893
  • AutoGluon 1.6 (60s): 0.892
  • MLJAR 1.3 (60s): 0.890
  • LightGBM (hyperopt, 50 trials): 0.883
  • CatBoost (default): 0.879
  • Random Forest: 0.878
  • LightGBM (default, 1000 trees): 0.859
  • SVC: 0.847
  • Logistic Regression: 0.841

And counts where each algorithm does the worst or is within 0.5% of the worst AUROC: 

  • LightGBM (default, 1000 trees): 44
  • Logistic Regression: 43
  • SVC: 36
  • Random Forest: 12
  • LightGBM (hyperopt, 50 trials): 8
  • CatBoost (default): 8
  • MLJAR 1.3 (60s): 7
  • MLJAR (2020, 300s): 4
  • AutoGluon (2020, 300s): 2
  • AutoGluon 1.6 (60s): 0
  • TabPFN-3.5: 0
  • TabICLv2: 0

Neither foundation model, nor AutoGluon 1.6, is ever the worst or within 0.5% of it.

Here is a plot of average (over folds) AUROC vs number of samples:

Average AUROC vs. number of samples.
Fig. 2 Average AUROC vs. number of samples.

I was surprised when I saw this plot the first time. The collective wisdom that I’ve ingested is something like: “don’t bother using complex models for tiny data.” But this doesn’t seem true for these 106 datasets. Even at the low end, TabPFN-3.5 and TabICLv2 work best of all: mean AUROC 0.932 and 0.930 on the 17 datasets with fewer than 250 rows. Random Forest (0.908) and CatBoost (0.914) still handily beat the two linear models (0.857 and 0.860). Default LightGBM (0.869) is barely ahead of them; it seems to overfit tiny data (more on that below). There’s an odd peak in the plot where the linear models suddenly do better. I don’t think it’s meaningful: it comes from the two hill-valley datasets near 1,200 rows, where the linear models score about 0.96 and the tree models about 0.6.

Next, the standard deviation of AUROC across outer folds:

Standard deviation of AUROC across outer folds.
Fig. 3 Standard deviation of AUROC across outer folds.

Linear models don’t just generalize worse regardless of dataset size - they also have higher generalization variance. The foundation models have the lowest. Note the one strange SVC outlier. Another SVC mystery… It’s still there in 2026 (thoracic-surgery, standard deviation 0.21), and default LightGBM now has two of its own.

Training and prediction time

The foundation models take almost no time to train and much longer to predict, the reverse of classical ML algorithms. I timed one outer fold of 30 of the datasets for every model, on a 24-core AMD CPU and on an RTX 3080 GPU, and split training time from prediction time. The median fold has 770 training rows and 257 test rows.

Mean AUROC against median training and prediction seconds per fold, on CPU and GPU, with the Pareto front.
Fig. 4 Accuracy vs training and prediction time, on CPU (top) and GPU (bottom). The red line is the Pareto front: every model off it is beaten on both time and AUROC by one on it. Models without GPU support appear in the GPU panels at their CPU times. The CatBoost and AutoGluon points in the GPU panels come from training on the GPU, so their AUROCs differ slightly from the main benchmark.
  • TabPFN-3.5 and TabICLv2 don’t really train (0.2 and 0.6 seconds per fold). On the CPU, predicting 257 rows takes 8.5 seconds for TabPFN-3.5 and 2.6 for TabICLv2: about 37 and 12 milliseconds per row, vs ~0.02 milliseconds for the tree models.
  • A GPU cuts their prediction time to about 0.35 seconds per fold: 24× faster for TabPFN-3.5 and 7× for TabICLv2.
  • On training time, TabPFN-3.5 is the entire Pareto front: nothing trains faster, and nothing is more accurate.
  • On prediction time, there is a trade-off. Tuned LightGBM is the most accurate model that predicts in milliseconds; on the CPU, everything more accurate costs 100–2,000× more per prediction.
  • CatBoost trains 10× slower on the GPU than on the CPU at these sizes (26 seconds vs 2.6). Maybe I did something wrong here, or maybe it’s the small datasets? I assume sending training to the GPU is intended for massive datasets.

So if you score a few hundred (or more) rows at once, the foundation models are the obvious choice. If you serve predictions one at a time with tight latency, a tree model is still probably better.

Reproducing the 2020 baselines

Before comparing 2026 numbers with 2020 ones, I reran the three 2020 baselines (SVC, Logistic Regression, Random Forest) with the original script, ported to today’s scikit-learn. Logistic Regression and Random Forest match the 2020 scores to four decimal places on every dataset but one, nursery-4class, where Logistic Regression is now about 0.02 lower. The data file is unchanged and I couldn’t find the cause. SVC matches on 100 of the 106 datasets and differs by 0.001–0.04 on the other six. I had to cap libsvm’s iterations, because on one dataset SVC ran for hours without converging, and that cap is the likely cause, though I haven’t confirmed it. Either way, the old and new SVC averages agree to 0.001.

Have the foundation models memorized these datasets?

TabPFN and TabICL are pretrained on synthetic data, but the datasets in this blog post are old and public. If any of them leaked into pretraining by, say, being used as sources to train the generative model that actually made the synthetic datasets, the foundation models could look better than they are. I ran two checks on the first outer fold of 105 of the 106 datasets (nursery-4class joined the set after I ran them), with CatBoost and a default Random Forest as controls.

  1. Shuffle the training labels, then score against the true test labels. A model that learns only from the rows it’s given should score about 0.5; one that remembers the dataset should score higher. The mean AUROC was 0.513 for TabPFN-3.5 and 0.506 for TabICLv2, compared to 0.489 and 0.508 for the controls. Where TabPFN scores high on shuffled labels, the controls mostly do too (appendicitis: TabPFN 0.81, Random Forest 0.82), because small test sets make AUROC noisy. The exception is the volcanoes datasets, where TabPFN reaches 0.66–0.80 vs 0.46–0.56 for the controls. I don’t have an explanation for that.
  2. Train on only 10 or 20 rows. A model that memorized the datasets would keep most of its full score. On the 83 datasets with five or fewer classes, so that 10 rows can include every class, TabPFN-3.5 drops from 0.905 to 0.731 with 10 rows and TabICLv2 from 0.902 to 0.727. The controls drop to 0.715–0.719, so the foundation models are only about 0.01 ahead.

So I see no sign of memorization, with the volcanoes caveat.

AutoML: six years of progress, or a shorter time budget?

I gave the 2026 AutoML runs 60 seconds per fold, down from 300 in 2020, so two things changed at once. To separate them, I reran the datasets where each tool lost the most.

AutoGluon. On average, AutoGluon 1.6 at 60 seconds matches the 2020 version at 300 seconds. I reran its 10 biggest losses at 300 seconds. On those 10 datasets, today’s version is within 0.006 of 2020 on average, and the two hill-valley datasets jump from 0.73 and 0.80 to 0.995 and 0.983, slightly above 2020. I also reran the same 10 at 60 seconds, as a control for run-to-run noise: the scores barely moved, except on hill-valley, where single folds swung by up to 0.14. AutoGluon got faster, though a few datasets still need the longer budget.

MLJAR. The first 60-second MLJAR run lost up to 0.14 AUROC on the smallest datasets, and 300 seconds barely helped: glioma16 didn’t move, and robot-failure-lp1 made up 0.04 of its 0.11 loss. The drop came from MLJAR’s validation-split heuristic, not the shorter time limit. MLJAR’s Compete mode documents 10-fold cross-validation, but with a time limit it starts with a single 90/10 split and switches to 10-fold only if its first decision tree trains in under 1/250 of the budget. On my machine that tree took 1–7 seconds, so MLJAR kept the split. On the 50-row glioma16 dataset, that left about four validation rows to choose models with. Forcing 10-fold raised MLJAR’s mean from 0.880 to 0.890, and from 0.852 to 0.902 on datasets under 250 rows. It cost one large dataset: kr-vs-k (10,000 rows, 18 classes) fell from 0.973 to 0.793, because 10-fold leaves too little time to fit good models there in 60 seconds. The results above use the 10-fold run.

Do you need to tune LightGBM?

Yes. With default settings and 1,000 trees, LightGBM averages 0.859, vs 0.883 with 50 hyperopt trials. Default LightGBM is also the model most often worst or near-worst (44 datasets), with its biggest problems on tiny data (0.869 under 250 rows). LightGBM keeps its default learning rate of 0.1 however many trees you ask for, which likely overfits small datasets. CatBoost avoids this by picking its own learning rate from the dataset size and tree count.

I also tried the published “tuned defaults” for LightGBM from Better by Default (Holzmüller, Grinsztajn & Steinwart, NeurIPS 2024), through their pytabkit package. They averaged 0.829, which is worse than plain defaults (0.859). Those settings were tuned on datasets with at least 2,500 rows, and they hold out 20% of the training data for early stopping, which is expensive when you only have 100 rows.

IID Thoughts

How applicable are these experiments? Both levels of the nested cross-validation used class-stratified random splits. So the splits were IID: independent and identically distributed. The test data looked like the validation data which looked like the training data. This is both unrealistic and precisely how most peer-reviewed publications evaluate when they try out machine learning. (At least the good ones.) In some cases, there is actual covariate-shifted “test” data available. It’s possible that LightGBM is better than linear models for IID data regardless of its size, but this is no longer true if the test set is from some related but different distribution than the training set. I can’t experiment very easily in this scenario: “standard” benchmark datasets are readily available, but realistic pairs of training and covariate-shifted test sets are not.

Conclusions & Caveats

So what can we conclude?

  • If you only care about the IID setting or only have access to a single dataset, non-linear models are likely to be superior even if you only have 50 samples. That is even more true in 2026.
  • Start with TabPFN-3.5 or TabICLv2. They are the most accurate here, need no tuning, and train in under a second. Budget for slow prediction on a CPU, or use a GPU.
  • AutoGluon is a good way to get an upper bound on performance, but it’s much harder to understand the final complex ensemble than, say, LightGBM where you can plot the SHAP values. In 2026 the foundation models give a higher upper bound in less time.
  • hyperopt is old and has some warts but works better than the alternatives that I’ve tried.

Caveats:

  • LightGBM has a lot of excellent bells and whistles that were not at all used here: native missing value handling (we had none), smarter encoding of categorical variables (I used one-hot encoding for the sake of uniformity/fairness), per-feature monotonic constraints (need to have prior knowledge). Every model, including the 2026 additions, got the same one-hot encoding. TabPFN, TabICL and CatBoost can all handle categorical columns natively and might do even better with them.
  • TabPFN-3.5’s weights are licensed for non-commercial use. Check the license before you put it in a product.
  • All 2026 timings come from one machine. The 2020 AutoML times in the repo come from a different machine.
  • This is just classification. Regression might have different outcomes.

Again, check out the code and feel free to add new scripts with other algorithms. It shouldn’t be too hard. https://github.com/sergeyf/SmallDataBenchmarks