Is Causal Direction Linearly Readable Inside Transformer and State-Space Tabular Models?

Tabular foundation models such as TabPFN are networks pre-trained on millions of synthetic datasets drawn from random causal simulations. After pre-training they make predictions on a new table in a single forward pass. A recent study found that these models carry information about which variable causes which, even though they were trained only to predict labels. That study, however, read the information out with a fairly powerful decoder built from attention layers. It also examined only one architecture, a Transformer. So two questions remain open. Is the causal structure actually laid out simply in the model's internal states, or does the decoder compute it? And does that structure survive when the Transformer is swapped for a cheaper, linear-time state-space model (a recurrent-style network that mixes a sequence through a learned linear recurrence instead of all-pairs attention)?

This note proposes a single, deliberately weak readout to answer both questions. The readout is one bilinear map that scores the pair (variable $i$, variable $j$). We split it into a symmetric part and an antisymmetric part. The symmetric part can only answer "are $i$ and $j$ connected?". The antisymmetric part is the only thing that can say "$i \to j$ rather than $j \to i$". Applying this readout layer by layer to a Transformer and to a bidirectional state-space model trained on the identical synthetic causal prior gives a direct, architecture-agnostic measurement of where each backbone stores the causal skeleton, where it stores causal direction, and whether the cheaper backbone loses direction specifically.

Core Claim

The claim is that causal knowledge in synthetic-prior tabular models splits into two components that a linear readout can separate: undirected dependence and edge orientation. The claim also predicts that these two components respond differently to the choice of backbone.

Orientation in observational data is identified only through subtle distributional asymmetries, such as whether the noise looks independent of the cause in one direction but not the other. These asymmetries must be accumulated across many rows. We therefore expect orientation to be more fragile than skeleton under a mixer built for symmetric aggregation over rows. Concretely, we predict that a bidirectional state-space backbone keeps skeleton decodability close to the Transformer's but shows a measurably larger drop in the antisymmetric (orientation) component.

The result is informative either way. If orientation survives, cheaper backbones are viable for amortized causal discovery. If it does not, we learn which component an architecture change must protect.

Prior Work and Its Roles

The work that motivates this proposal is Does TabPFN Understand Causal Structures?. It froze TabPFNv2, decoded directed edges with learnable "causal tokens", cross-attention, and a dual-attention decoder, and found that causal information peaks in layers 4–6 of 12 and disappears under random weights. Our proposal keeps its frozen-backbone, layer-wise design. It differs in two ways: it replaces the attention decoder with a single bilinear form, so that the backbone rather than the decoder must do the work, and it extends the analysis beyond one architecture.

The architecture side is supplied by State-Space Models for Tabular Prior-Data Fitted Networks. That paper showed that unidirectional Mamba breaks row-order invariance, that the bidirectional Hydra model with repeated context permutations comes within 1.1% of TabPFN accuracy and scales to $2^{17}$ rows, and that it evaluated only label prediction. We take its Hydra recipe and ask the causal question it never asked.

Is Mamba Capable of In-Context Learning? found, using layer-wise probes, that Mamba refines its in-context predictions gradually across depth. This gives a concrete prediction to test: causal information in Hydra may be spread more evenly across depth than the mid-layer peak seen in the Transformer.

Two papers supply the probing methodology. Choose Your Transformer showed that final-layer readouts misjudge transfer quality, with LogME correlation rising from 0.58 to 0.86 under layer averaging. This is why we read out every layer and a layer mean, not just the last layer. LogME computes linear-head evidence in closed form, and we use it as a training-free companion score to the probe.

The amortized discovery models AVICI and CausalTab define the performance ceiling. Both are trained end-to-end for discovery, and CausalTab already uses an asymmetric bilinear edge head on top of an axial-attention encoder. Our probe has the same functional form as CausalTab's head. The difference is that CausalTab's encoder is trained for discovery, whereas our backbones are frozen label predictors. The gap between the two is the quantity we want to measure. CausalTab examined only final-layer PCA and attention backbones.

The constraining evidence is that orientation from observational data is limited by Markov equivalence classes, the sets of graphs that imply identical independence patterns, as CausalTab notes. Any orientation claim must therefore be scored on identifiable edges, or with interventional data.

Research Program

We train two backbones from scratch on one shared synthetic prior: a TabPFN-style Transformer and Hydra with repeated context permutations. Both use the same supervised label-prediction objective, data stream, and step count, so that only the sample mixer differs. The prior uses CausalTab-style families: Erdős–Rényi, scale-free, and hub graphs; linear, MLP, and Gaussian-process mechanisms; and Gaussian, Laplace, and heteroscedastic noise. Unidirectional Mamba trained the same way serves as an ablation that removes bidirectionality. We also probe the public TabPFNv2 checkpoint, to check that our probe reproduces the earlier mid-layer finding on the original model.

For each layer $l$ and variable $i$, we mean-pool the cell embeddings over rows to obtain $h_i^l \in \mathbb{R}^k$. The edge score is

