SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2406.07423 · 2024

Beyond ELBOs: A Large-Scale Evaluation of Variational Methods for Sampling

arXiv · PDF · Open in the Atlas

Code that ran

9 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, 1 violated it and 0 have no contract verdict; 6 failures of our instrument; 1 no recorded run), measured 2026-11-22; 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/2406.07423.json · badge: /api/ran/2406.07423.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
denisbless/variational_sampling_methods canonical (classifier label)
classifier basis: census
9 ran · 1 no recorded run
FunctionStatusWhere it lives
compute_reverse_ess Ran
ran, violated the contract we drafted
denisbless/variational_sampling_methods/algorithms/common/eval_methods/utils.py
code served (permissive licence) · get_code("2e95829a31e8dc4b")
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 ArrayImpl, ndim 0, dtype family float, shape () 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 jax
import jax.numpy as jnp

# Set seed for reproducibility
jax.config.update("jax_default_prng_impl", "threefry2x32")
key = jax.random.PRNGKey(0)

# Create small test data
# log_weights: array of log-space importance weights (shape: n_samples,)
n_samples = 5
log_weights = jnp.array([-2.0, -1.5, -0.5, -3.0, -1.0])

# eval_samples: scalar indicating number of evaluation samples
eval_samples = 3

ARGS = {
    "log_weights": log_weights,
    "eval_samples": eval_samples,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, ndim 0, dtype family float, shape () — shape () 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
create_point Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
denisbless/variational_sampling_methods/algorithms/fab/sampling/base.py
code served (permissive licence) · get_code("e5de8a47e5b6f3bb")
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 Point. 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 jax
import jax.numpy as jnp
import chex

def log_q_fn(x: chex.Array) -> chex.Array:
    """Simple log probability function for proposal distribution."""
    return -0.5 * jnp.sum(x**2)

def log_p_fn(x: chex.Array) -> chex.Array:
    """Simple log probability function for target distribution."""
    return -0.5 * jnp.sum((x - 1.0)**2)

x = jnp.array([0.1, 0.2, 0.3, 0.4])

ARGS = {
    "x": x,
    "log_q_fn": log_q_fn,
    "log_p_fn": log_p_fn,
    "with_grad": True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
chex, jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Point — a Point 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
extract_last_entry Ran
ran; our contract draft was wrong, not the code
denisbless/variational_sampling_methods/algorithms/common/eval_methods/utils.py
code served (permissive licence) · get_code("4a97143dac6c9fc8")
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 dict. 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)

# The function extract_last_entry takes a dictionary and extracts the last entry
# from each value (assuming values are indexable like lists or tensors).
# It uses: dictionary.items(), len(value), value[-min(len(value), 1)]

# Create a dictionary with various types of values that support indexing and len()
test_dict = {
    'list_key': [1, 2, 3, 4, 5],
    'tensor_key': torch.tensor([10, 20, 30, 40]),
    'string_key': 'hello',
    'nested_list': [[1, 2], [3, 4], [5, 6]],
    'single_element': [42],
}

ARGS = {
    'dictionary': test_dict
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not 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
get_grad_intermediate_log_prob Ran
ran, honoured the contract we drafted
denisbless/variational_sampling_methods/algorithms/fab/sampling/base.py
code served (permissive licence) · get_code("34677d7bdda50827")
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 (2, 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
import numpy as np

torch.manual_seed(0)

# Create small arrays with distinct shapes for different parameters
grad_log_q = torch.randn(2, 4)  # batch_size=2, dim=4
grad_log_p = torch.randn(2, 4)  # same shape as grad_log_q
beta = torch.tensor(0.5)         # scalar tensor
alpha = 0.3                       # float value

ARGS = {
    "grad_log_q": grad_log_q,
    "grad_log_p": grad_log_p,
    "beta": beta,
    "alpha": alpha,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
chex, numpy, 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 (2, 4) — shape (2, 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
get_intermediate_log_prob Ran
ran, honoured the contract we drafted
denisbless/variational_sampling_methods/algorithms/fab/sampling/base.py
code served (permissive licence) · get_code("de01b4b20037266a")
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 ndarray, ndim 2, dtype family float, shape (2, 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
import numpy as np
import chex

torch.manual_seed(0)

# Create small chex arrays (which are just jax arrays or numpy arrays)
# Using numpy arrays as they work with chex
log_q = np.array([[0.1, 0.2, 0.3, 0.4],
                   [0.5, 0.6, 0.7, 0.8]], dtype=np.float32)

log_p = np.array([[1.0, 1.1, 1.2, 1.3],
                   [1.4, 1.5, 1.6, 1.7]], dtype=np.float32)

beta = np.array([[0.3, 0.4, 0.5, 0.6],
                  [0.2, 0.3, 0.4, 0.5]], dtype=np.float32)

alpha = 0.7

ARGS = {
    "log_q": log_q,
    "log_p": log_p,
    "beta": beta,
    "alpha": alpha
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
chex, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (2, 4) — shape (2, 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
moving_averages Ran
ran; our contract draft was wrong, not the code
denisbless/variational_sampling_methods/algorithms/common/eval_methods/utils.py
code served (permissive licence) · get_code("2a30e0be0e543a3b")
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 dict. 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 jax.numpy as jnp
import numpy as np

# Create a sample dictionary with numeric values
# The function expects a dictionary where values are sequences that can be converted to arrays
dictionary = {
    'loss': [1.2, 1.1, 1.0, 0.9, 0.8, 0.7],
    'accuracy': [0.5, 0.6, 0.7, 0.8, 0.85, 0.9],
    'learning_rate': np.array([0.001, 0.001, 0.001]),
}

window_size = 5

ARGS = {
    'dictionary': dictionary,
    'window_size': window_size,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not 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
rejection_sampling Ran
ran; our contract draft was wrong, not the code
denisbless/variational_sampling_methods/algorithms/fab/sampling/rejection_sampling.py
code served (permissive licence) · get_code("88fe97b3c30bcc9b")
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 ArrayImpl, ndim 2, dtype family float, shape (2, 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 jax
import jax.numpy as jnp
import jax.random
import distrax
import chex
from typing import Callable

# Set seed for reproducibility
jax.config.update("jax_platform_name", "cpu")

# Create a simple target log probability function
def target_log_prob_fn(x: jnp.ndarray) -> jnp.ndarray:
    """Simple target: standard normal log probability"""
    return -0.5 * jnp.sum(x**2, axis=-1)

# Create a proposal distribution (multivariate normal)
proposal = distrax.MultivariateNormalDiag(
    loc=jnp.zeros(4),
    scale_diag=jnp.ones(4)
)

# Parameters for rejection sampling
n_samples = 2
k = 2.0  # scaling constant for rejection sampling
key = jax.random.PRNGKey(0)

ARGS = {
    "n_samples": n_samples,
    "proposal": proposal,
    "target_log_prob_fn": target_log_prob_fn,
    "k": k,
    "key": key,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
chex, distrax, jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, ndim 2, dtype family float, shape (2, 4) — shape (2, 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
simple_resampling Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
denisbless/variational_sampling_methods/algorithms/fab/sampling/resampling.py
code served (permissive licence) · get_code("4a1953fc2385ba92")
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 jax
import jax.numpy as jnp
import chex

# Set random seed for reproducibility
jax.config.update('jax_platform_name', 'cpu')

# Create a PRNG key
key = jax.random.PRNGKey(0)

# Create log_weights: shape (num_batch,) with rank 1
# Using 2 samples in the batch
num_batch = 2
log_weights = jnp.array([-0.5, -1.2])

# Create samples: an ArrayTree (can be nested dict/list of arrays)
# All arrays should have batch dimension as first axis (size 2)
samples = {
    'tensor1': jnp.ones((2, 4)),
    'tensor2': jnp.zeros((2, 3)),
    'nested': {
        'tensor3': jnp.arange(10).reshape(2, 5)
    }
}

ARGS = {
    'key': key,
    'log_weights': log_weights,
    'samples': samples
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
chex, jax — 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
smc_simple_resampling Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
denisbless/variational_sampling_methods/algorithms/fab/sampling/resampling.py
code served (permissive licence) · get_code("b2c1edb04bec461b")
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 jax
import jax.numpy as jnp
import chex

# Set random seed for reproducibility
key = jax.random.PRNGKey(0)

# Create small test data
batch_size = 2
num_samples = 4

# log_weights: shape (batch_size,) with log probabilities
log_weights = jnp.array([-1.0, -2.0])

# samples: an ArrayTree (can be nested dict/list/tuple of arrays)
# The function uses jax.tree_util.tree_map and jnp.take on axis 0
# So we need arrays with batch dimension as first axis
samples = {
    'particles': jnp.ones((batch_size, num_samples)),
    'weights': jnp.ones((batch_size, 3))
}

ARGS = {
    'key': key,
    'log_weights': log_weights,
    'samples': samples
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
chex, jax — 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
log_effective_sample_size Not yet run
unverified (harvested, no recorded run)
denisbless/variational_sampling_methods/algorithms/fab/sampling/resampling.py
code served (permissive licence) · get_code("821d3fb722c0d48d")
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, 3 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 3 later) and 7 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
compute_reverse_ess 1 other paper
1 later
2606.16073 (2026-06)
Stop the Sampler! Classifier-Based Adaptive Stopping for Sampling Kernels
extract_last_entry 1 other paper
1 later
2606.16073 (2026-06)
Stop the Sampler! Classifier-Based Adaptive Stopping for Sampling Kernels
moving_averages 1 other paper
1 later
2606.16073 (2026-06)
Stop the Sampler! Classifier-Based Adaptive Stopping for Sampling Kernels

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

Monte Carlo methods, Variational Inference, and their combinations play a pivotal role in sampling from intractable probability distributions. However, current studies lack a unified evaluation framework, relying on disparate performance measures and limited method comparisons across diverse tasks, complicating the assessment of progress and hindering the decision-making of practitioners. In response to these challenges, our work introduces a benchmark that evaluates sampling methods using a standardized task suite and a broad range of performance criteria. Moreover, we study existing metrics for quantifying mode collapse and introduce novel metrics for this purpose. Our findings provide insights into strengths and weaknesses of existing sampling methods, serving as a valuable reference for future developments. The code is publicly available here.

For agents

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

get_harvested_code_for_paper("2406.07423")
get_code_for_paper("2406.07423")
have("2406.07423")

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

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

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

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

Connect an agent — have() is free.