TabICL: teaching a table to become a prompt

A technical anatomy of distribution-aware cell embeddings, row compression, and in-context learning on tables that no longer fit the small-data story.

QU ET AL. · ICML 202531-PAGE PAPER + APPENDICESCLASSIFICATION
n rows × m featurescollapse m before ICL
The scaling problem

TabPFNv2 keeps the 2D grid alive.

Alternating attention repeatedly crosses samples for every feature. The expensive sample–sample term therefore carries a factor of m.

TabICL makes the grid disappear.

It first compresses every row to 512 dimensions. Dataset-level ICL then sees one sequence of rows—not one sequence for every column.

dominant sample term: n²m → n²
01 / 04

Three transformers. One deliberate bottleneck.

The paper calls this a two-stage architecture because embedding precedes ICL. Operationally, that embedding stage contains two transformers—one across samples within columns, one across features within rows.

Understand each value in its column.

SHARED SET TRANSFORMER · d=128 · k=128 INDUCERS · 3 ISAB BLOCKS · 4 HEADS

one column cⱼ
34
28
45
52
31 · test
128 learned inducing vectors
a weight + bias per cell
WᵢⱼBᵢⱼ
eⱼ = W ⊙ cⱼ + B ∈ ℝⁿˣ¹²⁸

MAB₁ uses training samples only as keys/values; test values query the train-derived summary in MAB₂.

Let the features in each row interact.

3 LAYERS · 8 HEADS · 4 LEARNED [CLS] TOKENS · RoPE BASE 100,000

CLS₁CLS₂CLS₃CLS₄ e₁e₂e₃eₘ
RoPE
Hᵢ = concat(CLS₁…CLS₄) ∈ ℝ⁵¹²

RoPE breaks symmetry between similarly distributed columns—but also breaks exact column-permutation invariance.

Infer the task from labelled rows.

12 LAYERS · 4 HEADS · LATE LABEL FUSION · 2-LAYER PREDICTION MLP

row embedding + label embedding
y₁
y₂
y₃
?
?
attention mask
test probabilities
.07.11.82
.18.72.10
.03.14.83

Training rows attend to training rows. Test rows attend only to training rows. Labels never enter TFcol or TFrow.

01 · DISTRIBUTION-AWARE

Values get meaning from their distribution.

The same scalar can mean very different things in age, income, a category code, or a count. TFcol is shared across columns, so it cannot memorize “feature 17.” Instead, it reads each column as a set and generates a contextual weight and bias for every cell.

  • ISAB reduces column attention from O(n²) to O(nk).
  • Only training rows form the induced summary, preventing test leakage.
02 · CONTEXT-AWARE

A row becomes one fixed token.

Every row is a sequence of feature embeddings plus four learned summary tokens. The four outputs are concatenated to 512 dimensions. This is the bottleneck that removes m from the later sample-attention term.

  • RoPE prevents identically distributed columns from collapsing together.
  • Column shuffling at ensemble time approximately restores invariance.
03 · IN-CONTEXT

Supervision arrives only after compression.

One-hot labels are projected into the same 512-dimensional space and added to training-row embeddings. TFicl maps labelled context and unlabelled queries to probabilities in one forward pass—no parameter update on the target dataset.

  • Late fusion lets class-hierarchy subproblems reuse the same row embeddings.
  • The ICL block remains quadratic in the number of rows.

Walk the tensors, not the metaphor.

X ∈ ℝⁿˣᵐRaw table. Labels are withheld from the embedding path.
E ∈ ℝⁿˣᵐˣ¹²⁸Every cell is distribution-aware after shared TFcol.
H ∈ ℝⁿˣ⁵¹²Four [CLS] outputs summarize every row after TFrow.
P ∈ ℝⁿᵗᵉˢᵗˣᶜTFicl plus a two-layer MLP produces test probabilities.

“Feature identity” without feature names

A language model starts with semantic tokens. A raw table starts with ambiguous scalars. TabICL’s answer is statistical: encode whether a value is central, extreme, common, rare, discrete, skewed, or heavy-tailed within its own column.

The paper’s PCA probe shows learned column summaries clustering by skewness and kurtosis. That is evidence of distributional structure—not proof that the model recovered a human-readable datatype.

low skew · light tails→ different Wᵢ, Bᵢ
02 / 04

The difference is where the grid disappears.

Choose a method to see what remains alive during inference, when labels enter, and whether the target dataset triggers parameter fitting.

TabICL

O(nkm + nm² + n²)

The grid is compressed once. TFcol is linear in rows because k=128 is fixed. TFrow is quadratic in features. The expensive operation runs once over 512-D row tokens.

TabPFNv2

O(nm² + n²m)

The grid survives every layer. Alternating row-wise and column-wise attention repeatedly pays sample attention for each feature. Labels are fused early; random feature identifiers and grouped feature encodings fight representation collapse.

Gradient-boosted trees

fit a task-specific ensemble

No in-context task inference. CatBoost/XGBoost fit splits and leaf values for each dataset, usually with validation and hyperparameter search. Their bias is naturally strong for discontinuities and interactions—one reason TabICL adds tree-generated priors.

