SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2509.21655 · ICLR · 2025

DriftLite: Lightweight Drift Control for Inference-Time Scaling of Diffusion Models

Grant Rotskoff, Wenhao Gao, Jiequn Han, Lexing Ying, Yinuo Ren

arXiv · PDF · Open in the Atlas

Code that ran

7 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; 1 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 5 failures of our instrument; 3 no recorded run), measured 2026-11-24; 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/2509.21655.json · badge: /api/ran/2509.21655.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
yinuoren/DriftLite canonical (classifier label)
classifier basis: census
7 ran · 3 no recorded run
FunctionStatusWhere it lives
compute_mmd Ran
ran, violated the contract we drafted
yinuoren/DriftLite/evaluation.py
code served (permissive licence) · get_code("120031b737364a94")
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
import numpy as np

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

# Create small test arrays
# particles1: shape (2, 4) - 2 particles in 4D space
particles1 = jnp.array(np.random.randn(2, 4), dtype=jnp.float32)

# weights1: shape (2,) - weights for particles1
weights1 = jnp.array([0.5, 0.5], dtype=jnp.float32)

# particles2: shape (3, 4) - 3 particles in 4D space (different count for distinction)
particles2 = jnp.array(np.random.randn(3, 4), dtype=jnp.float32)

# weights2: shape (3,) - weights for particles2
weights2 = jnp.array([0.33, 0.33, 0.34], dtype=jnp.float32)

# sigma: RBF kernel bandwidth
sigma = 20.0

ARGS = {
    "particles1": particles1,
    "weights1": weights1,
    "particles2": particles2,
    "weights2": weights2,
    "sigma": sigma,
}
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 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
compute_mmd_rff Ran
ran; our contract draft was wrong, not the code
yinuoren/DriftLite/evaluation.py
code served (permissive licence) · get_code("0bcff305235f7081")
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 seeds for reproducibility
jax.config.update("jax_enable_custom_prng", False)

# Create small test particles and weights
n1 = 2
n2 = 3
dim = 4

particles1 = jnp.array([
    [1.0, 2.0, 3.0, 4.0],
    [5.0, 6.0, 7.0, 8.0]
], dtype=jnp.float32)

weights1 = jnp.array([0.3, 0.7], dtype=jnp.float32)

particles2 = jnp.array([
    [1.5, 2.5, 3.5, 4.5],
    [5.5, 6.5, 7.5, 8.5],
    [0.5, 1.5, 2.5, 3.5]
], dtype=jnp.float32)

weights2 = jnp.array([0.2, 0.3, 0.5], dtype=jnp.float32)

ARGS = {
    "particles1": particles1,
    "weights1": weights1,
    "particles2": particles2,
    "weights2": weights2,
    "sigma": 20.0,
    "num_features": 2048,
    "feature_batch_size": 1024,
    "seed": 42
}
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
compute_nll Ran
ran; our contract draft was wrong, not the code
yinuoren/DriftLite/evaluation.py
code served (permissive licence) · get_code("1b4baf7328c1af21")
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
import numpy as np

# Define particles: shape (batch_size, dim)
particles = jnp.array([
    [0.1, 0.2, 0.3, 0.4],
    [0.5, 0.6, 0.7, 0.8]
], dtype=jnp.float32)

# Define weights: shape (batch_size,) - normalized importance weights
weights = jnp.array([0.6, 0.4], dtype=jnp.float32)

# Define log_density_fn: a callable that takes a single particle and returns a log density
def log_density_fn(particle: jnp.ndarray) -> float:
    """Simple Gaussian log density centered at origin."""
    return -0.5 * jnp.sum(particle ** 2)

ARGS = {
    "particles": particles,
    "weights": weights,
    "log_density_fn": log_density_fn
}
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 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
divergence_via_jvp_exact Ran
ran; our contract draft was wrong, not the code
yinuoren/DriftLite/methods/utils.py
code served (permissive licence) · get_code("7bf2f670bb268723")
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
import numpy as np

def score_fn(s, x):
    """
    A simple stand-in score function that takes a scale parameter s
    and input x, and returns scores of the same shape as x.
    """
    return s * x + 0.1 * x**2

# Create small test data
s_value = 0.5  # scale parameter
x_value = jnp.array([[1.0, 2.0, 3.0, 4.0],
                      [5.0, 6.0, 7.0, 8.0]])  # shape (2, 4)

