Code for paper: Identifiability Guarantees for Causal Disentanglement from Soft Interventions (NeurIPS 2023)
arXiv link: https://arxiv.org/abs/2307.06250
First download the dataset following instructions in ./data/README.md.
Our model (discrepancy-based VAE) can be trained by running
python run.py --device DEVICE
after replacing DEVICE with the supported compute (e.g., cuda:0). The hyperparameters are specified in opts (line 19 in ./src/run.py).
To run the ablation studies, set --model cvae for ours w/o discrepancy and --model mvae for ours w/o causal layer in the previous command.
Once training is done, inference and sampling can be done using functions in ./src/inference.py. Examples using this can be found in ./notebooks/plot_samples.ipynb, where we can reproduce all the figures and numbers in the paper. To reproduce the learned programs and latent DAG, use ./notebooks/check_DAG.ipynb.
Generate sythentic data by running ./data/simulation/generate.py. Then follow ./notebooks/run_simu.ipynb to obtain the results.
All figures can be found in ./notebooks/figures. For the trained models, these are uploaded to https://www.dropbox.com/sh/139nwj128o7g11f/AACV95PzRAc7-zKQMuvjiJEda?dl=0 due to space limit.