SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2501.14314 · 2025

Graph Feedback Bandits on Similar Arms: With and Without Graph Structures

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 (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 0 failures of our instrument; 2 no recorded run), measured 2026-11-23; 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/2501.14314.json · badge: /api/ran/2501.14314.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
qh1874/GraphBandits_SimilarArms canonical (classifier label)
classifier basis not recorded on the link
5 ran · 2 no recorded run
FunctionStatusWhere it lives
generate_graph Ran
ran on a synthesized input
qh1874/GraphBandits_SimilarArms/aux_func.py
code served (permissive licence) · get_code("3876c6360df908fe")
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 networkx as nx

ARGS = {
    "K": 30
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx — 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
generate_graph1 Ran
ran on a synthesized input
qh1874/GraphBandits_SimilarArms/aux_func.py
code served (permissive licence) · get_code("ef8969931e08f861")
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 list. 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

np.random.seed(42)

ARGS = {
    "T": 100,
    "K": 5,
    "m": 10
}
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 list — a list 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
is_clique_adj Ran
ran on a synthesized input
qh1874/GraphBandits_SimilarArms/algo_new/Double_UCB.py
code served (permissive licence) · get_code("7e460762de478cb3")
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 bool, 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

ARGS = {
    "adj": np.array([[True, True, False, False],
                     [True, True, True, False],
                     [False, True, True, True],
                     [False, False, True, True]], dtype=np.bool_),
    "neigh": np.array([0, 1, 2], dtype=np.int32)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numba, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, 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
neighbor_to_adj_symmetric Ran
ran on a synthesized input
qh1874/GraphBandits_SimilarArms/aux_func.py
code served (permissive licence) · get_code("f3204de91b1da7ec")
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 (4, 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 numpy as np
from numba import jit
from numba.typed import List
import numba

@jit(nopython=True)
def deepcopy(A_list, n):
    B_list = List()
    for i in range(n):
        B_list.append(List.empty_list(numba.types.int32))
        m = len(A_list[i])
        for j in range(m):
            B_list[i].append(A_list[i][j])
    return B_list

@jit(nopython=True)
def neighbor_to_adj_symmetric(typed_neighbor, n):
    neighbor = deepcopy(typed_neighbor, len(typed_neighbor))
    arms_num = 0
    for _ in range(n):
        arms_num += 1
        neigh1 = neighbor[arms_num - 1]
        for arm in set(neigh1):
            if arms_num - 1 not in neighbor[arm]:
                neighbor[arm].append(arms_num - 1)
    adj = np.zeros((n, n), dtype=np.bool_)
    for i in range(n):
        nbrs = neighbor[i]
        for t in range(len(nbrs)):
            j = nbrs[t]
            adj[i, j] = True
            adj[j, i] = True
    for i in range(n):
        adj[i, i] = True
    return adj

# Build a typed neighbor list for numba
# This represents adjacency relationships where neighbor[i] contains indices of neighbors of node i
typed_neighbor_list = List()

# Create small example: 4 nodes with some neighbor relationships
# Node 0 neighbors: [1, 2]
neighbor_0 = List.empty_list(numba.types.int32)
neighbor_0.append(1)
neighbor_0.append(2)
typed_neighbor_list.append(neighbor_0)

# Node 1 neighbors: [0]
neighbor_1 = List.empty_list(numba.types.int32)
neighbor_1.append(0)
typed_neighbor_list.append(neighbor_1)

# Node 2 neighbors: [0, 3]
neighbor_2 = List.empty_list(numba.types.int32)
neighbor_2.append(0)
neighbor_2.append(3)
typed_neighbor_list.append(neighbor_2)

# Node 3 neighbors: [2]
neighbor_3 = List.empty_list(numba.types.int32)
neighbor_3.append(2)
typed_neighbor_list.append(neighbor_3)

n = 4

ARGS = {
    "typed_neighbor": typed_neighbor_list,
    "n": n
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numba, 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 (4, 4) — shape (4, 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
select_first_geq_zero Ran
ran on a synthesized input
qh1874/GraphBandits_SimilarArms/algo_new/Unkown_UCB_BL.py
code served (permissive licence) · get_code("5d3d1ea5fdbce537")
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 int, ndim 0, dtype family int, 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 torch
import numpy as np
from numba import jit

@jit(nopython=True)
def select_first_geq_zero(L):
    Len = len(L)
    for i in range(Len):
        if L[i] != 0:
            return i

# Construct valid arguments
# L should be a list or array-like that can be iterated in nopython mode
# The function looks for the first element that is not equal to 0
# We'll use a numpy array which works well with numba

L = np.array([0, 0, 5, 2, 0], dtype=np.float64)

ARGS = {
    "L": L
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numba, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, 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
run_many_trials Not yet run
unverified (harvested, no recorded run)
qh1874/GraphBandits_SimilarArms/UCB_D.py
code served (permissive licence) · get_code("c6de8ea8b1d1d224")
How it ran

no invocation recorded.

run_one_trial Not yet run
unverified (harvested, no recorded run)
qh1874/GraphBandits_SimilarArms/UCB_D.py
code served (permissive licence) · get_code("419d3cbb742e863e")
How it ran

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

In this paper, we study the stochastic multi-armed bandit problem with graph feedback. Motivated by applications in clinical trials and recommendation systems, we assume that two arms are connected if and only if they are similar (i.e., their means are close to each other). We establish a regret lower bound for this problem under the novel feedback structure and introduce two upper confidence bound (UCB)-based algorithms: Double-UCB, which has problem-independent regret upper bounds, and Conservative-UCB, which has problem-dependent upper bounds. Leveraging the similarity structure, we also explore a scenario where the number of arms increases over time (referred to as the \emph{ballooning setting}). Practical applications of this scenario include Q\&A platforms (e.g., Reddit, Stack Overflow, Quora) and product reviews on platforms like Amazon and Flipkart, where answers (or reviews) continuously appear, and the goal is to display the best ones at the top. We extend these two UCB-based algorithms to the ballooning setting. Under mild assumptions, we provide regret upper bounds for both algorithms and discuss their sub-linearity. Furthermore, we propose a new version of the corresponding algorithms that do not rely on prior knowledge of the graph's structural information and provide regret upper bounds. Finally, we conduct experiments to validate the theoretical results.

For agents

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

get_harvested_code_for_paper("2501.14314")
get_code_for_paper("2501.14314")
have("2501.14314")

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

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

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

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

Connect an agent — have() is free.