arXiv:2608.27882cs.LGAug 2026

Manuscript Offprint

arXiv:2608.27882

SOMTab: Set-Order Mamba for Efficient Tabular In-Context Learning

Hao Wang, Siyu Zhang, Wei Ma

Abstract

Tabular foundation models based on in-context learning have recently emerged as strong alternatives to task-specific model fitting. However, the current performance frontier remains dominated by attention-heavy architectures, where attention is used throughout the modeling pipeline. This raises a natural question: is attention necessary at every stage of tabular in-context learning? We introduce SOMTab, a Set-Order Mamba architecture for efficient tabular in-context learning. SOMTab separates representation construction from query-conditioned retrieval. For row and column representations, it maps unordered table tokens into stable latent slots and applies Mamba-based state-space mixing to construct compact representations. For final prediction, it retains attention-based in-context learning to preserve query-conditioned retrieval from labeled context examples. We further introduce DCH-TailMix, a synthetic prior that combines degree-corrected graph heterogeneity with mixed heavy-tailed regimes to diversify synthetic dependency structures. Across tabular benchmarks, SOMTab approaches the performance of strong Transformer-based tabular foundation models while achieving faster inference and lower GPU memory usage, yielding a favorable efficiency–accuracy trade-off.

1 Introduction

Tabular data are among the most common data formats in scientific and industrial machine learning, with applications in healthcare, finance, biology, materials science, and the social sciences (Borisov et al., 2022; Grinsztajn et al., 2022). Despite the remarkable progress of deep learning in vision and language, tabular prediction has long been dominated by tree-based methods such as random forests and gradient-boosted decision trees (Breiman, 2001; Chen and Guestrin, 2016; Ke et al., 2017; Prokhorenkova et al., 2018). One key challenge

Normalized log-loss vs. runtime

Figure

Total time per 1K train samples (s, median)

Figure 1: Predictive quality–efficiency trade-off on all TALENT classification datasets. The horizontal axis reports the median fit-plus-predict time per 1K labeled context samples, and the vertical axis reports the mean min–max normalized log-loss across datasets. Lower values are better on both axes, and the runtime axis is shown on a logarithmic scale. All methods are rerun on the same H200 server under a common evaluation pipeline; baselines use their official default configurations. The dashed line denotes the empirical Pareto frontier.

is that tabular datasets are highly heterogeneous: different tables have different feature spaces, feature distributions, sample sizes, class cardinalities, missing-value patterns, and degrees of feature interaction. These properties make it difficult to design a single neural architecture that transfers reliably across datasets (Borisov et al., 2022; Zhu et al., 2023; Ye et al., 2024).

Tabular foundation models have begun to change this landscape. Built on the framework of Prior-Data Fitted Networks (PFNs), models such as TabPFN, TabPFNv2, TabICL, and TabICLv2 are pretrained on synthetic tabular tasks to amortize prediction across datasets, and apply the learned predictor to a new dataset through in-context learning (ICL), without updating model parameters on the target data (Müller et al., 2021; Hollmann et al., 2022, 2025; Qu et al., 2025, 2026). Given labeled training examples as context and unlabeled test examples as queries, these models are trained to approximate the posterior predictive distribution induced by a synthetic prior over datasets. This paradigm replaces per-dataset model selection and hyperparameter tuning with a single forward-pass predictor, and has achieved strong performance on tabular benchmarks.

However, current leading PFN-style tabular foundation models remain largely built around Transformer attention. Exemplified by TabPFNv2 and its successors, attention serves as a general-purpose table-mixing mechanism: it allows samples, features, and labels to interact so that the model can infer feature distributions, cross-feature dependencies, and task-specific structure from the context (Vaswani et al., 2017; Hollmann et al., 2025; Qu et al., 2025, 2026). This all-to-all comparison is expressive and well aligned with in-context learning, especially in the final prediction stage where test examples must condition on labeled context examples. Yet it also inherits the quadratic cost of attention along the sample or feature dimension, making long-context tabular prediction increasingly expensive as tables grow. This raises a more specific architectural question: must attention be the default operator throughout a tabular foundation model, or is it mainly needed for query-context matching at prediction time? Since earlier table-representation stages often aggregate distributional and interaction information before final prediction, they may be amenable to more efficient linear-complexity sequence operators, such as selective state-space models (Gu et al., 2021; Gu and Dao, 2023; Dao and Gu, 2024).

