SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2310.11122 · 2023

Sensitivity-Aware Amortized Bayesian Inference

arXiv · PDF · Open in the Atlas

Code that ran

5 of 6 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, 0 violated it and 0 have no contract verdict; 5 failures of our instrument; 1 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/2310.11122.json · badge: /api/ran/2310.11122.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
bayesflow-org/SA-ABI canonical (classifier label)
classifier basis: census
5 ran · 1 no recorded run
FunctionStatusWhere it lives
build_climate_model_color_dict Ran
ran; our contract draft was wrong, not the code
bayesflow-org/SA-ABI/src/python/visualization.py
code served (permissive licence) · get_code("85b493b6ed9fc95c")
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 OrderedDict. 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 seaborn as sns
import random
from collections import OrderedDict

# Construct arguments for build_climate_model_color_dict
names = ['model_a', 'model_b', 'model_c', 'climate_model_x', 'climate_model_y']

ARGS = {
    'names': names,
    'seed': 42424
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
seaborn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type OrderedDict — a OrderedDict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a OrderedDict 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_empirical_rt_data Ran
ran; our contract draft was wrong, not the code
bayesflow-org/SA-ABI/src/python/helpers.py
code served (permissive licence) · get_code("4c765d9432b59f82")
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. 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 os
import tempfile
import pandas as pd
import tensorflow as tf

# Create a temporary directory with sample CSV files
temp_dir = tempfile.mkdtemp()

# Create sample data files in the expected format (Condition, Response, Response Time)
sample_data_1 = """1 0.5 0.234
2 1.0 0.456
1 0.5 0.789"""

sample_data_2 = """2 1.0 0.123
1 0.5 0.345
2 1.0 0.567
1 0.5 0.890"""

# Write sample files to temp directory
with open(os.path.join(temp_dir, 'subject_001.csv'), 'w') as f:
    f.write(sample_data_1)

with open(os.path.join(temp_dir, 'subject_002.csv'), 'w') as f:
    f.write(sample_data_2)

ARGS = {
    'load_dir': temp_dir
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list — a list 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
load_training_data Ran
ran; our contract draft was wrong, not the code
bayesflow-org/SA-ABI/src/python/training.py
code served (permissive licence) · get_code("fb0ce74e4521fb6e")
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 os
import pickle
import tempfile
import shutil

# Create a temporary directory structure to simulate the data path
temp_dir = tempfile.mkdtemp()
data_dir = os.path.join(temp_dir, 'data', 'levy_comparison')
os.makedirs(data_dir, exist_ok=True)

# Create subdirectories for different scaling names
scaling_name = 'linear'
goal = 'train'
scaling_dir = os.path.join(data_dir, scaling_name)
os.makedirs(scaling_dir, exist_ok=True)

# Create a pickle file with sample data
sample_data = {
    'features': [1.0, 2.0, 3.0, 4.0],
    'labels': [0, 1],
    'metadata': {'size': 2}
}

pkl_path = os.path.join(scaling_dir, f'{goal}.pkl')
with open(pkl_path, 'wb') as f:
    pickle.dump(sample_data, f)

# Patch os.path.abspath to point to our temp directory
original_abspath = os.path.abspath
def patched_abspath(path):
    if 'levy_comparison' in path:
        return path.replace('../../data/levy_comparison', data_dir)
    return original_abspath(path)

os.path.abspath = patched_abspath

ARGS = {
    'scaling_name': 'linear',
    'goal': 'train'
}
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
mask_inputs Ran
ran; our contract draft was wrong, not the code
bayesflow-org/SA-ABI/src/python/helpers.py
code served (permissive licence) · get_code("762bac7df25846d9")
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
import copy

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

# Create a minimal simulations_dict following the BayesFlow format
# The function expects:
# - 'model_outputs' as a list of dicts
# - Each dict has 'sim_data' with shape (n_data_sets, n_persons, n_trials, n_features)
# Based on the code: sim_data[:, :, :, 1:3] are accessed (columns 1-2)
# and sim_data[:, :, :, 2] and sim_data[:, :, :, 1] are accessed separately

n_data_sets = 2
n_persons = 3
n_trials = 10
n_features = 4

# Create synthetic simulation data
sim_data = np.random.randn(n_data_sets, n_persons, n_trials, n_features).astype(np.float32)

simulations_dict = {
    'model_outputs': [
        {
            'sim_data': sim_data.copy()
        },
        {
            'sim_data': sim_data.copy()
        }
    ]
}

ARGS = {
    'simulations_dict': simulations_dict,
    'missings_mean': 3.5,
    'missings_sd': 1.2,
    'missing_value': -1,
    'missing_rts_equal_mean': True,
    'tolerance': 3,
    'insert_additional_missings': False
}
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 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
sensitivity_ridge_plot Ran
ran; our contract draft was wrong, not the code
bayesflow-org/SA-ABI/src/python/visualization.py
code served (permissive licence) · get_code("3742ec0f066554af")
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 FacetGrid. 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 pandas as pd
import numpy as np

# Create a sample DataFrame with posterior samples
np.random.seed(0)

# Generate sample data with multiple categories
n_samples = 500
categories = ['cat_A', 'cat_B', 'cat_C']
data = {
    'variable': np.concatenate([
        np.random.normal(0, 1, n_samples),
        np.random.normal(2, 1, n_samples),
        np.random.normal(4, 1.5, n_samples)
    ]),
    'category': np.repeat(categories, n_samples),
}

df = pd.DataFrame(data)

# Define color palette
palette = ['#1f77b4', '#ff7f0e', '#2ca02c']

# Define label function (optional parameter)
def custom_label_func(x, color, label):
    import matplotlib.pyplot as plt
    ax = plt.gca()
    ax.text(0, 0.5, label, color='black', fontsize=10, ha='left', va='center', 
            transform=ax.transAxes)

ARGS = {
    'df': df,
    'x': 'variable',
    'palette': palette,
    'category': 'category',
    'overlap': 0.4,
    'alpha': 1,
    'major': None,
    'minor': None,
    'label_func': None,
    'major_hspace': 0.3,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy, pandas, seaborn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type FacetGrid — a FacetGrid output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a FacetGrid 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
get_latex_results_table Not yet run
unverified (harvested, no recorded run)
bayesflow-org/SA-ABI/src/python/helpers.py
code served (permissive licence) · get_code("44aad8c2e7760ba2")
How it ran

no invocation recorded.

Also present in other papers' code

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

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

Sensitivity analyses reveal the influence of various modeling choices on the outcomes of statistical analyses. While theoretically appealing, they are overwhelmingly inefficient for complex Bayesian models. In this work, we propose sensitivity-aware amortized Bayesian inference (SA-ABI), a multifaceted approach to efficiently integrate sensitivity analyses into simulation-based inference with neural networks. First, we utilize weight sharing to encode the structural similarities between alternative likelihood and prior specifications in the training process with minimal computational overhead. Second, we leverage the rapid inference of neural networks to assess sensitivity to data perturbations and preprocessing steps. In contrast to most other Bayesian approaches, both steps circumvent the costly bottleneck of refitting the model for each choice of likelihood, prior, or data set. Finally, we propose to use deep ensembles to detect sensitivity arising from unreliable approximation (e.g., due to model misspecification). We demonstrate the effectiveness of our method in applied modeling problems, ranging from disease outbreak dynamics and global warming thresholds to human decision-making. Our results support sensitivity-aware inference as a default choice for amortized Bayesian workflows, automatically providing modelers with insights into otherwise hidden dimensions.

For agents

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

get_harvested_code_for_paper("2310.11122")
get_code_for_paper("2310.11122")
have("2310.11122")

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

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

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

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

Connect an agent — have() is free.