Formulas for Counting the Sizes of Markov Equivalence Classes of Directed Acyclic Graphs

Yangbo He, Bin Yu · DOI

Abstract

The sizes of Markov equivalence classes (MECs) of directed acyclic graphs (DAGs) play important roles in measuring the uncertainty and complexity in causal learning. A Markov equivalence class can be represented by an essential graph and its undirected subgraphs determine the size of the class. In this paper, we develop a method to derive the formulas for counting the sizes of Markov equivalence classes. We first introduce a new concept of core graph. The size of a Markov equivalence class of interest is a polynomial of the number of vertices given its core graph. Then, we discuss the recursive and explicit formula of the polynomial, and provide an algorithm to derive the size formula via symbolic computation for any given core graph. The proposed size formula derivation sheds light on the relationships between the size of a Markov equivalence class and its representation graph, and makes size counting efficient, even when the essential graphs contain non-sparse undirected subgraphs.

Introduction

In causal discovery, observational data often fails to identify a unique causal model, leading to a set of indistinguishable Directed Acyclic Graphs (DAGs) known as a Markov Equivalence Class (MEC). Determining the size of an MEC—the number of DAGs it contains—is critical for quantifying model uncertainty and planning optimal interventions. Traditionally, counting these DAGs has been computationally intensive, particularly for dense graphs where recursive partitioning methods struggle. This research introduces a novel approach that treats MEC size as a polynomial function, enabling efficient computation even in complex, dense networks.

The Core Graph and Polynomial Representation

The size of an MEC is fundamentally determined by its undirected components, specifically Undirected Connected Chordal Graphs (UCCGs). The authors introduce the concept of a core graph to simplify this counting problem. A core graph is obtained by identifying and pruning "dominating vertices"—those connected to every other vertex in the graph.

Structural variety of graphs and their complements based on missing edges.

The central theoretical contribution is the proof that the size of an MEC is a polynomial of the number of dominating vertices ($m$). By focusing on the core structure, the complexity of the counting problem is significantly reduced, as many different essential graphs may share the same underlying core.

Symbolic Computation and the SizeF Algorithm

To automate the derivation of these polynomials, the researchers developed the SizeF algorithm. This algorithm utilizes symbolic computation (implemented via the sympy library in the countMEC package) to transform recursive size formulas into explicit polynomials.

Table of derived polynomial formulas for various core graph structures.

As shown in the table above, once a core graph is identified, its corresponding size formula can be expressed as a polynomial in $m$. This allows for instantaneous size calculation for any graph sharing the same core structure, regardless of the total number of vertices. This shift from enumeration to formula evaluation is the key to the method's efficiency.

Performance and Insights

The proposed method offers dramatic performance improvements, particularly in scenarios that were previously considered "hard":

  • Density Advantage: Unlike traditional methods that slow down as edge density increases, the polynomial approach often becomes faster. Dense graphs typically have more dominating vertices, leading to smaller, simpler core graphs.
  • Massive Speedups: In empirical tests, the new approach reduced computation time from 440 seconds to just 0.5 seconds for a dense graph with 15 vertices.
  • Scalability: The method scales effectively to graphs with up to 100 vertices, maintaining high efficiency where previous benchmarks failed to provide results in a reasonable timeframe.

Conclusion

By re-framing MEC size counting as a polynomial derivation problem, this work provides a powerful tool for causal analysis. The introduction of core graphs and symbolic computation allows researchers to handle dense causal networks that were previously computationally intractable. Future work will focus on integrating these fast formulas into active learning frameworks to streamline the causal discovery process in real-time.

Summary updated

BibTeX
@misc{he2016formulas,
  author = {Yangbo He and Bin Yu},
  title = {{Formulas for Counting the Sizes of Markov Equivalence Classes of Directed Acyclic Graphs}},
  year = {2016},
  eprint = {1610.07921},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1610.07921},
}
Figure