SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2606.01595 · 2026

Uncertainty-Calibrated Diffusion for Reliable 3D Molecular Graph Generation

Yi Liu, Jingxiang Qu, Fang Wan

arXiv · PDF

Code that ran

6 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; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 6 failures of our instrument; 3 no recorded run); 1 of them was also run on the host, not in the jail, by the peer-agreement lane that set its level, measured 2026-11-22; 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/2606.01595.json · badge: /api/ran/2606.01595.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
jiuguaiwf/UCD canonical (classifier label)
classifier basis: census
6 ran · 3 no recorded run
FunctionStatusWhere it lives
swish Ran
ran; our contract draft was wrong, not the code
jiuguaiwf/UCD/edm/egnn/dropout_layer.py
code served (permissive licence) · get_code("0f786c407fb1ee4c")
How it ran

Ran in Syntology's jail on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) 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. The comparison behind this sample's level is a different run: the peer-agreement lane ran it again on the host, not in the jail (report dated 2026-09-04T22:33:52Z). 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 swish takes a single parameter 'x' which is used with:
# - torch.sigmoid(x) - requires a tensor
# - x * ... - requires a tensor that supports multiplication
# So x should be a tensor

x = torch.randn(2, 4)

ARGS = {
    "x": x
}
Setup block drafted by
a language model, Claude Haiku 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 Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) 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
build_diagonal_laplace_state Ran
ran; our contract draft was wrong, not the code
jiuguaiwf/UCD/edm/egnn/last_layer_laplace.py
code served (permissive licence) · get_code("1b4121b61259e9d2")
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 torch
import torch.nn as nn

torch.manual_seed(0)

# Create a small linear layer with bias
# in_features=4, out_features=3
linear_layer = nn.Linear(in_features=4, out_features=3, bias=True)

# feature_square_sum should have numel = in_features + 1 (since bias exists)
# So we need 5 elements (4 for weights + 1 for bias)
feature_square_sum = torch.tensor([1.0, 2.0, 3.0, 4.0, 5.0])

# prior_precision as a float
prior_precision = 1.0

# obs_noise as a float
obs_noise = 1.0

ARGS = {
    'linear_layer': linear_layer,
    'feature_square_sum': feature_square_sum,
    'prior_precision': prior_precision,
    'obs_noise': obs_noise
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — 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
compute_loss_and_nll Ran
ran; our contract draft was wrong, not the code
jiuguaiwf/UCD/edm/qm9/losses.py
code served (permissive licence) · get_code("4ed06d5114046b7e")
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 torch
import torch.nn as nn
from torch.distributions import Poisson

torch.manual_seed(0)

# Create a minimal args object
class Args:
    def __init__(self):
        self.probabilistic_model = 'diffusion'

args = Args()

# Create a minimal generative model that accepts the expected inputs
class GenerativeModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 1)
    
    def forward(self, x, h, node_mask, edge_mask, context):
        # x: (bs, n_nodes, n_dims)
        # Returns nll of shape (bs,)
        bs = x.size(0)
        return torch.randn(bs)

generative_model = GenerativeModel()

# Create nodes_dist with log_prob method
class NodesDist:
    def log_prob(self, N):
        # N is a long tensor of shape (bs,)
        return torch.randn(N.size(0))

nodes_dist = NodesDist()

# Create tensors with distinct sizes
bs = 2
n_nodes = 3
n_dims = 4

x = torch.randn(bs, n_nodes, n_dims)
h = torch.randn(bs, n_nodes, 5)
node_mask = torch.ones(bs, n_nodes, 1)
edge_mask = torch.ones(bs, n_nodes, n_nodes)
context = torch.randn(bs, 6)