$$ s^l_{ij} = (h_i^l)^\top (S + A)\, h_j^l, \qquad S = S^\top,\; A = -A^\top, $$

where $S$ and $A$ are learned $k\times k$ matrices. The probe is trained with binary cross-entropy on held-out synthetic graphs, with the backbone frozen. Because the term $(h_i^l)^\top S h_j^l$ is symmetric in $i$ and $j$, it can only score adjacency. Because the term $(h_i^l)^\top A h_j^l$ changes sign when $i$ and $j$ are swapped, it alone carries direction. We report skeleton average precision, using $S$ alone, and orientation accuracy on true identifiable edges, using the sign of the $A$ term. We also add a rank-limited version of the probe to trace a capacity curve.

Baselines

The naive reference point has two parts. The first is the same bilinear probe applied to randomly initialized backbones of each architecture, which isolates what pre-training contributes. The second is the same probe applied to hand-crafted per-variable statistics: moments, plus random-feature kernel embeddings in the style of The Randomized Causation Coefficient. This second baseline is the critical one. If moment features reach the same orientation accuracy, the backbone adds nothing that cheap statistics do not already provide.

The strongest existing method for reading causal structure out of a frozen backbone is the attention adapter of Does TabPFN Understand Causal Structures?. We re-implement it and run it on both of our backbones, with the same probing data and a matched hyperparameter search budget. That paper reports outperforming GIES and IGSP in ROC AUC, but no reported result found on Lacuna for its exact AUC or AP values, so we will establish the numbers ourselves.

The ceiling is end-to-end amortized discovery. On the CausalTab synthetic families in the mixed-interventional regime, CausalTab reports F1 0.952 against AVICI's 0.844 (CausalTab). On SERGIO interventional gene-regulatory data, AVICI reports F1 0.338 against GIES at 0.092 (AVICI). We do not expect a frozen linear probe to beat these numbers. Success means something more specific. First, the linear probe should recover most of the adapter's average precision on each backbone; we set the bar at 90% or more. Second, it should clearly beat the moment-feature and random-weight controls. Third, the Hydra-minus-Transformer gap should be estimated with confidence intervals tight enough to say whether orientation degrades more than skeleton.

The key ablation splits the probe into $S$-only and $A$-only versions, and compares Mamba against Hydra.

Why not just…?

Why not just run the existing attention adapter on Hydra? It would show that causal structure can be extracted from Hydra. But an adapter with cross-attention can compute pairwise asymmetries on its own, which is exactly the confound we are trying to remove. We run it anyway as a baseline. If the adapter succeeds while the linear antisymmetric term fails, that difference is the finding: Hydra keeps the raw ingredients for direction but does not organize them.

Why not just train Hydra end-to-end for discovery and report F1? End-to-end training measures what the architecture can learn when it is trained for the task. It says nothing about what a label-prediction prior already instilled. This is a real alternative for practitioners, and we include a Hydra discovery model on the CausalTab families so that readers can see both numbers side by side. The probing question is different: it asks whether cheap PFNs that are already deployed carry reusable causal structure.

Why not just use an MLP probe? This is a genuine threat. Causal signals could be present in the representations but encoded nonlinearly. We therefore report a full capacity curve: rank-limited bilinear probe, full bilinear probe, one-hidden-layer MLP on concatenated pairs, and the adapter. If the MLP closes the gap only for Hydra, we will report that Hydra stores orientation nonlinearly, rather than claiming that it lacks orientation.

Why not just use per-variable moment statistics? Orientation from observational data often reduces to noise-shape asymmetries that moments can capture. This control is included directly. Any backbone advantage is reported net of it.

Proposed Experiments

The first experiment probes both trained backbones, the Mamba ablation, and TabPFNv2 at every layer and at the layer mean. It uses held-out CausalTab mechanism families with $d \in \{5, 10, 20\}$, observational and mixed-interventional data, and graph-density sweeps.

The decisive check has three parts. It asks whether the TabPFNv2 mid-layer peak reported by the earlier study reappears under a linear probe. It asks whether the Hydra-to-Transformer ratio for orientation accuracy is lower than the ratio for skeleton average precision, with five probe seeds and three prior seeds. And it asks whether the Mamba ablation degrades orientation further.

Transfer is then tested on SERGIO interventional data, where we compare probe F1 after thresholding against AVICI's reported 0.338, and on the Semantic Causal Environment Benchmark, for which no reported result found on Lacuna, so we report relative performance only.

Finally, we test whether layer-mean LogME evidence for edge labels, computed without any training, predicts discovery F1 across backbones and layers, mirroring the transferability analysis of Choose Your Transformer. A rank correlation at or above that paper's layer-mean level would make the probe a practical tool for choosing a backbone before committing to costly training. Hydra required 134 versus 48 hours of training in State-Space Models for Tabular Prior-Data Fitted Networks, so a cheap screen of this kind has real value.