ARGS = {
    "score_fn": score_fn,
    "s": s_value,
    "x": x_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 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
generate_random_unit_vector Ran
ran, honoured the contract we drafted
yinuoren/DriftLite/methods/scalar_basis.py
code served (permissive licence) · get_code("6d1e60f441b076ed")
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 1, dtype family float, shape (5,) 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

ARGS = {
    "dim": 5,
    "seed": 42,
}
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 1, dtype family float, shape (5,) — shape (5,) 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_scalar_basis_functions Ran
ran; our contract draft was wrong, not the code
yinuoren/DriftLite/methods/scalar_basis.py
code served (permissive licence) · get_code("62dc948be903d0ef")
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 list, ndim 1, 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
from jax import random
import numpy as np

# Helper functions that the main function calls
def hutchinson_trace_estimator_varying(func, s, x, key, num_samples):
    """Stand-in for Hutchinson trace estimator"""
    return jnp.sum(jnp.array([0.1 for _ in range(num_samples)]))

def divergence_via_jvp_exact(func, s, x):
    """Stand-in for JVP-based divergence"""
    return 0.5

# Create a minimal example object
class ExampleStandIn:
    def __init__(self, dim):
        self._dim = dim
    
    def get_total_dimension(self):
        return self._dim
    
    def score(self, s, x):
        """Score function (time-dependent)"""
        return jnp.ones_like(x) * 0.1
    
    def reward_fn(self, x):
        """Reward function"""
        x_flat = jnp.ravel(x)
        return 0.5 * jnp.sum(x_flat ** 2)
    
    def reward_grad(self, x):
        """Gradient of reward"""
        return x
    
    def reward_lap(self, x):
        """Laplacian of reward"""
        return self._dim
    
    def log_pt_density(self, s, x):
        """Log probability density (time-dependent)"""
        x_flat = jnp.ravel(x)
        return -0.5 * jnp.sum(x_flat ** 2)

# Create configuration objects
class SimulationConfig:
    def __init__(self):
        self.use_potential = True
        self.use_hutchinson = False
        self.num_hutchinson_samples = 2
        self.use_score_norm = True
        self.use_score_dot_xi = True
        self.num_xi = 2

class ExperimentConfig:
    def __init__(self):
        self.mode = 'quadratic'

# Set up arguments
dim = 4
example = ExampleStandIn(dim)
simulation_config = SimulationConfig()
experiment_config = ExperimentConfig()
random_seed = 42

ARGS = {
    'example': example,
    'simulation_config': simulation_config,
    'experiment_config': experiment_config,
    'random_seed': random_seed
}
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 list, ndim 1, dtype family float — a list 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_vector_basis_functions Ran
ran; our contract draft was wrong, not the code
yinuoren/DriftLite/methods/vector_basis.py
code served (permissive licence) · get_code("371941e78a44d9d7")
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 list, ndim 1, 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
from jax import random
import torch
import torch.nn as nn

torch.manual_seed(0)

# Stand-in classes and helper functions

class Example:
    def __init__(self):
        self.dim = 4
    
    def get_total_dimension(self):
        return self.dim
    
    def score(self, x):
        # Returns gradient of log probability
        return jnp.ones_like(x) * 0.1
    
    def reward_grad(self, x):
        # Gradient of reward function
        return x * 0.5
    
    def reward_lap(self, x):
        # Laplacian of reward function
        return jnp.ones(x.shape[0]) * self.dim

class SimulationConfig:
    def __init__(self, use_hutchinson=False, num_hutchinson_samples=10):
        self.use_hutchinson = use_hutchinson
        self.num_hutchinson_samples = num_hutchinson_samples

class ExperimentConfig:
    def __init__(self, mode='quadratic'):
        self.mode = mode

# Helper functions that are referenced in the function
def hutchinson_trace_estimator_varying(score_fn, s, x, base_key, num_samples):
    # Stub implementation
    return jnp.sum(x)

def divergence_via_jvp_exact(score_fn, s, x):
    # Stub implementation
    return jnp.sum(x)

# Create instances
example = Example()
simulation_config = SimulationConfig(use_hutchinson=False)
experiment_config = ExperimentConfig(mode='quadratic')
random_seed = 42

ARGS = {
    'example': example,
    'simulation_config': simulation_config,
    'experiment_config': experiment_config,
    'random_seed': random_seed
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list 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_config Not yet run
unverified (harvested, no recorded run)
yinuoren/DriftLite/config.py
code served (permissive licence) · get_code("2a17e467c6eb04c5")
How it ran

no invocation recorded.

hutchinson_trace_estimator_varying Not yet run
unverified (harvested, no recorded run)
yinuoren/DriftLite/methods/utils.py
code served (permissive licence) · get_code("16e559a22090ffc2")
How it ran

no invocation recorded.

load_config Not yet run
unverified (harvested, no recorded run)
yinuoren/DriftLite/config.py
code served (permissive licence) · get_code("6c06fb97a80954f9")
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-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

We study inference-time scaling for diffusion models, where the goal is to adapt a pre-trained model to new target distributions without retraining. Existing guidance-based methods are simple but introduce bias, while particle-based corrections suffer from weight degeneracy and high computational cost. We introduce DriftLite, a lightweight, training-free particle-based approach that steers the inference dynamics on the fly with provably optimal stability control. DriftLite exploits a fundamental degree of freedom in the Fokker-Planck equation between the drift and particle potential, and yields two practical instantiations: Variance-and Energy-Controlling Guidance (VCG/ECG) for approximating the optimal drift with modest and scalable overhead. Across Gaussian mixture models, particle systems, and large-scale protein-ligand co-folding problems, DriftLite consistently reduces variance and improves sample quality over pure guidance and sequential Monte Carlo baselines. These results highlight a principled, efficient route toward scalable inference-time adaptation of diffusion models. Our source code is publicly available at https://github.com/yinuoren/DriftLite.

For agents

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

get_harvested_code_for_paper("2509.21655")
get_code_for_paper("2509.21655")
have("2509.21655")

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

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

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

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

Connect an agent — have() is free.