SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2603.00454 · ICML · 2026

Rooted Absorbed Prefix Trajectory Balance with Submodular Replay for GFlowNet Training

Xi Wang, Wenbo Lu, Shengjie Wang

arXiv · PDF · Open in the Atlas

Code that ran

6 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 5 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/2603.00454.json · badge: /api/ran/2603.00454.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
ComDec/ChemGFN community
Papers with Code archive
6 ran · 2 no recorded run
FunctionStatusWhere it lives
_delta_cumsum Ran
ran, honoured the contract we drafted
ComDec/ChemGFN/chemgfn/models/losses.py
code served (permissive licence) · get_code("4aeffcaa0571f585")
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 Tensor, 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 torch

torch.manual_seed(0)

# Construct valid arguments for _delta_cumsum
# The function expects three tensors of shape [B, L] where:
# - B is batch size
# - L is sequence length
# log_pf: log forward probabilities
# log_r: log ratio
# log_pterm: log p-term

B = 2  # batch size
L = 4  # sequence length

log_pf = torch.randn(B, L)
log_r = torch.randn(B, L)
log_pterm = torch.randn(B, L)

ARGS = {
    "log_pf": log_pf,
    "log_r": log_r,
    "log_pterm": log_pterm,
}
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 Tensor, 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
_gather_by_index Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ComDec/ChemGFN/chemgfn/models/losses.py
code served (permissive licence) · get_code("821b75a611c331d7")
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 Tensor, ndim 1, dtype family float, shape (2,) 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

torch.manual_seed(0)

# Create a [B, L] tensor where B=2 (batch size), L=4 (sequence length)
x = torch.randn(2, 4)

# Create an index tensor of shape [B, 1] where each index selects a position in L
# The gather operation will select x[b, idx[b]] for each row b
idx = torch.tensor([[1], [3]])

ARGS = {
    "x": x,
    "idx": idx,
}
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 Tensor, ndim 1, dtype family float, shape (2,) — shape (2,) 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
_reconstruct_ref_logP Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ComDec/ChemGFN/chemgfn/models/losses.py
code served (permissive licence) · get_code("3f6af32ab237d03d")
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 Tensor, 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 torch

torch.manual_seed(0)

# Create small tensors with distinct dimensions
# ref_log_pf: shape [B, L - 1] = [2, 3]
# ref_log_pterm: shape [B, L] = [2, 4]
# where B=2 (batch size), L=4 (sequence length)

batch_size = 2
seq_len = 4

ref_log_pf = torch.randn(batch_size, seq_len - 1)
ref_log_pterm = torch.randn(batch_size, seq_len)

ARGS = {
    "ref_log_pf": ref_log_pf,
    "ref_log_pterm": ref_log_pterm,
}
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 Tensor, 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
_suffix_future_max Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ComDec/ChemGFN/chemgfn/models/losses.py
code served (permissive licence) · get_code("ee765fd680fe36d4")
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 Tensor, 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 torch

torch.manual_seed(0)

# Create small tensors for testing
# u: shape (batch=2, sequence_length=4) - the main input tensor
u = torch.randn(2, 4)

# valid: shape (batch=2, sequence_length=4) - boolean mask indicating valid positions
valid = torch.tensor([[True, True, False, True],
                      [True, False, True, True]], dtype=torch.bool)

ARGS = {
    "u": u,
    "valid": valid,
}
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 Tensor, 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
_suffix_future_soft Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ComDec/ChemGFN/chemgfn/models/losses.py
code served (permissive licence) · get_code("a82db6f5f7ba0436")
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 Tensor, 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 torch

torch.manual_seed(0)

# Construct small tensors for the function
# u: shape (batch_size, seq_len) - the values to compute soft maximum over
# valid: shape (batch_size, seq_len) - boolean mask indicating valid positions
batch_size = 2
seq_len = 4

u = torch.randn(batch_size, seq_len)
valid = torch.ones(batch_size, seq_len, dtype=torch.bool)

# Set some positions to invalid for realism
valid[0, -1] = False

beta = 2.0
rho = 0.5

ARGS = {
    "u": u,
    "valid": valid,
    "beta": beta,
    "rho": rho,
}
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 Tensor, 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
_sum_log_pf_upto_tau Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ComDec/ChemGFN/chemgfn/models/losses.py
code served (permissive licence) · get_code("4b84e390ddb447a9")
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 Tensor, ndim 1, dtype family float, shape (2,) 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

torch.manual_seed(0)

# log_pf: shape (batch_size, seq_len)
# The function uses log_pf[:, :-1] to get all but the last token step
# tau: shape (batch_size,) with integer indices
log_pf = torch.randn(2, 5)  # batch_size=2, seq_len=5
tau = torch.tensor([1, 3], dtype=torch.long)  # batch_size=2, values < seq_len

ARGS = {
    "log_pf": log_pf,
    "tau": tau,
}
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 Tensor, ndim 1, dtype family float, shape (2,) — shape (2,) 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
GFNLoss Not yet run
unverified (harvested, no recorded run)
ComDec/ChemGFN/chemgfn/models/losses.py
code served (permissive licence) · get_code("710a188fe5a63ef1")
How it ran

no invocation recorded.

RapTBLoss Not yet run
unverified (harvested, no recorded run)
ComDec/ChemGFN/chemgfn/models/losses.py
code served (permissive licence) · get_code("c6cde18be550b62d")
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, 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 8 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

Generative Flow Networks (GFlowNets) enable fine-tuning large language models to approximate reward-proportional posteriors, but they remain prone to mode collapse, manifesting as prefix collapse and length bias. We attribute this to two factors: (i) weak credit assignment to early prefixes, and (ii) biased replay that induces a shifted, non-representative training flow distribution. We propose Rooted absorbed prefix Trajectory Balance (RapTB), an objective that anchors subtrajectory supervision at the root and propagates terminal rewards to intermediate prefixes via absorbed suffix-based backups, providing dense prefix-level learning signals. To mitigate replayinduced distribution shift, we further introduce SubM, a submodular replay refresh strategy that promotes both high reward and diversity. Empirically, on tasks such as molecule generation with LLM using SMILES strings, RapTB combined with SubM consistently improves optimization performance and molecular diversity while preserving high validity. The code is released on https://github.com/ComDec/ChemGFN.

For agents

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

get_harvested_code_for_paper("2603.00454")
get_code_for_paper("2603.00454")
have("2603.00454")

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

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

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

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

Connect an agent — have() is free.