We argue that tabular ICL can be usefully decomposed into two computational roles: representation construction and query-context matching. Representation construction transforms raw cell values and context information into intermediate table or row representations by capturing distributional properties of columns and interactions among features. Query-context matching, in contrast, predicts labels for test examples by conditioning each test representation on labeled examples in the context (Brown et al., 2020; Xie et al., 2021; Müller et al., 2021). Attention is naturally suited for this role because its query-key-value mechanism provides direct query-dependent routing between test and training examples (Vaswani et al., 2017). The former role, however, can be viewed as a structured compression problem: the model must aggregate information from unordered rows and columns into useful representations before final prediction. This observation suggests that attention should be allocated selectively rather than treated as the default operator across all stages.

Selective state-space models, exemplified by Mamba, provide a promising alternative for efficient representation construction (Gu et al., 2021; Gu and Dao, 2023). Mamba uses input-dependent state-space dynamics to propagate, suppress, or update information, achieving strong sequence modeling performance while scaling linearly with sequence length (Gu and Dao, 2023). Yet directly applying Mamba to tabular ICL is nontrivial. Tables are not natural sequences: the order of rows and columns is largely arbitrary (Zaheer et al., 2017; Lee et al., 2019), whereas Mamba operates through an ordered state-space scan. Moreover, replacing the final ICL stage with pure state-space compression may remove the query-dependent matching behavior that makes attention effective for in-context prediction. Thus, the challenge is not simply to replace Transformers with Mamba, but to integrate state-space mixing into tabular ICL while preserving both the unordered structure of tables and the query-dependent matching capability of attention.

We propose SOMTab, a Set-Order Mamba architecture for efficient tabular in-context learning. SOMTab uses attention selectively in the tabular ICL pipeline. For representation construction, it first maps unordered table tokens into ordered latent slots through a set-to-order mechanism, and then applies Mamba-based mixing over these slots to encode column distributions and row-wise feature interactions efficiently (Zaheer et al., 2017; Lee et al., 2019; Gu and Dao, 2023). For final prediction, SOMTab retains attention-based ICL, allowing test examples to condition on label-relevant information from labeled context examples. This hybrid design reflects our central hypothesis: attention is most valuable for query-context matching, whereas state-space sequence mixing can provide a sufficient and more efficient alternative for table representation once the unordered structure of tabular data is explicitly handled.

In addition to the architecture, we introduce a synthetic dependency prior, DCH-TailMix (Degree-Corrected Heterogeneity with Tail Mixing), to improve the diversity of pretraining tasks. PFN-style tabular foundation models depend critically on the synthetic prior used during pretraining (Müller et al., 2021; Hollmann

Figure

Figure 2: Architecture overview of SOMTab. The top illustrates the end-to-end pipeline, where variable- and sample-level Set-to-Order Mamba modules construct compact row representations, followed by an attention-based ICL reader for query prediction. The bottom details the corresponding representation modules and context-only attention mechanism.

et al., 2022, 2025; Qu et al., 2025, 2026). Existing priors based on structural causal models or random graph mechanisms encode useful inductive biases (Pearl, 2009; Peters et al., 2017), but a single graph-sampling regime may not fully capture the diverse dependency patterns encountered in real-world tables. DCH-TailMix addresses this limitation by combining degree-corrected graph heterogeneity with mixed heavy-tailed regimes, generating diverse dependency structures that expose the model to a broader range of feature-target and feature-feature relationships during pretraining.

Our experiments on TALENT classification datasets show that SOMTab achieves competitive predictive performance among strong Transformer-based tabular foundation models while substantially reducing fit-plus-predict runtime and exhibiting increasingly favorable peak-memory scaling as the labeled context grows. Additional results on TabArena further demonstrate a competitive efficiency–performance trade-off across a broader collection of tabular baselines (Erickson et al., 2025). Ablations show that both the set-to-order Mamba encoder and the DCH-TailMix prior contribute to the final performance. These results support a simple design principle for tabular ICL: use attention for query–context matching, while employing efficient state-space sequence operators for representation construction when the unordered table structure can be organized into a stable latent order.

Our main contributions are summarized as follows:

• We introduce SOMTab, a Set-Order Mamba architecture for tabular in-context learning that organizes unordered table tokens into ordered latent sequences, uses Mamba-based mixing for efficient representation construction, and retains attention for final query-context matching.

• We propose DCH-TailMix, a synthetic dependency prior that combines degree-corrected graph heterogeneity with mixed heavy-tailed regimes to generate more diverse feature-target and feature-feature dependency structures for PFN-style pretraining.

• We provide empirical evaluations and ablation studies showing that SOMTab achieves a favorable speed–accuracy trade-off, approaching the predictive performance of strong

Transformer-based tabular foundation models while substantially reducing inference time.