SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2602.04596 · 2026

Uncertainty Decomposition for Bayes-Filtered Transformers via Bayesian Predictive Inference

Sandra Fortini, Susan Wei, Kenyon Ng, Judith Rousseau, Sonia Petrone

arXiv · PDF · Open in the Atlas

Code that ran

11 of 16 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 1 has no contract verdict; 9 failures of our instrument; 5 no recorded run), measured 2026-11-21; 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/2602.04596.json · badge: /api/ran/2602.04596.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
weiyaw/ud4pfn canonical (classifier label)
classifier basis: census
11 ran · 5 no recorded run
FunctionStatusWhere it lives
build_pointwise_band Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
weiyaw/ud4pfn/predictive_clt/bands.py
code served (permissive licence) · get_code("229f69a3d1e8ef4e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import jax
import jax.numpy as jnp
import numpy as np

# Set seed for reproducibility
np.random.seed(0)

# Create small dummy data for the function
# mean: should be a JAX array of shape (n,)
# cov: should be a 1D JAX array of variances/covariances of shape (n,)
# alpha: float parameter for confidence level

mean = jnp.array([1.0, 2.0, 3.0, 4.0])
cov = jnp.array([0.1, 0.2, 0.15, 0.25])
alpha = 0.05

ARGS = {
    'mean': mean,
    'cov': cov,
    'alpha': alpha
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
build_simultaneous_band Ran
ran on a synthesized input
weiyaw/ud4pfn/predictive_clt/bands.py
code served (permissive licence) · get_code("7cd443046505bb80")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import jax
import jax.numpy as jnp
import jax.random as jr
import numpy as np

# Create small test tensors
# mean: 1D array of shape (4,)
mean = jnp.array([1.0, 2.0, 3.0, 4.0])

# cov: 2D covariance matrix of shape (4, 4)
# Create a simple positive definite covariance matrix
base_cov = np.array([
    [2.0, 0.5, 0.1, 0.0],
    [0.5, 1.5, 0.2, 0.1],
    [0.1, 0.2, 1.0, 0.3],
    [0.0, 0.1, 0.3, 0.8]
])
cov = jnp.array(base_cov)

# alpha: float parameter for quantile
alpha = 0.05

ARGS = {
    'mean': mean,
    'cov': cov,
    'alpha': alpha
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
c2_trajectory Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
weiyaw/ud4pfn/experiments/beta_bernoulli/plot_corrupt_sweep.py
code served (permissive licence) · get_code("6c0b5f2bda453aa3")
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 numpy as np

# Create a small numpy array b with shape (K, R)
# K represents the number of grid points, R represents the number of replications
K = 5
R = 3
np.random.seed(0)
b = np.random.randn(K, R)

# Set k_min - the starting index
k_min = 10

# Set gamma - a float parameter for weighting
gamma = 1.5

ARGS = {
    "b": b,
    "k_min": k_min,
    "gamma": gamma,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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
compute_ellipsoid_log_volume Ran
ran, violated the contract we drafted
weiyaw/ud4pfn/predictive_clt/bands.py
code served (permissive licence) · get_code("7214efc943b0bfd5")
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 float64, ndim 0, 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

# Set random seed for reproducibility
np.random.seed(0)

# Create a small covariance matrix (d x d)
# For a valid covariance matrix, we need positive definite
d = 4
# Create a random matrix and multiply by its transpose to ensure positive definiteness
random_matrix = np.random.randn(d, d)
cov = random_matrix @ random_matrix.T

# Create a radius parameter (positive scalar)
radius = 2.5

ARGS = {
    "cov": cov,
    "radius": radius,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
compute_qm Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
weiyaw/ud4pfn/experiments/beta_bernoulli/plot.py
code served (permissive licence) · get_code("a0455452bb663467")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Set random seed for reproducibility
np.random.seed(0)

# Construct arguments for compute_qm
# b: np.ndarray - shape (K, R) where K is number of rollouts, R is number of replicates
b = np.random.randn(5, 3)  # K=5, R=3 - small array of rollout data

# k_min: int - minimum index for the sequence
k_min = 10

# gammas_U: tuple - gamma values for computing U_gamma aggregates
gammas_U = (0.0, 0.25, 0.5, 0.75, 1.0)

ARGS = {
    'b': b,
    'k_min': k_min,
    'gammas_U': gammas_U,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
compute_signed Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
weiyaw/ud4pfn/experiments/beta_bernoulli/plot.py
code served (permissive licence) · get_code("9c67e5e74ceaf13e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Create small test arrays
K = 5  # number of time steps
R = 3  # number of rollouts

# Create b array: shape (K, R)
np.random.seed(0)
b = np.random.randn(K, R) * 0.1

# Create delta array: shape (K, R) - same shape as b
delta = np.random.randn(K, R) * 0.05

# Create gammas array
gammas = np.array([0.5, 1.0, 1.5])

# k_min parameter
k_min = 10

ARGS = {
    'b': b,
    'k_min': k_min,
    'gammas': gammas,
    'delta': delta
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
find_run_directories Ran
ran; our contract draft was wrong, not the code
weiyaw/ud4pfn/experiments/_shared/artifacts.py
code served (permissive licence) · get_code("47f53d5d98ef8e5f")
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 re
from pathlib import Path
import tempfile
import os

# Create a temporary directory with some child directories
temp_dir = tempfile.mkdtemp()
os.makedirs(os.path.join(temp_dir, "run_001"), exist_ok=True)
os.makedirs(os.path.join(temp_dir, "run_002"), exist_ok=True)
os.makedirs(os.path.join(temp_dir, "run_003"), exist_ok=True)
os.makedirs(os.path.join(temp_dir, "other_dir"), exist_ok=True)
os.makedirs(os.path.join(temp_dir, "test_run"), exist_ok=True)

# Create a compiled regex pattern
pattern = re.compile(r"run_\d+")

ARGS = {
    "directory": temp_dir,
    "pattern": pattern,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 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
fit_power_law Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
weiyaw/ud4pfn/experiments/beta_bernoulli/plot.py
code served (permissive licence) · get_code("5a8de63643e08e53")
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

# Create simple test data for power law fitting
# We'll create data that roughly follows y = C * n^(-beta)
np.random.seed(0)

n = np.array([1.0, 2.0, 5.0, 10.0, 20.0, 50.0, 100.0])
# Create y data with power law relationship: y = 10 * n^(-0.5) + small noise
beta_true = 0.5
C = 10.0
y = C * (n ** (-beta_true)) + np.random.normal(0, 0.1, len(n))

ARGS = {
    "n": n,
    "y": y
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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
load Ran
ran; our contract draft was wrong, not the code
weiyaw/ud4pfn/experiments/beta_bernoulli/plot_corrupt_sweep.py
code served (permissive licence) · get_code("47f8136210317d5c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from pathlib import Path
import tempfile

torch.manual_seed(0)

# Create a temporary directory and file to save/load from
temp_dir = tempfile.mkdtemp()
temp_path = Path(temp_dir) / "test_checkpoint.pt"

# Create some sample data to save
sample_data = {
    "model_state": torch.randn(2, 4),
    "optimizer_state": torch.randn(3, 5),
    "metadata": {"epoch": 10, "loss": 0.5}
}

# Save the data so we can load it
torch.save(sample_data, temp_path)

# Define arguments for the load function
ARGS = {
    "path": temp_path
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_run_metadata Ran
ran; our contract draft was wrong, not the code
weiyaw/ud4pfn/experiments/_shared/artifacts.py
code served (permissive licence) · get_code("3e5bf539e9d212cb")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tempfile
import os
from pathlib import Path
from omegaconf import OmegaConf

# Create a temporary directory structure to simulate a run directory
temp_dir = tempfile.mkdtemp()
run_dir = Path(temp_dir)

# Create .hydra subdirectory
hydra_dir = run_dir / '.hydra'
hydra_dir.mkdir(parents=True, exist_ok=True)

# Create a config.yaml file with some metadata
config_dict = {
    'setup': 'test_setup',
    'n_estimators': 100,
    'data_size': 1000,
    'x_grid_size': 50,
    'seed': 42
}
config_yaml_path = hydra_dir / 'config.yaml'
OmegaConf.save(config_dict, config_yaml_path)

ARGS = {
    'run_dir': run_dir,
    'required_fields': ('setup', 'n_est', 'n', 'm', 'seed')
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
omegaconf — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
read_pickle Ran
ran; our contract draft was wrong, not the code
weiyaw/ud4pfn/experiments/_shared/artifacts.py
code served (permissive licence) · get_code("3a4505d0014c9009")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import pickle
import tempfile
from pathlib import Path

# Create a temporary pickle file to read
temp_dir = tempfile.TemporaryDirectory()
temp_path = Path(temp_dir.name) / "test.pkl"

# Create some test data and pickle it
test_data = {
    "key1": "value1",
    "key2": [1, 2, 3],
    "key3": {"nested": "dict"}
}

with open(temp_path, 'wb') as f:
    pickle.dump(test_data, f)

# Define arguments for read_pickle
ARGS = {
    "path": temp_path
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
compute_b_and_delta Not yet run
unverified (harvested, no recorded run)
weiyaw/ud4pfn/experiments/beta_bernoulli/diagnostic.py
code served (permissive licence) · get_code("cede248e68f001a8")
How it ran

no invocation recorded.

compute_g0_to_gn Not yet run
unverified (harvested, no recorded run)
weiyaw/ud4pfn/predictive_clt/posterior.py
code served (permissive licence) · get_code("e7294a7dec2a0ecd")
How it ran

no invocation recorded.

compute_gn Not yet run
unverified (harvested, no recorded run)
weiyaw/ud4pfn/predictive_clt/posterior.py
code served (permissive licence) · get_code("aa0eb68e0bdfc95f")
How it ran

no invocation recorded.

sample_batch Not yet run
unverified (harvested, no recorded run)
weiyaw/ud4pfn/experiments/beta_bernoulli/data.py
code served (permissive licence) · get_code("1aa3ed1c49159f33")
How it ran

no invocation recorded.

sample_gn_plus_1 Not yet run
unverified (harvested, no recorded run)
weiyaw/ud4pfn/predictive_clt/posterior.py
code served (permissive licence) · get_code("c569658437194f80")
How it ran

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-21.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Bayes-filtered transformers are transformers meta-learned on sequences from a prior predictive distribution to approximate the corresponding posterior predictive distribution. They output total predictive uncertainty in a single forward pass but never explicitly represent a posterior distribution, making the standard route to separating aleatoric from epistemic uncertainty unavailable. We address this challenge through the lens of Bayesian predictive inference (BPI). Our main result is a predictive Central Limit Theorem (CLT) for supervised settings under conditions that are among the weakest known in the BPI literature. The CLT characterises the posterior of the limiting predictive distribution given an observed context as asymptotically Gaussian; the variance of this Gaussian quantifies epistemic uncertainty. We apply the framework to TabPFN, a Bayes-filtered transformer that is a state-of-the-art foundation model for tabular prediction. The resulting credible bands achieve near-nominal frequentist coverage as context length grows, and the decomposition largely matches standard desiderata: epistemic uncertainty shrinks with context length and is highest in sparsely observed regions within the span of the context data, while aleatoric uncertainty dominates near decision boundaries where classes overlap.

For agents

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

get_harvested_code_for_paper("2602.04596")
get_code_for_paper("2602.04596")
have("2602.04596")

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

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

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

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

Connect an agent — have() is free.