SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.04355 · ICLR · 2025

PQMass: Probabilistic Assessment of the Quality of Generative Models using Probability Mass Estimation

Laurence Perreault-Levasseur, Yashar Hezaveh, Nikolay Malkin, Connor Stone, Pablo Lemos, Sammy Sharief, Salma Salhi

arXiv · PDF · Open in the Atlas

Code that ran

8 of 10 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; 2 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 6 failures of our instrument; 2 no recorded run), measured 2026-11-22; 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/2402.04355.json · badge: /api/ran/2402.04355.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
Ciela-Institute/PQM community
Papers with Code archive
8 ran · 2 no recorded run
FunctionStatusWhere it lives
_compute_counts_numpy Ran
ran; our contract draft was wrong, not the code
Ciela-Institute/PQM/src/pqm/pqm.py
code served (permissive licence) · get_code("07da518a36bc7033")
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 2, dtype family int; 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 numpy as np

# Set random seed for reproducibility
np.random.seed(0)

# Create small sample arrays with distinct dimensions
# x_samples: (N, D) where N=2 samples, D=4 dimensions
x_samples = np.random.randn(2, 4).astype(np.float32)

# y_samples: (M, D) where M=3 samples, D=4 dimensions
y_samples = np.random.randn(3, 4).astype(np.float32)

# refs: (num_refs, D) where num_refs=5, D=4 dimensions
num_refs = 5
refs = np.random.randn(num_refs, 4).astype(np.float32)

# kernel: use 'euclidean' which is a valid metric for cdist
kernel = 'euclidean'

