SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2404.02060 · 2024

Long-context LLMs Struggle with Long In-context Learning

arXiv · PDF · Open in the Atlas

Code that ran

7 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, 1 violated it and 0 have no contract verdict; 6 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/2404.02060.json · badge: /api/ran/2404.02060.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
tiger-ai-lab/longiclbench canonical (classifier label)
classifier basis: census
7 ran · 0 no recorded run
FunctionStatusWhere it lives
format_discovery_prompt Ran
ran; our contract draft was wrong, not the code
tiger-ai-lab/longiclbench/banking77_infer.py
code served (permissive licence) · get_code("a341d8663c967193")
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 torch
import numpy as np

# Create sample data dictionaries with text and label indices
data_dict_list = [
    {
        'text': 'I cannot activate my card, what should I do?',
        'label': 0  # 'activate_my_card'
    },
    {
        'text': 'What is the age limit for this service?',
        'label': 1  # 'age_limit'
    },
    {
        'text': 'Do you support Apple Pay or Google Pay?',
        'label': 2  # 'apple_pay_or_google_pay'
    },
    {
        'text': 'Is ATM support available in my country?',
        'label': 3  # 'atm_support'
    },
    {
        'text': 'How can I set up automatic top up?',
        'label': 4  # 'automatic_top_up'
    },
]

ARGS = {
    'data_dict_list': data_dict_list,
    'round': 0,
    'with_instruction': False,
    'context_token_number': '2k'
}
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 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
format_discovery_prompt Ran
ran; our contract draft was wrong, not the code
tiger-ai-lab/longiclbench/discovery_infer.py
code served (permissive licence) · get_code("7e77e9f4b0d18e87")
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 torch
import numpy as np

ARGS = {
    'data_dict_list': [
        {
            'sentence1': 'The weather was beautiful yesterday',
            'sentence2': 'we decided to go for a walk in the park',
            'label': 15  # 'and'
        },
        {
            'sentence1': 'She studied hard for the exam',
            'sentence2': 'she passed with flying colors',
            'label': 39  # 'consequently'
        },
        {
            'sentence1': 'He wanted to go to the beach',
            'sentence2': 'it started raining heavily',
            'label': 24  # 'but'
        },
        {
            'sentence1': 'The first approach did not work',
            'sentence2': 'we tried a different strategy',
            'label': 56  # 'instead,'
        },
        {
            'sentence1': 'John is a software engineer',
            'sentence2': 'he works for a tech company',
            'label': 15  # 'and'
        },
        {
            'sentence1': 'The company faced financial difficulties',
            'sentence2': 'they had to lay off employees',
            'label': 39  # 'consequently'
        },
    ],
    'round': 0,
    'with_instruction': False,
    'context_token_number': '2k'
}
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 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
format_long_prompt Ran
ran; our contract draft was wrong, not the code
tiger-ai-lab/longiclbench/dialoguere_infer.py
code served (permissive licence) · get_code("9f398117ae453e86")
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 json
import tempfile
import os

# Create a temporary JSON file with sample training data
temp_dir = tempfile.gettempdir()
train_file = os.path.join(temp_dir, "train_data_temp.json")

# Sample training data matching the expected format
train_data = [
    {
        "dialogue": "Alice met Bob yesterday at the coffee shop. Bob is Alice's boyfriend.",
        "relation": "per:girl/boyfriend",
        "subject_entity": "Alice",
        "object_entity": "Bob"
    },
    {
        "dialogue": "Alice met Bob yesterday at the coffee shop. Bob is Alice's boyfriend.",
        "relation": "per:place_of_residence",
        "subject_entity": "Alice",
        "object_entity": "coffee shop"
    },
    {
        "dialogue": "Charlie works at TechCorp. Charlie is the CEO.",
        "relation": "per:employee_or_member_of",
        "subject_entity": "Charlie",
        "object_entity": "TechCorp"
    },
    {
        "dialogue": "Charlie works at TechCorp. Charlie is the CEO.",
        "relation": "per:title",
        "subject_entity": "Charlie",
        "object_entity": "CEO"
    },
    {
        "dialogue": "Diana is John's sister and they both study at Harvard University.",
        "relation": "per:siblings",
        "subject_entity": "Diana",
        "object_entity": "John"
    },
    {
        "dialogue": "Diana is John's sister and they both study at Harvard University.",
        "relation": "per:schools_attended",
        "subject_entity": "Diana",
        "object_entity": "Harvard University"
    },
]

# Write training data to temporary file
with open(train_file, 'w', encoding='utf8') as f:
    json.dump(train_data, f)

ARGS = {
    'train_json_file': train_file,
    'with_instruction': True,
    'context_round': '2'
}
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
intersection Ran
ran, violated the contract we drafted
tiger-ai-lab/longiclbench/data_preprocess.py
code served (permissive licence) · get_code("cf83a84f693a8da2")
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 torch

torch.manual_seed(0)

# Define arguments for the intersection function
lst1 = [1, 2, 3, 4, 5]
lst2 = [3, 4, 5, 6, 7]

ARGS = {
    "lst1": lst1,
    "lst2": lst2,
}
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
merge_data Ran
ran; our contract draft was wrong, not the code
tiger-ai-lab/longiclbench/dialoguere_infer.py
code served (permissive licence) · get_code("f9d4bb72caad3f36")
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