Serialized LLM

O(L²) in serialized token length
age: 34, income: 72000, zip: 94107risk: 0
age: 28, income: 91500

The table becomes text. Column names can supply semantics, but serialization spends context on syntax and tokenization. The paper cites tabular LLM work limited to roughly 32–64 shots and notes uncertainty around numerical reasoning.

Architecture, supervision, and adaptation
AspectTabICLTabPFNv2Boosted treesSerialized LLM
Label fusionLate: labels are added only to row embeddings before TFicl.Early: labels participate throughout the two-way attention stack.Labels fit splits, leaf values, and boosting residuals.Labels appear in serialized input–output examples.
Feature identityColumn distribution + RoPE position; no semantic names required.Random identifiers + grouped feature encoding.Explicit dataset columns; split logic is feature-specific.Usually semantic names plus textual position.
Target adaptationForward pass; no update. Paper uses a 32-member ensemble.Forward pass; no update. Paper uses a 32-member ensemble.Fit per dataset; typically tune with validation.Few-shot prompting can avoid fitting, but is context-limited.
Scaling pressurenm² + n² after fixed-k column attention.nm² + n²m; sample attention repeats per feature.Training and tuning cost; implementation and data dependent.Quadratic attention in a long serialized sequence.

RoPE solves a real ambiguity by creating another.

If two columns share a distribution, a permutation-invariant row transformer can confuse rows that are column permutations of one another. RoPE injects positional identity into queries and keys, preserving distinct row representations.

But tables have no natural column order. The model therefore ensembles across random column permutations to approximate the invariance its encoder deliberately broke.

same values · different columns
A·1B·2C·3D·4
With RoPE: position-dependent rotations keep this ordering distinguishable.
03 / 04

Scaling had to be learned, not merely enabled.

Accepting a 60K-row tensor is not the same as knowing how to use 60K examples. The authors teach long-context behavior with curriculum learning and broaden the synthetic prior.

1,024 rows

160K steps, micro-batch 4. The full network learns the basic synthetic task prior.

avg. rank 11.4

1K–40K rows

2K steps, log-uniform sizes, activation checkpointing above 10K.

avg. rank 7.46

40K–60K rows

50 steps. TFcol and TFrow freeze; only the dataset-level TFicl adapts.

avg. rank 6.95
70% neural structural causal models
30% tree SCMs
≈82M SYNTHETIC DATASETS≤100 FEATURES≤10 CLASSES20 DAYS · 3×A100 40GBMORE ACTIVATIONS + GP FUNCTIONS
04 / 04

What the experiments prove—and what they don’t.

The headline is speed at TabPFNv2-level quality, with a widening advantage as tables grow. The careful reading is more specific: benchmark scale, memory scale, and statistical comparison are three different claims.

Across TALENT datasets below 30K samples, measured speedup rises from roughly 1.5× on small tables to 3–10× on large ones. A fitted scaling law approaches about 5× at large sizes.

100K samples × 500 features

5 GB GPU~25 GB CPU

The appendix trace reports this configuration with batching and CPU offload. The main text rounds the host requirement to a 32 GB RAM setup.

500K samples × 500 features

<14 GB GPU~120 GB CPU

This is a systems scalability demonstration. Memory mapping can trade disk I/O for much lower host RAM.

What the paper reports
What that supports
QUALITY
Comparable to TabPFNv2 overall; stronger ranking on large datasets and ahead of CatBoost there.
Large-context ICL can remain competitive beyond few-shot regimes.
SPEED
1.1s geometric-mean train+inference time per 1K samples; up to 10× faster than TabPFNv2.
Removing the feature factor from sample attention matters in practice, not just asymptotically.
SCALE
Benchmarks up to 150K total samples; conclusion discusses up to 100K training samples; memory trace reaches 500K total.
500K feasibility is a memory/runtime result, not validated predictive quality at 500K.
ABLATION
Tree priors help modestly; curriculum rank improves 11.4 → 7.46 → 6.95, with some small-dataset regressions.
The large-data gain is partly a training-distribution result, not architecture alone.
!

Critical reading

The paper is unusually explicit about several limits. Four materially affect how to interpret or deploy the architecture.

1

500K is not a 500K accuracy benchmark.

The appendix shows a 500K × 500 table passing through the system with less than 14 GB of GPU memory, at roughly 120 GB of CPU RAM before disk offload. Predictive evidence is measured at smaller scale.

2

Column order becomes a model input.

RoPE fixes representation collapse by breaking feature symmetry. The 32-member ensemble averages permutations to approximate the invariance a tabular model would ideally have by construction.

3

“Single forward pass” is an ensemble statement here.

Each prediction is parameter-update free, but the reported configuration averages 32 predictions across shuffled columns, class labels, and preprocessing choices. Cheaper than 100-step tuning, yes; one model evaluation, no.

4

The native task prior is narrow.

Pretraining covers classification with at most 10 classes and 100 features. More classes use a hierarchical decomposition; regression is future work. Generalization to 500 features is extrapolation.

TabICL’s contribution is not “attention, but faster.” It is a bottleneck with the right inductive bias.