SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2607.28077 · 2026

LEEPS: Latent-Guided Explore-Exploit Prompt Sampling for Efficient RLVR in Large Language Models

Shuang Liang, Yifan Gong, Xiting Wang, Haoyang Zhou, Guowei Wang

arXiv · PDF · Open in the Atlas

Code that ran

9 of 10 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, 5 violated it and 0 have no contract verdict; 3 failures of our instrument; 1 no recorded run), measured 2026-11-22; 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/2607.28077.json · badge: /api/ran/2607.28077.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
ShuangLiangX/LEEPS community
Papers with Code archive
9 ran · 1 no recorded run
FunctionStatusWhere it lives
_as_bool Ran
ran, violated the contract we drafted
ShuangLiangX/LEEPS/recipe/leeps/task_sampler.py
code served (permissive licence) · get_code("f894b12627feeb71")
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) 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 torch
import numpy as np

torch.manual_seed(0)

# Analyze the function: _as_bool takes a single parameter 'value'
# It checks if value is a string, and if so, strips and lowercases it
# Then checks if it's in a set of truthy string values
# Otherwise converts to bool

# Test cases for different input types
ARGS = {
    "value": "true"  # A string that should return True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — 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
_as_float Ran
ran, honoured the contract we drafted
ShuangLiangX/LEEPS/recipe/leeps/task_sampler.py
code served (permissive licence) · get_code("928b8813c0c6ff67")
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) and returned float, 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 torch
import numpy as np

torch.manual_seed(0)

# Test case 1: torch.Tensor with detach and cpu methods
tensor_value = torch.tensor(3.14, dtype=torch.float32)

# Test case 2: numpy generic type
numpy_value = np.float32(2.71)

# Test case 3: plain Python float
plain_float = 1.41

# We need to test the function with different input types
# The function takes a single parameter 'value'
# Let's create multiple test cases

ARGS = {
    "value": tensor_value
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, 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
_cfg_get Ran
ran; our contract draft was wrong, not the code
ShuangLiangX/LEEPS/recipe/leeps/task_sampler.py
code served (permissive licence) · get_code("57ae4bb54b785f88")
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) and returned str. 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 torch
import torch.nn as nn

torch.manual_seed(0)

# Test case 1: obj is None
obj_none = None

# Test case 2: obj is a dict
obj_dict = {
    'param1': 'value1',
    'param2': 42,
    'nested': {'key': 'nested_value'}
}

# Test case 3: obj is a class instance with attributes
class ConfigObject:
    def __init__(self):
        self.param1 = 'attr_value1'
        self.param2 = 100
        self.nested_attr = 'nested_attr_value'

obj_instance = ConfigObject()

# Test case 4: obj is an nn.Module
class SimpleModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.param1 = 'module_param'
        self.param2 = 999

obj_module = SimpleModule()

# Define ARGS with all parameter combinations
ARGS = {
    'obj': obj_dict,
    'name': 'param1',
    'default': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
_normalize_id Ran
ran; our contract draft was wrong, not the code
ShuangLiangX/LEEPS/recipe/leeps/task_sampler.py
code served (permissive licence) · get_code("4644280371daaab5")
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) and returned str. 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 torch
import numpy as np

torch.manual_seed(0)

# The function _normalize_id checks if the index has an 'as_py' method
# and calls it if present, then converts the result to string.
# We need to provide an index that either:
# 1. Has an 'as_py' method (like PyArrow scalars)
# 2. Is directly convertible to string

# Create a mock object with as_py method (simulating PyArrow scalar)
class MockPyArrowScalar:
    def as_py(self):
        return 42

# Test with the mock object
index = MockPyArrowScalar()

