← All posts

AI paper reviews › Machine learning

The TabFM paper explained, how it predicts tables zero-shot

Google's TabFM reads a whole labeled table and predicts new rows in one forward pass. How it works, what it reports on TabArena, and how far to trust it.

If you’ve trained a model on a spreadsheet-like table, you probably know the routine. You clean the columns, fit and tune a gradient boosting model such as XGBoost or LightGBM, and then start over when the next table arrives. Gradient boosting adds small decision trees one at a time, each fixing the errors of the ones before it, and it has long been the default for tabular data. The TabFM paper asks whether that per-table training can be skipped.

“TabFM: A Zero-Shot Foundation Model for Tabular Data” comes from Weihao Kong and eight other researchers at Google Research, and version 1 was posted to arXiv on September 29, 2026. In short, TabFM is a 400M-parameter Transformer that takes the labeled training rows and the rows to predict as one input, then predicts in a single forward pass. It doesn’t train on your data, and its pretraining used only synthetic tables. On the 51 datasets of the TabArena benchmark, the authors report that it ranks first among tabular foundation models run with default settings and beats AutoML systems given four-hour budgets. Two add-ons that keep the weights frozen, TabFM+ and TabFM-Auto, push the scores higher.

Google first announced the model on its research blog on June 30, 2026, and the paper is the technical write-up that followed. As of November 2, 2026, the GitHub repository with its code had 2,828 stars.

Training per table versus in-context prediction

Take scikit-learn’s breast cancer data. Each of its 569 rows has 30 measurements and a label that says malignant or benign. Usually you’d hold out 143 rows for testing, fit a model on the other 426, and then predict. A tabular foundation model instead takes the 426 labeled rows and the 143 unlabeled rows together and returns class probabilities for the 143. Its weights stay the same for every table, and the table you pass in plays the role of a prompt for a language model. That’s in-context learning.

The idea goes back to TabPFN by Hollmann and colleagues, which was also pretrained on synthetic data but reported results on tables with up to 1,000 training points. The TabFM paper notes that attention over every cell grows with the square of both the row and column counts, which long kept tabular transformers under 1,000 rows. TabICL (ICML 2025) then compressed each row into one vector before running in-context learning across rows, and TabFM builds on that design.

A small in-context predictor you can run

To get a feel for it, I wrote a function. It compares each query row with every labeled row, turns the similarities into weights with a softmax, and averages the labels. If you read the query row as the query, the labeled rows as keys, and the labels as values, it resembles what one attention layer does. It has no learned parameters, so it’s a small example of the principle, and it doesn’t reproduce TabFM.

import numpy as np
from sklearn.datasets import load_breast_cancer
from sklearn.ensemble import HistGradientBoostingClassifier
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler

def icl_predict(X_ctx, y_ctx, X_query, temperature=0.05):
    # No fitting: the labeled rows are the input, like a prompt.
    dist = ((X_query[:, None, :] - X_ctx[None, :, :]) ** 2).mean(axis=2)
    scores = -dist / temperature                      # closer rows score higher
    w = np.exp(scores - scores.max(axis=1, keepdims=True))
    w /= w.sum(axis=1, keepdims=True)                 # softmax over the context rows
    return w @ np.eye(2)[y_ctx]                       # weighted vote of their labels

X, y = load_breast_cancer(return_X_y=True)
X_tr, X_te, y_tr, y_te = train_test_split(X, y, test_size=0.25, stratify=y, random_state=0)
scaler = StandardScaler().fit(X_tr)
X_tr, X_te = scaler.transform(X_tr), scaler.transform(X_te)

proba = icl_predict(X_tr, y_tr, X_te)
pred, conf = proba.argmax(axis=1), proba.max(axis=1)
hgb = HistGradientBoostingClassifier(random_state=0).fit(X_tr, y_tr)
print(f"softmax ICL correct: {(pred == y_te).sum()} / {len(y_te)}")
print(f"HistGB      correct: {(hgb.predict(X_te) == y_te).sum()} / {len(y_te)}")
for lo, hi in [(0.7, 0.9), (0.9, 1.01)]:
    m = (conf >= lo) & (conf < hi)
    print(f"said {lo:.0%} to {min(hi, 1):.0%}: rows {m.sum():3d}, "
          f"mean confidence {conf[m].mean():.3f}, right {(pred[m] == y_te[m]).mean():.3f}")
softmax ICL correct: 137 / 143
HistGB      correct: 134 / 143
said 70% to 90%: rows  10, mean confidence 0.823, right 0.800
said 90% to 100%: rows 132, mean confidence 0.988, right 0.977

