This is the source code for the implementation of "SCM-VAE: Learning Identifiable Causal Representations via Structural Knowledge" (IEEE BigData 2022)
The goal of causal representation learning is to map low-level observations to high-level causal concepts to learn interpretable and robust representations for various downstream tasks. Latent variable models such as the variational autoencoder (VAE) are frequently leveraged to learn disentangled representations. However, there are often complex non-linear causal relationships underlying the observed data that cannot be captured through disentangled representations or linear dependence assumptions. Further, an independent conditional prior assumption can make learning causal dependencies in the latent space more challenging. We propose a framework, coined SCM-VAE, which uses apriori causal knowledge, a structural causal prior, and a non-linear additive noise structural causal model (SCM) to learn independent causal mechanisms and identifiable causal representations. We conduct theoretical analysis and perform experiments on synthetic and real-world datasets to show the improved quality of learned causal representations and robustness under interventions.
-
Clone the repository
git clone https://github.com/Akomand/SCM-VAE.git cd SCM-VAE
-
Create New Environment
conda env create -f environment.yml
-
Activate environment
conda activate scm_vae
-
Generate data
python data/data_generators/pendulum.py python data/data_generators/flow.py
-
Navigate to
experiments
foldercd experiments
-
Run training script
python train_scm_vae.py --dataset-dir='../data/pendulum'
Experiments are run on the following datasets to evaluate our model:
Pendulum Dataset
Flow Dataset
CelebA Dataset
If you use our code or think our work is relevant to yours, we encourage you to cite this paper:
@INPROCEEDINGS{komanduri2022,
author={Komanduri, Aneesh and Wu, Yongkai and Huang, Wen and Chen, Feng and Wu, Xintao},
booktitle={2022 IEEE International Conference on Big Data},
title={SCM-VAE: Learning Identifiable Causal Representations via Structural Knowledge},
year={2022}
}
We acknowledge the following open-source repository that we built our work on