SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2404.18191 · ICLR · 2024

Published at ICLR 2024 Workshop on Reliable and Responsible Foundation Models EXPLORING THE ROBUSTNESS OF IN-CONTEXT LEARNING WITH NOISY LABELS

Zeming Wei, Yihao Zhang, Chen Cheng, Xinzhi Yu, Haodong Wen, Jingsong Sun, Guanzhang Yue

arXiv · PDF · Open in the Atlas

Code that ran

13 of 13 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, 0 violated it and 0 have no contract verdict; 12 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.18191.json · badge: /api/ran/2404.18191.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
InezYu0928/in-context-learning canonical (classifier label)
classifier basis: census
13 ran · 0 no recorded run
FunctionStatusWhere it lives
accuracy Ran
ran; our contract draft was wrong, not the code
InezYu0928/in-context-learning/src/tasks.py
pointer only (licence: MIT); the stored copy get_code serves, from sehyunkwon/task-diversity-icl, is pointer only (licence: NONE) · get_code("d7ae3e05768f422d")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from sehyunkwon/task-diversity-icl, and GitHub detected no licence in that repository 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.

basic_plot Ran
ran; our contract draft was wrong, not the code
InezYu0928/in-context-learning/src/plot_utils.py
code served (permissive licence) · get_code("e472ab225b88777b")
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, 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
import matplotlib.pyplot as plt
import seaborn as sns

# Build the metrics dict that the function expects
# The function accesses metrics[k] for each k in models
# It expects vs['mean'], vs['bootstrap_low'], vs['bootstrap_high']
# All should be array-like with len()

metrics = {
    'model_a': {
        'mean': np.array([0.8, 0.6, 0.4, 0.3, 0.2]),
        'bootstrap_low': np.array([0.75, 0.55, 0.35, 0.25, 0.15]),
        'bootstrap_high': np.array([0.85, 0.65, 0.45, 0.35, 0.25])
    },
    'model_b': {
        'mean': np.array([0.9, 0.7, 0.5, 0.4, 0.35]),
        'bootstrap_low': np.array([0.85, 0.65, 0.45, 0.35, 0.3]),
        'bootstrap_high': np.array([0.95, 0.75, 0.55, 0.45, 0.4])
    },
    'model_c': {
        'mean': np.array([0.7, 0.5, 0.35, 0.25, 0.18]),
        'bootstrap_low': np.array([0.65, 0.45, 0.3, 0.2, 0.13]),
        'bootstrap_high': np.array([0.75, 0.55, 0.4, 0.3, 0.23])
    }
}

