SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.16646 · ICLR · 2025

TOPODIFFUSIONNET: A TOPOLOGY-AWARE DIFFUSION MODEL

Chao Chen, Dimitris Samaras, Saumya Gupta

arXiv · PDF · Open in the Atlas

Code that ran

7 of 7 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; 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/2410.16646.json · badge: /api/ran/2410.16646.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
Saumya-Gupta-26/TopoDiffusionNet canonical (classifier label)
classifier basis: census
7 ran · 0 no recorded run
FunctionStatusWhere it lives
approx_standard_normal_cdf Ran
ran; our contract draft was wrong, not the code
Saumya-Gupta-26/TopoDiffusionNet/improved_diffusion/losses.py
pointer only (licence: MIT); the stored copy get_code serves, from quandao10/slct, is pointer only (licence: NONE) · get_code("cfd76fd0d89574a4")
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 quandao10/slct, and GitHub detected no licence in that repository 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. A run is recorded.

compute_average Ran
ran; our contract draft was wrong, not the code
Saumya-Gupta-26/TopoDiffusionNet/analysis-scripts/eval-metrics.py
code served (permissive licence) · get_code("899dd35be8a7d9c8")
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, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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)

classes = [1, 2, 3, 4, 5]

# Construct y_true: ground truth labels, must contain all classes in 'classes'
# Using 10 samples to have at least 2 samples per class (10/5 = 2)
y_true = [1, 2, 3, 4, 5, 1, 2, 3, 4, 5]

# Construct y_pred: predicted labels with same length as y_true
# Make it match some but not all ground truth for realistic testing
y_pred = [1, 2, 3, 4, 5, 1, 2, 3, 5, 5]  # Last one is wrong (predicted 5, actual 5 is correct; predicted 5, actual 4 is wrong)

ARGS = {
    'y_true': y_true,
    'y_pred': y_pred
}
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 list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
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
compute_metrics Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Saumya-Gupta-26/TopoDiffusionNet/analysis-scripts/eval-metrics.py
code served (permissive licence) · get_code("442558c88bf5c121")
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.metrics import accuracy_score, precision_score, recall_score, f1_score

classes = [1, 2, 3, 4, 5]

def compute_metrics(y_true, y_pred):
    accuracy = accuracy_score(y_true, y_pred)
    precision = precision_score(y_true, y_pred, average=None, zero_division=0, labels=classes)
    recall = recall_score(y_true, y_pred, average=None, zero_division=0, labels=classes)
    f1 = f1_score(y_true, y_pred, average=None, zero_division=0, labels=classes)
    return (accuracy, precision, recall, f1)

# Setup valid arguments
y_true = np.array([1, 2, 3, 4, 5, 1, 2, 3, 4, 5])
y_pred = np.array([1, 2, 3, 4, 5, 1, 2, 4, 4, 5])

ARGS = {
    'y_true': y_true,
    'y_pred': y_pred
}
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
discretized_gaussian_log_likelihood Ran
ran; our contract draft was wrong, not the code
Saumya-Gupta-26/TopoDiffusionNet/improved_diffusion/losses.py
pointer only (licence: MIT); the stored copy get_code serves, from quandao10/slct, is pointer only (licence: NONE) · get_code("cd33283d615fb3d7")
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 quandao10/slct, and GitHub detected no licence in that repository 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. A run is recorded.

make_master_params Ran
ran; our contract draft was wrong, not the code
Saumya-Gupta-26/TopoDiffusionNet/improved_diffusion/fp16_util.py
pointer only (licence: MIT); the stored copy get_code serves, from freemasti/diffo, is pointer only (licence: NONE) · get_code("a863803cdd5f3ce6")
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 freemasti/diffo, and GitHub detected no licence in that repository 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. A run is recorded.

normal_kl Ran
ran, honoured the contract we drafted
Saumya-Gupta-26/TopoDiffusionNet/improved_diffusion/losses.py
pointer only (licence: MIT); the stored copy get_code serves, from facebookresearch/agrol, is pointer only (licence: NOASSERTION) · get_code("cf2798b666b231ca")
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 facebookresearch/agrol, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

unflatten_master_params Ran
ran; our contract draft was wrong, not the code
Saumya-Gupta-26/TopoDiffusionNet/improved_diffusion/fp16_util.py
pointer only (licence: MIT); the stored copy get_code serves, from freemasti/diffo, is pointer only (licence: NONE) · get_code("30e43bcf12d042b0")
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 freemasti/diffo, and GitHub detected no licence in that repository 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. A run is recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 3 the same month, 5 later) and 2 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
normal_kl 160 other papers
124 dated earlier, 5 the same month, 29 later, 2 same year, order not determinable · 19 only as an assembly brick
2010.02502 (2020-10)
Denoising Diffusion Implicit Models
2105.05233 (2021-05)
Diffusion Models Beat GANs on Image Synthesis
2111.11672 (2021-11)
Few-shot Image Generation with Mixup-based Distance Learning
and 157 more not named here
approx_standard_normal_cdf 154 other papers
118 dated earlier, 5 the same month, 29 later, 2 same year, order not determinable · 17 only as an assembly brick
2010.02502 (2020-10)
Denoising Diffusion Implicit Models
2105.05233 (2021-05)
Diffusion Models Beat GANs on Image Synthesis
2111.11672 (2021-11)
Few-shot Image Generation with Mixup-based Distance Learning
and 151 more not named here
discretized_gaussian_log_likelihood 128 other papers
103 dated earlier, 1 the same month, 23 later, 1 same year, order not determinable · 16 only as an assembly brick
2010.02502 (2020-10)
Denoising Diffusion Implicit Models
2105.05233 (2021-05)
Diffusion Models Beat GANs on Image Synthesis
2111.11672 (2021-11)
Few-shot Image Generation with Mixup-based Distance Learning
and 125 more not named here
make_master_params 16 other papers
14 dated earlier, 2 later
2010.02502 (2020-10)
Denoising Diffusion Implicit Models
2205.14217 (2022-05)
Diffusion-LM Improves Controllable Text Generation
2206.07696 (2022-06)
Diffusion Models for Video Prediction and Infilling
and 13 more not named here
unflatten_master_params 15 other papers
14 dated earlier, 1 later
2010.02502 (2020-10)
Denoising Diffusion Implicit Models
2205.14217 (2022-05)
Diffusion-LM Improves Controllable Text Generation
2206.07696 (2022-06)
Diffusion Models for Video Prediction and Infilling
and 12 more not named here

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 models excel at creating visually impressive images but often struggle to generate images with a specified topology. The Betti number, which represents the number of structures in an image, is a fundamental measure in topology. Yet, diffusion models fail to satisfy even this basic constraint. This limitation restricts their utility in applications requiring exact control, like robotics and environmental modeling. To address this, we propose TopoDiffusionNet (TDN), a novel approach that enforces diffusion models to maintain the desired topology. We leverage tools from topological data analysis, particularly persistent homology, to extract the topological structures within an image. We then design a topologybased objective function to guide the denoising process, preserving intended structures while suppressing noisy ones. Our experiments across four datasets demonstrate significant improvements in topological accuracy. TDN is the first to integrate topology with diffusion models, opening new avenues of research in this area. Code available at https://github.com/Saumya-Gupta-26/ TopoDiffusionNet

For agents

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

get_harvested_code_for_paper("2410.16646")
get_code_for_paper("2410.16646")
have("2410.16646")

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

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

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

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

Connect an agent — have() is free.