arXiv:2610.24624cs.LGOct 2026

Manuscript Offprint

arXiv:2610.24624

Uncovering Semantic Hierarchies in Text-Attributed Graphs via Variational EM-based LLM-GNN Synergy

Yunhui Liu, Xudong Jin, Qizhuo Xie, Chunhui Zhao, Xiao Luo, Tao Zheng, Bin Chong, Tieke He

Abstract

While hierarchical structures are intrinsic to organizing human knowledge, current representation learning on text-attributed graphs predominantly operates on flat semantic spaces, overlooking the rich coarse-to-fine granularity inherent in real-world data. To bridge this gap, we propose SHiFT, which synergizes the reasoning power of LLMs with the structural representation capability of GNNs within an Expectation-Maximization (EM) paradigm. In the E-step, we harness LLMs as expert taxonomists to induce an explicit semantic tree, introducing a lightweight Mapping & Diagnosis strategy that reduces inference costs by surgically updating the hierarchy only when anomalies are detected. In the M-step, we align the GNN encoder with this induced hierarchy from complementary perspectives, including clustering partition, topological skeleton, and semantic concepts. Theoretical analysis interprets SHiFT as a generalized Variational EM algorithm. Extensive experiments demonstrate that SHiFT not only achieves state-of-the-art performance but also uncovers high-quality, human-readable taxonomies. Our code can be found at https://github.com/Cloudy1225/SHiFT.

1 Introduction

Structuring knowledge into hierarchies is fundamental to human cognition [56] and modern AI systems, underpinning biomedical ontologies [60], document taxonomies [10], and recent advances in retrieval-augmented generation [18] and agent memory [49]. Yet hierarchical modeling remains underexplored for Text-Attributed Graphs (TAGs), graphs where nodes carry rich textual content and edges encode semantic relations, which are pervasive in scientific literature, e-commerce, and social media [19]. In these domains, data exhibits natural hierarchical semantics: for instance, in a citation network, Large Language Models and Graph Machine Learning are distinct sub-fields of Artificial Intelligence, residing on different branches from Computer Vision [50]. An ideal embedding space should reflect this geometry, encoding node similarity across levels of semantic abstraction.

Figure

Figure 1: Existing paradigms vs. SHiFT.

∗^{*}Corresponding author.

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

However, prevailing TAG methods, ranging from classic Graph Neural Networks (GNNs) [23] to recent interactions with Large Language Models (LLMs) [19], predominantly operate on flat semantic structures, as shown in Figure 1. While they excel at capturing the graph topology, they often fail to disentangle the semantic hierarchy inherent in the node documents. Existing attempts to introduce hierarchy into graph learning, such as hyperbolic embeddings [2, 68], typically focus on geometric properties. These methods require complex optimization and, crucially, yield latent hierarchies that lack semantic interpretability, e.g., they provide coordinates, not concepts. Consequently, a critical question arises: How can we effectively uncover and model the explicit semantic hierarchy in TAGs when such taxonomies are absent or incomplete?

Addressing this question is non-trivial due to the duality of the data: the hierarchy is partially encoded in textual semantics and partially implied by the graph topology, like community structures. Aligning these modalities presents a dilemma. While LLMs possess vast internalized knowledge to recognize semantic hierarchies [21, 73], they lack the ability to perceive the graph structures that reveal subfields. Conversely, GNNs excel at structural clustering [31, 40, 39] but lack the semantic capability to name and organize these clusters into a meaningful taxonomy. Furthermore, naive solutions, such as prompting an LLM to classify every node independently [63], are not only prohibitively expensive but also disregard the relational signals provided by the graph structure.

To bridge this gap, we propose SHiFT (Semantic Hierarchy-induced Framework for Text-attributed graphs), which synergizes the semantic reasoning of LLMs with the structural representation power of GNNs within an Expectation-Maximization (EM) style framework. In the E-step, we harness LLMs as expert taxonomists: hierarchical clustering on the embedding space selects representative coreset documents, from which the LLM induces a tree-structured taxonomy with explicit concept names and definitions; to mitigate inference cost, a lightweight Mapping & Diagnosis strategy invokes the LLM only upon detecting anomalies such as concept drift or low cluster cohesion. In the M-step, we optimize the GNN encoder via a unified objective that internalizes three facets of the induced taxonomy: Taxonomy Partition Alignment, enforcing local cohesion by grouping nodes per cluster assignment; Taxonomy Skeleton Alignment, imposing a global geometric constraint so that embedding distances mirror path distances in the hierarchy; and Taxonomy Concept Alignment, anchoring node embeddings to LLM-generated concepts across multiple abstraction levels for semantic grounding. This iterative process lets graph topology guide the LLM toward topologically consistent concepts, while the LLM guides the GNN toward a semantically organized space.

We further provide a formal theoretical analysis showing SHiFT instantiates a generalized Variational EM algorithm, offering a principled account of its convergence. Experiments show that SHiFT not only achieves state-of-the-art performance in classification and clustering tasks but also produces high-quality, human-readable taxonomies that reveal the latent organization of the data.

References (71)