NGTM: Substructure-based Neural Graph Topic Model for Interpretable Graph Generation
Yuanxin Zhuang, Dazhong Shen, Ying Sun · 2025
Read NGTM: Substructure-based Neural Graph Topic Model for Interpretable Graph Generation by Yuanxin Zhuang, Dazhong Shen, Ying Sun (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2507-13133.txt.
Introduction
Yuanxin Zhuang, Dazhong Shen, and Ying Sun propose a new way to generate graphs in a 2025 paper. Graphs matter in fields from molecule design to knowledge maps. Past generators make realistic graphs, but they rarely show why a structure was chosen, which limits trust and control.
Their model borrows from topic modeling in language. It treats a graph as a mix of hidden topics, and each topic is a pattern over meaningful building blocks. A global variable captures the overall structure, so each graph can be traced back to its topic mix. In tests, the model matched rival generators on quality. It also let users tune topics to steer features or induce traits in molecules. The authors stress fine grained control as the main gain.
Catalog record
| CREATOR | Yuanxin Zhuang, Dazhong Shen, Ying Sun |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 54 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2507-13133
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
NGTM: Substructure-based Neural Graph Topic Model for Interpretable Graph Generation Yuanxin Zhuang, Dazhong Shen, Ying Sun Abstract Graph generation plays a pivotal role across numerous domains, including molecular design and knowledge graph construction. Although existing methods achieve considerable success in generating realistic graphs, their interpretability remains limited, often obscuring the rationale behind structural decisions. To address this challenge, we propose the Neural Graph Topic Model (NGTM), a novel generative framework inspired by topic modeling in natural language processing. NGTM represents graphs as mixtures of latent topics, each defining a distribution over semantically meaningful substructures, which facilitates explicit interpretability at both local and global scales. The generation process transparently integrates these topic distributions with a global structural variable, enabling clear semantic tracing of each generated graph. Experiments demonstrate that NGTM achieves competitive generation quality while uniquely enabling fine-grained control and interpretability, allowing users to tune structural features or induce biological properties through topic-level adjustments. 1 Introduction Graph generation is a fundamental task with diverse applications—including molecular design [ 1 ] , knowledge graph construction [ 2 ] , and relational data modeling [ 3 ] . While generating valid and accurate graphs is essential, understanding the underlying generative process and explaining structure formation is equally crucial [ 4 ] . This significance is particularly evident in high-stakes applications like drug discovery [ 5 ] , where generation process interpretability builds trust, enables rational design, and supports downstream scientific analysis [ 6 , 7 , 8 ] . Despite its importance, interpretability remains a major challenge in existing graph generation models [ 9 , 10 , 11 ] . Sequential methods, such as the auto-regressive model Graph Generative Pre-trained Transformer (G2PT) [ 12 ] and the reinforcement learning-based model ExSelfRL [ 13 ] , generate graphs step-by-step by incrementally adding nodes and edges. While their procedures are explicit, the underlying decisions depend heavily on hidden states, making semantic interpretation difficult. In contrast, models based on VAEs like DAVA [ 14 ] and GANs like ConfGAN [ 15 ] generate entire graphs from latent representations in a single forward pass, while diffusion-based models like ConStruct [ 16 ] iteratively refine graphs from random noise. Although these methods achieve strong performance and capture complex distributions, their latent spaces are often opaque and unaligned with interpretable graph components. As a result, they struggle to provide insights into the reasoning behind generated graphs. Graphs are often composed of key substructures that define their topology and functionality [ 17 ] . For example, molecular graphs contain recurring building blocks like functional groups or rings, which are essential to their structural diversity and chemical behavior [ 18 ] . Explicitly modeling these substructures improves the quality and diversity of generated graphs while uncovering hidden patterns that reveal new domain knowledge [ 19 , 20 ] . Additionally, this approach enhances generation transparency, enables precise control over substructure inclusion, and ensures generated graphs align with real-world characteristics. However, achieving interpretable graph generation remains challenging. Post hoc methods analyze latent features or learned representations after generation to identify meaningful patterns in graphs [ 21 , 22 ] . While useful, these approaches do not influence the generative process itself, leaving the reasoning behind structural decisions untraceable. Some generative models construct molecular graphs from substructures [ 18 , 20 , 19 ] . Although effective in improving validity and modularity, these methods have two key limitations: (1) they often struggle to automatically discover and organize previously unseen substructures into coherent semantic units; and (2) they often lack a unified, transparent narrative of the generation process, making it difficult to trace the relationships and contributions of individual substructures to the overall graph. Moreover, such reliance on predefined or pre-extracted substructures can constrain generative flexibility and hinder the discovery of novel structures. To address these challenges, we propose the Neural Graph Topic Model (NGTM), a novel interpretable generative framework inspired by topic modeling techniques in natural language processing [ 23 ] . NGTM models graphs as mixtures of latent topics, with each topic corresponding to a distinct distribution over interpretable graph substructures (e.g., rings, motifs, functional groups in molecular graphs). By explicitly extracting reusable structural units and organizing them into semantically coherent topics, NGTM achieves clear semantic organization in graph generation. Based on the topics, the generation process in NGTM is transparent and traceable, comprising three clear steps: (1) sampling a topic mixture to define the semantic profile of the target graph; (2) sampling relevant substructures based on these sampled topics; and (3) assembling these substructures under learned structural constraints to form a coherent graph, thus integrating both local interpretability (via explicit substructures) and global interpretability (via topic mixtures) in a unified and transparent way. Our experiments reveal that NGTM not only achieves competitive generation quality but, more importantly, pioneers a new level of interpretability and controllability in graph generation. The learned topics align robustly with meaningful structural and functional classes (e.g., carcinogenicity), providing a clear semantic basis. By adjusting these topics, NGTM enables continuous and fine-grained control over key graph properties, allowing the generation process to be precisely steered toward desired outcomes. 2 Results Figure 1: Figure 1. Overview of the NGTM framework for interpretable graph generation. (a) The probabilistic graphical model of NGTM. (b) Training phase: NGTM infers topic mixtures from real graphs and discovers semantically meaningful substructure topics, enabling reconstruction through interpretable latent factors. (c–e) Generation phase: (c) Multinomial sampling from \theta assigns each substructure to a topic, and the corresponding latent vectors are decoded into interpretable substructures. (d) Mapping matrices determine how substructures are softly aligned and integrated into the growing graph. (e) Visualization of the sequential assembly process guided by global structure vectors. (f) Example of controllable generation: adjusting topic proportions modifies graph semantics. 2.1 Overview of the NGTM Graph Generation Process Graphs can be viewed as compositions of structural motifs or substructures, each originating from a semantically meaningful latent topic. For example, molecular graphs typically contain interpretable substructures like rings, chains, and functional groups that frequently co-occur. To explicitly capture this structural diversity, we propose NGTM, a novel and interpretable generative approach that models graph structures as assemblies of substructures sampled from a set of latent topics. Specifically, we assume there are K latent topics, each topic defines a Gaussian distribution over latent embeddings of substructures, denoted as \Phi={\mathcal{N}(\mu^{k},\sigma^{k})}_{k=1}^{K} . These distributions are parameterized and learned through a Conditional Variational Autoencoder (CVAE) [ 24 ] , with topics serving as conditioning variables during training. Such a design enables the generation of diverse and potentially novel substructures without relying on a predefined substructure vocabulary. Latent vectors sampled from these topic-specific distributions are decoded into adjacency matrices representing meaningful subgraphs. To govern the semantic composition, we introduce a latent variable drawn from \mathcal{N}(\mu^{\theta},\sigma^{\theta}) , transformed via softmax into a topic proportion vector \theta . This vector directs the topic selection for substructure generation, ensuring semantic coherence in the resulting graph. Additionally, we introduce a global structural variable g\sim\mathcal{N}(\mu^{g},\sigma^{g}) to capture high-level topological properties such as density, connectivity, and overall layout. This global guidance ensures that the final assembled graph is coherent, realistic, and structurally sound. The NGTM generative framework is outlined in Figure 1 , where Figure 1 (a)