Bernhard Schölkopf, Siyuan Guo, Moritz Miller
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; 2 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 4 failures of our instrument; 5 no recorded run), measured 2026-11-24; 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/2506.05188.json · badge: /api/ran/2506.05188.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.
| Repository | Role | Ran |
|---|---|---|
| moxmiller/counterfactual-reasoning | canonical (classifier label) classifier basis not recorded on the link |
8 ran · 5 no recorded run |
| mrtzmllr/iccr | canonical (classifier label) classifier basis: classifier_2025 |
3 ran · 0 no recorded run |
| Function | Status | Where it lives |
|---|---|---|
| colormap | Ran ran; our contract draft was wrong, not the code |
mrtzmllr/iccr/src/attentions.py code served (permissive licence) · get_code("0e520b701a9608ee") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned LinearSegmentedColormap. 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.
|
| derivative | Ran ran on a synthesized input |
moxmiller/counterfactual-reasoning/src/lotka_volterra.py code served (permissive licence) · get_code("7c1cc7fd9fc6e491") How it ranRan 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 ndarray, ndim 1, dtype family float, shape (2,) 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.
|
| direct_thetas | Ran ran on a synthesized input |
moxmiller/counterfactual-reasoning/src/dataset.py code served (permissive licence) · get_code("c5e5709a14db68f8") How it ranRan 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.
|
| effective_support_size | Ran ran on a synthesized input |
moxmiller/counterfactual-reasoning/src/dataset.py code served (permissive licence) · get_code("8b0dd188295931de") How it ranRan 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.
|
| get_final_var | Ran ran, honoured the contract we drafted |
moxmiller/counterfactual-reasoning/src/curriculum.py code served (permissive licence) · get_code("3c24ac252fef0868") How it ranRan 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.
|
| legend_model_names | Ran ran on a synthesized input |
moxmiller/counterfactual-reasoning/src/eval/plotting.py code served (permissive licence) · get_code("8a4ce5192b8c6e35") How it ranRan 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 str. 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.
|
| mean_squared_error | Ran ran; our contract draft was wrong, not the code |
moxmiller/counterfactual-reasoning/src/tasks.py code served (permissive licence) · get_code("fc94f27a0973e093") How it ranRan 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.
|
| model_to_device | Ran ran; our contract draft was wrong, not the code |
mrtzmllr/iccr/src/write_eval.py code served (permissive licence) · get_code("3fcbb3a3a960cbdb") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned tuple, ndim 1, dtype family float; no output shape is stated. 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 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.
|
| retrieve_attentions | Ran ran, honoured the contract we drafted |
mrtzmllr/iccr/src/attentions.py code served (permissive licence) · get_code("081d0d39b2556eae") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned DataFrame. 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.
|
| squared_error | Ran ran; our contract draft was wrong, not the code |
moxmiller/counterfactual-reasoning/src/tasks.py code served (permissive licence) · get_code("348d63a78eb4cb94") How it ranRan 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.
|
| variance_extensions | Ran ran on a synthesized input |
moxmiller/counterfactual-reasoning/src/write_eval.py code served (permissive licence) · get_code("0942014e4b037c99") How it ranRan 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.
|
| build_model | Not yet run unverified (harvested, no recorded run) |
moxmiller/counterfactual-reasoning/src/models.py code served (permissive licence) · get_code("6dab71e46d7c02d7") How it ranno invocation recorded. |
| get_data_sampler | Not yet run unverified (harvested, no recorded run) |
moxmiller/counterfactual-reasoning/src/dataset.py code served (permissive licence) · get_code("de267184c2825d5a") How it ranno invocation recorded. |
| get_task_sampler | Not yet run unverified (harvested, no recorded run) |
moxmiller/counterfactual-reasoning/src/tasks.py code served (permissive licence) · get_code("bfd1a4e013b52634") How it ranno invocation recorded. |
| plot_sde_bar_chart | Not yet run unverified (harvested, no recorded run) |
moxmiller/counterfactual-reasoning/src/eval/plotting.py code served (permissive licence) · get_code("5b5ddbde62248e97") How it ranno invocation recorded. |
| retrieve_attentions | Not yet run unverified (harvested, no recorded run) |
moxmiller/counterfactual-reasoning/src/attentions.py code served (permissive licence) · get_code("566d397aa980c8cf") How it ranno invocation recorded. |
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, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 1 later) and 13 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.
| Function | Also present in | Earliest-dated | Others named |
|---|---|---|---|
| get_final_var | 8 other papers 7 dated earlier, 1 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 5 dated earlier |
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 2404.18191 (2024-04) Published at ICLR 2024 Workshop on Reliable and Responsible Foundation Models EXPLORING THE ROBUSTNESS OF IN-CONTEXT LEARNING WITH NOISY LABELS and 2 more not named here |
| squared_error | 5 other papers 5 dated earlier |
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 2404.18191 (2024-04) Published at ICLR 2024 Workshop on Reliable and Responsible Foundation Models EXPLORING THE ROBUSTNESS OF IN-CONTEXT LEARNING WITH NOISY LABELS and 2 more not named here |
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-24.
Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.
Large-scale neural language models exhibit remarkable performance in in-context learning: the ability to learn and reason about the input context on the fly. This work studies in-context counterfactual reasoning in language models, that is, the ability to predict consequences of a hypothetical scenario. We focus on a well-defined, synthetic linear regression task that requires noise abduction. Accurate prediction is based on (1) inferring an unobserved latent concept and (2) copying contextual noise from factual observations. We show that language models are capable of counterfactual reasoning. Further, we enhance existing identifiability results and reduce counterfactual reasoning for a broad class of functions to a transformation on in-context observations. In Transformers, we find that self-attention, model depth and pre-training data diversity drive performance. Moreover, we provide mechanistic evidence that the latent concept is linearly represented in the residual stream and we introduce designated noise abduction heads central to performing counterfactual reasoning. Lastly, our findings extend to counterfactual reasoning under SDE dynamics and reflect that Transformers can perform noise abduction on sequential data, providing preliminary evidence on the potential for counterfactual story generation. Our code is available under https://github.com/mrtzmllr/iccr.
The same record, over MCP at https://syntology.ai/mcp:
get_harvested_code_for_paper("2506.05188")
get_code_for_paper("2506.05188")
have("2506.05188")
The run record, dated, one paper per request, free:
curl https://syntology.ai/api/ran/2506.05188.json
A badge for a README (the split and the date, never a ratio):
[](https://syntology.ai/paper/2506.05188)
Connect an agent — have() is free.