SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2606.16073 · 2026

Stop the Sampler! Classifier-Based Adaptive Stopping for Sampling Kernels

Nikita Morozov, Sergey Samsonov, Esmeralda Whitammer, Kirill Korolev, Stepan Pavlenko

arXiv · PDF · Open in the Atlas

Code that ran

7 of 8 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; 4 failures of our instrument; 1 no recorded run), measured 2026-11-23; 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/2606.16073.json · badge: /api/ran/2606.16073.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
kkorolev1/stop-the-sampler canonical (classifier label)
classifier basis: census
4 ran · 1 no recorded run
DenisBless/variational_sampling_methods canonical (classifier label)
classifier basis: census
3 ran · 0 no recorded run
FunctionStatusWhere it lives
clip_log_reward Ran
ran, honoured the contract we drafted
kkorolev1/stop-the-sampler/algorithms/diff_sampler_clf/diff_sampler_clf_rnd.py
code served (permissive licence) · get_code("68ac73a716b4892f")
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.numpy as jnp
import numpy as np

# Create a small log_reward array
log_reward = jnp.array([[-50000.0, -75000.0, -100000.0, -125000.0],
                        [-10000.0, -200000.0, -99999.0, -100001.0]])

# Define clip_value parameter
clip_value = -100000.0

ARGS = {
    "log_reward": log_reward,
    "clip_value": clip_value
}
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 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
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
eval_fn_one Ran
ran; our contract draft was wrong, not the code
kkorolev1/stop-the-sampler/run_eval.py
code served (permissive licence) · get_code("92cb05fd129f59fc")
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 torch.nn as nn

torch.manual_seed(0)

# Stand-in model_state class with params attribute
class ModelState:
    def __init__(self):
        self.params = {"weight": torch.randn(4, 3), "bias": torch.randn(4)}

# Stand-in rnd function that simulates rollout/trajectory generation
def mock_rnd(key, model_state, params):
    # Returns (trajectories, _, _, trajectories_length)
    # trajectories: tensor of shape (batch, seq_len, feature_dim)
    # trajectories_length: tensor of shape (batch,) with sequence lengths
    batch_size = 2
    seq_len = 5
    feature_dim = 4
    
    trajectories = torch.randn(batch_size, seq_len, feature_dim)
    trajectories_length = torch.tensor([5, 3], dtype=torch.long)
    
    return trajectories, None, None, trajectories_length

# Create instances
rnd = mock_rnd
model_state = ModelState()
key = torch.tensor(42)  # Simple key for RNG

ARGS = {
    "rnd": rnd,
    "model_state": model_state,
    "key": key,
}
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
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
linear_annealing Ran
ran, honoured the contract we drafted
kkorolev1/stop-the-sampler/algorithms/diff_sampler_clf/utils.py
code served (permissive licence) · get_code("b07af36519d93885")
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 float, 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 torch
import numpy as np

# Define ARGS dict with all parameters for linear_annealing
ARGS = {
    "current": 5,
    "n_rounds": 10,
    "min_val": 0.1,
    "max_val": 1.0,
    "exp": True,
    "descending": False,
    "avoid_zero": True
}
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 float, 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
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
sample_kernel Ran
ran; our contract draft was wrong, not the code
kkorolev1/stop-the-sampler/algorithms/diff_sampler_clf/diff_sampler_clf_rnd.py
code served (permissive licence) · get_code("3f285359964fd300")
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 jax
import jax.numpy as jnp

# Set seed for reproducibility
jax.config.update("jax_default_prng_impl", "threefry2x32")

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

# Create mean as a jnp array with shape (2,) - batch size 2
mean = jnp.array([1.5, 2.5])

# Create scale as a jnp array with shape (2,) - batch size 2, matching mean shape
scale = jnp.array([0.5, 1.0])

ARGS = {
    "key_gen": key_gen,
    "mean": mean,
    "scale": scale
}
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 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
get_invtemp Not yet run
unverified (harvested, no recorded run)
kkorolev1/stop-the-sampler/algorithms/diff_sampler_clf/utils.py
code served (permissive licence) · get_code("623e9e6914981d32")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 0 later) and 5 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 dated earlier
2406.07423 (2024-06)
Beyond ELBOs: A Large-Scale Evaluation of Variational Methods for Sampling
extract_last_entry 1 other paper
1 dated earlier
2406.07423 (2024-06)
Beyond ELBOs: A Large-Scale Evaluation of Variational Methods for Sampling
moving_averages 1 other paper
1 dated earlier
2406.07423 (2024-06)
Beyond ELBOs: A Large-Scale Evaluation of Variational Methods for Sampling

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

Repositories linked to this paper

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

Abstract

Sampling from complex, unnormalized probability densities is a fundamental challenge in Bayesian inference and probabilistic modeling. While Markov chain Monte Carlo (MCMC) methods provide asymptotic guarantees, they often suffer from slow mixing and high computational costs due to fixed or manually tuned trajectory lengths. In this work, we propose a novel framework that treats trajectory termination as a learnable component of the sampling dynamics. By framing MCMC within the theory of non-acyclic generative flow networks (GFlowNets), we train state-dependent neural classifiers to decide when a trajectory has reached a high-density region and should terminate. We theoretically establish the connection between optimal classifiers and the target density via detailed balance conditions and introduce a multilevel training scheme to facilitate exploration in complex geometries. Experimental results across various benchmark densities demonstrate that our approach significantly reduces average trajectory lengths while improving mode coverage and mixing compared to standard MCMC baselines.

For agents

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

get_harvested_code_for_paper("2606.16073")
get_code_for_paper("2606.16073")
have("2606.16073")

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

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

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

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

Connect an agent — have() is free.