SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2301.10140 · 2023

The Semantic Scholar Open Data Platform

arXiv · PDF · Open in the Atlas

Code that ran

9 of 9 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 9 have no contract verdict; 0 failures of our instrument; 0 no recorded run), measured 2026-11-22; 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/2301.10140.json · badge: /api/ran/2301.10140.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
allenai/s2aff canonical (classifier label)
classifier basis not recorded on the link
9 ran · 0 no recorded run
FunctionStatusWhere it lives
build_query_ngrams Ran
ran on a synthesized input
allenai/s2aff/s2aff/features.py
code served (permissive licence) · get_code("b6270ab42d807275")
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 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
from nltk.util import ngrams

def build_query_ngrams(q, max_ngram_len=7):
    q_split = q.split()
    n_grams = []
    longest_ngram = np.minimum(max_ngram_len, len(q_split))
    for i in range(int(longest_ngram), 0, -1):
        n_grams += [' '.join(ngram).replace('|', '\\|') for ngram in ngrams(q_split, i)]
    return n_grams

# Setup code to construct valid arguments
ARGS = {
    "q": "hello world test query",
    "max_ngram_len": 7
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
nltk, numpy — 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 float — 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
coerce_v2_to_v1like Ran
ran on a synthesized input
allenai/s2aff/s2aff/ror.py
code served (permissive licence) · get_code("a6dae4dd5461e7ab")
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 torch
import numpy as np

# Construct a minimal ROR v2 record dict that exercises all paths in coerce_v2_to_v1like
rec = {
    'names': [
        {
            'value': 'University of Example',
            'types': ['ror_display']
        },
        {
            'value': 'UoE',
            'types': ['acronym']
        },
        {
            'value': 'Example University',
            'types': ['alias']
        },
        {
            'value': 'University Example Label',
            'types': ['label']
        }
    ],
    'locations': [
        {
            'geonames_details': {
                'name': 'Boston',
                'country_subdivision_name': 'Massachusetts',
                'country_subdivision_code': 'MA',
                'country_code': 'US',
                'country_name': 'United States'
            }
        }
    ],
    'external_ids': [
        {
            'type': 'wikidata',
            'all': ['Q12345', 'Q12346'],
            'preferred': 'Q12345'
        },
        {
            'type': 'isni',
            'all': ['0000 0001 2345 6789'],
            'preferred': '0000 0001 2345 6789'
        }
    ],
    'links': [
        {
            'type': 'wikipedia',
            'value': 'https://en.wikipedia.org/wiki/University_of_Example'
        },
        {
            'type': 'website',
            'value': 'https://example.edu'
        }
    ],
    'relationships': [
        {
            'type': 'parent',
            'id': 'parent-id-123',
            'label': 'Parent Organization'
        },
        {
            'type': 'child',
            'id': 'child-id-456',
            'label': 'Child Organization'
        }
    ]
}

ARGS = {
    'rec': rec
}
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 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
format_group Ran
ran on a synthesized input
allenai/s2aff/s2aff/lightgbm_helpers.py
code served (permissive licence) · get_code("a3b94dceef736662")
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 (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
from itertools import groupby

def format_group(g):
    return np.array([len(list(group)) for _, group in groupby(g)])

# The function takes a single parameter 'g' which is an iterable
# It groups consecutive identical elements and returns the count of each group
# Test with a simple numpy array or list with repeated elements

g = np.array([1, 1, 1, 2, 2, 3, 3, 3, 3])

ARGS = {
    "g": g
}
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 (3,) — shape (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
get_stage1_pipeline Ran
ran on a synthesized input
allenai/s2aff/s2aff/flags.py
code served (permissive licence) · get_code("63b8d6ba9fb53208")
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 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 os
import warnings

# The function get_stage1_pipeline takes one optional parameter: default
# Looking at the function body:
# - It calls _normalize_pipeline(os.getenv('S2AFF_PIPELINE')) - this reads env var
# - It calls _rust_available() - this tries to import and call rust backend
# - It compares pipeline to strings 'python' and 'rust'
# - It compares default to None and to 'rust' and 'python'
# - It returns strings: 'python' or 'rust'

# The parameter 'default' can be:
# - None (the default)
# - 'python'
# - 'rust'
# - or any other string that makes sense as a default pipeline name

# We'll test with default=None which is the most basic case
ARGS = {
    'default': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
s2aff — 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
get_stage2_pipeline Ran
ran on a synthesized input
allenai/s2aff/s2aff/flags.py
code served (permissive licence) · get_code("a923f8dd990aa916")
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 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 os
import warnings
from typing import Optional

# The function get_stage2_pipeline has one parameter: default
# Looking at the function body:
# - default is Optional and can be None or a string like 'rust' or 'python'
# - It's used in comparisons: if default is None, if default == 'rust'
# - It's returned as-is

# We need to test the function with different values of default
# Let's use None as a simple test case since it's the most common usage

ARGS = {
    'default': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
s2aff — 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_geoname_id Ran
ran on a synthesized input
allenai/s2aff/s2aff/text.py
code served (permissive licence) · get_code("6bcc20d86535a8aa")
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 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 numpy as np

ARGS = {
    "value": "12345"
}
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 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
sum_list_of_list_of_tuples Ran
ran on a synthesized input
allenai/s2aff/s2aff/ror.py
code served (permissive licence) · get_code("ae988508ee1cc8ac")
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
from collections import defaultdict

torch_imported = False
try:
    import torch
    torch_imported = True
except:
    pass

# Construct the dicts argument
# The function expects an iterable of dictionaries that are iterable as (k, v) pairs
# This means each dict should be treated as an iterable of tuples
# We'll create a list of lists of tuples (which can be iterated as key-value pairs)

dicts = [
    [("a", 1.5), ("b", 2.3), ("c", 0.5)],
    [("a", 0.8), ("b", 1.2), ("d", 3.1)],
    [("b", 0.9), ("c", 1.1), ("e", 2.0)]
]

ARGS = {
    "dicts": dicts,
    "use_log": False
}
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 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
url_to_filename Ran
ran on a synthesized input
allenai/s2aff/s2aff/file_cache.py
code served (permissive licence) · get_code("2f31deaa2df92981")
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 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.

from hashlib import sha256

ARGS = {
    'url': 'https://example.com/path/to/model.bin',
    'etag': 'abc123def456'
}
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 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
v2_display_name Ran
ran on a synthesized input
allenai/s2aff/s2aff/ror.py
code served (permissive licence) · get_code("06fb62360ea56104")
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 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.

def v2_display_name(rec):
    """Extract display name from ROR v2 names array."""
    names = rec.get('names') or []
    for n in names:
        if not isinstance(n, dict):
            continue
        if 'ror_display' in (n.get('types') or []):
            value = n.get('value')
            if value:
                return value
    for n in names:
        if not isinstance(n, dict):
            continue
        value = n.get('value')
        if value:
            return value
    return None


# Test case 1: record with ror_display name
rec1 = {
    'names': [
        {
            'value': 'Display Name 1',
            'types': ['ror_display']
        },
        {
            'value': 'Alternative Name',
            'types': ['other']
        }
    ]
}

# Test case 2: record without ror_display, should return first name
rec2 = {
    'names': [
        {
            'value': 'First Name',
            'types': ['other']
        },
        {
            'value': 'Second Name',
            'types': ['alternative']
        }
    ]
}

# Test case 3: record with no names
rec3 = {
    'names': []
}

# Test case 4: record with None names
rec4 = {
    'names': None
}

# Test case 5: record with non-dict entries in names
rec5 = {
    'names': [
        'string_name',
        {
            'value': 'Valid Name',
            'types': ['ror_display']
        }
    ]
}

ARGS = {
    'rec': rec1
}
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 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

Also present in other papers' code

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

The volume of scientific output is creating an urgent need for automated tools to help scientists keep up with developments in their field. Semantic Scholar (S2) is an open data platform and website aimed at accelerating science by helping scholars discover and understand scientific literature. We combine public and proprietary data sources using state-of-the-art techniques for scholarly PDF content extraction and automatic knowledge graph construction to build the Semantic Scholar Academic Graph, the largest open scientific literature graph to-date, with 200M+ papers, 80M+ authors, 550M+ paper-authorship edges, and 2.4B+ citation edges. The graph includes advanced semantic features such as structurally parsed text, natural language summaries, and vector embeddings. In this paper, we describe the components of the S2 data processing pipeline and the associated APIs offered by the platform. We will update this living document to reflect changes as we add new data offerings and improve existing services.

For agents

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

get_harvested_code_for_paper("2301.10140")
get_code_for_paper("2301.10140")
have("2301.10140")

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

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

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

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

Connect an agent — have() is free.