ima-vae

This is the code for the paper Embrace the Gap: VAEs perform Independent Mechanism Analysis, showing that optimizing the ELBO is equivalent to optimizing the IMA-regularized log-likelihood under certain assumptions (e.g., small decoder variance).

https://github.com/rpatrik96/ima-vae

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org, zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.3%) to scientific vocabulary

Keywords

disentanglement dsprites ica independent-component-analysis pytorch pytorch-lightning vae variational-autoencoder variational-inference wandb
Last synced: 6 months ago · JSON representation ·

Repository

This is the code for the paper Embrace the Gap: VAEs perform Independent Mechanism Analysis, showing that optimizing the ELBO is equivalent to optimizing the IMA-regularized log-likelihood under certain assumptions (e.g., small decoder variance).

Basic Info
  • Host: GitHub
  • Owner: rpatrik96
  • License: apache-2.0
  • Language: Jupyter Notebook
  • Default Branch: master
  • Homepage:
  • Size: 11.4 MB
Statistics
  • Stars: 23
  • Watchers: 2
  • Forks: 0
  • Open Issues: 0
  • Releases: 1
Topics
disentanglement dsprites ica independent-component-analysis pytorch pytorch-lightning vae variational-autoencoder variational-inference wandb
Created about 4 years ago · Last pushed almost 2 years ago
Metadata Files
Readme License Citation

README.md


# Embrace the Gap: VAEs perform Independent Mechanism Analysis [![Conference](http://img.shields.io/badge/NeurIPS-2022-4b44ce.svg)](https://openreview.net/forum?id=G4GpqX4bKAH) [![Paper](http://img.shields.io/badge/arxiv-stat.ML:2206.02416-B31B1B.svg)](https://arxiv.org/abs/2206.02416) ![CI testing](https://github.com/rpatrik96/ima-vae/workflows/CI%20testing/badge.svg?branch=master&event=push) [![DOI](https://zenodo.org/badge/431811003.svg)](https://zenodo.org/badge/latestdoi/431811003)

Description

This is the code for the paper Embrace the Gap: VAEs perform Independent Mechanism Analysis, showing that optimizing the ELBO is equivalent to optimizing the IMA-regularized log-likelihood under certain assumptions (e.g., small decoder variance).

How to run

First, install dependencies
```bash

clone ima_vae

git clone --recurse-submodules https://github.com/rpatrik96/ima-vae

if forgot to pull submodules, run

git submodule update --init

install ima_vae

cd ima-vae pip install -e .
pip install -r requirements.txt

install spriteworld

pip install -e ./spriteworld

install submodule requirements

pip install --requirement ima/requirements.txt --quiet pip install --requirement tests/requirements.txt --quiet pip install --requirement spriteworld/requirements.txt --quiet

install pre-commit hooks (only necessary for development)

pre-commit install Next, navigate to the `ima-vae` directory and run `ima_vae/cli.py. bash python3 imavae/cli.py fit --help python3 imavae/cli.py fit --config configs/trainer.yaml --config configs/synth/moebius.yaml --model.prior=beta ```

Hyperparameter optimization

First, you need to log into wandb bash wandb login #you will find your API key at https://wandb.ai/authorize

Then you can create and run the sweep bash wandb sweep sweeps/synth/mlp/finding_optimal_gamma_uniform.yaml # returns sweep ID wandb agent <ID-comes-here> --count=<number of runs> # when used on a cluster, set it to one and start multiple processes

Citation

``` @inproceedings{ reizingerembrace2022, title={Embrace the Gap: {VAE}s Perform Independent Mechanism Analysis}, author={Patrik Reizinger and Luigi Gresele and Jack Brady and Julius Von K{\"u}gelgen and Dominik Zietlow and Bernhard Sch{\"o}lkopf and Georg Martius and Wieland Brendel and Michel Besserve}, booktitle={Advances in Neural Information Processing Systems}, editor={Alice H. Oh and Alekh Agarwal and Danielle Belgrave and Kyunghyun Cho}, year={2022}, url={https://openreview.net/forum?id=G4GpqX4bKAH} }

```

Owner

  • Name: Patrik Reizinger
  • Login: rpatrik96
  • Kind: user
  • Location: Germany
  • Company: IMPRS-IS, ELLIS

PhD student at IMPRS-IS (University of Tübingen) and ELLIS. Looking into causality and representation learning.

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Reizinger"
  given-names: "Patrik"
  orcid: "https://orcid.org/0000-0001-9861-0293"
- family-names: "Gresele"
  given-names: "Luigi"
  orcid: "https://orcid.org/0000-0001-8837-6720"
- family-names: "Brady"
  given-names: "Jack"
- family-names: "Zietlow"
  given-names: "Dominik"
- family-names: "von Kügelgen"
  given-names: "Julius"
  orcid: "https://orcid.org/0000-0001-6469-4118"
- family-names: "Besserve"
  given-names: "Michel"
- family-names: "Martius"
  given-names: "Georg"
  orcid: "https://orcid.org/0000-0002-8963-7627"
- family-names: "Brendel"
  given-names: "Wieland"
  orcid: "https://orcid.org/0000-0003-0982-552X"
- family-names: "Bernhard"
  given-names: "Schölkopf"
  orcid: "https://orcid.org/0000-0002-8177-0925"
title: "ima-vae"
version: 0.1.0
doi: 10.5281/zenodo.6606841
date-released: 2022-06-02
url: "https://github.com/rpatrik96/ima-vae"

GitHub Events

Total
  • Watch event: 1
Last Year
  • Watch event: 1

Committers

Last synced: 8 months ago

All Time
  • Total Commits: 410
  • Total Committers: 3
  • Avg Commits per committer: 136.667
  • Development Distribution Score (DDS): 0.037
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Patrik Reizinger p****7@g****m 395
Patrik Reizinger p****r@b****l 11
Jack Brady j****7@g****m 4
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 8 months ago

All Time
  • Total issues: 0
  • Total pull requests: 4
  • Average time to close issues: N/A
  • Average time to close pull requests: 11 days
  • Total issue authors: 0
  • Total pull request authors: 2
  • Average comments per issue: 0
  • Average comments per pull request: 0.25
  • Merged pull requests: 3
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
  • JackBrady (3)
  • rpatrik96 (1)
Top Labels
Issue Labels
Pull Request Labels

Dependencies

requirements.txt pypi
  • Pillow *
  • PyYAML *
  • disent *
  • distrax *
  • dm-env *
  • hydra-core *
  • imageio *
  • jax *
  • jaxlib *
  • jsonargparse *
  • matplotlib *
  • numpy *
  • omegaconf *
  • pre-commit *
  • pytest *
  • pytorch-lightning *
  • scikit-learn *
  • scipy *
  • setuptools *
  • six *
  • sklearn *
  • torch *
  • torchvision *
  • tueplots *
  • wandb *
setup.py pypi
  • pytorch-lightning *
tests/requirements.txt pypi
  • black * test
  • check-manifest * test
  • codecov >=2.1 test
  • coverage * test
  • flake8 * test
  • lightning-bolts * test
  • pytest >=3.0.5 test
  • pytest-cov * test
  • pytest-flake8 * test
  • twine ==1.13.0 test
.github/workflows/ci-testing.yml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • actions/setup-python v2 composite