SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.01565 · 2024

Bayes' Power for Explaining In-Context Learning Generalizations

arXiv · PDF · Open in the Atlas

Code that ran

10 of 11 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; 9 failures of our instrument; 1 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/2410.01565.json · badge: /api/ran/2410.01565.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
samuelgabriel/bayesgeneralizations canonical (classifier label)
classifier basis: census
10 ran · 1 no recorded run
FunctionStatusWhere it lives
get_NormalInitializer Ran
ran; our contract draft was wrong, not the code
samuelgabriel/bayesgeneralizations/pfns/initializers.py
code served (permissive licence) · get_code("4c84ce37831d7194")
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 function. 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
from torch import nn

torch.manual_seed(0)

# The function get_NormalInitializer takes a std parameter (standard deviation)
# and returns an initializer function that applies normal initialization to nn.Linear layers
# The std parameter should be a numeric value (float or int)

ARGS = {
    "std": 0.02
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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_bucket_limits Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
samuelgabriel/bayesgeneralizations/pfns/bar_distribution.py
code served (permissive licence) · get_code("35c69200cda57d8c")
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 1, dtype family float, 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 torch

torch.manual_seed(0)

# Case 1: Using ys parameter
ys = torch.tensor([1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0])
num_outputs_1 = 2
full_range_1 = None
verbose_1 = False

# Case 2: Using full_range parameter
num_outputs_2 = 3
full_range_2 = (0.0, 10.0)
ys_2 = None
verbose_2 = False

# We'll use Case 1 as the main ARGS
ARGS = {
    "num_outputs": num_outputs_1,
    "full_range": full_range_1,
    "ys": ys,
    "verbose": verbose_1,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 1, dtype family float, 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_cosine_schedule_with_warmup Ran
ran; our contract draft was wrong, not the code
samuelgabriel/bayesgeneralizations/pfns/utils.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from db-Lee/CFBO, is pointer only (licence: NONE) · get_code("a9c14b9fb71dbe7c")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from db-Lee/CFBO, 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.

get_linear_schedule_with_warmup Ran
ran; our contract draft was wrong, not the code
samuelgabriel/bayesgeneralizations/pfns/utils.py
code served (permissive licence) · get_code("afba2c06a42074fe")
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 LambdaLR. 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 torch.optim import SGD

torch.manual_seed(0)

# Create a simple model
model = nn.Linear(4, 2)

# Create an optimizer
optimizer = SGD(model.parameters(), lr=0.1)

# Define arguments for get_linear_schedule_with_warmup
ARGS = {
    "optimizer": optimizer,
    "num_warmup_steps": 100,
    "num_training_steps": 1000,
    "last_epoch": -1,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type LambdaLR — a LambdaLR output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a LambdaLR 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_log_dims Ran
ran; our contract draft was wrong, not the code
samuelgabriel/bayesgeneralizations/pfns/encoders.py
code served (permissive licence) · get_code("2b96e0e5006ab7a6")
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 math

torch.manual_seed(0)

# Construct a small tensor to pass to get_log_dims
# The function takes x, applies log transformation with eps parameter
# x should be a tensor with positive values (since we're taking log)
x = torch.rand(2, 4) + 0.1  # Small positive values to ensure log is well-defined

eps = 1e-10

ARGS = {
    "x": x,
    "eps": eps
}
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
get_normalized_encoder Ran
ran; our contract draft was wrong, not the code
samuelgabriel/bayesgeneralizations/pfns/encoders.py
code served (permissive licence) · get_code("39f5dc76953cf6db")
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 function. 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)

# Define a simple encoder creator function
def simple_encoder_creator(in_dim, out_dim):
    return nn.Linear(in_dim, out_dim)

# Define data_std as a scalar float
data_std = 2.5

ARGS = {
    "encoder_creator": simple_encoder_creator,
    "data_std": data_std,
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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_normalized_uniform_encoder Ran
ran; our contract draft was wrong, not the code
samuelgabriel/bayesgeneralizations/pfns/encoders.py
code served (permissive licence) · get_code("16eab2bd7416886c")
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 function. 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 math

torch.manual_seed(0)

# Define a minimal encoder_creator that satisfies the usage pattern
# The function expects encoder_creator to be callable with (in_dim, out_dim)
class SimpleLinearEncoder(nn.Module):
    def __init__(self, in_dim, out_dim):
        super().__init__()
        self.linear = nn.Linear(in_dim, out_dim)
    
    def forward(self, x):
        return self.linear(x)

# Create the encoder_creator function
def encoder_creator(in_dim, out_dim):
    return SimpleLinearEncoder(in_dim, out_dim)

ARGS = {
    "encoder_creator": encoder_creator
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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_restarting_cosine_schedule_with_warmup Ran
ran; our contract draft was wrong, not the code
samuelgabriel/bayesgeneralizations/pfns/utils.py
code served (permissive licence) · get_code("aa7ad3fc695f98b5")
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 LambdaLR. 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 torch.optim import SGD

torch.manual_seed(0)

# Create a simple model
model = nn.Linear(4, 3)

# Create an optimizer
optimizer = SGD(model.parameters(), lr=0.1)

# Define arguments for the function
ARGS = {
    'optimizer': optimizer,
    'num_warmup_steps': 100,
    'num_training_steps': 1000,
    'steps_per_restart': 200,
    'num_cycles': 0.5,
    'last_epoch': -1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type LambdaLR — a LambdaLR output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a LambdaLR 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
shift_pixels Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
samuelgabriel/bayesgeneralizations/pfns/priors/batched_discrete_bayes.py
code served (permissive licence) · get_code("97d7366c4584dc56")
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, 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
import torch.nn.functional as F

torch.manual_seed(0)

# Create a small 2D image tensor (height=4, width=3)
image = torch.randn(4, 3)

# Define shift amounts
shift_x = 1
shift_y = -1

ARGS = {
    'image': image,
    'shift_x': shift_x,
    'shift_y': shift_y,
}
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, 3) — shape (4, 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
x_sampler Ran
ran, honoured the contract we drafted
samuelgabriel/bayesgeneralizations/pfns/priors/batched_discrete_bayes.py
code served (permissive licence) · get_code("6c839d00ca7b4d22")
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 (5, 1) 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)

ARGS = {
    "num_samples": 5
}
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 (5, 1) — shape (5, 1) 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_custom_bar_dist Not yet run
unverified (harvested, no recorded run)
samuelgabriel/bayesgeneralizations/pfns/bar_distribution.py
code served (permissive licence) · get_code("c6a3c0f3c5bb8a2c")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 7 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 0 the same month, 5 later) and 4 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_linear_schedule_with_warmup 21 other papers
12 dated earlier, 8 later, 1 same year, order not determinable
2004.10964 (2020-04)
Don't Stop Pretraining: Adapt Language Models to Domains and Tasks
2011.07430 (2020-11)
Audio-Visual Event Recognition through the lens of Adversary
2109.04912 (2021-09)
ReasonBERT: Pre-trained to Reason with Distant Supervision
and 18 more not named here
get_cosine_schedule_with_warmup 5 other papers
3 dated earlier, 2 later
1912.06430 (2019-12)
End-to-End Learning of Visual Representations from Uncurated Instructional Videos
2402.03774 (2024-02)
Learning a Decision Tree Algorithm with Transformers
2403.10923 (2024-03)
Interpretable Machine Learning for TabPFN
and 2 more not named here
get_normalized_uniform_encoder 4 other papers
3 dated earlier, 1 later
2402.11137 (2024-02)
TuneTables: Context Optimization for Scalable Prior-Data Fitted Networks
2403.10923 (2024-03)
Interpretable Machine Learning for TabPFN
2406.01805 (2024-06)
TabMDA: Tabular Manifold Data Augmentation for Any Classifier using Transformers with In-context Subsetting
and 1 more not named here
get_NormalInitializer 3 other papers
2 dated earlier, 1 later
2402.11137 (2024-02)
TuneTables: Context Optimization for Scalable Prior-Data Fitted Networks
2403.10923 (2024-03)
Interpretable Machine Learning for TabPFN
2602.12082 (2026-02)
Empirical Gaussian Processes
get_normalized_encoder 3 other papers
3 dated earlier
2402.11137 (2024-02)
TuneTables: Context Optimization for Scalable Prior-Data Fitted Networks
2403.10923 (2024-03)
Interpretable Machine Learning for TabPFN
2406.01805 (2024-06)
TabMDA: Tabular Manifold Data Augmentation for Any Classifier using Transformers with In-context Subsetting
get_restarting_cosine_schedule_with_warmup 2 other papers
2 dated earlier
2402.03774 (2024-02)
Learning a Decision Tree Algorithm with Transformers
2403.10923 (2024-03)
Interpretable Machine Learning for TabPFN
get_bucket_limits 1 other paper
1 later
2602.12082 (2026-02)
Empirical Gaussian Processes

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

Traditionally, neural network training has been primarily viewed as an approximation of maximum likelihood estimation (MLE). This interpretation originated in a time when training for multiple epochs on small datasets was common and performance was data bound; but it falls short in the era of large-scale single-epoch trainings ushered in by large self-supervised setups, like language models. In this new setup, performance is compute-bound, but data is readily available. As models became more powerful, in-context learning (ICL), i.e., learning in a single forward-pass based on the context, emerged as one of the dominant paradigms. In this paper, we argue that a more useful interpretation of neural network behavior in this era is as an approximation of the true posterior, as defined by the data-generating process. We demonstrate this interpretations' power for ICL and its usefulness to predict generalizations to previously unseen tasks. We show how models become robust in-context learners by effectively composing knowledge from their training data. We illustrate this with experiments that reveal surprising generalizations, all explicable through the exact posterior. Finally, we show the inherent constraints of the generalization capabilities of posteriors and the limitations of neural networks in approximating these posteriors.

For agents

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

get_harvested_code_for_paper("2410.01565")
get_code_for_paper("2410.01565")
have("2410.01565")

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

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

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

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

Connect an agent — have() is free.