Towards a Foundation Model Approach for Causal Graph Learning

Naiyu Yin, Tian Gao, Yue YuOpenReview 2026 · Submission to ICLR 2026 · Rejected

TL;DR

Researchers have developed Attention-DAG (ADAG), the first practical foundation model approach for unsupervised causal graph learning. By pre-training on data from thousands of different domains, ADAG learns a universal "prior" for causal structures, enabling it to infer complex Directed Acyclic Graphs (DAGs) from new data in milliseconds—a "zero-shot" feat that traditionally takes minutes or hours of intense computation.

What Problem Does This Paper Address?

Identifying cause-and-effect relationships is a holy grail in AI, typically represented by Directed Acyclic Graphs (DAGs). However, learning these graphs from observational data is notoriously difficult for three reasons:

  1. Computational Complexity: The number of possible graph structures grows super-exponentially with the number of variables.
  2. Identifiability: With limited data, multiple different graphs can often explain the same observations equally well, making it impossible to find the "true" cause.
  3. Lack of Generalization: Most existing algorithms are "per-task." If you have a new dataset, you have to start the optimization process from scratch, wasting previous knowledge gained from similar problems.

The authors aim to move away from these "one-off" solvers toward a foundation model that can transfer structural knowledge across different causal tasks.

Methods

The core of the paper is Attention-DAG (ADAG). Instead of searching for a graph through iterative trial and error, ADAG uses a Transformer-based architecture to learn a nonlinear kernel mapping.

  • The Input: Observational data (samples of variables).
  • The Output: A weighted adjacency matrix representing the causal graph and the strength of the relationships.
  • The "Secret Sauce": ADAG is trained across thousands of different "domains" (tasks). During training, it uses a data reconstruction loss combined with an acyclicity constraint (a mathematical trick to ensure the output is a valid DAG without cycles).
  • Unsupervised Learning: Crucially, the model does not need to see the "ground truth" graphs during training; it learns to infer them simply by trying to understand the underlying data-generating process across many different scenarios.

Datasets

The authors evaluated ADAG using a mix of synthetic and real-world benchmarks:

  • Synthetic Data: Erdos-Renyi (ER) graphs of varying sizes ($d = 5, 10, 20, 50$ nodes). They tested three data types: Heterogeneous (same structure, different weights), Order-consistent (different structures, same topological order), and General (completely random DAGs).
  • Realistic Data:
    • Sachs: A classic dataset of protein signaling pathways (11 variables).
  • Sergio: A simulator for gene regulatory networks, used to create subgraphs of 10 variables.

Key Insights and Ideas

  • Learning the "Prior": By seeing thousands of different causal systems, the model learns what a "reasonable" causal graph looks like. This shared low-dimensional prior acts as a guide, helping the model make accurate guesses even when the test data is extremely sparse (the "small-sample regime").
  • Zero-Shot Inference: Once the model is pre-trained, it doesn't need to "think" or optimize when it sees a new dataset. It performs a single forward pass through the neural network to produce the graph.
  • Attention as a Kernel: The researchers found that the attention mechanism is particularly good at capturing the complex, nonlinear relationships between raw data points and the abstract structure of a causal graph.

Key Results

ADAG demonstrated a massive leap in both efficiency and accuracy:

  • Speed: In scale tests ($d=50$), traditional state-of-the-art methods like NOTEARS took ~84 seconds, while multi-task baselines took over 5 minutes. ADAG performed the same inference in 0.0006 seconds.
  • Accuracy: ADAG consistently achieved the lowest Structural Hamming Distance (SHD)—a measure of how many edges are wrong—across almost all synthetic settings.
  • Robustness: In "low-sample" regimes (where you have very few observations), ADAG significantly outperformed baselines, proving that its pre-trained prior effectively mitigates the "identifiability" problem.
  • Real-World Success: On the Sachs protein dataset, ADAG achieved a lower SHD (12.45) than established methods like NOTEARS (15) and DAGMA (14).

Limitations and Future Work

While a major step forward, the authors note a few hurdles:

  • Linear Assumption: The current model is primarily formulated for linear Structural Equation Models (SEMs). While they showed it can generalize to some nonlinear data, a native nonlinear version is a future goal.
  • Scalability: Due to hardware limits, the experiments focused on graphs with up to 50 nodes. Scaling this to hundreds or thousands of variables (like full genomic networks) remains a challenge.
  • Theoretical Depth: The paper provides some theoretical justifications for why the parameters are identifiable, but the authors suggest that more work is needed to fully understand the "identifiability" properties of foundation models in the small-data regime.

Summary updated

Abstract

Due to its human-interpretability and invariance properties, Directed Acyclic Graph (DAG) has been a foundational tool across various areas of AI research. %, leading to significant advancements. However, DAG learning remains highly challenging, due to its super-exponential growth in computational cost and identifiability issues, particularly in small-sample regimes. To address these two challenges, we leverage the recent success of transformers and develop a foundation model approach for discovering multiple DAGs across tasks. In particular, we propose Attention-DAG (ADAG), a novel attention-mechanism-based architecture for learning multiple linear Structural Equation Models (SEMs). ADAG learns the mapping from observed data to both graph structure and parameters via a nonlinear attention-based kernel, enabling efficient multi-task generalization of the underlying linear SEMs. By formulating the learning process across multiple domains as a continuous optimization problem, the pre-trained ADAG model captures the common structural properties as a shared low-dimensional prior, thereby reducing the ill-posedness of downstream DAG tasks in small-sample regimes. We evaluate our proposed approach on benchmark synthetic datasets and find that ADAG achieves substantial improvements in both DAG learning accuracy and zero-shot inference efficiency. To the best of our knowledge, this is the first practical approach for pre-training a foundation model for unsupervised DAG learning, representing a step toward more efficient and generalizable down-stream applications in causal discovery.
BibTeX
@misc{yin2026towards,
  author = {Naiyu Yin and Tian Gao and Yue Yu},
  title = {{Towards a Foundation Model Approach for Causal Graph Learning}},
  year = {2026},
  url = {https://openreview.net/forum?id=vSAWV43kvs},
  howpublished = {OpenReview},
  note = {Submitted to ICLR 2026},
}
Figure