jAM (JAX implementation of Action Matching)
May 24, 2023 · View on GitHub
Action Matching is a method for learning the time evolution of distributions from samples. That is, suppose we observe the time evolution of some random variable with the density , from to . Having access to uncorrelated samples of (which are not a part of a single trajectory) at different points in time , Action Matching learns a model of the dynamics by learning how to move samples in time such that they are distributed according to for any .
The key idea is to learn such function (which we parameterize with a neural network) that yields the continuity equation Then the propagation of samples in time can be performed simply by simulating the corresponding ODE For the method description see the Tutorials section below or the paper.
Tutorials
| Method | Link |
|---|---|
| Action Matching | |
| Entropic (Stochastic) Action Matching | |
| Unbalanced Action Matching (with reweighting) |
Running the code
Run all the code using main.py with different config and mode.
configflag takes the path to the config file.modeflag takes one of the following values: "train", "eval", "fid_stats". All the modes require a config file. Mind thedata.uniform_dequantizationflag when evaluating statistics on the dataset for FID evaluation.workdiris the path to the working directory for storing states.
For instance, on the clusters with slurm, you would run the code like this inside your sbatch scripts
python main.py --config configs/am/cifar/generation.py \
--workdir $PWD/checkpoint/${SLURM_JOB_ID} \
--mode 'train'