Giter Club home page Giter Club logo

traj_drl's Introduction

From Points to Functions: Infinite-dimensional Representations in Diffusion Models


This repository contains the official implementation for the paper From Points to Functions: Infinite-dimensional Representations in Diffusion Models

Abstract Diffusion-based generative models learn to iteratively transfer unstructured noise to a complex target distribution as opposed to Generative Adversarial Networks (GANs) or the decoder of Variational Autoencoders (VAEs) which produce samples from the target distribution in a single step. Thus, in diffusion models every sample is naturally connected to a random trajectory which is a solution to a learned stochastic differential equation (SDE). Generative models are only concerned with the final state of this trajectory that delivers samples from the desired distribution. Abstreiter et. al (2021) showed that these stochastic trajectories can be seen as continuous filters that wash out information along the way. Consequently, it is reasonable to ask if there is an intermediate time step at which the preserved information is optimal for a given downstream task. In this work, we show that a combination of information content from different time steps gives a strictly better representation for the downstream task. We introduce an attention and recurrence based modules that ``learn to mix'' information content of various time-steps such that the resultant representation leads to superior performance in downstream tasks.

Our work consists of analysis done on different types of datasets to see whether the trajectory based representations learned using score-based modeling leads to different information at different parts of the trajectory. In particular, we do analysis on standard benchmarks like CIFAR10 and CIFAR100 as well as different multi-task scenarios like Colored-MNIST and CelebA. The data used in the experiments can be found here.


We refer the readers to the respective sub-directories for details regarding each of the experiments. The code is heavily adapted from Yang Song's codebase

  • diffusion_model: Directory for training score-based models. In particular, we train the score model using main.py (alternatively run-file run.sh) after which we compute the representations using representations.py (alternatively run-file rep.sh).
  • downstream_classification: Once the representations have been computed, we use the scripts in these directories to train MLP, transformer and other models for getting performance plots on CIFAR10/CIFAR100/Mini-ImageNet.
  • qualitative_analysis: Finally, we use the code present here to perform experiments related to attention ablations, mutual information, activation profiles, etc.

Please do cite our work if you build up on it or find it useful and feel free to create an issue or contact me at [email protected] in case of any questions.

to-do

traj_drl's People

Contributors

sarthmit 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.