Abstract
This paper introduces ExMAG, a novel score-based branch-and-cut algorithm for learning Maximally Ancestral Graphs (MAGs) to uncover causal relationships in the presence of hidden confounders. By using a compact Mixed-Integer Quadratic Programming (MIQP) formulation rather than traditional extended formulations, ExMAG scales significantly better than previous exact methods, delivering state-of-the-art accuracy and faster runtimes on small to medium-sized datasets.
The Challenge of Hidden Confounders
In causal discovery, researchers often rely on Directed Acyclic Graphs (DAGs) or Dynamic Bayesian Networks (DBNs) to model relationships between variables. However, these models struggle with hidden confounders—unobserved variables that influence multiple observed variables. Ignoring confounders can lead to completely backward conclusions, a phenomenon famously illustrated by Simpson’s paradox.
To handle hidden confounders, the field uses Maximally Ancestral Graphs (MAGs). MAGs use directed edges to represent direct causality and bidirected edges to represent latent confounding. Learning MAGs from data is computationally intensive; existing exact methods rely on Mixed-Integer Programming (MIP) using "extended formulations," where the number of variables scales exponentially with the number of nodes. This historically limited exact methods to toy problems of just 4 to 5 variables.
The ExMAG Approach
The authors propose ExMAG, which formulates MAG learning as a Mixed-Integer Quadratic Program (MIQP). The method relies on two key innovations:
- Compact Formulation: Instead of an extended formulation that scales exponentially, ExMAG uses a compact formulation where the dimension is polynomial in the number of vertices. It introduces separate binary matrices for directed and bidirected edges.
- Lazy Constraints via Separation Routine: A valid MAG cannot have directed cycles, "almost directed" cycles, or invalid inducing paths. Enforcing all these rules upfront is computationally impossible. Instead, ExMAG uses a branch-and-cut approach with lazy constraints. During optimization, a custom separation routine uses the Floyd-Warshall algorithm and Depth-First Search (DFS) to hunt for graph violations. If a violation is found, the algorithm generates a cutting plane to forbid it and continues optimizing.
Performance and Scalability
The authors evaluated ExMAG on synthetic datasets including Erdős-Rényi (ER) graphs and Bow-free (BF) graphs. They also introduced "3BF" graphs (max degree capped at 3) to provide a fair comparison against baselines that scale exponentially with in-degree.
Key Results
- Massive Scalability Leap: ExMAG scales to 25+ stochastic processes, a massive improvement over the 4-5 variable limit of previous exact formulations.
- Superior Accuracy: ExMAG consistently achieved lower Structural Hamming Distance (SHD) and higher F1-scores compared to state-of-the-art baselines (FCI,
ip4ancadmg, andipbm) across synthetic scenarios. - Real-World Efficacy: On a financial dataset of 16 European credit default swaps (CDS), ExMAG successfully identified expected risk pathways, correctly flagging entities like Lufthansa and Deutsche Bank as high-risk importers of systemic financial stress.
Conclusion and Future Work
ExMAG demonstrates that moving from an extended MIP formulation to a compact one with lazy constraints drastically shifts the scalability boundary for exact causal discovery. While the algorithm's worst-case runtime remains exponential, it proves that we don't need exponential variables to solve the MAG learning problem effectively. Future work may involve developing more elaborate data structures and cutting planes to further improve runtimes, similar to advancements seen in solvers for the Traveling Salesperson Problem.
Summary updated