TL;DR
Tabular Foundation Models (TFMs) promise the magic of zero-shot, LLM-style reasoning on messy spreadsheets without needing to train an XGBoost model from scratch every time. However, their performance lives and dies by the few-shot examples fed into their context window—where random examples bring noise, and pure similarity search traps the model in an echo chamber of nearly identical rows. TabDivER is a training-free, plug-and-play retrieval framework that breaks out of this echo chamber by balancing relevance with geometric diversity, giving TFMs a richer, broader view of the data and pushing them past classic tree-based baselines.
What Problem Does This Paper Address?
For decades, tabular data (spreadsheets, SQL databases) has been ruled by Gradient Boosted Decision Trees like XGBoost and LightGBM. Recently, Transformer-based Tabular Foundation Models (TFMs) have stepped onto the scene, using In-Context Learning (ICL)—feeding a small set of labeled rows alongside a test row—to make predictions on brand-new tables without per-dataset training or hyperparameter tuning.
The catch? ICL is notoriously picky about its context. Current TFMs fall into two camps:
- Non-retrieval models grab random or fixed rows, polluting the context with irrelevant noise and out-of-distribution samples.
- Retrieval-augmented models search for the closest neighbors to the test query. Because high-dimensional tabular data is sparse and clumpy, pure similarity search suffers from manifold collapse: it pulls rows from a single tight cluster. Deprived of structural variety, the model overfits to spurious local correlations.
You can't just copy-paste diversity tricks from NLP, either. Tabular columns lack a natural semantic order, mix wildly different data types, and suffer from representation collapse when passed through neural encoders.
Methods
TabDivER acts as a model-agnostic, training-free pre-processor that curates the ideal context set in three stages:
- Geometry-Preserving Retrieval Space: Instead of relying on a pre-trained neural encoder (which squashes geometric distances), TabDivER builds a clean, raw feature space. It strips away target labels to prevent leakage, imputes and z-scores numerical columns, maps categories to integers, clips extreme outliers, and drops useless columns (like zero-variance features).
- Fast Exact Indexing: Row vectors are $L^2$-normalized onto a unit hypersphere and loaded into a memory-mapped Faiss index (
IndexFlatIP) for fast, exact cosine-similarity search. Given a query, it pulls a broad pool of top-$M$ candidates and filters out anything below a similarity threshold ($\tau = 0.3$). - Tabular Diversity-Adaptive Reranking: Standard diversity algorithms like Maximum Marginal Relevance (MMR) use a fixed trade-off weight ($\lambda$) and only penalize similarity to already-selected items. TabDivER upgrades this with two novel twists:
- Dual-Penalty Redundancy Control: Alongside penalizing similarity to the current context set, it pre-computes a local self-$k$NN density score to actively penalize candidates sitting in hyper-dense, repetitive clusters of the data manifold.
- Query-Adaptive $\lambda$: Rather than tuning $\lambda$ per dataset, TabDivER dynamically calculates it for every single query based on two geometric signals: how concentrated the candidate similarities are, and how spread out the candidates are around their centroid.
Datasets
Because TabDivER is training-free, all datasets are used strictly for evaluation across 118 standard tasks plus an industrial temporal benchmark (no new benchmarks are introduced):
- OpenML-CC18: 72 diverse classification tasks.
- CTR23: 30 regression tasks featuring extreme sparsity and high-cardinality categories.
- Reg_num: 16 regression tasks spanning heterogeneous real-world domains.
- TabReD: 6 industrial-scale datasets with temporal splits (training precedes testing in time) to test robustness against natural distribution shift.
Key Insights and Ideas
- Learned embeddings ruin tabular diversity: Swapping TabDivER's raw canonicalized feature space for learned embeddings from a TFM encoder (TabICL) caused classification accuracy to plummet by 19.4 percentage points (0.853 down to 0.658). Neural encoders collapse the subtle geometric distances needed to tell candidates apart.
- Fixed diversity can be worse than no diversity: Vanilla MMR with a fixed $\lambda = 0.5$ actually hurt performance compared to simple similarity-only search (0.816 vs. 0.832 ACC). Diversity only shines when dynamically adapted to each query's local neighborhood and paired with manifold density control.
- More context isn't always better: When relevance is weighted too heavily, expanding the context window from 1,024 to 2,048 samples actually degrades accuracy ("inverse scaling"), because you are just packing the prompt with redundant clones.
- Two geometric regimes benefit for different reasons: On compact datasets, diversity pushes search outside a dense, repetitive core to find complementary evidence. On sparse, multi-modal datasets, diversity acts as a global bridge across isolated peaks so the model doesn't base its decision on a single mode.
Key Results
TabDivER consistently boosted all four tested TFMs (TabPFN-v2, TabICL, TabDPT, and LimiX-16M) across classification and regression benchmarks, allowing TFM variants to outperform tuned GBDTs (XGBoost, LightGBM) and deep tabular baselines (TabR, ModernNCA).
- Broad Accuracy & $R^2$ Gains: TabPFN-v2 saw the largest relative leaps—jumping +2.6% in ACC on CC18 (0.827 to 0.853) and +2.2% in $R^2$ on CTR23 (0.708 to 0.730). Paired with LimiX-16M, TabDivER achieved the highest overall classification scores (0.888 ACC, 0.939 AUC). On specific multi-modal datasets like Sulfur, $R^2$ surged from 0.779 to 0.933 (+15.4%).
- Efficiency at the Pareto Frontier: Using GPU-parallelized batching, TabDivER processes queries in ~14.6 ms (~1,980 queries per second), hitting the optimal accuracy-latency Pareto frontier with minimal overhead over basic similarity search.
Limitations and Future Work
- Mixed results under temporal drift: On the time-split TabReD benchmark, evolving feature-label relationships ("retrieval drift") revealed an interesting trade-off. While TabDivER helped models with small contexts or naive L2 search (TabPFN-v2, TabDPT), it slightly degraded models that already rely on massive random windows (TabICL) or learned attention retrieval (LimiX-16M), where forcing extra geometric diversity pulled in outdated or label-irrelevant noise.
- Future Directions: Because operating purely on raw geometry leaves semantic context on the table, the authors plan to explore adaptively blending high-level table metadata into the retrieval space, as well as scaling the indexing pipeline for massive, high-velocity streaming data.
Summary updated