Exact Topological Compliance: A New Approach to Generating Persistence-Equivalent Graphs

The study proposes local iterative and global constraint satisfaction methods, achieving graph generation that exactly matches target persistence diagrams for the first time.
This article explores exact topological compliance in graph generation within topological data analysis. Existing topology-aware generative models rely on soft regularization and can only approximately match target persistence diagrams. The researchers propose two methods: local-constraint-based iterative generation, which guarantees exact realization and reachability but trades off diversity; and reformulating the problem as a global constraint satisfaction problem, applicable to any vertex-based permutation-equivariant filtration scheme. Experiments on four benchmarks show both methods exactly realize the target persistence diagram, and the code is open-sourced.
In topological data analysis, persistent homology is a powerful tool that summarizes the topological evolution of a graph into persistence diagrams (PDs). In recent years, generating graphs whose topological structure matches a target descriptor has become increasingly important, especially in graph generation and network analysis. However, existing topology-aware generative models typically rely on soft regularization, so the persistence diagrams of generated graphs can only be approximately similar. Recently, a study conducted a principled investigation of the generation problem, aiming to generate graphs that exactly realize a target persistence diagram.
Background: Why Exact Topological Compliance Matters
Persistent homology captures topological features of a graph, such as connected components and loops, through persistence diagrams. In many applications, such as molecular design, social network simulation, and infrastructure planning, generated graphs must strictly satisfy specific topological constraints. For example, in drug discovery, the topological structure of a molecule directly affects its chemical properties. If the generated graph only approximately matches the target persistence diagram, it may lead to unusable results.
Existing methods usually use soft regularization, encouraging the generated persistence diagram to be close to the target through a loss function, but they cannot guarantee an exact match. This study proposes two methods aimed at exactly realizing a target persistence diagram, thereby addressing this fundamental issue.

