SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.20274 · NeurIPS · 2024

Library Learning Doesn't: The Curious Case of the Single-Use "Library"

Frank Rudzicz, Xujie Si, Ian Berlot-Attwell

arXiv · PDF · Open in the Atlas

Code that ran

6 of 6 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, 1 violated it and 0 have no contract verdict; 3 failures of our instrument; 0 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/2410.20274.json · badge: /api/ran/2410.20274.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
wiio12/LEGO-Prover canonical (classifier label)
classifier basis: census
4 ran · 0 no recorded run
ikb-a/curious-case canonical (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
FunctionStatusWhere it lives
count Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ikb-a/curious-case/trove/ablation_experiment_results/other_runs/base_count_ablat1_run1/tmp_exec_math-counting2024-09-20T12:41:14,939404299-04:00.py
pointer only (licence: NONE) · get_code("be0c7b5ae497c20e")
How it ran

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

digits Ran
ran, honoured the contract we drafted
ikb-a/curious-case/trove/ablation_experiment_results/other_runs/base_count_ablat1_run1/tmp_exec_math-counting2024-09-20T12:41:14,939404299-04:00.py
pointer only (licence: NONE) · get_code("e6a36cb0d847d177")
How it ran

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

is_sequence Ran
ran, violated the contract we drafted
wiio12/LEGO-Prover/lego_prover/utils/file_utils.py
code served (permissive licence) · get_code("377feaa4a69f18d2")
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 collections

# The function is_sequence checks if an object is a collections.abc.Sequence
# and is not a string. We need to provide a value for the 'obj' parameter.

# Test with various objects to demonstrate the function works
test_list = [1, 2, 3, 4]
test_tuple = (5, 6, 7)
test_string = "hello"
test_dict = {1: 2}
test_custom_sequence = collections.namedtuple('CustomSeq', ['a', 'b'])(1, 2)

# The function only has one parameter: obj
ARGS = {
    "obj": [1, 2, 3]  # A list is a collections.Sequence and not a string
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — 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
pack_varargs Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
wiio12/LEGO-Prover/lego_prover/utils/file_utils.py
code served (permissive licence) · get_code("4926aacb60add226")
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, ndim 1, dtype family int; 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 collections

torch_available = False
try:
    import torch
    torch.manual_seed(0)
    torch_available = True
except ImportError:
    pass

def is_sequence(obj):
    """
    Returns:
      True if the sequence is a collections.Sequence and not a string.
    """
    return isinstance(obj, collections.abc.Sequence) and (not isinstance(obj, str))

def pack_varargs(args):
    """
    Pack *args or a single list arg as list

    def f(*args):
        arg_list = pack_varargs(args)
        # arg_list is now packed as a list
    """
    assert isinstance(args, tuple), 'please input the tuple `args` as in *args'
    if len(args) == 1 and is_sequence(args[0]):
        return args[0]
    else:
        return args


# Test case 1: single list argument
test_list = [1, 2, 3, 4, 5]
args_1 = (test_list,)

# Test case 2: multiple scalar arguments
args_2 = (1, 2, 3)

# Test case 3: single tuple argument (which is a Sequence)
args_3 = ([10, 20, 30],)

# Test case 4: empty tuple
args_4 = ()

# Test case 5: string (should not be treated as sequence)
args_5 = ("hello",)

# Test case 6: single string with other args
args_6 = ("string", 42)

ARGS = {
    "args": args_1
}
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 list, ndim 1, dtype family int — a list 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
similar Ran
ran, honoured the contract we drafted
wiio12/LEGO-Prover/lego_prover/agents/skill.py
code served (permissive licence) · get_code("2858c9de61ad0a2c")
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 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
from difflib import SequenceMatcher

torch.manual_seed(0)

# The function takes two parameters: a and b
# It uses them with SequenceMatcher(None, a, b).ratio()
# SequenceMatcher works with any sequences (strings, lists, etc.)
# The ratio() method compares them and returns a similarity score

# We'll use simple strings as they're the most common use case
a = "hello world"
b = "hello word"

ARGS = {
    "a": a,
    "b": b
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
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
utf_open Ran
ran; our contract draft was wrong, not the code
wiio12/LEGO-Prover/lego_prover/utils/file_utils.py
code served (permissive licence) · get_code("edd852217838fe9c")
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 StreamReaderWriter. 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 codecs
import tempfile
import os

# Create a temporary file for testing
temp_dir = tempfile.gettempdir()
temp_file = os.path.join(temp_dir, "test_utf8.txt")

# Write some test content to the file
with open(temp_file, 'w', encoding='utf-8') as f:
    f.write("Hello, World! 你好世界")

# Define arguments for utf_open function
ARGS = {
    "fname": temp_file,
    "mode": "r"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type StreamReaderWriter — a StreamReaderWriter 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

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 3 later) and 2 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
similar 6 other papers
6 dated earlier
2301.11305 (2023-01)
DetectGPT: Zero-Shot Machine-Generated Text Detection using Probability Curvature
2305.00909 (2023-05)
Outline, Then Details: Syntactically Guided Coarse-To-Fine Code Generation
2310.05914 (2023-10)
NEFTune: Noisy Embeddings Improve Instruction Finetuning
and 3 more not named here
is_sequence 2 other papers
1 dated earlier, 1 later
2305.16291 (2023-05)
VOYAGER: An Open-Ended Embodied Agent with Large Language Models
2503.03505 (2025-03)
Parallelized Planning-Acting for Efficient LLM-based Multi-Agent Systems in Minecraft
pack_varargs 2 other papers
1 dated earlier, 1 later
2305.16291 (2023-05)
VOYAGER: An Open-Ended Embodied Agent with Large Language Models
2503.03505 (2025-03)
Parallelized Planning-Acting for Efficient LLM-based Multi-Agent Systems in Minecraft
utf_open 2 other papers
1 dated earlier, 1 later
2305.16291 (2023-05)
VOYAGER: An Open-Ended Embodied Agent with Large Language Models
2503.03505 (2025-03)
Parallelized Planning-Acting for Efficient LLM-based Multi-Agent Systems in Minecraft

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

Advances in Large Language Models (LLMs) have spurred a wave of LLM library learning systems for mathematical reasoning. These systems aim to learn a reusable library of tools, such as formal Isabelle lemmas [Paulson, 1994] or Python programs that are tailored to a family of tasks. Many of these systems are inspired by the human structuring of knowledge into reusable and extendable concepts [Ellis et al., 2021], but do current methods actually learn reusable libraries of tools? We study two library learning systems for mathematics which both reported increased accuracy: LEGO-Prover [Wang et al., 2024a] and TroVE [Wang et al., 2024b]. We find that function reuse is extremely infrequent on miniF2F [Zheng et al., 2022] and MATH [Hendrycks et al., 2021]. Our followup ablation experiments suggest that, rather than reuse, self-correction and self-consistency are the primary drivers of the observed performance gains. Our code and data are available at https://github.com/ikb-a/curious-case. Preprint. Under review.

For agents

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

get_harvested_code_for_paper("2410.20274")
get_code_for_paper("2410.20274")
have("2410.20274")

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

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

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

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

Connect an agent — have() is free.