๐ค AI Summary
This work addresses the lack of reliable uncertainty quantification and efficient implementations in existing causal discovery methods for directed graphsโboth acyclic (DAGs) and cyclic (DCGs)โunder linear non-Gaussian noise. We introduce cyclinbayes, an open-source R package that, for the first time, enables unified Bayesian learning of both DAGs and DCGs within a single framework. By combining spike-and-slab priors with a hybrid MCMC algorithm, our approach provides full posterior uncertainty quantification over individual edges, network motifs, and global graph structures, and yields optimal point estimates via decision-theoretic minimization of posterior expected loss. The method scales to large datasets and fills a critical gap in the availability of robust inference tools for non-Gaussian DCGs. Code and tutorials are publicly released.
๐ Abstract
We introduce cyclinbayes, an open-source R package for discovering linear causal relationships with both acyclic and cyclic structures. The package employs scalable Bayesian approaches with spike-and-slab priors to learn directed acyclic graphs (DAGs) and directed cyclic graphs (DCGs) under non-Gaussian noise. A central feature of cyclinbayes is comprehensive uncertainty quantification, including posterior edge inclusion probabilities, posterior probabilities of network motifs, and posterior probabilities over entire graph structures. Our implementation addresses two limitations in existing software: (1) while methods for linear non-Gaussian DAG learning are available in R and Python, they generally lack proper uncertainty quantification, and (2) reliable implementations for linear non-Gaussian DCG remain scarce. The package implements computationally efficient hybrid MCMC algorithms that scale to large datasets. Beyond uncertainty quantification, we propose a new decision-theoretic approach to summarize posterior samples of graphs, yielding principled point estimates based on posterior expected loss such as posterior expected structural Hamming distance and structural intervention distance. The package, a supplementary material, and a tutorial are available on GitHub at https://github.com/roblee01/cyclinbayes.