NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Exact Topological Compliance: Generating Persistence-Equivalent Graphs

Mattie Ji, Indradyumna Roy, Vikas K GargNeurIPS 2026

TL;DR

When generating synthetic graphs—like new molecules or sensor networks—getting the "almost right" number of loops or connected pieces often isn't good enough. Existing AI models use soft mathematical nudges that only approximate a target shape, frequently hallucinating extra cycles or merging distinct components. This paper throws out approximation and solves the problem from first principles, introducing the first algorithms guaranteed to generate diverse graphs that match a target topological blueprint exactly.

What Problem Does This Paper Address?

In many real-world networks, topology dictates function: the exact count of rings governs a molecule’s stability, and loops or gaps determine structural risk in infrastructure and sensor networks.

To summarize a graph's shape, researchers use persistent homology. Imagine building a graph step-by-step—for instance, revealing nodes in order of their degree (number of connections), a process called a filtration. As the graph grows, connected components are "born" and merge ("die"), and independent loops appear. Tracking these births and deaths yields a multiset of coordinate pairs called a Persistence Diagram (PD)—essentially a topological barcode of the graph.

Because many differently wired graphs share the exact same PD, conditioning a generator on a PD means sampling from a specific family of structurally distinct, topologically identical graphs. Current deep learning approaches (like diffusion models) try to do this by adding a PD-matching penalty to their training loss. However, soft penalties offer zero guarantees: the generated graphs often miss the target number of cycles or components.

The authors ask a fundamental question: Can we build a strictly PD-compliant generator that is both sound (every output matches the target PD with zero error) and complete (every valid graph sharing that PD is reachable)?

Methods

The authors tackle strict topological compliance from two complementary angles—moving from step-by-step construction to a bird's-eye global view:

  • Local Iterative Sampler: This algorithm builds the graph step-by-step along the filtration, adding vertices, merging components, and closing cycles at each stage $k$ using only neighborhood-level information. For degree-based filtrations, it tracks a "degree capacity" for each node. Because greedy local choices can paint the builder into a corner, it operates as a rejection sampler—restarting if it hits a dead end.
  • Global Constraint Programming (CP): To avoid dead ends entirely, the authors reframe the problem as a global Constraint Satisfaction Problem solvable by off-the-shelf CP solvers. They model the unknown graph's adjacency matrix using Boolean and integer variables governed by six constraint families: filtration value alignment (e.g., node degree), component slot partitioning, edge-slot consistency, spanning-tree witnesses (a clever trick to check connectivity in linear rather than quadratic time), Euler characteristics (to lock in exact cycle counts), and birth-time survival.

While focused primarily on node degree, the global CP framework works for any node-based filtration that doesn't depend on node ordering, with concrete encodings provided for triangle/clique counts, clustering coefficients, closeness, Katz centrality, and PageRank.

Datasets

The authors evaluate their methods across four standard graph generation benchmarks spanning diverse sizes, densities, and topologies (using standard 64:16:20 train/validation/test splits where neural baselines require training):

  • COMM-20 (community graphs)
  • PLANAR (planar graphs)
  • SBM (Stochastic Block Model graphs)
  • ENZYMES (molecular protein structures)

No new datasets are introduced, though the authors note their exact generators naturally create controlled, noise-free synthetic families ideal for benchmarking future topological neural networks.

Key Insights and Ideas

  • The Local Myopia Trap (Theorem 3.10): Why does the local sampler sometimes get stuck when trying to add cycles? The authors prove a striking impossibility theorem: no purely local, step-by-step algorithm can simultaneously be sound, reach all valid graphs, and never hit dead ends. Persistent homology is inherently global; making valid local moves at step $k$ can quietly exhaust the capacity needed to form cycles at step $k+1$ (though on acyclic graphs/forests, local generation succeeds 100% of the time!).
  • A Minimal-Sufficient Blueprint: For degree filtrations, the six constraint families in the global CP encoding are mathematically minimal. Every satisfying assignment maps to a valid graph, every valid graph is represented, and dropping any single constraint family immediately allows topological impostors to slip through.
  • More Training Won't Fix Soft Losses: Neural diffusion models conditioned on topological descriptors don't just suffer from minor noise—they exhibit a fundamental structural gap (merging components and inventing excess cycles) that extra training simply does not close.

Key Results

  • Local vs. Global Trade-offs: Both methods achieve exact topological compliance on 100% of their completed outputs. On COMM-20, PLANAR, and ENZYMES, both succeed on 99.1%–100% of targets, with the local rejection sampler running 1.7–2.8$\times$ faster on the smaller datasets (e.g., 0.17s vs. 0.30s on COMM-20). However, on tightly constrained SBM graphs, local myopia strikes: the local sampler succeeds on only 15.0% of targets, whereas the global CP solver succeeds on 82.5% in less than half the average wall-clock time (654.8s vs. 1465.0s).
  • Exactness vs. Neural Diffusion: Tested against topology-augmented diffusion baselines (DiGress+TAGG and ConStruct+TAGG), the global CP solver achieves a degree-PD 1-Wasserstein error ($\bar{W}_1$) of 0.00 across all four benchmarks with 0 hours of training. In contrast, neural baselines require 8.9 to 61.6 hours of per-dataset training yet still suffer massive topological drift—recording $\bar{W}_1$ errors around 17 on ENZYMES, 38–43 on PLANAR, and 434–465 on SBM. On a 33-node ENZYMES test graph with 10 cycles, CP nails the exact invariants while the neural models hallucinate 24 and 27 cycles.

Limitations and Future Work

  • Tractability vs. Amortization: Exactness has a computational price. On larger, dense graphs (like SBM), global CP inference takes over 10 minutes per target and times out (at 1,800s) on 17.5% of instances. Once trained, neural baselines are 3–38$\times$ faster at inference on larger graphs, making them preferable when rough topological similarity suffices across massive batches.
  • Future Directions: The authors view strict compliance as a foundational starting point. Natural next steps include extending to richer filtration schemes (beyond vertex-based ones), introducing controlled relaxations (such as generating graphs guaranteed to lie within a specific topological distance ball), and embedding their exact constraint encodings directly inside learned neural generators.

Summary updated

BibTeX
@inproceedings{ji2026exact,
  author = {Mattie Ji and Indradyumna Roy and Vikas K Garg},
  title = {{Exact Topological Compliance: Generating Persistence-Equivalent Graphs}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=xcQkqD4abA},
}
Figure