Skip to content

Implementation of the D3PM algorithm (diffusion with categorical variable)

License

Notifications You must be signed in to change notification settings

Forbu/D3PM_replication

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

D3PM_replication

Implementation (in pytorch) of the D3PM algorithm (diffusion with categorical variable) : https://arxiv.org/pdf/2107.03006.pdf

In this repository we will implement the D3PM algorithm on discrete MNIST data.

Forward discrete diffusion process

in the forward discrete we have something like that :

image

Reverse diffusion process after training

Training is currently being done.

Result after training on 10% of the data points :

image

Training params

We train using nb_temporal_step = 254, lambda = 0.01 and hidden_dim = 32 (no need to have huge number of latent images).

Also we only have 3 bins (categorical variables) in the above exemple images.

Also as the base model we use ContextUnet architecture coming from the deeplearning.ai course on diffusion process : https://deeplearning.ai/short-courses/how-diffusion-models-work/

Notes on the current development

The modification is concern the passage here :

Screenshot 2024-01-07 at 22 24 29

I want to point out that there is currently some (tiny) differences with the paper implementation :

In our implementation, we currently directly parametrize Screenshot 2024-01-07 at 22 25 21 as being the neural network and not Screenshot 2024-01-07 at 22 27 11

A second interesting point : in the current code we only use the Uniform Noise and not the absorbing noise setup which seems to give better result in the paper.

About

Implementation of the D3PM algorithm (diffusion with categorical variable)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published