cs.LGNov 20, 2026

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

Authors: Mohammadreza Bakhtyari, Bogdan Mazoure, Renato Cordeiro de Amorim, Guillaume Rabusseau, Vladimir Makarenkov

Organizations: Université du Québec à Montréal, Canada · Mila, Canada · University of Essex, UK · DIRO, Université de Montréal, Canada

Abstract

Estimating the number of clusters, kk, 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 kk 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×2\times faster than TabClustPFN and 30×30\times faster than traditional CVIs such as Silhouette and Calinski-Harabasz. Code is available at https://github.com/mrbakhtyari/TabK.

Figures & tables

Appendix figures & tables13 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. TabClustPFN: A Prior-data Fitted Network for Tabular Data Clustering

    Jan 29, 2026Tianqi Zhao, Guanyang Wang, Yan Shuo Tan +1Cluster Number EstimationClustering

  2. CNMBI: Determining the Number of Clusters Using Center Pairwise Matching and Boundary Filtering

    Mar 23, 2026Ruilin Zhang, Haiyang Zheng, Hongpeng WangCluster Number EstimationClustering

  3. CLUBench: A Clustering Benchmark

    May 28, 2026Feng Xiao, Dazhi Fu, Chris Ding +1Benchmark DesignClustering