The function got 137 of the 143 test rows right, and HistGradientBoosting with default settings got 134. Of course, a three-row gap on one small split can’t tell you which is better. At a temperature of 0.05, a row whose mean squared difference is 0.05 smaller gets about 2.7 times the weight, and I picked that value with 5-fold cross-validation on the training rows only. The function uses a fixed similarity that weighs all 30 columns equally, while in TabFM, layers of attention learned from synthetic tables do that job.

The last two lines show what calibration means. Where the function said 70% to 90%, its mean confidence was 0.823, and it was right on 0.800 of those rows. By scikit-learn’s calibration guide, about 80% of the samples a well-calibrated classifier scores near 0.8 should actually be positive. The TabFM abstract says its predictions are calibrated, but the paper doesn’t measure calibration on its own. TabArena scores binary tasks with ROC AUC, which looks only at ranking, and multiclass tasks with log loss, which punishes overconfidence.

Why it trains only on synthetic tables

The model card gives the reasons: diverse, high-quality open tables are scarce, and real industrial data comes with privacy and licensing issues. So TabFM is pretrained on tables drawn from structural causal models (SCMs). An SCM is a recipe for data. A directed acyclic graph sets which variables affect which, and each variable is a function of its parents plus noise. Here’s a small example with one fixed graph.

import numpy as np
import pandas as pd

rng = np.random.default_rng(1)
n = 6
# Graph: x0 -> x1, x0 -> x2, (x1, x2) -> hidden h -> label y
x0 = rng.normal(0, 1, n)
x1 = np.sin(2 * x0) + 0.3 * rng.normal(0, 1, n)
x2 = np.digitize(x0 ** 2 + 0.3 * rng.normal(0, 1, n), [0.3, 1.0])  # categorical: 0, 1, 2
h = np.tanh(2 * x1) - 0.8 * x2 + 0.3 * rng.normal(0, 1, n)
y = (h > np.median(h)).astype(int)
print(pd.DataFrame({"x0": x0, "x1": x1, "x2": x2, "y": y}).round(2).to_string(index=False))
   x0    x1  x2  y
 0.35  0.48   0  0
 0.82  1.17   1  0
 0.33  0.72   0  1
-1.30 -0.42   2  0
 0.91  0.98   1  1
 0.45  0.94   0  1

Here x1 and x2 depend on x0, and y comes from a hidden node the table doesn’t show. In pretraining, the graph, the functions, the table shape, the share of categorical columns, missing entries, label noise, and class balance are all drawn at random for each table, with at most 100 columns (Section 3.2). The loss is computed only on query rows, so pretraining has the same shape as inference. Google’s announcement says hundreds of millions of such datasets were used, and the paper describes a four-stage curriculum that grows the context from 2,048 to 16,384 rows.

An SCM graph, the synthetic table drawn from it, and the four-stage curriculum chart
Figure 3 from the paper. (a) An SCM graph with random functional links and (b) a table drawn from it, with numerical and categorical columns plus classification and regression targets. (c) In the four-stage curriculum, rows per table grow from 2,048 to 16,384 while tables per batch shrink from 2,048 to 256, so every step sees the same number of rows, about 4.19 million. Source: Kong et al. (2026), CC BY 4.0.

How TabFM reads a table

Section 3.1 splits TabFM into four stages.

Diagram of TabFM's table encoder and in-context predictor, with column and row attention explained
Figure 2 from the paper. (a) Left, the table encoder: cell embeddings pass through two stages that alternate column ISAB and row SAB, and the CLS tokens yield a row vector R. Right, the in-context predictor: a label embedding e(y) is added to the training rows' vectors, followed by 24 layers of attention across rows. (b) Column ISAB looks across rows through m inducing points at a cost linear in the number of rows, and row SAB looks across features with RoPE. Source: Kong et al. (2026), CC BY 4.0.

First, a cell value passes through 32 learned frequencies, whose cosines and sines give 64 numbers, and these are projected to 128 dimensions. Each column is grouped with the columns 1 and 3 places to its right, wrapping around at the end. Counting from 0, column 8 of a 10-column table is grouped with columns 9 and 1.

Second, attention alternates between the two axes of the table. Down each column, rows don’t look at each other directly. They go through 256 inducing points that gather information from labeled rows only. With 16,384 rows, all row pairs would come to about 268 million, but going through the inducing points takes about 8.4 million pairs, gathering and reading back combined, 32 times fewer. Across each row, attention uses rotary position embeddings (RoPE) to encode column positions relative to each other, so tables wider than those in pretraining still fit.

