Weighted Adjoint Matching: Finetuning Flow Matching Models with Time-Dependent Control Cost
Organizations: Inria, Ecole Normale Supérieure, PSL Research University
Abstract
We introduce Weighted Adjoint Matching, a method to finetune a pretrained diffusion or flow matching model given a differentiable reward. We derive it from Adjoint Matching, which reformulates finetuning as a stochastic optimal control problem with a quadratic control cost. Building on the observation that these models generate coarse features before fine details, we place a time-dependent weight on the control cost. A high cost early in the generative process preserves balance and diversity in the coarse features, which carry most of the semantics, while a low cost at the end lets the model increase the reward by refining details. We prove that our method is equivalent to maximizing the reward under time-varying Kullback--Leibler regularization on the generative paths. Experiments on Gaussian mixtures and on MNIST show a better tradeoff between reward and mode balance than Adjoint Matching.
Figures & tables
Appendix figures & tables11 assets
Supplementary material from the paper’s appendix.
Appendix
| \left\{\begin{array}[]{ll}X^{(m)}_{t_{0}}&=X^{(m)}_{0}\sim\mathcal{N}(0,I),\\ X^{(m)}_{t_{k+1}}&=X^{(m)}_{t_{k}}+h\left(2v^{\textnormal{finetune}}_{\theta}(X^{(m)}_{t_{k}},t_{k})-\frac{\dot{\alpha}_{t_{k}}}{\alpha_{t_{k}}}X^{(m)}_{t_{k}}\right)+\sqrt{h}\gamma(t_{k})\mathcal{N}(0,I).\end{array}\right. | (34) |
| Predicted class (%) | ||||||||||||
| Method | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | ||
| Base | – | 0.140 | 10.2 | 9.9 | 9.9 | 10.8 | 9.4 | 9.1 | 9.8 | 10.0 | 10.1 | 10.9 |
| Adjoint | 5.7 | 0.159 | 14.8 | 5.8 | 12.0 | 12.0 | 7.4 | 8.5 | 10.0 | 8.0 | 12.1 | 9.4 |
| Weighted, | 21 | 0.161 | 10.6 | 6.6 | 11.4 | 11.8 | 8.9 | 8.1 | 10.2 | 9.1 | 13.0 | 10.4 |
| Weighted, | 34 | 0.162 | 10.5 | 7.4 | 10.6 | 10.9 | 9.4 | 8.5 | 9.2 | 9.2 | 12.9 | 11.4 |
| Weighted, | 52 | 0.161 | 10.6 | 8.8 | 10.2 | 11.0 | 9.2 | 7.7 | 9.8 | 9.0 | 12.3 | 11.2 |
| Predicted class (%) | ||||||||||||
| Method | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | ||
| Base | – | 0.140 | 10.2 | 9.9 | 9.9 | 10.8 | 9.4 | 9.1 | 9.8 | 10.0 | 10.1 | 10.9 |
| Adjoint | 10 | 0.176 | 18.0 | 3.4 | 12.5 | 12.3 | 7.0 | 7.9 | 10.7 | 6.5 | 13.1 | 8.6 |
| Weighted, | 37 | 0.181 | 12.0 | 3.4 | 13.7 | 11.3 | 8.2 | 7.8 | 8.0 | 7.7 | 17.4 | 10.6 |
| Weighted, | 57 | 0.180 | 11.9 | 6.1 | 11.2 | 11.6 | 8.1 | 6.4 | 8.9 | 8.4 | 16.0 | 11.2 |
| Weighted, | 92 | 0.180 | 10.6 | 7.8 | 11.0 | 10.7 | 8.5 | 7.6 | 9.7 | 8.6 | 14.2 | 11.4 |
| Predicted class (%) | ||||||||||||
| Method | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | ||
| Base | – | 0.857 | 10.4 | 10.1 | 9.4 | 10.8 | 9.5 | 9.0 | 9.9 | 9.8 | 10.3 | 10.7 |
| Adjoint | 8.6 | 0.880 | 5.3 | 19.6 | 7.8 | 9.9 | 9.6 | 9.6 | 8.9 | 10.8 | 7.8 | 10.6 |
| Weighted, | 25 | 0.880 | 8.8 | 14.8 | 8.1 | 10.4 | 12.0 | 9.0 | 7.3 | 10.4 | 7.6 | 11.6 |
| Weighted, | 43 | 0.880 | 9.3 | 12.2 | 8.8 | 11.1 | 10.2 | 10.0 | 9.6 | 10.7 | 8.1 | 10.1 |
| Weighted, | 63 | 0.880 | 9.8 | 11.2 | 9.0 | 10.5 | 10.6 | 10.5 | 9.4 | 10.4 | 8.4 | 10.2 |
Diffusion Model Fine-Tuning
Diffusion model fine-tuning adapts pretrained generative models to new concepts, tasks, domains, and preferences through targeted updates.
See all 181 papers