SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2112.03204 · 2021

Quantifying Adaptability in Pre-trained Language Models with 500 Tasks

arXiv · PDF · Open in the Atlas

Code that ran

7 of 8 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 6 have no contract verdict; 1 failure of our instrument; 1 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/2112.03204.json · badge: /api/ran/2112.03204.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
facebookresearch/task_bench canonical (classifier label)
classifier basis not recorded on the link
6 ran · 1 no recorded run
belindal/taskbench500 canonical (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
FunctionStatusWhere it lives
apply_mask_and_truncate Ran
ran on a synthesized input
facebookresearch/task_bench/run_models/dataloaders.py
code served (permissive licence) · get_code("1da6f7d7907dee83")
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 Tensor, ndim 3, dtype family float, shape (1, 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 torch

torch.manual_seed(0)

# Create a small tensor with shape (bsz=2, seqlen=4, feature_dim=3)
tensor = torch.randn(2, 4, 3)

# Create a boolean mask with shape (bsz=2)
# This will select which batch elements to keep
mask = torch.tensor([True, False])

# max_len is an integer for truncating sequence dimension
max_len = 2

ARGS = {
    "tensor": tensor,
    "mask": mask,
    "max_len": max_len,
}
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 Tensor, ndim 3, dtype family float, shape (1, 2, 3) — shape (1, 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
check_string_token_overlap Ran
ran on a synthesized input
facebookresearch/task_bench/run_models/utils.py
code served (permissive licence) · get_code("dc5ddb47622c34a8")
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.

# Setup code for check_string_token_overlap function

# The function takes:
# - pred: str (a prediction string)
# - all_valid_gens: list (list of sets/lists of valid tokens at each position)
# - all_possible_words: list (list of valid words/tokens)
# - max_tok_len: int (maximum token length)

# Construct valid arguments
pred = "hello world this is a test"

# all_valid_gens is a list where each element is a collection of valid tokens at that position
# The function iterates through it with len(all_valid_gens) as the target sequence length
all_valid_gens = [
    {"hello", "hi"},
    {"world", "earth"},
    {"this", "that"},
    {"is", "was"},
    {"a", "the"},
    {"test", "example"}
]

# all_possible_words should contain valid words and prefixes
# The function checks membership with "in all_possible_words"
all_possible_words = [
    "hello", "hi", "world", "earth", "this", "that", 
    "is", "was", "a", "the", "test", "example",
    "hello world", "hi world", "this is", "is a", "a test"
]

max_tok_len = 3

ARGS = {
    "pred": pred,
    "all_valid_gens": all_valid_gens,
    "all_possible_words": all_possible_words,
    "max_tok_len": max_tok_len
}
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 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
gen_all_possible_consecutive_merges Ran
ran on a synthesized input
facebookresearch/task_bench/run_models/utils.py
code served (permissive licence) · get_code("e5fe0f391fb415ea")
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 torch

# Define ARGS with valid arguments for gen_all_possible_consecutive_merges
ARGS = {
    "tokens": ["hello", "world", "foo", "bar"],
    "all_possible_words": {"hello world", "world foo", "foo bar", "hello", "world", "foo", "bar"}
}
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 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
gen_all_possible_splits_of_len Ran
ran on a synthesized input
facebookresearch/task_bench/run_models/utils.py
code served (permissive licence) · get_code("7c366cb1de2ef758")
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 2, 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.

# Analyze the function to understand what parameters are needed
# gen_all_possible_splits_of_len(string, length, all_possible_words, max_tok_len=3)

# The function expects:
# - string: a space-separated string
# - length: an integer for sequence length
# - all_possible_words: a set/dict of valid words and prefixes
# - max_tok_len: max token length (default 3)

# Let's trace through the logic:
# 1. string.split(' ') - needs a string with spaces
# 2. all_possible_words - checked with "in" operator, so needs to support membership testing
# 3. length - compared with len(tokens)
# 4. max_tok_len - used in multiplication

# Create minimal valid arguments
string = "hello world foo bar baz"
length = 2
all_possible_words = {
    "hello",
    "world", 
    "foo",
    "bar",
    "baz",
    "hello world",
    "world foo",
    "foo bar",
    "bar baz"
}
max_tok_len = 3

ARGS = {
    "string": string,
    "length": length,
    "all_possible_words": all_possible_words,
    "max_tok_len": max_tok_len
}
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 list, ndim 2, 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
load_functions Ran
ran; our contract draft was wrong, not the code
belindal/taskbench500/scripts/make_data.py
pointer only (licence: NONE) · get_code("34e3fe9c3d0e4578")
How it ran

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

parse_to_function_tree Ran
ran on a synthesized input
facebookresearch/task_bench/function/utils.py
code served (permissive licence) · get_code("d63596a943f3a5ab")
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 FunctionNode. 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

# Set random seed for reproducibility
torch.manual_seed(0)

# Looking at the function parse_to_function_tree, it takes a single parameter 's'
# which is a string that gets parsed to build a function tree.
# The function processes characters in the string to identify matching parentheses,
# brackets, and braces, building a tree structure.

# Let's create test cases for the string parameter:
# Simple case with nested parentheses and brackets
test_string_1 = "func(arg1,arg2)[idx]{key}"

# Case with just base function
test_string_2 = "simpleFunc"

# More complex nested case
test_string_3 = "f(a,b(c,d))[x,y]{z}"

# Case with multiple levels
test_string_4 = "func(x)[0]{a,b}"

# We'll use the first test case as our main test
ARGS = {
    "s": "func(arg1,arg2)[idx]{key}"
}
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 FunctionNode — a FunctionNode output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a FunctionNode 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
recursive_apply_str_func Ran
ran on a synthesized input
facebookresearch/task_bench/function/utils.py
code served (permissive licence) · get_code("d98044753dd449db")
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

def str_upper(s):
    """Simple string transformation function"""
    return s.upper()

# Test collection - a nested structure with strings, lists, dicts, and sets
test_collection = {
    "greeting": "hello",
    "names": ["alice", "bob", "charlie"],
    "nested": {
        "message": "world",
        "items": ["foo", "bar"]
    },
    "unique_words": {"test", "data", "python"},
    "flag": True
}

ARGS = {
    "collection": test_collection,
    "str_function": str_upper
}
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
make_sampler_from_function Not yet run
unverified (harvested, no recorded run)
facebookresearch/task_bench/function/utils.py
code served (permissive licence) · get_code("511ff40bb9164122")
How it ran

no invocation recorded.

Also present in other papers' code

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

When a neural language model (LM) is adapted to perform a new task, what aspects of the task predict the eventual performance of the model? In NLP, systematic features of LM generalization to individual examples are well characterized, but systematic aspects of LM adaptability to new tasks are not nearly as well understood. We present a large-scale empirical study of the features and limits of LM adaptability using a new benchmark, TaskBench500, built from 500 procedurally generated sequence modeling tasks. These tasks combine core aspects of language processing, including lexical semantics, sequence processing, memorization, logical reasoning, and world knowledge. Using TaskBench500, we evaluate three facets of adaptability, finding that: (1) adaptation procedures differ dramatically in their ability to memorize small datasets; (2) within a subset of task types, adaptation procedures exhibit compositional adaptability to complex tasks; and (3) failure to match training label distributions is explained by mismatches in the intrinsic difficulty of predicting individual labels. Our experiments show that adaptability to new tasks, like generalization to new examples, can be systematically described and understood, and we conclude with a discussion of additional aspects of adaptability that could be studied using the new benchmark.

For agents

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

get_harvested_code_for_paper("2112.03204")
get_code_for_paper("2112.03204")
have("2112.03204")

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

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

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

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

Connect an agent — have() is free.