Git Product home page Git Product logo

rhognf's Introduction

$\rho$-GNF : $\rho$-GNF: A Copula-based Sensitivity Analysis to Unobserved Confounding Using Normalizing Flows. [arxiv]

$\rho$ represents the sensitivity parameter of the Gaussian copula that represents the non-causal associaition/dependence between the Gaussian noise of the $\rho$-GNF, $Z_A$ and $Z_Y$. Since the transformations of $Z_A \rightarrow A$ and $Z_Y \rightarrow Y$ are monotonic by design, the non-causal association due to unobserved confounding modeled by the copula represents the non-causal association between $A$ and $Y$ thanks to scale-invariance property of $\rho$ to monotonically increasing transformations.

The implementation of rho-GNF is done by extending the offical codes for the paper: Graphical Normalizing Flows, Antoine Wehenkel and Gilles Louppe. (May 2020). [arxiv] [github]

This implemnetation is an adaptation of the c-GNF (Causal-Graphical Normalizing Flows) for causal effect identification and estimation for sensitivity analysis to relax the unconfoundedness assumptions.

Balgi, S., Peña, J. M., & Daoud, A. (2022). Personalized Public Policy Analysis in Social Sciences Using Causal-Graphical Normalizing Flows. Proceedings of the AAAI Conference on Artificial Intelligence, 36(11), 11810-11818. [paper]

The $\rho_{curve}$ for a given dataset is generated by running multiple values of $\rho \in [-1,+1]$ and plotting the line with the points $(\rho,ACE_{\Phi_\rho})$.

Dependencies

The list of dependencies can be found in requirements.txt text file and installed with the following command:

pip install -r requirements.txt

Code architecture

This repository provides some code to build diverse types normalizing flow models in PyTorch. The core components are located in the models folder. The different flow models are described in the file NormalizingFlow.py and they all follow the structure of the parent class NormalizingFlow. A flow step is usually designed as a combination of a normalizer (such as the ones described in Normalizers sub-folder) with a conditioner (such as the ones described in Conditioners sub-folder). Following the code hierarchy provided makes the implementation of new conditioners, normalizers or even complete flow architecture very easy.

$\rho$-GNF PGM2024 submission experiments

Three different settings of datasets and experiments presented in our $\rho$-GNF PGM2024 submission

1. Simulated dataset with Continuous variables with the code python ToySimulatedContinuous.py -h.

python ToySimulatedContinuous.py -alpha ALPHA -beta BETA -delta DELTA -rho RHO

For example,

python ToySimulatedContinuous.py -alpha 0.2 -beta -0.6 -delta 0.72 -rho -0.55

to run the rho-GNF corresponding to the observational dataset generated from the SCM in Eq. 8.

2. Simulated dataset with Categorical variables with the code python ToySimulatedBinary.py -h.

python ToySimulatedBinary.py -rho RHO -p_U P_U -p_AU0 P_AU0 -p_AU1 P_AU1 -p_YA0U0 P_YA0U0 -p_YA0U1 P_YA0U1 -p_YA1U0 P_YA1U0 -p_YA1U1 P_YA1U1 -n_DGPs N_DGPS -n_dgp N_DGP

For example,

python ToySimulatedBinary.py -rho 0.0 -n_DGPs 20 -n_dgp 0

to run the rho-GNF corresponding to the observational dataset with the binary treatment A, outcome Y and unobserved confounder U.

3. Real-world IMF child poverty dataset with Categorical variables with the code python RealIMFCategorical.py -h.

python RealIMFCategorical.py -rho RHO -y_dim Y_DIM

For example,

python RealIMFCategorical.py -y_dim 8 -rho 0.0

to run the rho-GNF corresponding to the real-world observational dataset with the binary treatment A, categorical outcome Y and unobserved confounder Political-will.

y_dim represents the dimension of the outcome to be used. 1:education, 2:health, 3:information, 4: malnutrition, 5: sanitization, 6: shelter, 7: water, 8: total degree of all the 7 individual dimensions of child poverty.

If you use c-GNF or $\rho $-GNF, please cite

  1. Balgi, S., Peña, J. M., & Daoud, A. (2022). Personalized Public Policy Analysis in Social Sciences Using Causal-Graphical Normalizing Flows. In Proceedings of the AAAI Conference on Artificial Intelligence, 36(11), 11810-11818. [paper] and
  2. Balgi, S., Peña, J. M., & Daoud, A. (2022). $\rho $-GNF: A Copula-based Sensitivity Analysis to Unobserved Confounding Using Normalizing Flows. In Proceedings of the 12th International Conference on Probabilistic Graphical Models (PGM 2024) - Proceedings of Machine Learning Research, (to appear). [arxiv]

rhognf's People

Contributors

sobalgi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.