Code Monkey home page Code Monkey logo

cida's Introduction

Continuously Indexed Domain Adaptation (CIDA)

This is the authors' official PyTorch implementation for CIDA. This repo contains code for experiments in the ICML 2020 paper 'Continuously Indexed Domain Adaptation'.

Outline for This README

Beyond Domain Adaptation: Brief Introduction for CIDA

Essentially CIDA asks the question of whether and how to go beyond current (categorical) domain adaptation regime and proposes the first approach to adapt across continuously indexed domains. For example, instead of adapting from domain A to domain B, we would like to simultaneously adapt across infintely many domains in a manifold. This allows us to go beyond domain adaption and perform both domain interpolation and domain extrapolation. See the following toy example.

For a more visual introduction, feel free to take a look at this video.

Sample Results

If we use domains [1, 6] as source domains and the rest as target domains, below are some sample results from previous domain adaptation methods and CIDA, where CIDA successfully learns how the decision boundary evolves with the domain index.

Method Overview

We provide a simple yet effective learning framework with theoretical guarantees (see the Theory section at the end of this README). Below is a quick comparison between previous domain adaptation methods and CIDA (differences marked in red).

  • Previous domain adaptation methods use a discriminator is classifify different domains (as categorical values), while CIDA's discriminator directly regresses the domain indices (as continuous values).
  • Previous domain adaptation methods' encoders ignore domain IDs, while CIDA takes the domain index as input.

IPython Notebooks and Environment

Below are some IPython Notebooks for the experiments. We strongly recommend starting from the simplest case, i.e., Experiments for Toy Datasets (Quarter Circle) to get familar with the data and settings.

IPython Notebooks

Besides using IPython notebooks, you can also directly run the following command for the Rotating MNIST experiments inside the folder 'rotatingMNIST':

bash run_all_exp.sh

Environment

  • Python 3.6
  • PyTorch 1.5.1
  • Numpy 1.19

Quantitative Results

Rotating MNIST

Intra-Dataset Results on Real-World Medical Datasets

In the intra-dataset setting, we consider both domain extrapolation and domain interpolation (see the figure below).

Cross-Dataset Results on Real-World Medical Datasets

Multi-Dimensional CIDA on Real-World Medical Datasets

Theory

Denoting the domain index as u and the encoding as z, we have (check the paper for full theorems):

  • Theorem 1 (Informal). CIDA converges, if and only if, the expectation of domain index ๐”ผ[๐‘ข | z] is identical for any embedding z.
  • Theorem 2 (Informal). PCIDA converges, if and only if, the expectation and the variance of domain index, ๐”ผ[๐‘ข | z] and ๐•[๐‘ข | z] are identical for any z.
  • Theorem 3 (Informal). The global optimum of the two-player game between ๐ธ and ๐ท matches the global optimum of the three-play game between ๐ธ, ๐น, and ๐ท.

Reference

Continuously Indexed Domain Adaptation

@inproceedings{DBLP:conf/icml/WangHK20,
  author    = {Hao Wang and
               Hao He and
               Dina Katabi},
  title     = {Continuously Indexed Domain Adaptation},
  booktitle = {ICML},
  year      = {2020}
}

cida's People

Contributors

hehaodele avatar js05212 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.