[Paper Review] Causal-learn: Causal Discovery in Python
Causal-learn is an open-source Python library that implements a wide range of causal discovery methods, independence tests, and utilities, enabling users to learn causal structures from observational data in Python.
Causal discovery aims at revealing causal relations from observational data, which is a fundamental task in science and engineering. We describe $ extit{causal-learn}$, an open-source Python library for causal discovery. This library focuses on bringing a comprehensive collection of causal discovery methods to both practitioners and researchers. It provides easy-to-use APIs for non-specialists, modular building blocks for developers, detailed documentation for learners, and comprehensive methods for all. Different from previous packages in R or Java, $ extit{causal-learn}$ is fully developed in Python, which could be more in tune with the recent preference shift in programming languages within related communities. The library is available at https://github.com/py-why/causal-learn.
Motivation & Objective
- Provide a comprehensive Python library for causal discovery spanning major methodological categories.
- Offer accessible APIs, modular components, and thorough documentation for practitioners and researchers.
- Support learning causal structures from observational data with tools for independence testing, scoring, and evaluation.
Proposed method
- Implement representative constraint-based methods (PC, FCI, MV-PC, CD-NOD) with selectable independence tests.
- Implement score-based methods (GES, exact search, dynamic programming, GRaSP) with configurable score functions (BIC, BDeu, Generalized Score).
- Incorporate constrained functional causal models (LiNGAM, DirectLiNGAM, VAR-LiNGAM, RCD, CAM-UV, ANM, PNL) to identify causal directions.
- Provide causal representation learning via Generalized Independent Noise (GIN) for latent variables and Granger causality for time series.
- Offer modular utilities for graph operations (DAGs, CPDAGs, PDAGs, PAGs) and evaluation metrics (precision, recall, SHD).
- Deliver extensive demos, documentation, and benchmark datasets to facilitate learning and evaluation.
Experimental results
Research questions
- RQ1How can a Python library consolidate diverse causal discovery methods across constraint-based, score-based, and functional causal model families?
- RQ2Can modular, language-pure Python implementations improve accessibility and extensibility for causal discovery workflows?
- RQ3How effective are various independence tests and score functions within a unified causal-learn framework across data types and missing data?
- RQ4To what extent can latent-variable causal discovery be facilitated via Generalized Independent Noise in practical scenarios?
- RQ5What tools and benchmarks best support evaluation and adoption of causal discovery methods in Python?
Key findings
- Causal-learn provides official implementations for major causal discovery algorithms across multiple families in Python.
- The library supports a variety of (conditional) independence tests and score functions, enabling flexible experimentation.
- It offers modular graph representations and evaluation metrics to assess recovered causal structures.
- Demos, documentation, and benchmark datasets are included to aid learning and method evaluation.
- The package emphasizes ease of use with Python-only implementation and accessible APIs for non-specialists and developers alike.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.