SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2609.01761 · September 2026

Pooling and Drift in Delayed Bandits

Melika Baghi

arXiv · PDF · Open in the Atlas

Code that ran

19 of 23 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; 2 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 16 failures of our instrument; 4 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/2609.01761.json · badge: /api/ran/2609.01761.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
melikabaghi/state-exp3 canonical (classifier label)
classifier basis: census
19 ran · 4 no recorded run
FunctionStatusWhere it lives
aggregate Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
melikabaghi/state-exp3/code/data_driven_grouping.py
code served (permissive licence) · get_code("5a0afb39de3d2007")
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 ndarray, ndim 2, dtype family float, shape (2, 3) 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

# Construct arguments for the aggregate function
# P: shape (batch_size, num_features) - probability or feature matrix
# groups: shape (num_features,) - group assignment for each feature

batch_size = 2
num_features = 4
num_groups = 3

# P is a 2D array with batch_size rows and num_features columns
P = np.random.rand(batch_size, num_features)

# groups is a 1D array with num_features elements, each in range [0, num_groups-1]
# This assigns each feature to a group
groups = np.array([0, 1, 1, 2])

ARGS = {
    "P": P,
    "groups": groups,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (2, 3) — shape (2, 3) 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
boot_mean Ran
ran; our contract draft was wrong, not the code
melikabaghi/state-exp3/code/analyze.py
code served (permissive licence) · get_code("ac4c9cbe5bc1f5f9")
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 ndarray, ndim 1, dtype family float, shape (10000,) 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
from numpy.random import Generator, PCG64

# Create a small numpy array for bootstrap resampling
d = np.array([1.5, 2.3, 3.1, 4.2, 5.0, 1.9])

# Create a numpy random generator
rng = Generator(PCG64(seed=42))

ARGS = {
    "d": d,
    "rng": rng,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (10000,) — shape (10000,) 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
clustered_environment Ran
ran; our contract draft was wrong, not the code
melikabaghi/state-exp3/code/data_driven_grouping.py
code served (permissive licence) · get_code("e81af978f19131af")
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 numpy as np

ARGS = {
    'K': 3,
    'S': 8,
    'T': 5,
    'heterogeneity': 0.1,
    'seed': 42,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
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
dirichlet_family Ran
ran; our contract draft was wrong, not the code
melikabaghi/state-exp3/code/baselines.py
code served (permissive licence) · get_code("f7840c3b52b2777b")
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 numpy as np

ARGS = {
    "seed": 42,
    "K": 40,
    "S": 8,
    "T": 10000,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
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
drift_family Ran
ran; our contract draft was wrong, not the code
melikabaghi/state-exp3/code/baselines.py
code served (permissive licence) · get_code("34b37e8ae251c566")
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 numpy as np

ARGS = {
    "seed": 42,
    "K": 40,
    "S": 17,
    "T": 8000,
    "q": 8,
    "d": 50,
    "eps": 0.1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
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
env Ran
ran; our contract draft was wrong, not the code
melikabaghi/state-exp3/code/state_exp3.py
code served (permissive licence) · get_code("6494f2779f96fe37")
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 numpy as np

# Create a random number generator
rng = np.random.RandomState(42)

# Define parameters based on the function signature
K = 3  # Number of distributions
S = 4  # Number of states
T = 5  # Number of time steps
V = 2  # Scaling factor for slope

ARGS = {
    'K': K,
    'S': S,
    'T': T,
    'V': V,
    'rng': rng
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
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
env Ran
ran; our contract draft was wrong, not the code
melikabaghi/state-exp3/code/certificate_gap.py
code served (permissive licence) · get_code("e2879cf139202834")
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 numpy as np

# Set random seed for reproducibility
np.random.seed(42)
rng = np.random.RandomState(42)

# Define parameters based on function signature
K = 3  # number of rows for P (transition matrix)
S = 4  # number of states
T = 5  # number of time steps
drift = 0.5  # scalar drift parameter

ARGS = {
    "K": K,
    "S": S,
    "T": T,
    "drift": drift,
    "rng": rng
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
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
ftrl_hybrid Ran
ran; our contract draft was wrong, not the code
melikabaghi/state-exp3/code/algo.py
code served (permissive licence) · get_code("30c5d1668663e8c2")
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 numpy as np

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

# Create a small loss vector L
# The function expects L to be a 1D numpy array of shape (K,)
# where K is the dimension of the simplex
K = 5
L = np.array([0.5, 1.2, 0.3, 0.8, 1.5])

# Optional parameters with reasonable defaults
alpha = 0.1
eta = 1.0
u0 = None  # Will be initialized inside the function
mu0 = None  # Will be initialized inside the function
outer = 60
inner = 40
tol = 1e-11

ARGS = {
    "L": L,
    "alpha": alpha,
    "eta": eta,
    "u0": u0,
    "mu0": mu0,
    "outer": outer,
    "inner": inner,
    "tol": tol,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
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
funnel_family Ran
ran; our contract draft was wrong, not the code
melikabaghi/state-exp3/code/baselines.py
code served (permissive licence) · get_code("ff7e231ea212f8f7")
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 numpy as np

ARGS = {
    "seed": 42,
    "K": 200,
    "S": 6,
    "T": 10000,
    "categories": 12,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
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
load Ran
ran; our contract draft was wrong, not the code
melikabaghi/state-exp3/code/analyze.py
code served (permissive licence) · get_code("e333a4dcfbdd91e0")
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, 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 json
from pathlib import Path
import tempfile

# Create a temporary JSON file with the expected structure
temp_dir = tempfile.TemporaryDirectory()
temp_path = Path(temp_dir.name) / "test_data.json"

# Create sample data matching the structure expected by the load function
sample_data = {
    "rows": [
        {"k": 1, "regime": "A", "Phi": 0.123456, "rho": 0.5, "algo": "algo1", "seed": 42, "regret": 0.1},
        {"k": 1, "regime": "A", "Phi": 0.123456, "rho": 0.5, "algo": "algo1", "seed": 43, "regret": 0.15},
        {"k": 1, "regime": "A", "Phi": 0.123456, "rho": 0.5, "algo": "algo2", "seed": 42, "regret": 0.2},
        {"k": 2, "regime": "B", "Phi": 0.654321, "rho": 0.7, "algo": "algo1", "seed": 42, "regret": 0.25},
    ]
}

# Write the sample data to the temporary file
with open(temp_path, 'w') as f:
    json.dump(sample_data, f)

ARGS = {
    "path": temp_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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
make_env Ran
ran; our contract draft was wrong, not the code
melikabaghi/state-exp3/code/algo.py
code served (permissive licence) · get_code("3b178984945a0cec")
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 numpy as np

# Define ARGS dict with all parameters for make_env
ARGS = {
    'K': 3,           # number of actions/states
    'S': 4,           # state dimension
    'd': 2,           # drift window/delay parameter
    'T': 8,           # time steps
    'drift': ('smooth', 0.15),  # drift type and magnitude
    'rng': np.random.default_rng(42),  # random number generator
    'seed_env': 0     # seed for environment
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
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
moments Ran
ran, honoured the contract we drafted
melikabaghi/state-exp3/code/state_exp3.py
code served (permissive licence) · get_code("173fab5aba513ef5")
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, 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)

# Define arguments for the moments function
ARGS = {
    "K": 3,          # Number of actions/categories
    "S": 4,          # Number of states
    "reps": 5,       # Number of repetitions
    "seed": 0        # Random seed
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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
oracle_groups Ran
ran, honoured the contract we drafted
melikabaghi/state-exp3/code/data_driven_grouping.py
code served (permissive licence) · get_code("6d52176583924a82")
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 ndarray, ndim 1, dtype family int, shape (8,) 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

def oracle_groups(S):
    return np.arange(S) // (S // 4)

# S is an integer representing the total number of groups/samples
# The function divides S into 4 equal parts and assigns group IDs
S = 8

ARGS = {
    'S': S
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family int, shape (8,) — shape (8,) 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
run Ran
ran on a synthesized input
melikabaghi/state-exp3/code/state_exp3.py
code served (permissive licence) · get_code("e944cf24c5624d74")
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 float64, ndim 0, 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

ARGS = {
    'K': 3,
    'S': 4,
    'T': 12,
    'd': 2,
    'V': 0.5,
    'seed': 42,
    'mode': 'state'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
run Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
melikabaghi/state-exp3/code/state_exp3_experiment.py
code served (permissive licence) · get_code("c1badc08994a8130")
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 float64, ndim 0, 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

np.random.seed(42)
rng = np.random.RandomState(42)

# Analyze function usage:
# P: shape (K, S), accessed as P[a], P[:, s_r]
# theta: shape (T, S), accessed as theta[t, s]
# c: shape (T, K), accessed as c[t, a], c[:, astar].sum()
# T: scalar, used in range(T) and arithmetic
# d: scalar, used in arithmetic
# m: scalar, used in modulo and arithmetic
# mode: string, compared to 'state'
# rng: has .choice(n, p=probs) and .binomial(n, p)

K = 4  # number of actions
S = 3  # number of states
T = 10  # time horizon
d = 2  # delay parameter
m = 2  # number of interleaved copies

# P: (K, S) - probability matrix from actions to states
P = np.random.dirichlet(np.ones(S), size=K)

# theta: (T, S) - reward probabilities
theta = np.random.rand(T, S)

# c: (T, K) - cost matrix
c = np.random.rand(T, K)

# mode: either 'state' or 'action'
mode = 'state'

ARGS = {
    'P': P,
    'theta': theta,
    'c': c,
    'T': T,
    'd': d,
    'm': m,
    'mode': mode,
    'rng': rng,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
run Ran
ran; our contract draft was wrong, not the code
melikabaghi/state-exp3/code/algo.py
code served (permissive licence) · get_code("162e56d3d7daa255")
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 numpy as np

class MockAlgorithm:
    def __init__(self):
        self.action_history = []
        self.update_history = []
    
    def act(self, t, rng, hint):
        action = rng.choice(3)
        self.action_history.append(action)
        return action
    
    def update(self, t, a, s, loss_feedback, hint):
        self.update_history.append((t, a, s, loss_feedback, hint))

T = 5
K = 3
A_max = 3

alg = MockAlgorithm()

P = np.array([
    [0.5, 0.3, 0.2],
    [0.2, 0.5, 0.3],
    [0.3, 0.2, 0.5]
])

th = np.random.RandomState(0).uniform(0, 1, size=(T, K))

c = np.array([
    [0.1, 0.2, 0.3],
    [0.2, 0.3, 0.4],
    [0.3, 0.4, 0.5],
    [0.4, 0.5, 0.6],
    [0.5, 0.6, 0.7]
])

hint = [None] * T

d = 2

rng = np.random.RandomState(42)

ARGS = {
    'alg': alg,
    'P': P,
    'th': th,
    'c': c,
    'hint': hint,
    'd': d,
    'rng': rng
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
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
run Ran
ran; our contract draft was wrong, not the code
melikabaghi/state-exp3/code/cancelling_denominator.py
code served (permissive licence) · get_code("121c1759b5ccb28c")
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, 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)

# Define parameters based on function signature and body analysis
T = 10  # number of time steps
S = 4   # number of states/actions
K = 3   # number of arms/actions
d = 2   # delay parameter

# P: shape (K, S) - probability matrix for each arm
P = np.random.dirichlet(np.ones(S), size=K)

# theta: shape (T, S) - threshold matrix over time
theta = np.random.uniform(0.3, 0.7, size=(T, S))

# c: shape (T, K) - cost matrix
c = np.random.uniform(0.1, 1.0, size=(T, K))

# denom: string parameter - either 'predict' or 'count'
denom = 'predict'

# seed: random seed
seed = 42

# Optional parameters with defaults
B = 8  # block size (should be even for half calculation)
alpha = 0.01
measure = True

ARGS = {
    'P': P,
    'theta': theta,
    'c': c,
    'd': d,
    'denom': denom,
    'seed': seed,
    'B': B,
    'alpha': alpha,
    'measure': measure,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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
test_lt Ran
ran; our contract draft was wrong, not the code
melikabaghi/state-exp3/code/analyze.py
code served (permissive licence) · get_code("25cfa72b95b45c70")
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, 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(42)
rng = np.random.default_rng(seed=42)

# Create a small difference array for testing
# The function expects a 1D numpy array of differences
diff = np.array([0.5, -0.3, 0.2, -0.1, 0.4, -0.2, 0.1, -0.4])

ARGS = {
    "diff": diff,
    "rng": rng,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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
trial Ran
ran; our contract draft was wrong, not the code
melikabaghi/state-exp3/code/state_exp3_experiment.py
code served (permissive licence) · get_code("4972baadcaa1b57a")
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 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

ARGS = {
    'K': 3,
    'S': 4,
    'T': 10,
    'd': 2,
    'V': 0.5,
    'seed': 42
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
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
env Not yet run
unverified (harvested, no recorded run)
melikabaghi/state-exp3/code/alpha_kappa.py
code served (permissive licence) · get_code("220f7315688458e8")
How it ran

no invocation recorded.

kappa_of Not yet run
unverified (harvested, no recorded run)
melikabaghi/state-exp3/code/certificate_gap.py
code served (permissive licence) · get_code("7ea6635641c3a376")
How it ran

no invocation recorded.

run Not yet run
unverified (harvested, no recorded run)
melikabaghi/state-exp3/code/alpha_kappa.py
code served (permissive licence) · get_code("7393773bdf3f1ca7")
How it ran

no invocation recorded.

run Not yet run
unverified (harvested, no recorded run)
melikabaghi/state-exp3/code/certificate_gap.py
code served (permissive licence) · get_code("9b99aaa42fafa00e")
How it ran

no invocation recorded.

Also present in other papers' code

Of 23 samples lifted from this paper's linked repositories, 23 carry a function identity and 0 do not. Of the 23 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 23 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

A system often has to act long before it learns whether the act worked: a recommender sees a click in seconds and a purchase in days. With $K$ actions and a delay of $d$ rounds, the best rate known for this setting is $\widetilde{O}(\sqrt{(K+d)T})$ over $T$ rounds, so a longer menu is always more expensive to learn from. It need not be: if the outcome depends on the action only through the state it produced, then one late outcome informs every action that could have produced the observed state, and the price is set by how many genuinely different states the actions produce rather than by how many actions there are. We measure this using an effective dimension $v_t$ between $1$ and the number of states, and prove $\widetilde{O}(\sqrt{(d+1)V\log K})$ for a rotating algorithm and $\widetilde{O}(\sqrt{V^{-}}+\sqrt{dT})$ for the single-copy algorithm used in practice, for any budget fixed in advance; merging similar states lowers the price further, at an explicit bias. Even when given the exact losses from $d$ rounds ago, no algorithm escapes $Ω(\sqrt{dE\min\{1+\log J,T/d\}})$, where $J$ counts the drifting directions and $E$ bounds how far losses move while the learner waits. On generated data, the state channel cuts regret by up to 79 percent against action-level weighting and, on the funnel family, by 32 to 68 percent against a tuned minimax-optimal method.

For agents

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

get_harvested_code_for_paper("2609.01761")
get_code_for_paper("2609.01761")
have("2609.01761")

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

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

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

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

Connect an agent — have() is free.