SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2306.00488 · 2023

Reconstructing Graph Diffusion History from a Single Snapshot

arXiv · PDF · Open in the Atlas

Code that ran

2 of 11 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 2 have no contract verdict; 0 failures of our instrument; 9 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/2306.00488.json · badge: /api/ran/2306.00488.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
q-rz/kdd23-ditto canonical (classifier label)
classifier basis: census
2 ran · 9 no recorded run
FunctionStatusWhere it lives
q_loss Ran
ran on a synthesized input
q-rz/kdd23-ditto/ditto.py
code served (permissive licence) · get_code("4ea3af4471316f50")
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

torch.manual_seed(0)

# Define a mock data object with required attributes
class MockData:
    def __init__(self):
        self.T = torch.tensor(5.0)
        self.num_nodes = 4
        self.edge_index = torch.tensor([[0, 1, 2, 3], [1, 2, 3, 0]], dtype=torch.long)

# Define a mock bpar config object
class MockBpar:
    def __init__(self):
        self.pI = 0.3
        self.pR = 0.2

# Define a mock diffus_gen function
def diffus_gen(T, n_nodes, edge_index, I0, n_samples, pI, pR):
    # Returns a tensor of shape (n_samples, n_nodes, time_steps)
    return torch.randn(n_samples, n_nodes, 3)

# Make diffus_gen available in global scope for the q_loss function
import builtins
builtins.diffus_gen = diffus_gen

# Define a small q_net model with lik method
class MockQNet(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 1)
    
    def lik(self, Y):
        # Y has shape (n_samples, n_nodes, time_steps)
        batch_size = Y.shape[0]
        n_nodes = Y.shape[1]
        
        # Return q_liks, zI0, zR0, zI, zR
        q_liks = torch.randn(batch_size)
        zI0 = torch.randn(batch_size, n_nodes)
        zR0 = torch.randn(batch_size, n_nodes)
        zI = torch.randn(batch_size, n_nodes, 3)
        zR = torch.randn(batch_size, n_nodes, 3)
        
        return q_liks, zI0, zR0, zI, zR

# Construct the arguments
data = MockData()
q_net = MockQNet()
I0 = torch.randn(2, 4)  # (batch_size, n_nodes)
bpar = MockBpar()
n_samples = 2

ARGS = {
    "q_net": q_net,
    "data": data,
    "I0": I0,
    "bpar": bpar,
    "n_samples": n_samples
}
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
torch2np Ran
ran on a synthesized input
q-rz/kdd23-ditto/inc/utils.py
code served (permissive licence) · get_code("0148fb4f4b21f606")
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 (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.

import torch
import numpy as np

torch.manual_seed(0)

# torch2np expects a torch tensor as input
# The function calls .cpu(), .detach(), and .numpy() on it
x = torch.randn(2, 4)

ARGS = {
    "x": x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
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 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
b_lik Not yet run
unverified (harvested, no recorded run)
q-rz/kdd23-ditto/gin.py
code served (permissive licence) · get_code("c43af06f30e8ef13")
How it ran

no invocation recorded.

cri_cluster Not yet run
unverified (harvested, no recorded run)
q-rz/kdd23-ditto/cri.py
code served (permissive licence) · get_code("bcf689a4bc85dd62")
How it ran

no invocation recorded.

cri_dist Not yet run
unverified (harvested, no recorded run)
q-rz/kdd23-ditto/cri.py
code served (permissive licence) · get_code("957e3671f3b0ad1d")
How it ran

no invocation recorded.

data_calc_tI Not yet run
unverified (harvested, no recorded run)
q-rz/kdd23-ditto/inc/data.py
code served (permissive licence) · get_code("4ee4262f7b351e21")
How it ran

no invocation recorded.

data_make_t Not yet run
unverified (harvested, no recorded run)
q-rz/kdd23-ditto/inc/data.py
code served (permissive licence) · get_code("7b36029f6bcc1b2e")
How it ran

no invocation recorded.

data_simulate Not yet run
unverified (harvested, no recorded run)
q-rz/kdd23-ditto/inc/data.py
code served (permissive licence) · get_code("c2d2719afe09d37b")
How it ran

no invocation recorded.

file_require Not yet run
unverified (harvested, no recorded run)
q-rz/kdd23-ditto/inc/utils.py
code served (permissive licence) · get_code("7eee67e75e94e7ad")
How it ran

no invocation recorded.

nx_layout Not yet run
unverified (harvested, no recorded run)
q-rz/kdd23-ditto/inc/utils.py
code served (permissive licence) · get_code("e436f8446c45f9e4")
How it ran

no invocation recorded.

pcdsvc_greedy Not yet run
unverified (harvested, no recorded run)
q-rz/kdd23-ditto/dhrec.py
code served (permissive licence) · get_code("b561e23990a1990b")
How it ran

no invocation recorded.

Also present in other papers' code

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

Diffusion on graphs is ubiquitous with numerous high-impact applications. In these applications, complete diffusion histories play an essential role in terms of identifying dynamical patterns, reflecting on precaution actions, and forecasting intervention effects. Despite their importance, complete diffusion histories are rarely available and are highly challenging to reconstruct due to ill-posedness, explosive search space, and scarcity of training data. To date, few methods exist for diffusion history reconstruction. They are exclusively based on the maximum likelihood estimation (MLE) formulation and require to know true diffusion parameters. In this paper, we study an even harder problem, namely reconstructing Diffusion history from A single SnapsHot} (DASH), where we seek to reconstruct the history from only the final snapshot without knowing true diffusion parameters. We start with theoretical analyses that reveal a fundamental limitation of the MLE formulation. We prove: (a) estimation error of diffusion parameters is unavoidable due to NP-hardness of diffusion parameter estimation, and (b) the MLE formulation is sensitive to estimation error of diffusion parameters. To overcome the inherent limitation of the MLE formulation, we propose a novel barycenter formulation: finding the barycenter of the posterior distribution of histories, which is provably stable against the estimation error of diffusion parameters. We further develop an effective solver named DIffusion hiTting Times with Optimal proposal (DITTO) by reducing the problem to estimating posterior expected hitting times via the Metropolis--Hastings Markov chain Monte Carlo method (M--H MCMC) and employing an unsupervised graph neural network to learn an optimal proposal to accelerate the convergence of M--H MCMC. We conduct extensive experiments to demonstrate the efficacy of the proposed method.

For agents

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

get_harvested_code_for_paper("2306.00488")
get_code_for_paper("2306.00488")
have("2306.00488")

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

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

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

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

Connect an agent — have() is free.