SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2601.05355 · 2026

An AI-powered Bayesian Generative Modeling Approach for Arbitrary Conditional Inference

Qiao Liu

arXiv · PDF · Open in the Atlas

Code that ran

8 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 7 failures of our instrument; 1 no recorded run), measured 2026-11-23; 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/2601.05355.json · badge: /api/ran/2601.05355.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
liuq-lab/bayesgm canonical (classifier label)
classifier basis: census
8 ran · 0 no recorded run
LeyingGuan/LCPexperiments canonical (classifier label)
classifier basis: census
0 ran · 1 no recorded run
FunctionStatusWhere it lives
get_ADRF Ran
ran; our contract draft was wrong, not the code
liuq-lab/bayesgm/src/bayesgm/utils/helpers.py
code served (permissive licence) · get_code("3e32cd0183bbb517")
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 1, dtype family float, shape (5,) 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

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

# Test with x_values directly
ARGS = {
    'x_values': [0.0, 0.5, 1.0, 1.5, 2.0],
    'x_min': None,
    'x_max': None,
    'nb_intervals': None,
    'dataset': 'Imbens'
}
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 1, dtype family float, shape (5,) — shape (5,) 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
get_SDR_dim Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
liuq-lab/bayesgm/src/bayesgm/utils/helpers.py
code served (permissive licence) · get_code("08f8cd74b59518df")
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 int64, ndim 0, dtype family int, 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.

import numpy as np
import scipy.linalg as linalg

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

# Create small sample data
n_samples = 20
n_features = 4

# Create X: (n_samples, n_features) with distinct dimensions
X = np.random.randn(n_samples, n_features).astype(np.float64)

# Create y: (n_samples,) with multiple unique values to avoid the single value error
y = np.array([0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4], dtype=np.float64)

# Define arguments
ARGS = {
    'X': X,
    'y': y,
    'n_slices': 10,
    'ratio': 0.8
}
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 int64, ndim 0, dtype family int, shape () — shape () 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_file Ran
ran, honoured the contract we drafted
liuq-lab/bayesgm/src/bayesgm/utils/data_io.py
code served (permissive licence) · get_code("68474fd11e08b18e")
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
import os
import tempfile
import pandas as pd

# Create a temporary directory for test files
temp_dir = tempfile.mkdtemp()

# Create a small CSV file
csv_path = os.path.join(temp_dir, "test_data.csv")
csv_data = pd.DataFrame({
    'feature1': [1.0, 2.0, 3.0],
    'feature2': [4.0, 5.0, 6.0],
    'feature3': [7.0, 8.0, 9.0]
})
csv_data.to_csv(csv_path, index=False, sep=',')

# Create a small TXT file
txt_path = os.path.join(temp_dir, "test_data.txt")
txt_data = np.array([[1.0, 2.0, 3.0],
                     [4.0, 5.0, 6.0],
                     [7.0, 8.0, 9.0]])
np.savetxt(txt_path, txt_data, delimiter='\t')

# Create a small NPZ file
npz_path = os.path.join(temp_dir, "test_data.npz")
np.savez(npz_path, data=txt_data)

