arXiv:2610.06679cs.LGOct 2026

Manuscript Offprint

arXiv:2610.06679

Closing the Context Gap: Activation Alignment for Tabular In-Context Learning

Yoel Zeldes

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Tabular foundation models perform in-context learning (ICL) by conditioning predictions on labeled training examples provided as context. Unlike traditional models that separate training from inference, these models must process all training examples in every forward pass, making each prediction expensive. Restricting the number of training examples reduces this cost but substantially degrades performance. Instead of discarding context, we propose activation alignment, a method that leverages the full context to teach a model how to behave when seeing only a subset. This is achieved by training a lightweight linear transformation on synthetic unlabeled data to map the intermediate activations of a data-constrained “student” (using partial context) toward those of a full-context “teacher” (using all data). Training the aligner requires no GPU and converges in seconds to minutes on commodity hardware. We evaluate on 38 classification datasets from the TabArena benchmark using the leading two tabular foundation models, TabPFN-3 and TabFM. Across all context budgets, the aligned student yields broad, statistically significant improvements over the unaligned baseline for both models. In low-data regimes, alignment recovers nearly half of the teacher’s predictive advantage. The method provides a practical, low-overhead approach to achieving the inference speed of compact contexts while closing a significant fraction of the performance gap to the full-context teacher.

1 Introduction

Tabular foundation models have become the state of the art for structured data prediction (Hollmann et al., 2025). Models such as TabPFN-3 (Grinsztajn et al., 2026) and TabFM (Google Research, 2026) perform in-context learning (ICL): given a set of labeled training examples as context and an unlabeled query, they produce a prediction in a single forward pass without weight updates. This paradigm enables rapid adaptation to new datasets and eliminates the need for task-specific training.

However, the predictive quality of ICL depends heavily on the number of context examples. When the context is small (due to limited data availability, hardware memory constraints, or computational cost of the quadratic attention mechanism), performance degrades substantially. Garg et al. (2022) showed that transformers implementing ICL improve with the number of in-context examples, and tabular foundation models exhibit a similar dependence on context size in practice (Qu et al., 2025; Ma et al., 2025), making sample efficiency a central bottleneck for practical deployment.

The root cause is architectural: unlike tree-based models, where training and inference are decoupled and prediction is immediate, tabular foundation models must carry all training examples through the forward pass at every prediction. Although intermediate key-value states could be cached, doing so requires large device memory. Existing approaches reduce this inference cost by compressing the context into compact latent tokens (TACO; Zabergja et al., 2026) or by pruning redundant transformer layers (TACTICL; Koshil et al., 2026). Both methods are effective but demand substantial GPU training.

Inspired by prior work on activation steering in large language models (Turner et al., 2025; Li et al., 2023; Todd et al., 2024) and feature-based knowledge distillation (Romero et al., 2015), we take a complementary approach. Rather than compressing the input or the architecture, we ask: can a model that has seen the full context teach a data-constrained copy of itself how to behave, by correcting its internal representations?

In this work, we propose activation alignment, a framework that fits a lightweight linear module to project the intermediate activations of a data-constrained student model toward those of a full-context teacher. Similar to TACO, the aligned student operates with a reduced number of input tokens compared to the full dataset. However, the aligner is drastically cheaper to train: a single linear layer fitted on pre-extracted activations, requiring no GPU and converging within seconds to minutes on commodity hardware. At inference time, the aligner corrects the student's hidden states at a single transformer layer without requiring any model fine-tuning.

We systematically evaluate activation alignment across 38 classification tasks from the TabArena benchmark (Erickson et al., 2026), a standardized evaluation suite of diverse tabular tasks, using TabPFN-3 (Grinsztajn et al., 2026) and TabFM (Google Research, 2026). Across both models and all evaluated context budgets, the aligned student outperforms the unaligned baseline in 81% of cases, with statistically significant gains. With only 10% of the training context, the aligned models achieve predictive parity with unaligned students provided two to four times as much data. Because activation alignment modifies internal representations rather than inputs or architecture, it is orthogonal to existing compression and context-selection methods; we discuss how the two approaches could be composed in Section 6. 1^{1}

References (31)