“无限流”是中国网络小说的一种流派,这类小说中的主角往往需要通过完成关卡或游戏来换取生存的机会。本仓库用于收集我自行实现的各种基于流的生成模型。本仓库对“流”的定义是微分同胚映射
- 标准 Flow Matching:最基本、最通用的流模型。先取条件于初始、终末分布来给出条件概率路径,而后给出边缘概率路径。[1,2,3]
- 标准 Score Matching:DDPM的连续版本,通过回归逆向SDE中的Score实现生成。损失中有$g^2(t)$权重时等价于极大似然估计。 [4,5]
- Action Matching:通过最小化Action-Gap损失获得一个标量场,以从快照数据中学习动力学。 [6]
In Chinese web novels, "Infinity Flow" is a popular genre where protagonists are forced to complete a series of levels or games in exchange for a chance to survive. This repository, in turn, is a collection of my own implementations of various flow-based generative models.
In the context of this repository, a "flow" is defined as a diffeomorphism
The models currently included are:
- Standard Flow Matching: The most fundamental and general flow model. It first defines a conditional probability path by conditioning on the initial and terminal distributions, and then derives the marginal probability path.
- Standard Score Matching: The continuous-time version of DDPM. Generation is achieved by regressing the score of the reverse-time SDE. When the loss function includes the
$g^2(t)$ weight, it becomes equivalent to Maximum Likelihood Estimation. - Action Matching: Learns dynamics from snapshot data by minimizing an "Action-Gap" loss to obtain a scalar field.
[1] Liu, X., Gong, C., & Liu, Q. (2022). Flow straight and fast: Learning to generate and transfer data with rectified flow. arXiv preprint arXiv:2209.03003.
[2] Lipman, Y., Chen, R. T., Ben-Hamu, H., Nickel, M., & Le, M. (2022). Flow matching for generative modeling. arXiv preprint arXiv:2210.02747.
[3] Tong, A., Malkin, N., Huguet, G., Zhang, Y., Rector-Brooks, J., Fatras, K., ... & Bengio, Y. (2023). Conditional flow matching: Simulation-free dynamic optimal transport. arXiv preprint arXiv:2302.00482, 2(3).
[4] Vahdat, A., Kreis, K., & Kautz, J. (2021). Score-based generative modeling in latent space. Advances in neural information processing systems, 34, 11287-11302.
[5] Song, Y., Durkan, C., Murray, I., & Ermon, S. (2021). Maximum likelihood training of score-based diffusion models. Advances in neural information processing systems, 34, 1415-1428.
[6] Neklyudov, K., Brekelmans, R., Severo, D., & Makhzani, A. (2023, July). Action matching: Learning stochastic dynamics from samples. In International conference on machine learning (pp. 25858-25889). PMLR.