arXiv:2610.18856cs.LGOct 2026

Manuscript Offprint

arXiv:2610.18856

Exact Topological Compliance: Generating Persistence-Equivalent Graphs

Mattie Ji, Indradyumna Roy, Vikas Garg

Abstract

Persistent homology summarizes the topological evolution of a graph as persistence diagrams (PDs). Generating graphs whose topology matches a target descriptor is increasingly important, yet existing topology-aware generative models rely on soft regularization, producing graphs whose PDs may only be approximately similar. We initiate a principled investigation of the generation problem: produce graphs that realize a target PD exactly. We propose two approaches guided by the implicit local and global constraints a target PD imposes. The local approach builds degree-based PD-equivalent graphs iteratively, and we prove that every output realizes the target PD and that every degree-based PD-equivalent graph is reachable. However, as shown thereafter, local generation necessarily trades off between sample diversity and reaching infeasible states. We therefore recast generation as a global constraint satisfaction problem with a complete encoding solvable by modern constraint programming solvers. This is applicable to any vertex-based permutation equivariant filtration scheme and is minimal under the degree filtration. Experiments on four standard graph generation benchmarks confirm that both methods realize the target PD exactly. Together, our methods provide a principled treatment of strict topology-compliant graph generation. Code is available at https://github.com/Aalto-QuML/ExactCompliance.

1 Introduction

Topological structure is a primary driver of function in many real-world graphs. The presence of components, cycles, and higher-order voids govern stability and catalytic activity in molecules [59, 49, 55], binding affinity and virality [56, 57], information flow in brain networks [47], certain patterns in medical imaging [33], and structural risk in transportation, trade, and infrastructure networks [58, 28, 53]. Persistent homology [4, 14] is the standard tool for extracting this information. Given a graph G and a filtration scheme, persistent homology tracks the births and deaths of homological features along the induced subgraph sequence. The result is a multiset of pairs (b,d)(b, d) called the persistence diagram (PD). PDs are stable under perturbation [8], computable with efficient algorithms [38], and have become the workhorse of topological data analysis (TDA) in machine learning, underpinning almost every topology-aware approach to graph and higher-order neural networks [19, 22, 2, 21, 24, 23, 62, 5, 44, 51, 39] and providing topological signals that standard message passing alone cannot recover (e.g., cycle detection).

In parallel, graph generation has recently emerged as a central tool across these same domains, with autoregressive [63], one-shot [46], and diffusion-based [36, 27, 52] models. Recent work conditions generation on domain-specific structural properties: spectral profile [32], molecular validity [10, 26], and structural constraints like planarity and acyclicity [30]. Conditioning on topology is a natural next step, but largely unexplored. A recent attempt [40], augments discrete diffusion with a 1-Wasserstein

∗^{*}Equal Contributions.

40th Conference on Neural Information Processing Systems (NeurIPS 2026).

Table 1: Overview of the core contributions in our paper.

Local Generation of PD-Equivalent Filtrations (Section 3)
Local Generation for General/Vertex/Degree FiltrationsAlgorithm 1, 2, 3
Correctness and Diversity of Local GenerationsTheorem 3.1, 3.7, 3.9
Perfect Generation on Acyclic Graphs (for General/Vertex)Corollary 3.4, 3.8
Impossibility Results for Local GenerationTheorem 3.10
Global Generation of PD-Equivalent Graphs (Section 4)
Global Generation for Any Canonical Vertex Filtration Scheme Φ\PhiSection 4.1
Soundness, Completeness, and Degree Minimality of EncodingTheorem 4.2
Experiments (Section 5)
Local vs. Global on Four Graph Generation BenchmarksTable 2
Comparison Against PD-Conditioned Neural Diffusion BaselinesTable 3, Figure 3

PD-matching loss. This soft regularizer nudges the learned distribution toward topological plausibility, but offers no guarantees that individually generated graphs attain the desired topological structure (e.g., the target number of cycles and components).

PD-conditioned graph generation from first principles. A PD is a finite summary of an underlying combinatorial structure and therefore collapses many graphs to the same image. The most widely studied filtration scheme in the graph learning literature is the vertex-degree function [2, 21, 40, 62, 19, 20]: it is permutation-equivariant and aligns naturally with the local message-passing inductive bias of GNNs. We adopt it as the primary filtration scheme throughout this paper and discuss extensions to other vertex-based, permutation-equivariant schemes (centrality [29], square clustering coefficients [25], triangle count [48], etc.) where they apply.

Even under this canonical choice, a PD is far from a complete descriptor. Figure 1 shows two non-isomorphic graphs with identical degree-based PDs; in general, graphs with differing structures and connectivity patterns, can share the same PD under a given filtration scheme. Each PD therefore identifies a class of compatible graphs, and conditioning on a PD amounts to sampling from this class. This raises the natural question: given an input PD and filtration scheme Φ\Phi, can we generate strictly PD-compatible graphs under Φ\Phi?

Figure

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

This motivates a precise criterion for any PD-conditioned generator. Given a filtration scheme Φ\Phi and a graph GG, we let P(G∙Φ)\mathcal{P}(G_{\bullet}^{\Phi}) denote the PDs associated to the induced subgraph sequence of GG under Φ\Phi. We call a generator strictly PD-compliant if it satisfies

  1. Soundness. Every sample GG from the generator satisfies P(G∙Φ)=D\mathcal{P}(G_{\bullet}^{\Phi}) = D exactly.

  2. Completeness. Every PD-compatible graph can be created by the generator.

Soft-conditioned models violate soundness by construction. Aiming for strict PD-compliance is the natural starting point: it makes the conditioning problem precise, and exposes what an input PD does and does not pin down. Once strict compliance is attained, it can be relaxed in applications.

Why exact compliance? Exact generation produces families of graphs with identical persistence diagrams but different combinatorial properties. Such families provide controlled datasets and benchmarks for training and evaluation in topological learning, and one can test whether a model truly exploits the prescribed topology or leans on unrelated statistics. They also give clean training and evaluation data for graph generation and reasoning from topological descriptors, with no label noise from approximate PD matching.

Exact generation can also help find counterexamples to conjectures about what properties are determined by persistence, and approximate generation cannot serve this purpose at all. Exactness is also important when applications critically depend on the exact number of topological features, such as ring counts in molecular generation [43] and coverage holes in sensor networks [11].

Contributions. We initiate a principled investigation of strict PD-compliant graph generation; Table 1 summarizes the formal statements. Our contributions are threefold.

(1) Local iterative sampler (Section 3). Local decisions are a prerequisite for any globally correct generation and rely only on the neighborhood-level information standard GNN pipelines already provide, making them the natural starting point. We give a sampler that is sound and complete on general, vertex-based, and degree filtrations, but the sampler can run into infeasible states. We subsequently prove an impossibility result: any local approach must trade off between locally PD-compliant choices and reaching globally infeasible states.

(2) Global generation via constraint programming (Section 4). The impossibility motivates us to characterize the global constraints. We recast generation as a constraint satisfaction problem applicable to any vertex-based permutation-equivariant filtration scheme, and give concrete encodings for degree, triangle and clique counts, clustering, closeness, Katz, and PageRank. We prove our method is strictly PD-compliant, and is a minimal encoding for degree filtrations.

(3) Empirical validation (Section 5). On COMM-20, PLANAR, SBM, and ENZYMES, both methods realise the target degree-PD exactly, while neural diffusion baselines with PD-conditioning regularisers leave a structural approximation gap that does not close with more training.

Related Works. Persistence-based reconstructions have been studied for embedded graphs, geometric shapes, and metric-measure spaces [7, 6, 1, 3, 45, 35, 17, 37]. These approaches exploit extrinsic information such as coordinates, directions, distances, or sampling measures to recover or analyze a geometric realization. In contrast, we consider abstract graphs without prescribed embeddings and characterize the set of graphs realizing specified persistence diagrams under an intrinsic, permutation-equivariant filtration. Our framework therefore complements geometric reconstruction methods by studying graphs sharing a common intrinsic PH signature. We only consider graph filtrations, as this is quite common for the usage of persistent homology in the GNN literature [19, 21, 22, 64, 48].

To compare the two, the persistent homology transform (PHT) [50] is injective [16, 9] on embedded graphs, but it does not resolve the graph isomorphism problem, as two different embeddings of the same abstract graph can have different PHTs. Our setting contains no coordinates, and we want to reconstruct abstract graphs with equivalent PDs, with the goal of benchmarking for graph isomorphisms. Another deviation from typical TDA considerations is that the GNN literature typically requires permutation equivariance for their filtrations. This imposes a strong rigidity on filtrations that typically do not show up for embedded graphs. For example, any permutation equivariant function on a cycle graph has to be constant, but certainly we can look at the height filtration on embedded cycles.

References (56)