SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2606.11087 · 2026

Test-Time Gradient Guidance of Flow Policies in Reinforcement Learning

U Berkeley, Sergey Levine, Qiyang Li, Kevin Frans, Tobias Springenberg, Zhiyuan Zhou, Charles Xu, Andy Peng

arXiv · PDF · Open in the Atlas

Code that ran

6 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 5 failures of our instrument; 0 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.11087.json · badge: /api/ran/2606.11087.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
zhouzypaul/qgf canonical (classifier label)
classifier basis: census
6 ran · 0 no recorded run
FunctionStatusWhere it lives
aggregate_q Ran
ran; our contract draft was wrong, not the code
zhouzypaul/qgf/agents/common.py
code served (permissive licence) · get_code("4b71de825a1395f1")
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 (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 torch
import torch.nn as nn

torch.manual_seed(0)

# Create sample data: qs should be an array-like with shape (batch_size, ...)
# The function aggregates along axis=0, so we need at least 2D
qs = jnp.array([[1.0, 2.0, 3.0, 4.0],
                 [5.0, 6.0, 7.0, 8.0],
                 [0.5, 1.5, 2.5, 3.5]])

# Create a config dict with optional q_aggregation parameter
# The function uses config.get('q_aggregation', 'min'), so it should support .get()
config = {
    'q_aggregation': 'min'
}

ARGS = {
    'qs': qs,
    'config': config
}
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 ArrayImpl, ndim 1, dtype family float, shape (4,) — shape (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
default_init Ran
ran; our contract draft was wrong, not the code
zhouzypaul/qgf/utils/networks.py
pointer only (licence: MIT); the stored copy get_code serves, from JongseongChae/FAC, is pointer only (licence: NONE) · get_code("2aaa6f4e0d62bf22")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from JongseongChae/FAC, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

ensemblize Ran
ran; our contract draft was wrong, not the code
zhouzypaul/qgf/utils/networks.py
pointer only (licence: MIT); the stored copy get_code serves, from JongseongChae/FAC, is pointer only (licence: NONE) · get_code("f157becc6d5dd71b")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from JongseongChae/FAC, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_flat_batch Ran
ran; our contract draft was wrong, not the code
zhouzypaul/qgf/agents/common.py
code served (permissive licence) · get_code("098c71f84661405f")
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.numpy as jnp
import numpy as np

# Create a minimal config dict
config = {
    'action_chunking': False
}

# Create batch dict with proper shapes
# Based on the function:
# - batch['actions'] is indexed with [..., 0, :] when action_chunking=False
#   So it needs shape (B, H, A) where B=batch, H=horizon, A=action_dim
# - batch['next_observations'] is indexed with [..., -1, :] so shape (B, H, obs_dim)
# - batch['rewards'] is indexed with [..., -1] so shape (B, H)
# - batch['masks'] is indexed with [..., -1] so shape (B, H)
# - batch['valid'] is indexed with [..., -1] so shape (B, H)

B = 2  # batch size
H = 3  # horizon/time dimension
A = 4  # action dimension
O = 5  # observation dimension

batch = {
    'actions': jnp.ones((B, H, A)),
    'next_observations': jnp.ones((B, H, O)),
    'rewards': jnp.ones((B, H)),
    'masks': jnp.ones((B, H)),
    'valid': jnp.ones((B, H))
}

ARGS = {
    'batch': batch,
    'config': config
}
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 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
mish Ran
ran, honoured the contract we drafted
zhouzypaul/qgf/agents/dcgql.py
pointer only (licence: MIT); the stored copy get_code serves, from diffusionyes/maxentdp, is pointer only (licence: NONE) · get_code("7fc1d127bf81537f")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from diffusionyes/maxentdp, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

timestep_embedding Ran
ran; our contract draft was wrong, not the code
zhouzypaul/qgf/utils/networks.py
code served (permissive licence) · get_code("11cf505faf3fe3f2")
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, 16) 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 math

# Create a small batch of timestep values between [0, 1]
t = jnp.array([0.2, 0.5], dtype=jnp.float32)

# Define arguments for the function
ARGS = {
    "t": t,
    "emb_size": 16,
    "max_period": 10000
}
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 2, dtype family float, shape (2, 16) — shape (2, 16) 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

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, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 2 later) and 3 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
default_init 13 other papers
10 dated earlier, 2 later, 1 undated · 10 only as an assembly brick
2406.09329 (2024-06)
Is Value Learning Really the Main Bottleneck in Offline RL?
2502.02538 (2025-02)
Flow Q-Learning
2506.07744 (2025-06)
Graph-Assisted Stitching for Offline Hierarchical Reinforcement Learning
and 10 more not named here
ensemblize 10 other papers
7 dated earlier, 2 later, 1 undated · 7 only as an assembly brick
2502.02538 (2025-02)
Flow Q-Learning
2506.21427 (2025-06)
Flow-Based Single-Step Completion for Efficient and Expressive Policy Learning
and 7 more not named here
mish 7 other papers
7 dated earlier · 1 only as an assembly brick
2312.11752 (2023-12)
Learning a Diffusion Model Policy from Rewards via Q-Score Matching
2402.17135 (2024-02)
Unsupervised Zero-Shot Reinforcement Learning via Functional Reward Encodings
2405.20555 (2024-05)
Diffusion Actor-Critic: Formulating Constrained Policy Iteration as Diffusion Noise Regression for Offline Reinforcement Learning
and 4 more not named here

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

Expressive continuous control policies, such as diffusion and flow models, form the backbone of recent advances in scaling imitation learning for simulated and real robot control. While they are known to scale stably in the supervised imitation learning setting, incorporating them into reinforcement learning (RL) pipelines for policy improvement has proven more difficult. It often requires specialized training objectives or backpropagating through denoising processes, which cause well-known issues with stability and affect scalability. In this paper we study the question of whether simple policy improvement schemes at test time alone, leaving stable supervised policy training intact, can be a competitive alternative which sidesteps these issues. To this end, we propose QGF (Q-Guided Flow), an RL algorithm that performs policy optimization entirely at test time. QGF works by pre-training both a reference flow policy (via a standard behavioral cloning objective) and a value function critic and, at test time, using the value gradient to guide the reference policy to generate higher-value actions without any additional policy learning. Empirically, QGF outperforms prior test-time RL methods on single-task and goal-conditioned offline RL benchmarks with high-dimensional action spaces, and is competitive with state-of-the-art training-time algorithms while being much cheaper to run. Moreover, it exhibits favorable scaling with model size by avoiding the instability of actor-critic training, offering a practical and effective alternative RL algorithm with expressive policies.

For agents

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

get_harvested_code_for_paper("2606.11087")
get_code_for_paper("2606.11087")
have("2606.11087")

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

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

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

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

Connect an agent — have() is free.