ARGS = {
    'args': args,
    'generative_model': generative_model,
    'nodes_dist': nodes_dist,
    'x': x,
    'h': h,
    'node_mask': node_mask,
    'edge_mask': edge_mask,
    'context': context
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — 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
compute_mc_dropout_scalar_uncertainty Ran
ran; our contract draft was wrong, not the code
jiuguaiwf/UCD/edm/egnn/models.py
code served (permissive licence) · get_code("dba4c0c168802618")
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 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.

import torch

torch.manual_seed(0)

# Create a small mc_outputs tensor
# Shape: (num_mc_samples, batch_size, output_dim)
# Using distinct sizes: 5 MC samples, 2 batch size, 4 output dimension
mc_outputs = torch.randn(5, 2, 4)

ARGS = {
    'mc_outputs': mc_outputs,
    'reduce': 'mean'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, 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
load_split_data Ran
ran; our contract draft was wrong, not the code
jiuguaiwf/UCD/edm/build_geom_dataset.py
code served (permissive licence) · get_code("24d665e94f616fb4")
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 os
import numpy as np
import tempfile
from pathlib import Path

# Create temporary directory for test data
tmpdir = tempfile.mkdtemp()

# Create a mock conformation file with molecule IDs and conformer data
# Format: each row is [mol_id, x1, x2, x3, ...]
# We'll create data with 3 molecules, some with multiple conformers
mol_data = []
# Molecule 0: 2 conformers
mol_data.append([0, 1.0, 2.0, 3.0, 4.0])
mol_data.append([0, 1.1, 2.1, 3.1, 4.1])
# Molecule 1: 3 conformers
mol_data.append([1, 5.0, 6.0, 7.0, 8.0])
mol_data.append([1, 5.1, 6.1, 7.1, 8.1])
mol_data.append([1, 5.2, 6.2, 7.2, 8.2])
# Molecule 2: 1 conformer
mol_data.append([2, 9.0, 10.0, 11.0, 12.0])

all_data = np.array(mol_data, dtype=np.float32)
conformation_file = os.path.join(tmpdir, 'conformations.npy')
np.save(conformation_file, all_data)

# Create permutation file that reorders molecules
# We have 3 molecules, so permutation should map them (e.g., identity or shuffled)
perm = np.array([0, 1, 2], dtype=np.int32)
perm_file = os.path.join(tmpdir, 'geom_permutation.npy')
np.save(perm_file, perm)

ARGS = {
    'conformation_file': conformation_file,
    'val_proportion': 0.1,
    'test_proportion': 0.1,
    'filter_size': None,
}
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
sum_except_batch Ran
ran; our contract draft was wrong, not the code
jiuguaiwf/UCD/edm/qm9/losses.py
code served (permissive licence) · get_code("90c529ca8e85d3db")
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 Tensor, 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

torch.manual_seed(0)

# The function takes a tensor x, reshapes it to (batch_size, -1),
# and sums across the flattened dimension. We need a multi-dimensional tensor.
x = torch.randn(2, 4, 3)  # batch=2, other dims flattened to 12

ARGS = {
    "x": x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, 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
get_args_gen Not yet run
unverified (harvested, no recorded run)
jiuguaiwf/UCD/edm/eval_conditional_qm9.py
code served (permissive licence) · get_code("f576c0a0e0ae29c2")
How it ran

no invocation recorded.

maybe_load_last_layer_laplace Not yet run
unverified (harvested, no recorded run)
jiuguaiwf/UCD/edm/eval_analyze-uncertainty.py
code served (permissive licence) · get_code("d3bd9393f95d2c44")
How it ran

no invocation recorded.

sample_diagonal_last_layer Not yet run
unverified (harvested, no recorded run)
jiuguaiwf/UCD/edm/egnn/last_layer_laplace.py
code served (permissive licence) · get_code("8e8422c6144b4f89")
How it ran

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, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 1 the same month, 1 later) and 4 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
swish 206 other papers
202 dated earlier, 3 the same month, 1 later · 44 only as an assembly brick
1408.5882 (2014-08)
Convolutional Neural Networks for Sentence Classification
1805.12114 (2018-05)
Deep Reinforcement Learning in a Handful of Trials using Probabilistic Dynamics Models
1809.01357 (2018-09)
Zero Shot Learning for Code Education: Rubric Sampling with Deep Learning Inference
and 203 more not named here
sum_except_batch 6 other papers
6 dated earlier
2105.09016 (2021-05)
E(n) Equivariant Normalizing Flows
2203.17003 (2022-03)
Equivariant Diffusion for Molecule Generation in 3D
2305.01140 (2023-05)
Geometric Latent Diffusion Models for 3D Molecule Generation
and 3 more not named here
compute_loss_and_nll 4 other papers
4 dated earlier
2203.17003 (2022-03)
Equivariant Diffusion for Molecule Generation in 3D
2305.01140 (2023-05)
Geometric Latent Diffusion Models for 3D Molecule Generation
2410.06262 (2024-10)
SymDiff: Equivariant Diffusion via Stochastic Symmetrisation
and 1 more not named here
get_args_gen 4 other papers
4 dated earlier
2203.17003 (2022-03)
Equivariant Diffusion for Molecule Generation in 3D
2305.01140 (2023-05)
Geometric Latent Diffusion Models for 3D Molecule Generation
2410.06262 (2024-10)
SymDiff: Equivariant Diffusion via Stochastic Symmetrisation
and 1 more not named here
load_split_data 1 other paper
1 dated earlier
2503.02918 (2025-03)
Straight-Line Diffusion Model for Efficient 3D Molecular Generation

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

Bayesian inference provides a principled framework for modeling epistemic uncertainty in neural networks by treating predictions as distributions rather than deterministic values. Meanwhile, diffusion-based models for 3D molecular graph generation operate on fragile geometric structures governed by strict chemical constraints, making inference highly sensitive to uncertainty miscalibration. A largely overlooked issue is that epistemic uncertainty arising from the learned denoiser interacts with the aleatoric uncertainty intentionally injected during reverse diffusion, leading to systematic variance inflation and a mismatch between the true distribution and the simulated distribution. This effect is particularly detrimental for high-precision molecular generation, where even small deviations can violate chemical validity. In this work, we provide a theoretical and empirical analysis of how epistemic uncertainty propagates through diffusion inference and degrades sampling quality. Building on this investigation, we propose UCD (Uncertainty-Calibrated Diffusion), a simple yet effective method that calibrates the reverse diffusion process to account for epistemic uncertainty. Extensive experiments on standard 3D molecular benchmarks demonstrate that UCD consistently improves sampling quality across diverse baseline methods, establishing new state-of-the-art performance for 3D molecular diffusion. The code is available at https://github.com/jiuguaiwf/UCD. • Computing methodologies → Generative and developmental approaches; Neural networks; Artificial intelligence.

For agents

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

get_harvested_code_for_paper("2606.01595")
get_code_for_paper("2606.01595")
have("2606.01595")

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

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

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

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

Connect an agent — have() is free.