SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2502.02538 · ICML · 2025

Flow Q-Learning

Sergey Levine, Qiyang Li, Seohong Park

arXiv · PDF · Open in the Atlas

Code that ran

5 of 7 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (4 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 1 failure of our instrument; 2 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/2502.02538.json · badge: /api/ran/2502.02538.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
seohongpark/fql canonical (classifier label)
classifier basis: classifier_2025
1 ran · 1 no recorded run
MohammadrezaNakhaei/FQL community
Papers with Code archive
4 ran · 1 no recorded run
FunctionStatusWhere it lives
ActorVectorField Ran
ran on a synthesized input · constructed an object; no result was computed
seohongpark/fql/agents/fql.py
code served (permissive licence) · get_code("aff3706f3b896c7b")
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 an instance of its own class, ActorVectorField: the run constructed the object and did not call it, so no result was computed. 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 flax.linen as nn
from typing import Sequence, Any

def default_init(scale=1.0):
    """Default kernel initializer."""
    return nn.initializers.variance_scaling(scale, 'fan_avg', 'uniform')

class SimpleEncoder(nn.Module):
    """Simple stand-in encoder module."""
    output_dim: int = 5
    
    @nn.compact
    def __call__(self, x):
        x = nn.Dense(self.output_dim)(x)
        return x

class MLP(nn.Module):
    """Multi-layer perceptron.

    Attributes:
        hidden_dims: Hidden layer dimensions.
        activations: Activation function.
        activate_final: Whether to apply activation to the final layer.
        kernel_init: Kernel initializer.
        layer_norm: Whether to apply layer normalization.
    """
    hidden_dims: Sequence[int]
    activations: Any = nn.gelu
    activate_final: bool = False
    kernel_init: Any = default_init()
    layer_norm: bool = False

    @nn.compact
    def __call__(self, x):
        for i, size in enumerate(self.hidden_dims):
            x = nn.Dense(size, kernel_init=self.kernel_init)(x)
            if i + 1 < len(self.hidden_dims) or self.activate_final:
                x = self.activations(x)
                if self.layer_norm:
                    x = nn.LayerNorm()(x)
            if i == len(self.hidden_dims) - 2:
                self.sow('intermediates', 'feature', x)
        return x

class ActorVectorField(nn.Module):
    """Actor vector field network for flow matching.

    Attributes:
        hidden_dims: Hidden layer dimensions.
        action_dim: Action dimension.
        layer_norm: Whether to apply layer normalization.
        encoder: Optional encoder module to encode the inputs.
    """
    hidden_dims: Sequence[int]
    action_dim: int
    layer_norm: bool = False
    encoder: nn.Module = None

    def setup(self) -> None:
        self.mlp = MLP((*self.hidden_dims, self.action_dim), activate_final=False, layer_norm=self.layer_norm)

    @nn.compact
    def __call__(self, observations, actions, times=None, is_encoded=False):
        """Return the vectors at the given states, actions, and times (optional).

        Args:
            observations: Observations.
            actions: Actions.
            times: Times (optional).
            is_encoded: Whether the observations are already encoded.
        """
        if not is_encoded and self.encoder is not None:
            observations = self.encoder(observations)
        if times is None:
            inputs = jnp.concatenate([observations, actions], axis=-1)
        else:
            inputs = jnp.concatenate([observations, actions, times], axis=-1)
        v = self.mlp(inputs)
        return v

# Build ARGS for ActorVectorField
ARGS = {
    'hidden_dims': (8, 16),
    'action_dim': 3,
    'layer_norm': False,
    'encoder': SimpleEncoder(output_dim=5),
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
flax, jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ActorVectorField — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ActorVectorField 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
Ensemble Ran
ran on a synthesized input · constructed an object; no result was computed
MohammadrezaNakhaei/FQL/fql.py
pointer only (licence: NONE) · get_code("b3e1ba477f66ccd1")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, MohammadrezaNakhaei/FQL 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.

FQL Ran
ran on a synthesized input · constructed an object; no result was computed
MohammadrezaNakhaei/FQL/fql.py
pointer only (licence: NONE) · get_code("a158907f13122847")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, MohammadrezaNakhaei/FQL 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.

Mlp Ran
ran on a synthesized input · constructed an object; no result was computed
MohammadrezaNakhaei/FQL/fql.py
pointer only (licence: NONE) · get_code("a6b7c2c470100719")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, MohammadrezaNakhaei/FQL 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.

make_mlp Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
MohammadrezaNakhaei/FQL/fql.py
pointer only (licence: NONE) · get_code("b1f4b83743029d60")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, MohammadrezaNakhaei/FQL 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.

FQLAgent Not yet run
unverified (harvested, no recorded run)
seohongpark/fql/agents/fql.py
code served (permissive licence) · get_code("763dea73641187cf")
How it ran

no invocation recorded.

weight_init Not yet run
unverified (harvested, no recorded run)
MohammadrezaNakhaei/FQL/fql.py
pointer only (licence: NONE) · get_code("79f09007f6cc0351")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, MohammadrezaNakhaei/FQL 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. No invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 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.

FunctionAlso present inEarliest-datedOthers named
ActorVectorField
brick of this paper's assembly: model
3 other papers
3 later · 2 only as an assembly brick
2510.07650 (2025-10)
Value Flows
2602.18015 (2026-02)
Flow Actor-Critic for Offline Reinforcement Learning
2605.01663 (2026-05)
Towards Efficient and Expressive Offline RL via Flow-Anchored Noise-conditioned Q-Learning

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

We present flow Q-learning (FQL), a simple and performant offline reinforcement learning (RL) method that leverages an expressive flowmatching policy to model arbitrarily complex action distributions in data. Training a flow policy with RL is a tricky problem, due to the iterative nature of the action generation process. We address this challenge by training an expressive onestep policy with RL, rather than directly guiding an iterative flow policy to maximize values. This way, we can completely avoid unstable recursive backpropagation, eliminate costly iterative action generation at test time, yet still mostly maintain expressivity. We experimentally show that FQL leads to strong performance across 73 challenging state-and pixel-based OGBench and D4RL tasks in offline RL and offline-to-online RL.

For agents

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

get_harvested_code_for_paper("2502.02538")
get_code_for_paper("2502.02538")
have("2502.02538")

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

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

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

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

Connect an agent — have() is free.