torch.manual_seed(0)

# Construct sample data for merge_data function
data = [
    {
        'dialogue': 'What is the capital of France?',
        'relation': 'capital_of',
        'subject_entity': 'Paris',
        'object_entity': 'France'
    },
    {
        'dialogue': 'What is the capital of France?',
        'relation': 'located_in',
        'subject_entity': 'Paris',
        'object_entity': 'Europe'
    },
    {
        'dialogue': 'Who is the president of the USA?',
        'relation': 'president_of',
        'subject_entity': 'Joe Biden',
        'object_entity': 'USA'
    }
]

ARGS = {
    'data': data
}
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
select_data Ran
ran; our contract draft was wrong, not the code
tiger-ai-lab/longiclbench/banking77_infer.py
code served (permissive licence) · get_code("ce0d2cbbfe713bbb")
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
import numpy as np

# Construct a valid dataset for select_data
# The function expects an iterable of dicts with 'label' keys
given_dataset = [
    {'label': 0, 'text': 'sample_0_a'},
    {'label': 0, 'text': 'sample_0_b'},
    {'label': 0, 'text': 'sample_0_c'},
    {'label': 1, 'text': 'sample_1_a'},
    {'label': 1, 'text': 'sample_1_b'},
    {'label': 2, 'text': 'sample_2_a'},
]

number_of_turns = 2

ARGS = {
    'given_dataset': given_dataset,
    'number_of_turns': number_of_turns,
}
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 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
select_test Ran
ran; our contract draft was wrong, not the code
tiger-ai-lab/longiclbench/tacred_infer.py
code served (permissive licence) · get_code("351fab33fab435dc")
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

torch.manual_seed(0)

selected_labels = ['org:founded_by', 'per:employee_of', 'org:alternate_names', 'per:cities_of_residence', 'per:children', 'per:title', 'per:siblings', 'per:religion', 'per:age', 'org:website', 'per:stateorprovinces_of_residence', 'org:member_of', 'org:top_members/employees', 'per:countries_of_residence', 'org:city_of_headquarters', 'org:members', 'org:country_of_headquarters', 'per:spouse', 'org:stateorprovince_of_headquarters', 'org:number_of_employees/members', 'org:parents', 'org:subsidiaries', 'per:origin', 'org:political/religious_affiliation', 'per:other_family', 'per:stateorprovince_of_birth', 'org:dissolved', 'per:date_of_death', 'org:shareholders', 'per:alternate_names', 'per:parents', 'per:schools_attended', 'per:cause_of_death', 'per:city_of_death', 'per:stateorprovince_of_death', 'org:founded', 'per:country_of_birth', 'per:date_of_birth', 'per:city_of_birth', 'per:charges', 'per:country_of_death']

given_dataset = [
    {'relation': 'org:founded_by', 'text': 'Company A was founded by John'},
    {'relation': 'org:founded_by', 'text': 'Company B was founded by Jane'},
    {'relation': 'per:employee_of', 'text': 'John works at Company A'},
    {'relation': 'per:employee_of', 'text': 'Jane works at Company B'},
    {'relation': 'org:alternate_names', 'text': 'Company A also known as CA'},
    {'relation': 'per:spouse', 'text': 'John is married to Mary'},
    {'relation': 'per:spouse', 'text': 'Jane is married to Bob'},
    {'relation': 'org:city_of_headquarters', 'text': 'Company A is in New York'},
    {'relation': 'per:title', 'text': 'John is CEO'},
    {'relation': 'org:founded', 'text': 'Company A was founded in 2000'},
]

number_of_turns = 2

ARGS = {
    'given_dataset': given_dataset,
    'number_of_turns': number_of_turns,
}
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

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, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 1 later) and 6 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
intersection 5 other papers
1 dated earlier, 4 later
2008.10707 (2020-08)
Patching as Translation: the Data and the Metaphor
2406.02049 (2024-06)
Causal Effect Identification in LiNGAM Models with Latent Confounders
2406.08666 (2024-06)
Interventional Causal Discovery in a Mixture of DAGs
and 2 more not named here

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

Large Language Models (LLMs) have made significant strides in handling long sequences. Some models like Gemini could even to be capable of dealing with millions of tokens. However, their performance evaluation has largely been confined to metrics like perplexity and synthetic tasks, which may not fully capture their true abilities in more challenging, real-world scenarios. We introduce a benchmark (LongICLBench) for long in-context learning in extreme-label classification using six datasets with 28 to 174 classes and input lengths from 2K to 50K tokens. Our benchmark requires LLMs to comprehend the entire input to recognize the massive label spaces to make correct predictions. We evaluate on 15 long-context LLMs and find that they perform well on less challenging classification tasks with smaller label space and shorter demonstrations. However, they struggle with more challenging task like Discovery with 174 labels, suggesting a gap in their ability to process long, context-rich sequences. Further analysis reveals a bias towards labels presented later in the sequence and a need for improved reasoning over multiple pieces of information. Our study reveals that long context understanding and reasoning is still a challenging task for the existing LLMs. We believe LongICLBench could serve as a more realistic evaluation for the future long-context LLMs.

For agents

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

get_harvested_code_for_paper("2404.02060")
get_code_for_paper("2404.02060")
have("2404.02060")

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

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

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

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

Connect an agent — have() is free.