TL;DR
Causal Learner is a new open-source R/MATLAB toolbox designed to streamline the entire causal discovery pipeline, from generating synthetic data to evaluating algorithm performance. By integrating 26 state-of-the-art algorithms for global, local, and Markov Blanket learning, it provides a modern, transparent alternative to aging, closed-source tools.
What Problem Does This Paper Address?
Causal discovery—the process of identifying cause-and-effect relationships from observational data—is a cornerstone of modern machine learning and data science. A key concept here is the Markov Blanket (MB): the minimal set of variables (parents, children, and "spouses") that makes a target variable independent of everything else in the network. Identifying the MB is essential for optimal feature selection.
However, the field has long been hampered by a lack of unified tools. The previous gold standard, Causal Explorer, was released over a decade ago and is closed-source, making it difficult for researchers to inspect, modify, or extend. Furthermore, existing tools often lack integrated functions for generating benchmark data or standardized evaluation metrics, forcing researchers to cobble together disparate scripts.
Methods
The authors developed Causal Learner using a hierarchical three-layer architecture to provide a "one-stop shop" for causal research:
- Data Layer (R): Generates discrete and continuous data based on well-known benchmark Bayesian Networks. While the generation logic is in R, the toolbox outputs data as flexible text files.
- Algorithm Layer (MATLAB): This is the core of the toolbox, containing 26 algorithms categorized into three types:
- Global Causal Structure Learning: Learns the entire Directed Acyclic Graph (DAG).
- Local Causal Structure Learning: Focuses only on the direct causes (parents) and direct effects (children) of a specific target.
- Markov Blanket Learning: Identifies the parents, children, and spouses of a target.
- Evaluation Layer (MATLAB): Provides 10 accuracy metrics and 2 efficiency metrics to rigorously benchmark algorithm performance.
To ensure reliability, the authors integrated original implementations of these algorithms whenever possible, rather than relying on potentially buggy re-implementations.
Datasets
Causal Learner utilizes a comprehensive suite of benchmark Bayesian Networks (BNs) for data generation and evaluation:
- Discrete BNs: Includes 20 classic networks ranging from small (CANCER, 5 nodes) to very large (MUNIN, up to 1041 nodes).
- Continuous BNs: Includes 6 networks such as SANGIOVESE and MAGIC-NIAB.
By providing these as built-in generators, the toolbox ensures that researchers can easily produce standardized datasets for comparative studies.
Key Insights and Ideas
- Open-Source Transparency: Unlike its predecessors, Causal Learner is fully open-source. This allows the community to understand the underlying logic, fix bugs, and add new algorithms as the field evolves.
- Visualizing Causal Scope: The paper clearly distinguishes between different levels of causal discovery. As shown below, global learning maps the whole system, while local and MB learning provide a targeted "ego-network" view of a specific variable.
- Usability First: The toolbox simplifies the user experience. For example, when learning a global structure, Causal Learner requires only 4 input parameters, whereas older tools required additional, often redundant, metadata like "domain counts."
Key Results
The toolbox represents a significant upgrade over Causal Explorer:
- Algorithm Breadth: It includes 15 Markov Blanket learning algorithms (compared to 9 in the older tool) and 4 local structure learning algorithms (compared to 0).
- Efficiency: The authors note that while accuracy remains comparable to older implementations, the integrated algorithms in Causal Learner are often much more efficient.
- Standardized Pipeline: The example below illustrates how a researcher can move from data generation to a learned structure and final evaluation in just a few lines of code.
Limitations and Future Work
Currently, Causal Learner operates under the standard assumptions of causal sufficiency (no unobserved common causes) and faithfulness (the data perfectly reflects the underlying graph structure). In real-world scenarios, these assumptions are often violated.
The authors plan to extend the toolbox in the future to include algorithms that can handle latent variables (hidden causes) and cases where the faithfulness assumption does not hold, further broadening the tool's applicability to complex, real-world datasets.
Summary updated