MindSpore-Powered Multi-Granularity Causal Structure Learning Improves the Accuracy of Causal Relationship Discovery
MindSpore-Powered Multi-Granularity Causal Structure Learning Improves the Accuracy of Causal Relationship Discovery
Paper Title: Multi-Granularity Causal Structure Learning
Source: AAAI 2024
Paper URL: https://ojs.aaai.org/index.php/AAAI/article/view/29278
Code URL: http://www.sdu-idea.cn/codes.php?name=MgCSL
As an open-source AI framework, MindSpore supports ultra-large-scale AI pre-training and brings excellent experience of device-edge-cloud synergy, simplified development, ultimate performance, and security and reliability for researchers and developers. Since it was open-sourced on March 28, 2020, MindSpore has been downloaded for over 7 million times. It has also been the subject of thousands of papers presented at premier AI conferences. Furthermore, it has a large community of developers and has been introduced to over 290 top universities and 5000 commercial applications. Being widely used in scenarios such as AI computing centers, finance, smart manufacturing, cloud, wireless, datacom, energy, "1+8+N" consumers, and smart automobiles, MindSpore has emerged as the leading open-source software on Gitee. Here in this open source community, you are welcome to make contributions such as development kits, idea pooling for modeling, industry innovations and applications, algorithm innovations, academic collaborations, AI book collaborations, and your own application cases in the cloud, device, edge, security fields, and more.
Thanks to the support from scientific, industry and academic circles, MindSpore-based papers account for 8% of all papers based on all AI frameworks as of 2023, ranking No. 2 in the world for two consecutive years. The MindSpore community supports analysis on top-level conference papers and promotes original AI achievements. In this blog, I'd like to share the paper of the team led by Prof. Yu Guoxian and Wang Jun, School of Software, Shandong University.
01 Research Background
In the context of digital transformation and rapid advancements in science and technology, data science is transforming from the data-centric paradigm to science-centric paradigm. This shift is causing a causal revolution that is sweeping across various research fields. Unlike conventional analysis methods that depend on surface correlation, causal structure learning identifies causal relationships between variables from observation data and mines directed acyclic graphs (DAGs) that represent causal structures. Causal structure learning plays an important role in stable inference and rational decision-making in fields such as recommendation systems, medical diagnosis, and epidemiology.
In view of its importance, numerous studies have been conducted to causal structure learning-related researches. Among the proposed constraint-based, score-based, and gradient-based algorithms, gradient-based algorithms attract much attention. These algorithms use differentiable directed acyclic constraints to transform structure learning problems into continuous optimization problems, and combine machine learning technology to search DAGs, which effectively improves the accuracy of causal relationship discovery.
02 Team Introduction
Liang Jiaxuan, the first author of the paper, is now pursuing his post-graduate diploma in the School of Software, Shandong University (2021-present). Her main research direction is causal learning.
Wang Jun, the first author's mentor, professor of the SDU-NTU Centre for Artificial Intelligence Research (C-FAIR), has been committed to trustworthy and interpretable AI theories and their application in biomedical big data analysis. She has completed four nation- and province-funded projects, won several academic awards, and published more than 100 papers in important academic journals or conferences. Her research results have been widely recognized and cited by researchers in different fields such as information technologies and life sciences.
03 Introduction to the Paper
With a focus on the problem of difficult identification of multi-granularity causal structures, the paper aims to improve multi-granularity causal structure learning (MgCSL). Existing methods predominantly consider causal effects between single variables (micro-variables), and ignore the intricate interplay of multiple variables (macro-variables) and their collective behavioral patterns. As a result, causal structures may not be correctly identified. For example, the brain can be represented at a micro granularity of neurons and their synapses, but high-order synergistic subsystems are commonplace, which are typically located between functional networks and may collaborate with each other. However, the uncertainty of macro variables increases the difficulty of exploring effective coarse-grained strategies and discovering macro variables. It is also urgent to improve the identification of causal connections between multi-granularity variables. Furthermore, the high complexity of causal discovery algorithms reduces the efficiency of processing high-dimensional data, hindering their practical implementations.

Figure 1: Algorithm framework
To address the aforementioned problems, MgCSL is proposed in the paper. As shown in Figure 1, the algorithm first constructs a sparse autoencoder (SAE) to explore effective coarse-grained strategies and extract causal variable abstractions. The encoded representations are summed to obtain latent macro-variable representations, and then the decoder reconstructs the observation data. The contribution matrix from micro variables to macro variables is extracted from the path product of encoder parameters. Next, MgCSL builds a multiple layer perceptron (LMP) for each micro variable, taking both micro- and macro-variables as inputs to explore potential causal mechanisms. In order to further improve efficiency, MgCSL introduces simplified acyclicity constraints to identify causal connections between multi-granularity variables and discover multi-granularity causal structures.
04 Experiment Results
To verify the validity of MgCSL, experiments are carried out on synthetic and real-world datasets.

Figure 2: Experiment results on a multi-granularity graph dataset
As shown in Figure 2, the presence of macro variables affects the precision of the baselines. Even on small graphs, their precision is as low as 0.5 or even lower. MgCSL can extract valuable information from multi-granularity variables for DAG learning, achieving optimal performance in precision and SHD with less time consumption.

Table 1: Experimental results on nonlinear models with an additive Gaussian process
In the paper, experiments are also carried out on typical causal discovery synthetic datasets. As shown in Table 1, MgCSL outperforms the baselines in most metrics, and its precision is still high even on high-dimensional graphs. In addition, the simplified acyclicity penalty enables MgCSL to provide effective results in a shorter period of time, ensuring its feasibility in real-world applications.

Table 2: Results on Sachs protein signaling dataset
In order to further verify the effectiveness of MgCSL, experiments are also carried out on the Sachs protein signaling dataset. The results in Table 2 show that MgCSL still exhibits competitive performance compared with its rivals, surpassing them in terms of precision, F1 and SHD, and identifying six correct causal edges. This indicates that MgCSL's obvious potential in practical applications.
05 Summary and Prospects
The paper studies how to learn multi-granularity causal structures on observation data, which is a practical and significant, but currently under-researched problem. An effective method MgCSL is proposed to extract potential macro variables by using SAE and to accelerate the discovery of multi-granularity causal structures using MLPs with a simplified acyclicity penalty. Experiments on synthetic and real-world datasets have proven the effectiveness of MgCSL.
It is found that most code can be easily implemented based on MindSpore official documentation when the algorithm is reproduced on MindSpore. In addition, the usability and parallel acceleration of MindSpore significantly improve development efficiency. As more and more developers and researchers join the MindSpore community, we look forward to building an open and collaborative platform for experience sharing and suggestion providing, thereby continuously improving MindSpore.