Third, eight CLS tokens of 128 dimensions summarize each row into a vector of 1,024 numbers, however many columns there are. Fourth, a 24-layer in-context predictor attends across these row vectors, and it holds 402.7M of the 408.7M parameters, about 98.5%. Each query row attends only to the rows that carry a label embedding, never to other query rows, so splitting or reordering the test rows doesn’t change its predictions. Since full row-to-row attention happens only here, on compressed rows, the context reaches 16,384 rows.

What the paper reports on TabArena

The paper uses the 38 classification and 13 regression datasets of TabArena, a benchmark accepted at NeurIPS 2025. Scores are Elo ratings from head-to-head results on each dataset and fold, with default Random Forest at 1000. The pool of 67 method configurations includes tuned tree and deep models, AutoML with four-hour budgets, and published foundation models.

Method (Table 2) Classification Elo Regression Elo
TabFM-Auto 1940.7 2392.4
TabFM+ 1838.0 2189.2
TabFM (zero-shot) 1768.6 2055.2
EXAONE-Tabular 1768.0 1973.1
AutoGluon 1.5 (extreme) 1669.7 1851.2
TabPFN-3 1641.9 1866.6

In regression, zero-shot TabFM leads the next model, EXAONE-Tabular, by 82.1 Elo, but in classification the gap is 0.6, close to a tie. So the authors point to improvability, the average relative error that an oracle picking the best method per dataset could still remove. TabFM’s is 6.10%, and EXAONE-Tabular’s is 9.47%. The claim that TabFM beats AutoML compares one default run of TabFM with AutoGluon, which stacks and bags many models within its time budget. TabFM+ and TabFM-Auto spend extra compute at prediction time, so they aren’t zero-shot results.

Two add-ons on the same frozen weights

TabFM+ (Section 4) uses the fact that reordering, rescaling, or adding columns changes the output, and it runs 32 altered views of the table through the frozen model. Half use the original columns, up to 500 features. The other half add products of two numeric columns and SVD components, each up to the square root of the column count rounded down, so up to 5 each for 25 columns. The predictions are blended with non-negative least squares weights while every view keeps at least 0.25 times 1/32, about 0.0078, and classification adds Platt scaling. The reported gains are 69.4 Elo in classification and 134.0 in regression.

In TabFM-Auto (Section 5), Gemini-3.8-Flash writes and revises Python code around the frozen model for preprocessing, feature engineering, and choosing which rows go into the context. Candidates are scored only by cross-validation inside a training split, and the search stops after 96 evaluations or six hours. The reported gains are 172.1 Elo in classification and 337.2 in regression, with 41 of 51 datasets improving. The authors say most of the gain came from new features, such as Strouhal and Reynolds numbers built for the airfoil_self_noise dataset. The details are in a companion paper (Fu et al. 2026a).

Limits the authors state, and open questions

According to the conclusion, pretraining covers only numeric and categorical tables of at most 16,384 rows and 100 columns. Larger tables are left to length generalization or subsampling, and free text is encoded without semantic tokenization. Reading the setup, I’d keep a few more points in mind.

  • It’s an arXiv preprint, version 1, with no journal or conference listed.
  • The paper analyzes attention complexity but reports no measured inference time, memory use, or hardware. The model card notes that memory grows with the number of training rows and that classification is capped at 10 classes. It also says that, since the model saw only synthetic data, its performance in specific real-world domains isn’t fully characterized.
  • Google’s announcement says the TabArena datasets range from 700 to 150,000 samples, but the paper doesn’t say how tables beyond 16,384 rows were handled.
  • LimiX-2, posted on September 15, 2026, also pretrains on SCM data and reports TabArena results, but it isn’t in Table 2.

Code, weights, and license

The code is at google-research/tabfm under Apache-2.0, with scikit-learn-style TabFMClassifier and TabFMRegressor classes. The weights the paper links, google/tabfm-1.1.0-pytorch, come as separate classification and regression checkpoints of about 820 MB each. They fall under the TabFM Non-Commercial License v1.0, which allows only non-commercial, non-production use, so read it before using TabFM at work. I only read these pages and didn’t run the model.

To go further, start with Sections 3.1 and 3.2 and Table 2 of the paper. I ran the two examples above on November 2, 2026, with Python 3.13.12, NumPy 2.5.4, pandas 3.1.0, and scikit-learn 1.9.1.

AI tools helped with the research for this post.