# TabK: Amortized Bayesian Estimation of the Number of Clusters in Tabular Data

arXiv: https://arxiv.org/abs/2611.28335 · HTML: https://mlsanity.com/paper/2611.28335/

## Key facts

- No citing papers in the map yet (data through 24 Nov 2026).
- Builds on 21 of its 42 references that are in the map.
- Submitted 20 Nov 2026, announced 24 Nov 2026.

## Builds on (most cited first, 21 of 21)

- [Attention Is All You Need](https://mlsanity.com/paper/1706.03762/) (2017)
- [Focal Loss for Dense Object Detection](https://mlsanity.com/paper/1708.02002/) (2017)
- [Unsupervised Deep Embedding for Clustering Analysis](https://mlsanity.com/paper/1511.06335/) (2015)
- [TabPFN: A Transformer That Solves Small Tabular Classification Problems in a Second](https://mlsanity.com/paper/2207.01848/) (2022)
- [Contrastive Clustering](https://mlsanity.com/paper/2009.09687/) (2020)
- [Towards K-means-friendly Spaces: Simultaneous Deep Learning and Clustering](https://mlsanity.com/paper/1610.04794/) (2016)
- [OpenML Benchmarking Suites](https://mlsanity.com/paper/1708.03731/) (2017)
- [SCARF: Self-Supervised Contrastive Learning using Random Feature Corruption](https://mlsanity.com/paper/2106.15147/) (2021)
- [SubTab: Subsetting Features of Tabular Data for Self-Supervised Representation Learning](https://mlsanity.com/paper/2110.04361/) (2021)
- [Deep Label Distribution Learning with Label Ambiguity](https://mlsanity.com/paper/1611.01731/) (2016)
- [Amortized Inference for Causal Structure Learning](https://mlsanity.com/paper/2205.12934/) (2022)
- [DeepDPM: Deep Clustering With an Unknown Number of Clusters](https://mlsanity.com/paper/2203.14309/) (2022)
- [Clustering Algorithms: A Comparative Approach](https://mlsanity.com/paper/1612.08388/) (2016)
- [Recovering the number of clusters in data sets with noise features using feature rescaling factors](https://mlsanity.com/paper/1602.06989/) (2016)
- [ZEUS: Zero-shot Embeddings for Unsupervised Separation of Tabular Data](https://mlsanity.com/paper/2505.10704/) (2025)
- [TabClustPFN: A Prior-data Fitted Network for Tabular Data Clustering](https://mlsanity.com/paper/2601.21656/) (2026)
- [CNAK : Cluster Number Assisted K-means](https://mlsanity.com/paper/1911.08871/) (2019)
- [Dying Clusters Is All You Need -- Deep Clustering With an Unknown Number of Clusters](https://mlsanity.com/paper/2410.09491/) (2024)
- [Natural Language-Based Synthetic Data Generation for Cluster Analysis](https://mlsanity.com/paper/2303.14301/) (2023)
- [Generating Multidimensional Clusters With Support Lines](https://mlsanity.com/paper/2301.10327/) (2023)
- [ClustRecNet: A Novel End-to-End Deep Learning Framework for Clustering Algorithm Recommendation](https://mlsanity.com/paper/2509.25289/) (2025)

## Abstract (arXiv)

Estimating the number of clusters, k, is a fundamental prerequisite for most clustering algorithms. Traditionally, this estimation has relied on computationally expensive grid searches over internal cluster validity indices (CVIs) or adaptive clustering algorithms, both constrained by specific statistical assumptions. We introduce TabK, a zero-shot, permutation-invariant transformer architecture that frames the estimation of k as an amortized Bayesian inference problem for tabular data. TabK leverages a novel Quantile Feature Encoder (QFE) to extract position-free, content-derived representations from empirical marginal distributions. By learning a generalized structural bias over a diverse synthetic prior, TabK estimates the number of clusters in a single forward pass per ensemble member. Evaluated across 50 diverse real-world benchmarks, TabK outperforms all competing methods, achieving a mean absolute error (MAE) value of 1.04 compared to 2.14 for the closest competitor. TabK also achieves the lowest average inference time, producing estimates in less than one second on average and running 2× faster than TabClustPFN and 30× faster than traditional CVIs such as Silhouette and Calinski-Harabasz. Code is available at https://github.com/mrbakhtyari/TabK.
