SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2311.08243 · NeurIPS · 2023

MCMC to address model misspecification in Deep Learning classification of Radio Galaxies

Anna Scaife, Devina Mohan

arXiv · PDF · Open in the Atlas

Code that ran

9 of 9 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, 1 violated it and 0 have no contract verdict; 6 failures of our instrument; 0 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/2311.08243.json · badge: /api/ran/2311.08243.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
devinamhn/RadioGalaxies-BNNs canonical (classifier label)
classifier basis: census
6 ran · 0 no recorded run
devinamhn/radiogalaxies-bnns canonical (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
FunctionStatusWhere it lives
array_to_png Ran
ran; our contract draft was wrong, not the code
devinamhn/RadioGalaxies-BNNs/radiogalaxies_bnns/datasets/mightee.py
code served (permissive licence) · get_code("5922e8d16a07386e")
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 Image. 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 numpy as np
from PIL import Image

torch.manual_seed(0)

# array_to_png expects an image array that can be converted by PIL.Image.fromarray
# The function converts it to grayscale ('L' mode)
# We need a numpy array with valid image data (uint8 values 0-255)

img_array = np.random.randint(0, 256, size=(4, 3), dtype=np.uint8)

ARGS = {
    "img": img_array
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 2 and dtype family int 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
credible_interval Ran
ran; our contract draft was wrong, not the code
devinamhn/radiogalaxies-bnns/radiogalaxies_bnns/eval/mightee/mightee_inference.py
code served (permissive licence) · get_code("446a71fb59542992")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) 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 sample array of values
samples = np.array([1.2, 3.4, 2.1, 5.6, 4.3, 2.8, 3.9, 4.7, 2.5, 3.2, 
                   4.1, 3.6, 2.9, 4.5, 3.8, 2.3, 4.9, 3.1, 2.7, 4.2])

# Set credibility level (e.g., 0.95 for 95% credible interval)
credibility = 0.95

ARGS = {
    'samples': samples,
    'credibility': credibility
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
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
energy_function Ran
ran; our contract draft was wrong, not the code
devinamhn/radiogalaxies-bnns/radiogalaxies_bnns/eval/ood/hmc_ood.py
code served (permissive licence) · get_code("fd6c8bd75d657464")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned ndarray, 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)

# The function expects:
# - logits: a 3D tensor (dim1, dim2, dim3) where logsumexp is applied on dim=2
# - T: a scalar (default=1), though it's not used in the function body

# Create a small 3D tensor for logits
# Shape: (batch_size, sequence_length, num_classes)
# Using distinct dimensions: 2, 3, 4
logits = torch.randn(2, 3, 4)

# T parameter (not actually used in the function, but included for completeness)
T = 1

ARGS = {
    'logits': logits,
    'T': T
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, 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
energy_function Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
devinamhn/RadioGalaxies-BNNs/radiogalaxies_bnns/eval/ood/dropout_ood.py
pointer only (licence: MIT); the stored copy get_code serves, from devinamhn/radiogalaxies-bbb, is pointer only (licence: GPL-3.0) · get_code("90ca8617a2376882")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from devinamhn/radiogalaxies-bbb, and GPL-3.0, as GitHub detects it on that repository, is not in the permissive set Syntology serves inline. 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.

energy_function_mlp Ran
ran, honoured the contract we drafted
devinamhn/RadioGalaxies-BNNs/radiogalaxies_bnns/eval/ood/dropout_ood.py
code served (permissive licence) · get_code("99264178c3fc3da0")
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) 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.

import torch
import numpy as np

torch.manual_seed(0)

# The function takes logits (a tensor) and T (temperature, default 1)
# It calls torch.logsumexp on logits with dim=1, then detaches and converts to numpy
# So logits needs to be a 2D tensor (batch_size, num_classes)

logits = torch.randn(2, 4)  # batch_size=2, num_classes=4

ARGS = {
    "logits": logits,
    "T": 1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (2,) — shape (2,) 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
fig2img Ran
ran, honoured the contract we drafted
devinamhn/radiogalaxies-bnns/radiogalaxies_bnns/eval/mightee/mightee_inference.py
code served (permissive licence) · get_code("55c2041f06386cb1")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned PngImageFile. 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 matplotlib.pyplot as plt
import numpy as np

# Create a simple matplotlib figure
fig = plt.figure(figsize=(6, 4))
ax = fig.add_subplot(111)
x = np.linspace(0, 2 * np.pi, 100)
y = np.sin(x)
ax.plot(x, y)
ax.set_xlabel('x')
ax.set_ylabel('sin(x)')
ax.set_title('Simple Sine Wave')

ARGS = {
    'fig': fig
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
PIL, matplotlib, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type PngImageFile — a PngImageFile output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PngImageFile output the recorded ndim 3 and dtype family int 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
image_preprocessing Ran
ran, violated the contract we drafted
devinamhn/RadioGalaxies-BNNs/radiogalaxies_bnns/datasets/mightee.py
code served (permissive licence) · get_code("d952fa5f65c1ce08")
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 ndarray, 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 numpy as np

# Create a small test image with an extra dimension to squeeze
# Shape: (1, 4, 3) - has a singleton dimension that will be squeezed
image = np.random.rand(1, 4, 3).astype(np.float32)

# field parameter - a string identifier
field = "test_field"

ARGS = {
    "image": image,
    "field": field,
}
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 ndarray, 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
parse_config Ran
ran; our contract draft was wrong, not the code
devinamhn/RadioGalaxies-BNNs/radiogalaxies_bnns/inference/utils.py
code served (permissive licence) · get_code("f95aacc5ad4a764b")
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 tempfile
import os

# Create a temporary config file with valid INI format
temp_dir = tempfile.mkdtemp()
config_file = os.path.join(temp_dir, "test_config.ini")

config_content = """[section1]
option1 = 42
option2 = 'hello'
option3 = [1, 2, 3]
option4 = True

[section2]
option5 = 3.14
option6 = {'key': 'value'}
option7 = (1, 2, 3)
"""

with open(config_file, 'w') as f:
    f.write(config_content)

ARGS = {
    'filename': config_file
}
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 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
rescale_image Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
devinamhn/RadioGalaxies-BNNs/radiogalaxies_bnns/datasets/mightee.py
code served (permissive licence) · get_code("f0183dd4da32f136")
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 ndarray, ndim 2, dtype family float, shape (3, 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 numpy as np

# Create a small image array for testing
# Using a simple 2D array representing a small grayscale image
img = np.array([
    [10.0, 20.0, 30.0],
    [40.0, 50.0, 60.0],
    [70.0, 80.0, 90.0]
], dtype=np.float32)

# Define the low threshold parameter
low = 5.0

ARGS = {
    'img': img,
    'low': low
}
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 ndarray, ndim 2, dtype family float, shape (3, 3) — shape (3, 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

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 3 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 3 later) and 6 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
energy_function 2 other papers
1 dated earlier, 1 later
2201.01203 (2022-01)
Quantifying Uncertainty in Deep Learning Approaches to Radio Galaxy Classification
2405.18351 (2024-05)
Evaluating Bayesian deep learning for radio galaxy classification
credible_interval 1 other paper
1 later
2405.18351 (2024-05)
Evaluating Bayesian deep learning for radio galaxy classification
energy_function_mlp 1 other paper
1 later
2405.18351 (2024-05)
Evaluating Bayesian deep learning for radio galaxy classification

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

The radio astronomy community is adopting deep learning techniques to deal with the huge data volumes expected from the next-generation of radio observatories. Bayesian neural networks (BNNs) provide a principled way to model uncertainty in the predictions made by deep learning models and will play an important role in extracting well-calibrated uncertainty estimates from the outputs of these models. However, most commonly used approximate Bayesian inference techniques such as variational inference and MCMC-based algorithms experience a "cold posterior effect (CPE)", according to which the posterior must be down-weighted in order to get good predictive performance. The CPE has been linked to several factors such as data augmentation or dataset curation leading to a misspecified likelihood and prior misspecification. In this work we use MCMC sampling to show that a Gaussian parametric family is a poor variational approximation to the true posterior and gives rise to the CPE previously observed in morphological classification of radio galaxies using variational inference based BNNs.

For agents

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

get_harvested_code_for_paper("2311.08243")
get_code_for_paper("2311.08243")
have("2311.08243")

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

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

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

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

Connect an agent — have() is free.