Code Monkey home page Code Monkey logo

diff-scm's Introduction

Diff-SCM

Overview

Diff-SCM aims at developing solutions based diffusion probabilistic modeling (DPM) for causal machine learning. Our algorithm perform counterfactual inference using Pearl's abduction-action-prediction strategy using a deterministic inference based on a deterministic diffusion inference (DDIM). We have also applied to the method for lesion localization in Brain MRI.

The code is this repo implements the following papers:

Sanchez, Pedro, and Sotirios A. Tsaftaris. "Diffusion Causal Models for Counterfactual Estimation." In Conference on Causal Learning and Reasoning (CLeaR). 2022.

Sanchez, Pedro, Kascenas, Antanas, Liu, Xiao, O'Neil, Alison and Sotirios A. Tsaftaris. "What is Healthy? Generative Counterfactual Diffusion for Lesion Localization." In Deep Generative Models workshop at MICCAI 2022 (DGM4Miccai). 2022.

Note. If one is looking for particular bits of code with our contributions, consider checking the diff_scm/sampling/sampling_utils.py file. The code for counterfactual estimation, classfier-free (implicit) inference and dynamic normalisation is there.

How to run

Install

The provided .yml file can be use for creating a conda environment with the following command.

conda env create -f environment.yml

Hyperparameters

A few hyperparameters are particularly important for counterfactual estimation. In particular, the parameters the control the strenght of the intervention. The sampling.classifier_scale, sampling.norm_cond_scale, sampling.sampling_progression_ratio are the some of these and can be found in the diff_scm/configs folder. Also, se this folder for example configuration on MNIST and BRATS dataset.

diff-scm's People

Contributors

sanches-pedro 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.