ARGS = {
    'metrics': metrics,
    'models': ['model_a', 'model_b'],
    'trivial': 1.0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy, seaborn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple 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
build_model Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
InezYu0928/in-context-learning/src/models.py
code served (permissive licence) · get_code("d9639c68861b1f12")
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 TransformerModel. 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
from transformers import GPT2Model, GPT2Config

torch.manual_seed(0)

class Config:
    def __init__(self, family, n_dims, n_positions, n_embd, n_layer, n_head):
        self.family = family
        self.n_dims = n_dims
        self.n_positions = n_positions
        self.n_embd = n_embd
        self.n_layer = n_layer
        self.n_head = n_head

conf = Config(
    family='gpt2',
    n_dims=4,
    n_positions=3,
    n_embd=8,
    n_layer=2,
    n_head=2
)

ARGS = {
    'conf': conf
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type TransformerModel — a TransformerModel output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a TransformerModel 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
eval_batch Ran
ran; our contract draft was wrong, not the code
InezYu0928/in-context-learning/src/eval_outliers.py
code served (permissive licence) · get_code("7495cd7b25d435ba")
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 2, dtype family float, shape (2, 3) as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 torch.nn as nn

torch.manual_seed(0)

# Create a minimal model that satisfies the function's usage
class DummyModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.name = 'lstm_model'
        self.linear = nn.Linear(4, 4)
    
    def forward(self, xs, ys, inds=None):
        # xs shape: (batch_size, n_points, input_dim)
        # ys shape: (batch_size, n_points, output_dim)
        # Return predictions of same shape as ys
        batch_size, n_points, _ = xs.shape
        return torch.randn(batch_size, n_points, ys.shape[-1])

# Create a minimal task sampler
class DummyTask:
    def evaluate(self, xs):
        # xs shape: (batch_size, n_points, input_dim)
        batch_size, n_points, _ = xs.shape
        return torch.randn(batch_size, n_points, 3)
    
    def get_metric(self):
        def metric(pred, ys):
            # pred shape: (batch_size, n_points, output_dim)
            # ys shape: (batch_size, n_points, output_dim)
            # Return (batch_size, n_points) metrics
            return torch.randn(pred.shape[0], pred.shape[1])
        return metric

def dummy_task_sampler():
    return DummyTask()

# Create test data
model = DummyModel()
task_sampler = dummy_task_sampler
xs = torch.randn(2, 3, 4)  # batch_size=2, n_points=3, input_dim=4
xs_p = torch.randn(2, 3, 4)  # Same shape as xs for concatenation

ARGS = {
    'model': model,
    'task_sampler': task_sampler,
    'xs': xs,
    'xs_p': xs_p
}
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 2, dtype family float, shape (2, 3) — shape (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
gen_standard Ran
ran; our contract draft was wrong, not the code
InezYu0928/in-context-learning/src/eval_outliers.py
code served (permissive licence) · get_code("6ed430154a51ff69")
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.

import torch
import torch.nn as nn

torch.manual_seed(0)

class DataSampler:
    def sample_xs(self, n_points, b_size):
        # Returns a tensor of shape (n_points, b_size, feature_dim)
        # Using distinct sizes: n_points=5, b_size=2, feature_dim=4
        return torch.randn(n_points, b_size, 4)

data_sampler = DataSampler()
n_points = 5
b_size = 2

ARGS = {
    "data_sampler": data_sampler,
    "n_points": n_points,
    "b_size": b_size,
}
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 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
get_data_sampler Ran
ran; our contract draft was wrong, not the code
InezYu0928/in-context-learning/src/samplers.py
code served (permissive licence) · get_code("8e7880c7ece962b1")
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 GaussianSampler. 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

torch.manual_seed(0)

ARGS = {
    'data_name': 'gaussian',
    'n_dims': 4,
    'bias': torch.randn(4),
    'scale': torch.randn(4, 4),
}
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 GaussianSampler — a GaussianSampler output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a GaussianSampler 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_final_var Ran
ran, honoured the contract we drafted
InezYu0928/in-context-learning/src/curriculum.py
code served (permissive licence) · get_code("3c24ac252fef0868")
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 math

ARGS = {
    "init_var": 0.1,
    "total_steps": 1000,
    "inc": 0.01,
    "n_steps": 100,
    "lim": 0.5
}
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 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
get_inference_baselines Ran
ran; our contract draft was wrong, not the code
InezYu0928/in-context-learning/src/eval_inference.py
code served (permissive licence) · get_code("96ed70434d3db4e6")
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.

import torch
import torch.nn as nn
import numpy as np

torch.manual_seed(0)

# Define a small task class that has evaluate and get_metric methods
class SimpleTask:
    def __init__(self, noise_std=1):
        self.noise_std = noise_std
    
    def evaluate(self, xs):
        # Return predictions of same shape as xs
        return xs * 2 + torch.randn_like(xs) * self.noise_std
    
    def get_metric(self):
        # Return a callable that computes loss
        def mse_loss(pred, target):
            loss = torch.mean((pred - target) ** 2)
            return loss
        return mse_loss

# Define a task sampler that returns Task instances
class TaskSampler:
    def __call__(self, noise_std=1):
        return SimpleTask(noise_std=noise_std)

# Define a simple ICL model
class SimpleICLModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 4)
    
    def forward(self, xs, ys):
        # xs shape: (2, 4), ys shape: (2, 4)
        return self.linear(xs)

# Define simple baseline models
class SimpleBaseline(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 4)
    
    def forward(self, xs, ys):
        # xs shape: (2, 4), ys shape: (2, 4)
        return self.linear(xs)

# Create instances
task_sampler = TaskSampler()
xs = torch.randn(2, 4)
icl_model = SimpleICLModel()
baseline1 = SimpleBaseline()
baseline2 = SimpleBaseline()
baselines = [baseline1, baseline2]

ARGS = {
    "baselines": baselines,
    "task_sampler": task_sampler,
    "xs": xs,
    "ICLmodel": icl_model,
    "noise_std": 1
}
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 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
get_inference_noise_std Ran
ran; our contract draft was wrong, not the code
InezYu0928/in-context-learning/src/eval_inference.py
code served (permissive licence) · get_code("8b454b5ce3e43a76")
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.

import torch
import torch.nn as nn
import numpy as np

torch.manual_seed(0)

# Define a minimal task class that supports the required interface
class DummyTask:
    def __init__(self, noise_std):
        self.noise_std = noise_std
    
    def evaluate(self, xs):
        # Return a tensor with shape matching xs but with different dimension
        # xs shape: (2, 4), so ys shape: (2, 3)
        batch_size = xs.shape[0]
        return torch.randn(batch_size, 3)
    
    def get_metric(self):
        # Return a metric function that takes (pred, ys) and returns a scalar
        def metric_fn(pred, ys):
            # MSE loss
            loss = torch.mean((pred - ys) ** 2)
            return loss
        return metric_fn

# Define a task sampler that returns DummyTask instances
def task_sampler(noise_std):
    return DummyTask(noise_std=noise_std)

# Define a minimal model
class DummyModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4 + 3, 3)
    
    def forward(self, xs, ys):
        # xs: (2, 4), ys: (2, 3)
        # Concatenate and pass through linear layer
        combined = torch.cat([xs, ys], dim=1)
        return self.linear(combined)

# Create instances
xs = torch.randn(2, 4)
noise_levels = [0.1, 0.5]
model = DummyModel()

ARGS = {
    'noise_levels': noise_levels,
    'task_sampler': task_sampler,
    'xs': xs,
    'model': model
}
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 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
get_inference_scale Ran
ran; our contract draft was wrong, not the code
InezYu0928/in-context-learning/src/eval_inference.py
code served (permissive licence) · get_code("b5fee02df4732e80")
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.

import torch
import torch.nn as nn
import numpy as np

torch.manual_seed(0)

# Create a small model that takes xs and ys and returns predictions
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, xs, ys):
        # xs shape: (2, 4), ys shape: (2, 3)
        return self.linear(xs)