ARGS = {
    "index": index
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
_slice_value Ran
ran, violated the contract we drafted
ShuangLiangX/LEEPS/recipe/leeps/task_sampler.py
code served (permissive licence) · get_code("d3cf54397bde9ee3")
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) and returned Tensor, ndim 2, dtype family float, shape (3, 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
import torch

torch.manual_seed(0)

# Test case 1: torch.Tensor
value_tensor = torch.randn(5, 4)
positions_tensor = [0, 2, 4]

# Test case 2: numpy.ndarray
value_numpy = np.random.randn(5, 4)
positions_numpy = [1, 3]

# Test case 3: list
value_list = [10, 20, 30, 40, 50]
positions_list = [0, 2, 4]

# Test case 4: object with iloc (pandas-like)
class PandasLike:
    def __init__(self, data):
        self.data = data
    
    def iloc(self, indices):
        return [self.data[i] for i in indices]

value_pandas = PandasLike([100, 200, 300, 400, 500])
positions_pandas = [1, 3]

# Primary test: torch.Tensor with positions
ARGS = {
    "value": value_tensor,
    "positions": positions_tensor
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, 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 (3, 4) — shape (3, 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
_tasksampler_cfg Ran
ran; our contract draft was wrong, not the code
ShuangLiangX/LEEPS/recipe/leeps/task_sampler.py
code served (permissive licence) · get_code("9b03d151644f93ab")
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) 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 torch
import torch.nn as nn

torch.manual_seed(0)

# The function _tasksampler_cfg takes 'args' and calls _cfg_get(args, 'tasksampler', {})
# _cfg_get checks if obj is None, if it's a dict (calls .get()), or uses getattr()
# So 'args' can be: None, a dict, or an object with a 'tasksampler' attribute

# Test case 1: args is a dict with 'tasksampler' key
class ConfigWithTasksampler:
    def __init__(self):
        self.tasksampler = {'batch_size': 32, 'num_workers': 4}

# Test case 2: args is a dict
args_dict = {
    'tasksampler': {'batch_size': 16, 'num_tasks': 10}
}

# Test case 3: args is an object with tasksampler attribute
args_obj = ConfigWithTasksampler()

# Test case 4: args is None (should return default {})
args_none = None

# For the function execution, we'll use the dict case as it's most straightforward
ARGS = {
    'args': {
        'tasksampler': {'batch_size': 32, 'num_workers': 4, 'num_tasks': 100}
    }
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — 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
_to_embedding_matrix Ran
ran, violated the contract we drafted
ShuangLiangX/LEEPS/recipe/leeps/task_sampler.py
code served (permissive licence) · get_code("ccd102431be91db5")
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) and returned ndarray, 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 numpy as np

# Create a 2D embedding matrix with shape (2, 4)
# This represents 2 embeddings of dimension 4
embeddings = np.array([
    [1.0, 2.0, 3.0, 4.0],
    [5.0, 6.0, 7.0, 8.0]
], dtype=np.float32)

ARGS = {
    'embeddings': embeddings
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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, 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
_to_numpy_indices Ran
ran, violated the contract we drafted
ShuangLiangX/LEEPS/recipe/leeps/task_sampler.py
code served (permissive licence) · get_code("f20078df7a8b992b")
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) and returned ndarray, ndim 1, dtype family int, shape (5,) 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

# The function _to_numpy_indices takes indices and converts them to a numpy array with dtype int64
# We need to provide a valid argument for the 'indices' parameter

# Test with a simple list of integers
indices = [0, 1, 2, 3, 4]

ARGS = {
    "indices": indices
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 (5,) — shape (5,) 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
l2_normalize Ran
ran, violated the contract we drafted
ShuangLiangX/LEEPS/recipe/leeps/task_sampler.py
code served (permissive licence) · get_code("4bb9a4bd0cf9085d")
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) and returned ndarray, 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 numpy as np

# Create a small numpy array with shape (2, 4) - batch size 2, dimension 4
values = np.array([
    [1.0, 2.0, 3.0, 4.0],
    [5.0, 6.0, 7.0, 8.0]
], dtype=np.float64)

ARGS = {
    "values": values
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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, 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
KNNExploreExploitSampler Not yet run
unverified (harvested, no recorded run)
ShuangLiangX/LEEPS/recipe/leeps/task_sampler.py
code served (permissive licence) · get_code("4537898ad5f25bd4")
How it ran

no invocation recorded.

Also present in other papers' code

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

Reinforcement learning with verifiable rewards (RLVR) improves the reasoning capabilities of large language models, but prompt groups with identical rollout rewards consume generation budget without effective learning signals. Pre-rollout prompt selection can reduce this waste by screening prompts before rollout generation. However, existing pre-rollout methods struggle to balance exploitation and exploration: repeatedly exploiting historically informative prompts can narrow training coverage, whereas broader exploration can lower the fraction of informative prompts. To address these limitations, we introduce LEEPS, a Latent-Guided Explore-Exploit Prompt Sampler that adaptively balances the reuse of previously observed informative prompts with continued exploration of uncertain ones. LEEPS partitions candidates into exploit and explore portfolios and adaptively allocates rollout budget according to their recent non-trivial ratios. It further uses representation-space neighbors and historical rollout outcomes to prioritize uncertain prompts likely to yield non-zero reward variance, thereby making exploration more targeted without additional rollouts. Across six mathematical reasoning benchmarks, LEEPS achieves the highest average score at both model scales, with relative gains of 2.6% and 3.7% over the strongest baseline for Qwen2.5-Math-1.5B and 7B, respectively, and generally improves faster during the training process. It also achieves the highest average score across the three evaluated OOD general-reasoning benchmarks at both model scales and adds only about 2 seconds of online sampling overhead per training step. Code is available at https://github.com/ShuangLiangX/LEEPS.

For agents

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

get_harvested_code_for_paper("2607.28077")
get_code_for_paper("2607.28077")
have("2607.28077")

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

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

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

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

Connect an agent — have() is free.