SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2504.05304 · ICML · 2025

Gaussian Mixture Flow Matching Models

Leonidas Guibas, Hao Tan, Kai Zhang, Gordon Wetzstein, Sai Bi, Zexiang Xu, Fujun Luan, Hansheng Chen

arXiv · PDF · Open in the Atlas

Code that ran

5 of 6 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 1 failure of our instrument; 1 no recorded run), measured 2026-11-24; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2504.05304.json · badge: /api/ran/2504.05304.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
lakonik/gmflow canonical (classifier label)
classifier basis not recorded on the link
5 ran · 1 no recorded run
FunctionStatusWhere it lives
gm1d_inverse_cdf_init_jit Ran
ran on a synthesized input
lakonik/gmflow/lib/ops/gmflow_ops/gmflow_ops.py
code served (permissive licence) · get_code("1103b2593a21779a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Create small tensors for the function parameters
gaussian_samples = torch.randn(2, 4)  # batch_size=2, dim=4
var = torch.tensor([0.5, 1.0, 1.5, 2.0])  # variance for each dimension
mean = torch.tensor([0.1, 0.2, 0.3, 0.4])  # mean for each dimension

ARGS = {
    "gaussian_samples": gaussian_samples,
    "var": var,
    "mean": mean,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float — no output shape is stated: observe_signature.py could not observe it (import:OSError)
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
gm1d_pdf_cdf Ran
ran on a synthesized input
lakonik/gmflow/lib/ops/gmflow_ops/gmflow_ops.py
code served (permissive licence) · get_code("8f5d2087a7aecdf4")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 5, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import math

torch.manual_seed(0)

# Set up small but distinct dimensions
bs = 2  # batch size
num_gaussians = 3
h = 4
w = 5
n_samples = 6

# Construct the gm1d dictionary with required tensors
gm1d = {
    'means': torch.randn(bs, num_gaussians, h, w),
    'logstds': torch.randn(bs, 1, 1, 1),
    'logweights': torch.randn(bs, num_gaussians, h, w),
}

# Construct samples tensor
samples = torch.randn(bs, n_samples, h, w)

ARGS = {
    'gm1d': gm1d,
    'samples': samples,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 5, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
gm_kl_loss Ran
ran on a synthesized input
lakonik/gmflow/train_toymodel.py
code served (permissive licence) · get_code("cfa36349a79bf6ff")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 1, dtype family float, shape (2,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Parameters for gm_kl_loss
bs = 2  # batch size
num_gaussians = 3
D = 4  # feature dimension

# Construct the Gaussian mixture dict
gm = {
    'means': torch.randn(bs, num_gaussians, D),
    'logstds': torch.randn(bs, 1, 1),
    'logweights': torch.randn(bs, num_gaussians, 1),
}

# Construct the sample tensor
sample = torch.randn(bs, D)

# Construct ARGS dict with all parameters
ARGS = {
    'gm': gm,
    'sample': sample,
    'eps': 0.0001,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 1, dtype family float, shape (2,) — shape (2,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
probabilistic_guidance_jit Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
lakonik/gmflow/lib/models/diffusions/gmflow.py
pointer only (licence: MIT); the stored copy get_code serves, from fuyunwang/MPFM-OSAD, is pointer only (licence: AGPL-3.0) · get_code("7bcb35f9f94c22a5")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from fuyunwang/MPFM-OSAD, and AGPL-3.0, as GitHub detects it on that repository, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

psd_inverse Ran
ran on a synthesized input
lakonik/gmflow/lib/ops/gmflow_ops/gmflow_ops.py
code served (permissive licence) · get_code("2d7ebd2eed334968")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (4, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# psd_inverse expects a positive semi-definite matrix
# We'll create a small PSD matrix by constructing A @ A.T
A = torch.randn(4, 4)
x = A @ A.T

ARGS = {
    "x": x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (4, 4) — shape (4, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
denoising_gm_convert_to_mean_jit Not yet run
unverified (harvested, no recorded run)
lakonik/gmflow/lib/models/diffusions/gmflow.py
pointer only (licence: MIT); the stored copy get_code serves, from fuyunwang/MPFM-OSAD, is pointer only (licence: AGPL-3.0) · get_code("b35d6e215023c884")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from fuyunwang/MPFM-OSAD, and AGPL-3.0, as GitHub detects it on that repository, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 2 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 2 later) and 4 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
denoising_gm_convert_to_mean_jit 1 other paper
1 later
2605.02438 (2026-05)
Mixture Prototype Flow Matching for Open-Set Supervised Anomaly Detection
probabilistic_guidance_jit 1 other paper
1 later
2605.02438 (2026-05)
Mixture Prototype Flow Matching for Open-Set Supervised Anomaly Detection

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-24.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Diffusion models approximate the denoising distribution as a Gaussian and predict its mean, whereas flow matching models reparameterize the Gaussian mean as flow velocity. However, they underperform in few-step sampling due to discretization error and tend to produce oversaturated colors under classifier-free guidance (CFG). To address these limitations, we propose a novel Gaussian mixture flow matching (GM-Flow) model: instead of predicting the mean, GM-Flow predicts dynamic Gaussian mixture (GM) parameters to capture a multi-modal flow velocity distribution, which can be learned with a KL divergence loss. We demonstrate that GMFlow generalizes previous diffusion and flow matching models where a single Gaussian is learned with an L 2 denoising loss. For inference, we derive GM-SDE/ODE solvers that leverage analytic denoising distributions and velocity fields for precise few-step sampling. Furthermore, we introduce a novel probabilistic guidance scheme that mitigates the over-saturation issues of CFG and improves image generation quality. Extensive experiments demonstrate that GMFlow consistently outperforms flow matching baselines in generation quality, achieving a Precision of 0.942 with only 6 sampling steps on ImageNet 256×256.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2504.05304")
get_code_for_paper("2504.05304")
have("2504.05304")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2504.05304.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2504.05304.svg)](https://syntology.ai/paper/2504.05304)

Connect an agent — have() is free.