Language models are increasingly used as "domain experts" that propose cause-and-effect links between variables. Their best-looking results come from the same handful of textbook networks, such as Asia, Hepar2 and Munin, that appear in tutorials, papers and code all over the web. A high score on these graphs may therefore reflect a memorized answer key rather than causal judgment. Separately, language models asked about variable pairs claim far too many direct links. They mistake indirect and reversed relations for direct causes, and they are confident while doing so. We propose a hybrid in which observational data alone decides which variables can be adjacent, and the language model is allowed only to choose directions for links the data leaves ambiguous.
The adjacency decision comes from a cheap undirected estimate of the dependency structure: which pairs stay dependent after conditioning on small sets of other variables. The model's choice of direction is also constrained so that it can never create a structure the data contradicts. Two consequences follow. Memorized edges that the data does not support cannot enter the output, and whatever contamination remains is confined to a small, measurable set of decisions. We test this with "contamination twins" of each benchmark network. Some twins keep the variable names but change the true structure. Others keep the structure but rename the variables. Together they separate memory, domain knowledge and data.
Core Claim
Undirected preprocessing has a known guarantee. In the large-sample limit, the true causal links are a subset of the moralized graph: the undirected graph that joins each variable to its parents, its children, and the other parents of its children. The same subset property holds for a skeleton built by removing only those edges that a conditional independence test with a small conditioning set has separated. Bühlmann used the moralized-graph guarantee, estimated by inverse covariance, to make high-dimensional linear causal search tractable. Park et al. used it the same way for count data, and Raghu et al. used a mixed graphical model as a warm start for mixed continuous and categorical data. In all three, the filter exists to save computation.
We use the same filter for a different job: as a firewall against a contaminated prior. Our claim is that hard skeleton gating does three things. First, it removes most of the false-positive density in language-model causal graphs. Second, it largely eliminates the gap between a model's performance on canonical variable names and on paraphrased names. Third, it confines the remaining contamination channel to one place: orienting the edges whose direction the data cannot determine. These are the edges left undirected in the completed partially directed graph (CPDAG), the summary of all causal graphs that the data cannot tell apart. Because the model can only pick a graph inside that set, the damage memorization can do is bounded by the number of such edges, and we can measure it.
Position Relative to Prior Work
The motivating evidence comes from From Causal Plausibility to Causal Reliability. That paper evaluated 12 open-weight models as pairwise direct-edge classifiers on six networks from CausalGraphBench. It found high recall but very low precision, with 40.0% of indirect and 36.0% of reversed relations labelled as direct edges. It also noted that familiarity with canonical graphs such as AsiaM inflates scores. Its queries are pairwise, use no data, and impose no global constraints, which the authors list as a limitation. We supply exactly those missing pieces and add a controlled contamination design they did not attempt.
Unveiling Causal Reasoning in LLMs shows the same pattern in natural-language narratives: near-ceiling scores on old benchmarks and a sharp drop on fresh post-cutoff news. This motivates the concern but involves no graph recovery from data.
On the contamination side, the survey by Xu et al. frames detection as either matching (string overlap, membership inference) or comparison (performance on original versus rephrased items). ConStat turns the comparison approach into a statistical test. It corrects for item hardness using a pool of reference models and reports a contamination magnitude. We borrow this method to measure the name-familiarity gap. On the Fragility of Benchmark Contamination Detection constrains our design: it shows that likelihood-based detectors collapse toward chance after reinforcement-learning post-training. We therefore avoid any detector that relies on token probabilities and measure contamination only through behavior on controlled twins.
The algorithmic pieces come from three sources. SNAP shows that low-order pruning is cheap (details). Recursive Autonomy Identification contributes the idea that orientation decisions can be interleaved with skeleton tests. Standard v-structure detection and Meek's rules supply the orientations implied by the data.
DyVal also builds contamination-resistant evaluation from graphs. It uses graphs only as templates for generating word problems, whereas our twins regenerate observational data from altered causal structures.
Research Program
The pipeline has three stages.
The first stage estimates a skeleton. For the discrete networks we keep an edge unless a G-test separates the pair with a conditioning set of size at most $k$, for $k \in \{0,1,2\}$. As a second estimator we use neighborhood-selection moral-graph estimation, and a mixed graphical model where variables are mixed.
The second stage orients edges from the data alone. We run PC-style v-structure detection and Meek's rules restricted to the skeleton, which yields a CPDAG.
The third stage hands the language model only the edges that remain undirected. For each one, the model is prompted with variable names and descriptions, using the prompt formats of the CausalGraphBench study. Its choices are then repaired into a graph that stays acyclic and adds no new v-structures, so the output always lies inside the set of graphs the data cannot distinguish.
The evaluation centers on contamination twins of each CausalGraphBench network (AsiaM, River Status, COVID, Coal Gasifier, Hepar2, Munin1). Name twins keep the true graph and the generating probability tables but change the variable names in one of two ways. Paraphrased names keep the meaning: "dysp" becomes "shortness of breath," which preserves domain knowledge while breaking string-level association with the benchmark. Cryptic names (V1, V2, …) remove meaning entirely.
Structure twins keep the canonical names but change the generating graph. In each twin we delete a random 15% of edges, reverse a further 10%, and add 5% new edges between non-adjacent pairs, then redraw the probability tables of the affected nodes. In structure twins, memory and textbook knowledge both point to the original graph while the data points to the twin. This is the regime where a contaminated prior causes harm, for example a deployed system whose real causal wiring differs from the textbook network. We sample observational data at $n \in \{500, 2000, 10000\}$, with 20 twins per network.
The key quantity for structure twins is the memory override rate. Let $E_{\text{orig}}$ be the edge set of the canonical graph, $E_{\text{twin}}$ the edge set of the twin, and $\hat{E}$ the edges a pipeline outputs. Then
$$ O = \frac{|\hat{E} \cap (E_{\text{orig}} \setminus E_{\text{twin}})|}{|E_{\text{orig}} \setminus E_{\text{twin}}|}, $$
the fraction of deleted textbook edges that the pipeline reinserts anyway. We compute the analogous quantity for reversed edges, counting edges output in their textbook direction.
The name-familiarity gap is the drop in orientation accuracy from canonical to paraphrased names. We estimate it with ConStat's hardness-corrected procedure across the model pool, using cryptic names as the floor that measures how much a model knows without the labels.
A secondary product is a contamination audit for systems where no ground truth exists. We run the ungated model on all pairs and report its edges that the data skeleton separates at low order. On the twins we can check whether these skeleton-violating edges are concentrated on $E_{\text{orig}} \setminus E_{\text{twin}}$. If they are, the audit flags memorized structure using data alone.
Baselines
The naive reference point is data-only discovery. PC uses the same tests and significance level, and its undirected CPDAG edges are scored as half-correct for orientation accuracy (or, alternatively, oriented by a fair coin). Any language-model contribution must beat this on paraphrased and cryptic twins. Otherwise the model adds nothing beyond the data.
The strongest existing method on this question is the ungated pairwise classifier from From Causal Plausibility to Causal Reliability, run with its best prompt strategy (few-shot with chain-of-thought) and its confidence modes. We use the same open-weight model families, the same six networks and the same decoding settings, with a matched prompt budget per edge. Its reported numbers are mean edge F1 of about 0.30 on the smallest graphs and 0.031 on Munin1, with the 40.0% indirect and 36.0% reversed false-positive rates. Beating it means higher edge F1 on every network, and a memory override rate on structure twins below 10% at $n=10000$ where the ungated model's is high.
A second strong competitor is a soft-prior hybrid. Here the model's edge confidences enter a score-based search as a penalty, with prior weight tuned on held-out twins of other networks under the same tuning budget as our $k$ and significance level. This is how such priors are commonly combined with data. It is the right competitor because it can also use the data, but it lets confident memorized edges win when evidence is weak. We beat it if, at equal SHD on canonical-name graphs, the gated pipeline has lower memory override at $n \le 2000$.
Two ablations isolate the key ingredient. The first gates adjacency but lets the model orient every edge, overriding data-implied v-structures. This tests whether confining the model to undirected CPDAG edges matters. The second replaces the data skeleton with a random skeleton of equal density, which tests whether gains come from the data or merely from sparsity. For no specific baseline here, a skeleton-gated language-model hybrid on CausalGraphBench, did we find a reported result on Lacuna.
Why not just…?
Why not just threshold the model's confidence to recover precision? The CausalGraphBench study found that over 80% of false-positive direct edges carried verbalized confidence of at least 80% (source). Any threshold that removes them also removes most true edges. We nonetheless include confidence-thresholded variants of every confidence mode in the ungated baseline and report precision–recall curves, so this is settled empirically rather than assumed.
Why not just rename the variables to cryptic labels so memorization cannot help? This removes the contamination channel, but it also removes the domain knowledge that is the only reason to ask a language model at all. Cryptic twins are the floor in our design. If the gated pipeline with paraphrased names is no better than with cryptic names, then the model's useful knowledge was entirely tied to benchmark strings, and we would report that as the main finding.
Why not just ask the model to recite the Asia network, or run a membership-inference test, to decide whether to trust it? Recitation probes show that a model knows a graph, not whether its edge answers on a task are driven by that memory. The fragility results show that likelihood-based detectors such as LiRA lose about 14 points of AUROC after one epoch of reinforcement-learning post-training, and fall near chance for reasoning-contaminated models. We run a recitation probe per network as a covariate and test whether it predicts the measured name-familiarity gap. A strong correlation would make recitation a cheap screening tool, but it would not replace gating.
Why not just use the soft-prior hybrid? This is the most serious threat, because with large samples the data may overwhelm the prior and the two designs may converge. Our prediction is specific: they should diverge at small $n$, where weak true edges and memorized false edges compete. If they do not diverge at $n=500$, the hard gate offers no advantage beyond simplicity, and we will say so.
Decisive Experiments
Four results decide the proposal.
First, on structure twins at $n=10000$, the ungated classifier should reinsert a large fraction of deleted textbook edges, while the gated pipeline's override rate should fall close to the miss rate of the CI tests. If gating fails to reduce memory override, the firewall claim is false.
Second, the hardness-corrected name-familiarity gap, estimated with ConStat across the model pool, should be substantial for the ungated classifier on AsiaM and Hepar2 and should shrink under gating. If the ungated gap is already near zero, contamination is not what drives these edge scores. The project then reduces to a fix for over-prediction, which is still useful but narrower.
Third, under gating, the residual name gap should be concentrated on the edges the data leaves undirected, which is the bounded channel the claim predicts. Measuring the gap separately on data-oriented and model-oriented edges tests this directly.
Fourth, the gated pipeline must beat data-only PC on orientation accuracy for paraphrased twins. This is the condition under which the language model contributes real knowledge rather than recall.
We also report the recall of the skeleton filter at each sample size, because a filter that drops weak true edges is the known failure mode of undirected preprocessing. We report runtime as well. SNAP reports roughly 12,800 CI tests for PC against 955 for SNAP(0) on MAGIC-NIAB (source), so we expect low-order gating to keep Munin1 tractable. Finally, for the audit, we report the AUROC of skeleton violations as a detector of $E_{\text{orig}} \setminus E_{\text{twin}}$ edges.
References
- High-dimensional learning of linear causal networks via inverse covariance estimation
- Learning Large-Scale Poisson DAG Models based on OverDispersion Scoring
- Evaluation of Causal Structure Learning Methods on Mixed Data Types
- From Causal Plausibility to Causal Reliability: Evaluating LLMs as Calibrated Direct Causal-Edge Classifiers
- Unveiling Causal Reasoning in Large Language Models: Reality or Mirage?
- Benchmark Data Contamination of Large Language Models: A Survey
- ConStat: Performance-Based Contamination Detection in Large Language Models
- On The Fragility of Benchmark Contamination Detection in Reasoning Models
- SNAP: Sequential Non-Ancestor Pruning for Targeted Causal Effect Estimation With an Unknown Graph
- Recursive Autonomy Identification for Bayesian Network Structure Learning
- DyVal: Dynamic Evaluation of Large Language Models for Reasoning Tasks