Papers › What does a Bayes-filtered transformer believe? A predictive Monte Carlo approach

What does a Bayes-filtered transformer believe? A predictive Monte Carlo approach

19 Jul 2026arXiv:2607.17060added by Syntology

Afiq Abdillah Effiezal Aswadi, Haotong Ma, Susan Wei

Title, abstract, authors and date from arXiv's metadata (CC0); this paper is not in the Papers with Code archive (frozen 2025-07-28).

A Bayes-filtered transformer (BFT) is a transformer trained on sequences that are generated in two steps: first a latent task is drawn from a prior, then observations are drawn conditional on that task. Trained under autoregressive log loss, the BFT's next-token prediction, in the idealized limit, is the Bayesian posterior predictive distribution (PPD) induced by that prior and that conditional law. In practice the trained BFT is only an approximation of this ideal PPD, raising an interpretive question: what prior and posterior over the latent task has the trained BFT actually internalized? Existing work answers this question by comparing the trained BFT's predictions against the predictions of various "reference" posteriors, each standing in for a different candidate algorithm or computation the BFT might be implementing. This prediction-space comparison is fragile: different posteriors can share the same posterior-mean predictions. We use predictive Monte Carlo (PMC) as a general interpretability tool for any BFT: using only next-token generation, PMC returns an approximation to the implicit prior and posterior over the latent task, answering the interpretive question directly in latent space. We apply PMC to three stylized task families spanning 0-Markov and 1-Markov exchangeability. The phenomena previously reported in these settings remain visible in latent space. Code is available at https://github.com/afiq-aswadi/bft-pmc

PaperPDFCode Syntology ran

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 12 code samples harvested from 1 repository linked to this paper: 11 ran (of which 0 constructed an object rather than computing a result; 4 with no instrument failure: 3 honoured, 0 violated, 1 with no contract checked; 7 where Syntology's instrument failed) · 1 unverified. Where Syntology's instrument failed: 7 where our contract draft was wrong; failures of Syntology's instrument, not of the code.

By repository: found in paper text by Syntology: 12 samples from 1 repository, 11 ran (4 with no instrument failure; 7 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

Levels written on 2026-09-24 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

afiq-aswadi/bft-pmc found in paper text by SyntologySyntology: 12 samples, 11 ran (7 instrument-failed) · 1 unverified report

Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

12 samples harvested: 11 ran (of which 0 constructed an object rather than computing a result; 4 with no instrument failure: 3 honoured, 0 violated, 1 with no contract checked; 7 where Syntology's instrument failed) · 1 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page last changed ; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

3ran · honoured contract
7ran · our draft was wrong
1ran
1unverified

Licence: 0 of the 12 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from afiq-aswadi/bft-pmc. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of six reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity.

afiq-aswadi/bft-pmc found in paper text by Syntology 12 samples, 11 ran (7 instrument-failed) · 1 unverified
energy_distance_multidim metrics.py ran · honoured contract fingerprinted MIT (permissive) · 5489114b76c255d1 · report fixture: signature samples_a:ndarray/2/float, samples_b:ndarray/2/float · returned float · level recorded 2026-09-24
find_all_checkpoints analysis/checkpoints.py ran · our draft was wrong MIT (permissive) · b2169addb6e1946c · report fixture: signature run_dir:PosixPath/0/? · returned list · level recorded 2026-09-24
find_latest_checkpoint in 10 papers analysis/checkpoints.py ran · our draft was wrong MIT (permissive) · 6f57d9f09cdca659 · report fixture: signature run_dir:PosixPath/0/? · returned PosixPath · level recorded 2026-09-24
get_step analysis/checkpoints.py ran · honoured contract MIT (permissive) · 663bc481a165fa7e · report fixture: signature p:PosixPath/0/? · returned int · level recorded 2026-09-24
load_generalising_dataset balls_and_urns/dataset.py ran · our draft was wrong MIT (permissive) · 3233fea92e342f67 · report fixture: signature path:PosixPath/0/? · returned dict · level recorded 2026-09-24
load_memorising_dataset balls_and_urns/dataset.py ran · our draft was wrong MIT (permissive) · efd1a51a91e8a951 · report fixture: signature path:PosixPath/0/? · returned dict · level recorded 2026-09-24
load_predictive_samples balls_and_urns/dataset.py ran · our draft was wrong MIT (permissive) · 093eda4129ab157b · report fixture: signature path:PosixPath/0/? · returned dict · level recorded 2026-09-24
precompute_rotary_frequencies markov/model.py ran · honoured contract MIT (permissive) · 1db55008315130be · report fixture: signature head_dim:int/0/int, max_seq_len:int/0/int, theta:float/0/float · returned tuple · level recorded 2026-09-24
prepend_bos balls_and_urns/analysis.py ran · our draft was wrong fingerprinted MIT (permissive) · 7eadbc1def14d38b · report fixture: signature tokens:Tensor/2/int, bos_token:int/0/int · returned Tensor · level recorded 2026-09-24
sliced_wasserstein metrics.py ran MIT (permissive) · 56df6b610501614d · report fixture: signature samples_a:ndarray/2/float, samples_b:ndarray/2/float, n_projections:int/0/int, seed:int/0/int · returned float · level recorded 2026-09-24
symmetrised_kl metrics.py ran · our draft was wrong MIT (permissive) · 4dfa43cb5d75808f · report fixture: signature p:Tensor/3/float, q:Tensor/3/float, eps:float/0/float · returned float · level recorded 2026-09-24
apply_rotary_embedding markov/model.py unverified MIT (permissive) · 876803eb5c6a33b4 · report

Results from the paper

The Papers with Code archive ends with its 2025-07-28 snapshot. This paper's arXiv identifier, 2607.17060, was issued in July 2026, after that date, so the archive has no leaderboard rows for it.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections