Exact Topological Compliance: Generating Persistence-Equivalent Graphs

Mattie Ji, Indradyumna Roy, Vikas GargarXiv 2026

TL;DR

This paper introduces the first principled methods for strict topological compliance in graph generation, ensuring that generated graphs exactly match a target persistence diagram (PD). By moving beyond the "soft approximation" of existing neural models, the authors provide a local iterative sampler and a global constraint programming solver that guarantee both soundness (exact matches) and completeness (reachability of all valid graphs).

What Problem Does This Paper Address?

Topological features—like the number of connected components and cycles—are critical to the function of real-world networks, from the stability of molecules to the efficiency of transportation grids. Persistent Homology (PH) is the mathematical tool used to track these features, summarizing them into a Persistence Diagram (PD).

While modern generative models (like diffusion or autoregressive models) can be "topology-aware," they typically rely on soft regularization (e.g., minimizing a Wasserstein loss between diagrams). This often results in graphs that are "topologically similar" but lack the exact number of cycles or components required. The authors address this gap by asking: Can we generate graphs that realize a target PD exactly?

Methods

The authors propose two distinct frameworks for achieving exact compliance:

  1. Local Iterative Sampler (Section 3): This approach builds a graph step-by-step by adding vertices, merging components, and creating cycles. While intuitive and computationally efficient for sparse graphs, the authors prove a "fundamental limitation": local decisions can lead to "infeasible states" where it becomes impossible to satisfy global topological requirements later in the process.
  2. Global Constraint Programming (Section 4): To overcome the limits of local sampling, the authors recast graph generation as a Constraint Satisfaction Problem (CSP). They develop a complete encoding using Boolean and integer variables to represent the adjacency matrix and topological invariants (like the Euler characteristic). This method ensures that all global constraints are satisfied simultaneously.

The methods primarily target the vertex-degree filtration, a common scheme in graph learning, but the global framework is extensible to other schemes like triangle counts, clustering coefficients, and various centrality measures.

Figure 1: Two non-isomorphic graphs with identical degree-based persistence. Vertex color encodes degree; edges inherit the color of their max-degree endpoint.

Datasets

The methods were evaluated on four standard graph generation benchmarks:

  • COMM-20: Small, dense two-community stochastic block models.
  • PLANAR: Randomly generated planar graphs.
  • SBM: Large stochastic block model graphs (the most challenging due to size and density).
  • ENZYMES: Real-world protein contact maps.

These datasets span a variety of sizes, densities, and topological regimes, providing a robust test for both the local and global algorithms.

Key Insights and Ideas

  • The "Structural Approximation Gap": Neural models, even when conditioned on topology, often merge components or overshoot cycle counts because their losses are "soft." The authors demonstrate that exact compliance requires a combinatorial, rather than purely gradient-based, approach.
  • Local Failure Modes: A key "aha moment" is the proof (Theorem 3.10) that any local approach must trade off between diversity and feasibility. A local choice that seems valid for a sub-graph might prevent the global graph from ever reaching the target PD.
  • Minimal Encoding: For the degree filtration, the authors proved their constraint programming encoding is "minimal-sufficient," meaning every constraint is necessary to prevent the generation of topologically incorrect graphs.
Figure 2: An example of how Algorithm 1 can run out of cycles in the cycle adding stage.

Key Results

  • Exact Fidelity: Both proposed methods achieve a 1-Wasserstein distance ($W_1$) of 0.00 across all successful runs, meaning they match the target topology perfectly. In contrast, neural baselines (like DiGress+TAGG) consistently show a residual structural gap.
  • Global Superiority on Hard Tasks: On the complex SBM dataset, the local sampler succeeded on only 15% of targets, while the Global CP solver reached 82.5% success within the time budget.
  • Efficiency Trade-offs: The local sampler is significantly faster (up to 2.8x) on smaller, sparser datasets like COMM-20, making it a "cheap" option for simple topologies, while the CP solver is necessary for "tightly constrained" global structures.

Limitations and Future Work

  • Scalability: Constraint programming is NP-hard. While the encoding size is polynomial, very large or extremely dense graphs (e.g., the 17.5% of SBM targets that timed out) remain a challenge.
  • Higher-Order Topology: The current work focuses on 0D (components) and 1D (cycles) features. Extending this to higher-order voids in simplicial complexes would require more complex matrix-reduction constraints.
  • Hybrid Models: The authors suggest that their exact encoding could be used as a "building block" or a "projector" inside learned neural generators to combine the best of both worlds: the expressive power of deep learning with the guarantees of exact topology.

Summary updated

BibTeX
@misc{ji2026exact,
  author = {Mattie Ji and Indradyumna Roy and Vikas Garg},
  title = {{Exact Topological Compliance: Generating Persistence-Equivalent Graphs}},
  year = {2026},
  eprint = {2610.18856},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.18856},
}
Figure