# Define ARGS with all parameters
ARGS = {
    'path': csv_path,
    'sep': ',',
    'header': 0,
    'normalize': True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas, sklearn — 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
parse_file_triplet Ran
ran; our contract draft was wrong, not the code
liuq-lab/bayesgm/src/bayesgm/utils/data_io.py
code served (permissive licence) · get_code("10e6321541d5097e")
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
import os
import tempfile
import pandas as pd

# Create temporary files for testing
temp_dir = tempfile.mkdtemp()

# Create a .npz file
npz_path = os.path.join(temp_dir, "test_data.npz")
np.savez(
    npz_path,
    x=np.array([[1.0], [2.0], [3.0]], dtype='float32'),
    y=np.array([[10.0], [20.0], [30.0]], dtype='float32'),
    v=np.array([[0.1, 0.2], [0.3, 0.4], [0.5, 0.6]], dtype='float32')
)

# Create a .csv file
csv_path = os.path.join(temp_dir, "test_data.csv")
df = pd.DataFrame({
    'treatment': [1.0, 2.0, 3.0],
    'outcome': [10.0, 20.0, 30.0],
    'cov1': [0.1, 0.3, 0.5],
    'cov2': [0.2, 0.4, 0.6]
})
df.to_csv(csv_path, index=False, sep=',')

# Create a .txt file
txt_path = os.path.join(temp_dir, "test_data.txt")
txt_data = np.array([
    [1.0, 10.0, 0.1, 0.2],
    [2.0, 20.0, 0.3, 0.4],
    [3.0, 30.0, 0.5, 0.6]
])
np.savetxt(txt_path, txt_data, delimiter='\t')

ARGS = {
    'path': npz_path,
    'sep': '\t',
    'header': 0,
    'normalize': True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas, sklearn — 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
simulate_heteroskedastic_data Ran
ran; our contract draft was wrong, not the code
liuq-lab/bayesgm/src/bayesgm/datasets/simulators.py
code served (permissive licence) · get_code("a11375eccff6fa89")
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

ARGS = {
    "n": 1000,
    "d": 5,
    "seed": 42,
}
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
simulate_low_rank_data Ran
ran; our contract draft was wrong, not the code
liuq-lab/bayesgm/src/bayesgm/datasets/simulators.py
code served (permissive licence) · get_code("0d37df85e10feea9")
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

ARGS = {
    "n_samples": 100,
    "z_dim": 2,
    "x_dim": 4,
    "rank": 2,
    "sigma_z": False,
    "random_state": 123,
}
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
simulate_regression Ran
ran; our contract draft was wrong, not the code
liuq-lab/bayesgm/src/bayesgm/datasets/simulators.py
code served (permissive licence) · get_code("1ca6358e6351b48c")
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
from sklearn.datasets import make_low_rank_matrix

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

ARGS = {
    "n_samples": 10,
    "n_features": 5,
    "n_targets": 3,
    "effective_rank": None,
    "variance": None,
    "random_state": 123,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — 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
slice_y Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
liuq-lab/bayesgm/src/bayesgm/utils/helpers.py
code served (permissive licence) · get_code("dca6013f4e73aa73")
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 simple target variable y with multiple unique values
# for a regression or classification problem
y = np.array([1.2, 1.5, 2.1, 2.3, 2.8, 3.1, 3.5, 3.9, 4.2, 4.8, 
              5.1, 5.5, 6.0, 6.3, 6.7, 7.1, 7.5, 7.9, 8.2, 8.6])

ARGS = {
    'y': y,
    'n_slices': 5
}
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
GetDataset Not yet run
unverified (harvested, no recorded run)
LeyingGuan/LCPexperiments/datasets/datasets.py
pointer only (licence: NONE) · get_code("9e1180835f968ba1")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, LeyingGuan/LCPexperiments when it was checked. 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. No invocation recorded.

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, 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 9 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

Modern data analysis increasingly requires flexible conditional inference 𝑃 (𝑋 ℬ | 𝑋 𝒜 ), where (𝑋 𝒜 , 𝑋 ℬ ) is an arbitrary partition of the observed variables 𝑋. Existing approaches are either restricted to a fixed conditioning structure or depend strongly on the distribution of conditioning masks during training. To address these limitations, we introduce Bayesian generative modeling (BGM), a unified framework for arbitrary conditional inference. BGM learns a generative model of 𝑋 via a stochastic iterative Bayesian updating algorithm in which model parameters and latent variables are updated until convergence. Once trained, any conditional distribution can be obtained without retraining. Empirically, BGM achieves superior predictive performance with posterior predictive intervals, demonstrating that a single learned model can serve as a universal engine for conditional prediction with principled uncertainty quantification. We provide theoretical guarantees for convergence of the stochastic iterative algorithm, statistical consistency, and conditional risk bounds. The proposed BGM framework leverages modern AI to capture complex relationships among variables while adhering to Bayesian principles, offering a promising approach for a wide range of applications in modern data science. Code for BGM is available at https://github.com/liuq-lab/bayesgm. Document of BGM is available at https://bayesgm.readthedocs.io.

For agents

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

get_harvested_code_for_paper("2601.05355")
get_code_for_paper("2601.05355")
have("2601.05355")

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

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

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

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

Connect an agent — have() is free.