TL;DR
Tydra introduces the first hybrid Transformer–State Space Model (SSM) architecture designed specifically for tabular in-context learning. By interleaving TabPFN's attention layers with Hydra's subquadratic SSM layers, it cuts inference time by up to 30% while matching TabPFN's high accuracy, significantly outperforming pure SSM baselines that are ten times larger.
What Problem Does This Paper Address?
Tabular foundation models like TabPFN have revolutionized zero-shot tabular classification by making predictions via a single forward pass (in-context learning). However, because they rely on standard Transformer backbones, their computational cost scales quadratically ($O(L^2)$) with the number of rows ($L$). This makes inference prohibitively expensive for large datasets or local deployments—such as in hospitals where strict data privacy regulations forbid cloud-based inference.
While subquadratic State Space Models (SSMs) like Hydra offer a faster alternative, they suffer from a significant drop in predictive accuracy. Naively scaling up these pure SSMs fails to bridge the accuracy–efficiency gap. The authors tackle this bottleneck by exploring whether hybrid architectures can deliver the best of both worlds for tabular data.
Methods
The authors introduce Tydra, a hybrid architecture that interleaves TabPFN's attention layers with Hydra's SSM layers.
Unlike language models where sequences have a fixed order, tabular data is permutation-invariant—changing the order of rows should not change the model's predictions. To handle this, Tydra utilizes Hydra's bidirectional quasiseparable matrix mixer. This mechanism allows every row to interact with every other row in subquadratic time, preserving permutation invariance while avoiding the $O(L^2)$ cost of full attention.
The default Tydra model ({4 HT}) consists of 8 layers total, arranged as 4 repeating blocks of a Hydra layer followed by a Transformer layer. The model is meta-trained offline using synthetic datasets generated on-the-fly by a neural network prior framework, allowing it to perform zero-shot in-context learning at inference time.
Datasets
The model was evaluated across two distinct regimes:
- OpenML-CC-18: A suite of 30 binary and multiclass classification datasets (containing up to 2,000 observations, 100 features, and 10 classes) used to evaluate real-world predictive performance.
- Synthetic Tabular Datasets: Custom-generated datasets ranging from 512 to 32,768 samples, used specifically to benchmark inference speed and memory scaling over long context lengths.
Key Insights and Ideas
- Hybridization Translates to Tabular Data: The success of interleaving attention and SSM layers—previously seen only in large language models—applies effectively to tabular foundation models, breaking the strict quadratic scaling bottleneck without destroying accuracy.
- Layer Arrangement Matters: Not all hybrid mixes are equal. The authors evaluated a family of configurations varying the ratio and placement of layers. They discovered that a balanced 1:1 interleaving (
{4 HT}) yields the best trade-off, whereas clustering SSM layers together (e.g.,T{6H}T) causes severe performance drops on certain datasets. - Architectural Synergy Beats Raw Scaling: Simply making a pure SSM model bigger (Hydra 160M) doesn't make it perform like a Transformer; it actually makes it slower than TabPFN while still trailing in accuracy. True efficiency comes from combining the content-dependent interactions of attention with the efficiency of SSMs.
Key Results
- Speed and Accuracy Balance: On the 30 OpenML datasets, Tydra achieved an average inference speedup of 24.8% (up to 29.9%) compared to TabPFN, while maintaining virtually identical predictive performance (mean absolute AUROC difference of just 0.006).
- Outperforming Larger Baselines: Tydra outperformed a 10× larger pure SSM baseline (Hydra 160M) in both accuracy and inference speed.
- Long-Context Scaling: In synthetic benchmarks, Tydra scaled significantly better than TabPFN as dataset sizes grew, remaining highly competitive with the ultra-fast but less accurate Hydra 16M up to 4,096 rows.
Limitations and Future Work
- Dataset Scale: The real-world evaluation was restricted to small-to-medium datasets (up to 2,000 rows). Testing Tydra's capabilities on massive, long-context real-world datasets remains an open task.
- Data Complexity: The synthetic training prior currently lacks support for categorical features and missing values, which are common in real-world tabular data.
- Alternative Mixers: Future directions include exploring other subquadratic mechanisms like gated linear attention or Gated DeltaNet, as well as combining hybridization with looped transformer architectures.
Summary updated