Persistence Diagram (PD) is the core output of persistent homology. Given a filtration of a graph—that is, a process in which edges or vertices are gradually added as a parameter increases—each topological feature (such as a connected component or loop) has a "birth" and a "death" filtration value. A persistence diagram represents each feature as a point (birth, death) on the plane, where the horizontal coordinate is the birth time and the vertical coordinate is the death time. Points near the diagonal represent short-lived, noisy features, while points far from the diagonal represent significant and stable topological features. The distance between two persistence diagrams is usually measured by bottleneck distance or Wasserstein distance. Exactly realizing a target persistence diagram means that all birth-death pairs of topological features produced by the generated graph during filtration are exactly consistent with the target, rather than merely close in distance.
Permutation-Equivariant Filtration means that the filtration process remains invariant under permutations of vertex labels, that is, the topological features of the graph do not depend on the ordering of vertex labels. Common filtration schemes include degree filtration (adding vertices in order of vertex degree) and weight filtration (sorting by edge weights). Permutation equivariance is an important property that ensures the generated result does not depend on arbitrary vertex numbering, and it is also the prerequisite for the global constraint satisfaction method to be applicable to "any vertex-based permutation-equivariant filtration scheme."
Method 1: Local Iterative Generation
The first method is based on local constraints and iteratively constructs degree-based persistence-equivalent graphs. Specifically, the researchers proved that every output exactly realizes the target persistence diagram, and that every degree-based persistence-equivalent graph is reachable. This means that, starting from any initial graph, a series of local operations can generate all graphs satisfying the target persistence diagram.
However, this method has an inherent trade-off: the tension between sample diversity and reachability. To achieve certain topological structures, local generation may have to sacrifice diversity or even fall into an infeasible state. In other words, although local methods can guarantee exactness, they are limited in generating diverse graphs.
Method 2: Global Constraint Satisfaction
To overcome the limitations of local methods, the researchers reformulated the generation problem as a global Constraint Satisfaction Problem (CSP) and designed a complete encoding that can be solved by modern constraint programming solvers. This method is applicable to any vertex-based permutation-equivariant filtration scheme and is minimal under degree filtration.
The global method encodes topological constraints as constraints and uses a solver to find graphs satisfying all constraints. The advantage of this method is that it can handle complex global constraints and does not rely on an iterative process, thereby avoiding the diversity problem of local methods. Experiments show that both methods can exactly realize the target persistence diagram on four standard graph generation benchmarks.
Constraint Satisfaction Problem (CSP) is a class of mathematical problems consisting of a set of variables, the domain of values for each variable, and constraints that must be satisfied among the variables. The goal of solving a CSP is to find an assignment of variables such that all constraints are satisfied simultaneously. In the context of this article, the variables correspond to the connectivity relationships between vertices in the graph (or the existence of edges), and the constraints encode the topological features required by the target persistence diagram. Modern constraint programming solvers (such as CP-SAT, Gecode, etc.) use techniques such as backtracking search, constraint propagation, and conflict-driven learning to efficiently handle combinatorial explosion. The advantage of encoding graph generation as a CSP is that the solver can explore the solution space globally, avoiding infeasible states caused by greedy or iterative order in local methods; at the same time, the complete encoding guarantees that as long as a graph satisfying the target persistence diagram exists, the solver can find it.
Experimental Validation and Significance
The researchers conducted experiments on four standard graph generation benchmarks, including random graphs and community graphs. The results show that both methods can exactly realize the target persistence diagram, validating their effectiveness. In addition, the code has been open-sourced on GitHub (https://github.com/Aalto-QuML/ExactCompliance), providing a foundation for future research.
The significance of this work is that it provides the first principled treatment of graph generation with strict topological compliance, offering a reliable tool for applications requiring exact topological matching. In the future, this approach is expected to extend to more complex topological descriptors and higher-dimensional persistent homology.
Conclusion
Exact topological compliance in graph generation is a challenging problem, and this study provides solutions through both local and global methods. The local method is simple but has limited diversity, while the global method is more flexible but has higher computational complexity. Together, they open a new direction for the development of topology-aware generative models.
Topological Data Analysis (TDA) is an interdisciplinary field that aims to use topological tools (such as homology and persistent homology) to analyze the shape characteristics of high-dimensional, noisy data. Persistent homology is one of the most commonly used methods in TDA; it tracks the lifecycles of topological features under multi-scale filtrations and summarizes the shape of data into persistence diagrams. Introducing TDA tools into graph generation allows the generation process not only to focus on local connectivity patterns but also to globally control topological invariants such as the number of connected components and the number of loops. The work in this article is a typical representative of the intersection of TDA and generative models, elevating persistence diagrams from "analysis tools" to "generation targets" and providing a rigorous theoretical framework for topology-aware graph generation.
One-line Summary
This study proposes local iterative generation and global constraint satisfaction methods, achieving for the first time graph generation that exactly matches a target persistence diagram.
Paragraph Summary
This article discusses the problem of exact topological compliance in graph generation within topological data analysis. Existing topology-aware generative models rely on soft regularization and can only approximately match a target persistence diagram without guaranteeing exactness. The researchers propose two methods: first, local-constraint-based iterative generation, which constructs degree-based persistence-equivalent graphs through a series of local operations, guaranteeing that every output exactly realizes the target persistence diagram and that all equivalent graphs are reachable, though with a trade-off between sample diversity and reachability; second, reformulating the generation problem as a global constraint satisfaction problem, with a complete encoding solved by constraint programming solvers, applicable to any vertex-based permutation-equivariant filtration scheme and avoiding the diversity limitations of local methods. Experiments on four standard graph generation benchmarks show that both methods can exactly realize the target persistence diagram, and the code has been open-sourced.
Related articles

AI New Grad Resume Diagnosis: How to Stand Out for ML/CV Roles?
How can AI/ML new grads optimize their resumes to get interviews? Based on a real Reddit case, this article analyzes project selection, depth display, and structure for ML/CV roles, with actionable revision advice.

OpenAI Opens Up Decision Models as Competition with Jev Heats Up
OpenAI makes its decision model widely available, directly challenging first mover Jev. We analyze the impact on the decision model competitive landscape and key considerations for developers and enterprises.

Startup Growth Secrets: Early Sales Are Not the Key
At Disrupt, experts from Lovable, Polska, and Theory Ventures said early startup growth depends not on early sales but on a repeatable sales process, a clear ICP, team development, and data-driven iteration.