ARGS = {
    'x_samples': x_samples,
    'y_samples': y_samples,
    'refs': refs,
    'num_refs': num_refs,
    'kernel': kernel
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 2, dtype family int — 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
_compute_counts_torch Ran
ran; our contract draft was wrong, not the code
Ciela-Institute/PQM/src/pqm/pqm.py
code served (permissive licence) · get_code("563bfb964db9603b")
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 2, dtype family int; 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

torch.manual_seed(0)

# Create small sample tensors
# x_samples: (N, D) where N=2, D=4
x_samples = torch.randn(2, 4)

# y_samples: (M, D) where M=3, D=4
y_samples = torch.randn(3, 4)

# refs: (num_refs, D) where num_refs=5, D=4
num_refs = 5
refs = torch.randn(num_refs, 4)

# p parameter for distance metric
p = 2.0

ARGS = {
    "x_samples": x_samples,
    "y_samples": y_samples,
    "refs": refs,
    "num_refs": num_refs,
    "p": p,
}
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 2, dtype family int — 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
_mean_std_numpy Ran
ran, honoured the contract we drafted
Ciela-Institute/PQM/src/pqm/pqm.py
code served (permissive licence) · get_code("d099d92b4a639b9f")
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 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 numpy as np

# Create two sample numpy arrays with distinct shapes
# sample1: 4 samples, 3 features
sample1 = np.array([
    [1.0, 2.0, 3.0],
    [2.0, 3.0, 4.0],
    [3.0, 4.0, 5.0],
    [4.0, 5.0, 6.0]
])

# sample2: 5 samples, 3 features
sample2 = np.array([
    [5.0, 6.0, 7.0],
    [6.0, 7.0, 8.0],
    [7.0, 8.0, 9.0],
    [8.0, 9.0, 10.0],
    [9.0, 10.0, 11.0]
])

ARGS = {
    "sample1": sample1,
    "sample2": sample2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 2, 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
_mean_std_torch Ran
ran; our contract draft was wrong, not the code
Ciela-Institute/PQM/src/pqm/pqm.py
code served (permissive licence) · get_code("322e753b69b8a4c1")
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 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

torch.manual_seed(0)

# Create two sample tensors with distinct shapes
# sample1: batch size 2, feature dimension 4
# sample2: batch size 3, feature dimension 4
sample1 = torch.randn(2, 4)
sample2 = torch.randn(3, 4)

ARGS = {
    "sample1": sample1,
    "sample2": sample2,
}
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 2, 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
_random_permutation Ran
ran, honoured the contract we drafted
Ciela-Institute/PQM/src/pqm/pqm.py
code served (permissive licence) · get_code("fc84731c392a9fc2")
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 3, 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 numpy as np

torch.manual_seed(0)
np.random.seed(0)

# Create tiny torch tensors
x_torch = torch.randn(2, 4)
y_torch = torch.randn(2, 4)

# Create tiny numpy arrays
x_numpy = np.random.randn(2, 4)
y_numpy = np.random.randn(2, 4)

# Test with torch tensors
ARGS = {
    'x': x_torch,
    'y': y_torch
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 3, 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
_sample_reference_indices_numpy Ran
ran; our contract draft was wrong, not the code
Ciela-Institute/PQM/src/pqm/pqm.py
code served (permissive licence) · get_code("ec0a357e2f3c1754")
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. The image it ran in was not recorded. If your copy returns the same type 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 numpy as np

np.random.seed(0)

# Create sample data with distinct dimensions
# x_samples: shape (10, 4) - 10 samples, 4 features
# y_samples: shape (8, 4) - 8 samples, 4 features
x_samples = np.random.randn(10, 4).astype(np.float32)
y_samples = np.random.randn(8, 4).astype(np.float32)

# Define parameters
Nx = 3  # Number of references to sample from x_samples
Ny = 2  # Number of references to sample from y_samples
Ng = 2  # Number of Gaussian references

ARGS = {
    "Nx": Nx,
    "Ny": Ny,
    "Ng": Ng,
    "x_samples": x_samples,
    "y_samples": y_samples,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
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
_sample_reference_indices_torch Ran
ran; our contract draft was wrong, not the code
Ciela-Institute/PQM/src/pqm/pqm.py
code served (permissive licence) · get_code("d40f676ffa5be462")
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. The image it ran in was not recorded. If your copy returns the same type 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)

# Create sample tensors with distinct sizes
# x_samples: shape (10, 4) - 10 samples, 4 features
# y_samples: shape (8, 4) - 8 samples, 4 features
x_samples = torch.randn(10, 4)
y_samples = torch.randn(8, 4)

# Parameters for sampling
Nx = 3  # Number of references from x_samples
Ny = 2  # Number of references from y_samples
Ng = 2  # Number of Gaussian references

ARGS = {
    "Nx": Nx,
    "Ny": Ny,
    "Ng": Ng,
    "x_samples": x_samples,
    "y_samples": y_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 — a tuple output has no array shape of its own; none is stated
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
permute_test Ran
ran; our contract draft was wrong, not the code
Ciela-Institute/PQM/src/pqm/pqm.py
code served (permissive licence) · get_code("0cfbef3734c9c0ff")
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. The image it ran in was not recorded. If your copy returns the same type 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 numpy as np

torch.manual_seed(0)

# Define a simple test function that computes a statistic from x and y
def test_statistic_function(x, y):
    """
    A simple test statistic function that returns a scalar value.
    It accepts two arguments (x and y) as required by permute_test.
    """
    if isinstance(x, torch.Tensor):
        return (x.mean() - y.mean()).item()
    else:  # np.ndarray
        return np.mean(x) - np.mean(y)

# Create small sample data using torch.Tensor
x_torch = torch.randn(4, 3)
y_torch = torch.randn(4, 3)

# Create small sample data using np.ndarray
x_numpy = np.random.randn(4, 3)
y_numpy = np.random.randn(4, 3)

# Define ARGS dictionary with all required parameters
ARGS = {
    'f': test_statistic_function,
    'x': x_torch,
    'y': y_torch,
    'n_permute': 5,
    'n_rerun': 3,
    'measure': np.mean
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
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
_pqm_test Not yet run
unverified (harvested, no recorded run)
Ciela-Institute/PQM/src/pqm/pqm.py
code served (permissive licence) · get_code("058ed9ec51fb1030")
How it ran

no invocation recorded.

pqm_pvalue Not yet run
unverified (harvested, no recorded run)
Ciela-Institute/PQM/src/pqm/pqm.py
code served (permissive licence) · get_code("b2af5c67809c9b5e")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 10 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.

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-22.

Repositories linked to this paper

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

Abstract

We propose a likelihood-free method for comparing two distributions given samples from each, with the goal of assessing the quality of generative models. The proposed approach, PQMass, provides a statistically rigorous method for assessing the performance of a single generative model or the comparison of multiple competing models. PQMass divides the sample space into non-overlapping regions and applies chi-squared tests to the number of data samples that fall within each region, giving a 𝑝-value that measures the probability that the bin counts derived from two sets of samples are drawn from the same multinomial distribution. PQMass does not depend on assumptions regarding the density of the true distribution, nor does it rely on training or fitting any auxiliary models. We evaluate PQMass on data of various modalities and dimensions, demonstrating its effectiveness in assessing the quality, novelty, and diversity of generated samples. We further show that PQMass scales well to moderately high-dimensional data and thus obviates the need for feature extraction in practical applications. Code: https://github.com/Ciela-Institute/PQM.

For agents

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

get_harvested_code_for_paper("2402.04355")
get_code_for_paper("2402.04355")
have("2402.04355")

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

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

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

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

Connect an agent — have() is free.