SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2501.16825 · ICML · 2025

Can Transformers Learn Full Bayesian Inference In Context?

Vincent Fortuin, Tim Rudner, David Ügamer, Arik Reuter

arXiv · PDF · Open in the Atlas

Code that ran

12 of 16 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (9 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 1 violated it and 11 have no contract verdict; 0 failures of our instrument; 4 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/2501.16825.json · badge: /api/ran/2501.16825.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
arikreuter/icl_for_full_bayesian_inference canonical (classifier label)
classifier basis: classifier_2025
12 ran · 4 no recorded run
FunctionStatusWhere it lives
ConditionalBatchNorm Ran
ran on a synthesized input · constructed an object; no result was computed
arikreuter/icl_for_full_bayesian_inference/LinearRegression/Models/Transformer_CNF.py
pointer only (licence: NONE) · get_code("3672477c19ee824f")
How it ran

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

ConditionalLayerNorm Ran
ran on a synthesized input · constructed an object; no result was computed
arikreuter/icl_for_full_bayesian_inference/LinearRegression/Models/Transformer_CNF.py
pointer only (licence: NONE) · get_code("7334dfff7c15eb8c")
How it ran

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

DecoderBlockConditional Ran
ran on a synthesized input · constructed an object; no result was computed
arikreuter/icl_for_full_bayesian_inference/LinearRegression/Models/Transformer_CNF.py
pointer only (licence: NONE) · get_code("8746a274af2a0929")
How it ran

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

EncoderBlockConditional Ran
ran on a synthesized input · constructed an object; no result was computed
arikreuter/icl_for_full_bayesian_inference/LinearRegression/Models/Transformer_CNF.py
pointer only (licence: NONE) · get_code("cf23a8049b4ef088")
How it ran

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

Linear_block Ran
ran on a synthesized input · constructed an object; no result was computed
arikreuter/icl_for_full_bayesian_inference/LinearRegression/Models/Transformer_CNF.py
pointer only (licence: NONE) · get_code("8f40ac592744ccad")
How it ran

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

Linear_skip_block Ran
ran on a synthesized input · constructed an object; no result was computed
arikreuter/icl_for_full_bayesian_inference/LinearRegression/Models/Transformer_CNF.py
pointer only (licence: NONE) · get_code("02ac666b2ac3c6a1")
How it ran

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

MLP Ran
ran on a synthesized input · constructed an object; no result was computed
arikreuter/icl_for_full_bayesian_inference/LinearRegression/Models/Transformer_CNF.py
pointer only (licence: NONE) · get_code("67f27ed04e3e9672")
How it ran

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

MLPConditional Ran
ran on a synthesized input · constructed an object; no result was computed
arikreuter/icl_for_full_bayesian_inference/LinearRegression/Models/Transformer_CNF.py
pointer only (licence: NONE) · get_code("19ec286a9acca6f1")
How it ran

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

PositionalEncoding Ran
ran on a synthesized input · constructed an object; no result was computed
arikreuter/icl_for_full_bayesian_inference/LinearRegression/Models/Transformer_CNF.py
pointer only (licence: NONE) · get_code("870643f6c036b79d")
How it ran

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

PositionwiseFeedForward Ran
ran on a synthesized input
arikreuter/icl_for_full_bayesian_inference/LinearRegression/Models/Transformer_CNF.py
pointer only (licence: NONE) · get_code("c8a3be75f1c48e47")
How it ran

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

Rescale Ran
ran on a synthesized input
arikreuter/icl_for_full_bayesian_inference/LinearRegression/Models/Transformer_CNF.py
pointer only (licence: NONE) · get_code("a5253f7ea1d3f236")
How it ran

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

string2bool Ran
ran, violated the contract we drafted
arikreuter/icl_for_full_bayesian_inference/Experiments/RunExperiments/RunExperiments_LFM.py
pointer only (licence: NONE) · get_code("c838b52183d58395")
How it ran

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

TransformerCNF Not yet run
unverified (harvested, no recorded run)
arikreuter/icl_for_full_bayesian_inference/LinearRegression/Models/Transformer_CNF.py
pointer only (licence: NONE) · get_code("76c46a50e69c7c97")
How it ran

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

TransformerConditional Not yet run
unverified (harvested, no recorded run)
arikreuter/icl_for_full_bayesian_inference/LinearRegression/Models/Transformer_CNF.py
pointer only (licence: NONE) · get_code("420e50cb6931a973")
How it ran

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

TransformerDecoderConditional Not yet run
unverified (harvested, no recorded run)
arikreuter/icl_for_full_bayesian_inference/LinearRegression/Models/Transformer_CNF.py
pointer only (licence: NONE) · get_code("6a80680a5be99f66")
How it ran

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

TransformerEncoderConditional Not yet run
unverified (harvested, no recorded run)
arikreuter/icl_for_full_bayesian_inference/LinearRegression/Models/Transformer_CNF.py
pointer only (licence: NONE) · get_code("ad9007e5c53a09ac")
How it ran

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

Also present in other papers' code

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

Transformers have emerged as the dominant architecture in the field of deep learning, with a broad range of applications and remarkable in-context learning (ICL) capabilities. While not yet fully understood, ICL has already proved to be an intriguing phenomenon, allowing transformers to learn in context-without requiring further training. In this paper, we further advance the understanding of ICL by demonstrating that transformers can perform full Bayesian inference for commonly used statistical models in context. More specifically, we introduce a general framework that builds on ideas from prior fitted networks and continuous normalizing flows and enables us to infer complex posterior distributions for models such as generalized linear models and latent factor models. Extensive experiments on real-world datasets demonstrate that our ICL approach yields posterior samples that are similar in quality to state-of-the-art MCMC or variational inference methods that do not operate in context.

For agents

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

get_harvested_code_for_paper("2501.16825")
get_code_for_paper("2501.16825")
have("2501.16825")

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

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

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

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

Connect an agent — have() is free.