# Create a simple task sampler that returns task objects
class SimpleTask:
    def __init__(self, noise_std=1):
        self.noise_std = noise_std
        self.target_fn = lambda x: x.sum(dim=-1, keepdim=True).expand(-1, 3)
    
    def evaluate(self, xs):
        # Return predictions with shape matching what model outputs
        # xs shape: (2, 4) -> output shape: (2, 3)
        return self.target_fn(xs)
    
    def get_metric(self):
        # Return a metric function that takes (pred, ys) and returns a scalar tensor
        def mse_metric(pred, ys):
            # pred and ys are tensors, return scalar
            loss = torch.mean((pred - ys) ** 2)
            return loss
        return mse_metric

def task_sampler_fn(noise_std=1):
    return SimpleTask(noise_std=noise_std)

# Create input tensors
xs = torch.randn(2, 4)  # batch_size=2, feature_dim=4
x_scales = [0.5, 1.0, 2.0]  # list of scale factors

# Create model instance
model = SimpleModel()

ARGS = {
    'x_scales': x_scales,
    'task_sampler': task_sampler_fn,
    'xs': xs,
    'model': model,
    'noise_std': 1
}
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 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
mean_squared_error Ran
ran; our contract draft was wrong, not the code
InezYu0928/in-context-learning/src/tasks.py
code served (permissive licence) · get_code("fc94f27a0973e093")
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 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 torch.nn as nn

torch.manual_seed(0)

# The function mean_squared_error takes two parameters:
# - ys_pred: predicted values (tensor)
# - ys: ground truth values (tensor)
# Both should be tensors that support .square() and .mean() operations

ys_pred = torch.randn(2, 4)
ys = torch.randn(2, 4)

