SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2602.11395 · 2026

General and Efficient Steering of Diffusion Models

Mikhail Belkin, Yusu Wang, Qingsong Wang

arXiv · PDF · Open in the Atlas

Code that ran

4 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 1 has no contract verdict; 3 failures of our instrument; 2 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/2602.11395.json · badge: /api/ran/2602.11395.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
isotrivial/na-rfm community
Papers with Code archive
4 ran · 2 no recorded run
FunctionStatusWhere it lives
LaplaceKernelGradients Ran
ran on a synthesized input
isotrivial/na-rfm/na_rfm/dual_rfm.py
code served (permissive licence) · get_code("2b4169450641a426")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) 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 numpy as np

METHOD = 'compute_grads'

INIT_ARGS = {
    'bandwidth': 50.0,
    'eps': 1e-10
}

# Create sample data with distinct dimensions
n_x = 5  # number of centers
n_z = 3  # number of evaluation points
D = 4    # feature dimension

# Original centers and evaluation points
x = torch.randn(n_x, D)
z = torch.randn(n_z, D)

# Transformed centers and evaluation points (simulating x @ M and z @ M)
# In practice these would be the result of a Mahalanobis transformation
xm = torch.randn(n_x, D)
zm = torch.randn(n_z, D)

# KRR coefficients
coefs = torch.randn(n_x)

ARGS = {
    'x': x,
    'z': z,
    'xm': xm,
    'zm': zm,
    'coefs': coefs,
    'batch_size': 2000
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
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 — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
compute_binary_roc_auc Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
isotrivial/na-rfm/na_rfm/dual_rfm.py
code served (permissive licence) · get_code("fe6133b67311b7d3")
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) 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 numpy as np

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

# Create sample data for binary classification
# y_true: binary labels (0 or 1, represented as floats)
y_true = np.array([0.0, 0.0, 1.0, 1.0, 0.0, 1.0, 1.0, 0.0])

# scores: prediction scores (floats between 0 and 1)
scores = np.array([0.1, 0.2, 0.8, 0.9, 0.3, 0.7, 0.85, 0.15])

ARGS = {
    "y_true": y_true,
    "scores": scores,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy — 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
compute_precision_recall_metrics Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
isotrivial/na-rfm/na_rfm/dual_rfm.py
code served (permissive licence) · get_code("fdcec7481e6d7669")
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) 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 numpy as np

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

# Define dimensions
N = 8  # number of samples
D = 4  # feature dimension

# Create sample data
X = np.random.randn(N, D).astype(np.float32)
y = np.array([1, 1, 0, 0, 1, 0, 1, 0], dtype=np.float32)

# Create normalization parameters
mean = np.mean(X, axis=0).astype(np.float32)
std = np.std(X, axis=0).astype(np.float32)
std[std == 0] = 1.0  # avoid division by zero

# Create a direction vector
direction = np.random.randn(D).astype(np.float32)
direction = direction / np.linalg.norm(direction)  # normalize

# Sign correction
sign = 1

ARGS = {
    'X': X,
    'y': y,
    'direction': direction,
    'mean': mean,
    'std': std,
    'sign': sign
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
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
determine_direction_sign Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
isotrivial/na-rfm/na_rfm/dual_rfm.py
code served (permissive licence) · get_code("e5dbc56768c1b62a")
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) and returned tuple, 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 numpy as np

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

# Create small sample data
N = 2  # number of samples
D = 4  # number of features

# X: [N, D] features
X = np.random.randn(N, D).astype(np.float32)

# y: [N] binary labels (1 = target, 0 = other)
y = np.array([1, 0], dtype=np.int32)

# direction: [D] direction to evaluate
direction = np.random.randn(D).astype(np.float32)

# mean: [D] normalization mean
mean = np.random.randn(D).astype(np.float32)

# std: [D] normalization std (ensure positive values)
std = np.abs(np.random.randn(D)).astype(np.float32) + 0.1

ARGS = {
    "X": X,
    "y": y,
    "direction": direction,
    "mean": mean,
    "std": std,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 1, 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
DualRFM Not yet run
unverified (harvested, no recorded run)
isotrivial/na-rfm/na_rfm/dual_rfm.py
code served (permissive licence) · get_code("ac3940dc088d1174")
How it ran

no invocation recorded.

DualRFMResult Not yet run
unverified (harvested, no recorded run)
isotrivial/na-rfm/na_rfm/dual_rfm.py
code served (permissive licence) · get_code("ca85625109d287ad")
How it ran

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, 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 6 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-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

Steering diffusion models toward conditions unseen during training typically requires either retraining with conditional inputs or per-step gradient computations, both of which incur substantial computational overhead. We present Noise-Aligned RFM Steering (NA-RFM), a general recipe for efficiently steering unconditional diffusion models without gradient guidance during inference, enabling fast controllable generation. The method combines two offline-computed signals: noise alignment, a high-noise correction from PCA statistics of the target examples and the full data, and Recursive Feature Machine (RFM) activation steering, which learns a target-discriminative direction from labeled forward-process activations. During sampling, noise alignment provides coarse control at high noise, while the RFM direction is reused over intermediate/late timesteps through lightweight activation edits. Experiments on CIFAR-10, Im-ageNet, CelebA, and fine-grained bird species show improved target accuracy over gradient-based post-hoc guidance baselines, improved FID on the class-guidance benchmarks, and substantial inference speedups. Code: https://github.com/isotrivial/na-rfm.

For agents

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

get_harvested_code_for_paper("2602.11395")
get_code_for_paper("2602.11395")
have("2602.11395")

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

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

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

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

Connect an agent — have() is free.