ARGS = {
    "ys_pred": ys_pred,
    "ys": ys,
}
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 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
sample_transformation Ran
ran; our contract draft was wrong, not the code
InezYu0928/in-context-learning/src/samplers.py
code served (permissive licence) · get_code("7f92ad21604fa243")
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 2, dtype family float, shape (4, 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 torch
import math

torch.manual_seed(0)

# The function uses eigenvalues as a tensor that:
# - has len() called on it (so needs to be 1D)
# - is used in torch.diag()
# - is raised to power 2 and summed
# - is multiplied by a scalar

eigenvalues = torch.tensor([1.0, 2.0, 3.0, 4.0])

normalize = False

ARGS = {
    "eigenvalues": eigenvalues,
    "normalize": normalize,
}
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 2, dtype family float, shape (4, 4) — shape (4, 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
squared_error Ran
ran; our contract draft was wrong, not the code
InezYu0928/in-context-learning/src/tasks.py
code served (permissive licence) · get_code("348d63a78eb4cb94")
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 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 torch
import torch.nn as nn

torch.manual_seed(0)

# Create small tensors for predicted and actual values
# batch_size=2, output_dim=4
ys_pred = torch.randn(2, 4)
ys = torch.randn(2, 4)

ARGS = {
    "ys_pred": ys_pred,
    "ys": ys,
}
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 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

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 8 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 8 later) and 5 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
get_final_var 8 other papers
4 dated earlier, 4 later
2306.04891 (2023-06)
In-Context Learning through the Bayesian Prism
2310.17086 (2023-10)
Transformers Learn to Achieve Second-Order Convergence Rates for In-Context Linear Regression
2402.03170 (2024-02)
Is Mamba Capable of In-Context Learning?
and 5 more not named here
mean_squared_error 5 other papers
2 dated earlier, 3 later
2310.17086 (2023-10)
Transformers Learn to Achieve Second-Order Convergence Rates for In-Context Linear Regression
2402.04248 (2024-02)
Can Mamba Learn How to Learn? A Comparative Study on In-Context Learning Tasks
2407.19346 (2024-07)
Polynomial Regression as a Task for Understanding In-context Learning Through Finetuning and Alignment
and 2 more not named here
squared_error 5 other papers
2 dated earlier, 3 later
2310.17086 (2023-10)
Transformers Learn to Achieve Second-Order Convergence Rates for In-Context Linear Regression
2402.04248 (2024-02)
Can Mamba Learn How to Learn? A Comparative Study on In-Context Learning Tasks
2407.19346 (2024-07)
Polynomial Regression as a Task for Understanding In-context Learning Through Finetuning and Alignment
and 2 more not named here
sample_transformation 3 other papers
2 dated earlier, 1 later
2402.03170 (2024-02)
Is Mamba Capable of In-Context Learning?
2402.04248 (2024-02)
Can Mamba Learn How to Learn? A Comparative Study on In-Context Learning Tasks
2509.07963 (2025-09)
Customizing the Inductive Biases of Softmax Attention using Structured Matrices
accuracy 2 other papers
1 dated earlier, 1 later
2310.17086 (2023-10)
Transformers Learn to Achieve Second-Order Convergence Rates for In-Context Linear Regression
2410.05448 (2024-10)
Task Diversity Shortens the ICL Plateau
basic_plot 1 other paper
1 later
2509.07963 (2025-09)
Customizing the Inductive Biases of Softmax Attention using Structured Matrices
build_model 1 other paper
1 later
2509.07963 (2025-09)
Customizing the Inductive Biases of Softmax Attention using Structured Matrices
get_data_sampler 1 other paper
1 later
2509.07963 (2025-09)
Customizing the Inductive Biases of Softmax Attention using Structured Matrices

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

Recently, the mysterious In-Context Learning (ICL) ability exhibited by Transformer architectures, especially in large language models (LLMs), has sparked significant research interest. However, the resilience of Transformers' in-context learning capabilities in the presence of noisy samples, prevalent in both training corpora and prompt demonstrations, remains underexplored. In this paper, inspired by prior research that studies ICL ability using simple function classes, we take a closer look at this problem by investigating the robustness of Transformers against noisy labels. Specifically, we first conduct a thorough evaluation and analysis of the robustness of Transformers against noisy labels during in-context learning and show that they exhibit notable resilience against diverse types of noise in demonstration labels. Furthermore, we delve deeper into this problem by exploring whether introducing noise into the training set, akin to a form of data augmentation, enhances such robustness during inference, and find that such noise can indeed improve the robustness of ICL. Overall, our fruitful analysis and findings provide a comprehensive understanding of the resilience of Transformer models against label noises during ICL and provide valuable insights into the research on Transformers in natural language processing. Our code is available at https://github.com/InezYu0928/in-context-learning.

For agents

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

get_harvested_code_for_paper("2404.18191")
get_code_for_paper("2404.18191")
have("2404.18191")

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

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

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

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

Connect an agent — have() is free.