Uncovering Semantic Hierarchies in Text-Attributed Graphs via Variational EM-based LLM-GNN Synergy
Organizations: State Key Laboratory for Novel Software Technology, Nanjing University · Department of Statistics, University of Wisconsin–Madison · National Engineering Laboratory for Big Data Analysis and Applications, Peking University
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.
Figures & tables
| Method | Cora | Citeseer | ArXiv | WikiCS | Computer | Avg. |
|---|---|---|---|---|---|---|
| Classic/Hyperbolic GNNs and PLMs | ||||||
| GCN SE [ 23 ] | 82.30 ±0.19 | 70.55 ±0.32 | 71.39 ±0.28 | 79.86 ±0.19 | 71.44 ±1.19 | 75.11 |
| SAGE SE [ 13 ] | 82.27 ±0.37 | 69.56 ±0.43 | 71.21 ±0.18 | 79.67 ±0.25 | 81.43 ±0.27 | 76.83 |
| GAT SE [ 59 ] | 81.30 ±0.67 | 69.94 ±0.74 | 71.57 ±0.25 | 79.99 ±0.65 | 83.39 ±0.22 | 77.24 |
| HGCN [ 2 ] | 80.38 ±0.69 | 70.83 ±0.62 | 70.39 ±0.38 | 79.26 ±0.39 | 79.44 ±0.49 | 76.06 |
| HGCL [ 27 ] | 82.37 ±0.47 | 72.11 ±0.64 | 71.40 ±0.68 | 80.16 ±0.35 | 80.28 ±0.55 | 77.26 |
| Method | Cora | Citeseer | WikiCS | |||
|---|---|---|---|---|---|---|
| NMI | ARI | NMI | ARI | NMI | ARI | |
| GNN-based Methods | ||||||
| DMoN [ 58 ] | 49.00 | 43.70 | 39.10 | 38.40 | 23.50 | 9.00 |
| MAGI [ 29 ] | 52.90 | 46.40 | 41.10 | 39.60 | 46.70 | 38.10 |
| LLM+GNN Methods | ||||||
| GCLR [ 57 ] | 50.87 | 59.20 | 43.30 | 42.49 | 32.51 | 36.49 |
| Input Features | Cora | Citeseer | WikiCS |
|---|---|---|---|
| Backbone: MLP (Structure-agnostic) | |||
| 76.05 ±0.41 | 67.22 ±0.49 | 75.79 ±0.18 | |
| 72.68 ±0.34 | 67.51 ±0.58 | 77.50 ±0.24 | |
| 80.59 ±0.18 | 71.05 ±0.55 | 78.06 ±0.37 | |
| 81.91 ±0.55 | 72.83 ±0.73 | 78.33 ±0.21 | |
| Backbone: GCN (Structure-aware) | |||
| Method | Cora | Citeseer | WikiCS | Avg Drop |
|---|---|---|---|---|
| SHiFT (Full) | 84.83 ±0.58 | 73.96 ±0.92 | 82.40 ±0.48 | - |
| w/o EM (One-pass) | 83.27 ±0.37 | 72.62 ±0.75 | 81.48 ±0.54 | 1.27 |
| w/o TPA (Partition) | 83.46 ±0.35 | 72.84 ±0.76 | 81.18 ±0.22 | 1.24 |
| w/o TSA (Skeleton) | 83.34 ±0.27 | 72.31 ±0.94 | 81.38 ±0.23 | 1.39 |
| w/o TCA (Concept) | 84.14 ±0.60 | 73.56 ±0.83 | 82.05 ±0.44 | 0.48 |
Appendix figures & tables10 assets
Supplementary material from the paper’s appendix.
Appendix
| Dataset | #Nodes | #Edges | #Classes | Domain |
|---|---|---|---|---|
| Cora | 2,708 | 5,429 | 7 | Citation |
| Citeseer | 3,186 | 4,277 | 6 | Citation |
| ArXiv | 169,343 | 1,166,243 | 40 | Citation |
| WikiCS | 11,701 | 216,123 | 10 | Web Link |
| Computer | 87,229 | 721,081 | 10 | E-Commerce |
| Method | Acc@L3 | Acc@L2 | Acc@L1 | hF |
|---|---|---|---|---|
| MLP | 64.32 0.58 | 73.65 0.65 | 81.32 0.49 | 73.45 0.42 |
| GCN | 70.91 0.52 | 78.52 0.33 | 83.84 0.18 | 77.85 0.39 |
| TAPE | 71.54 0.41 | 79.43 0.28 | 84.41 0.31 | 78.96 0.33 |
| SHiFT | 74.18 0.44 | 81.27 0.31 | 85.73 0.25 | 81.34 0.28 |
| Taxonomy | Precision | Recall | Cophenetic |
|---|---|---|---|
| (text-only) | 0.7969 | 0.5160 | 0.2852 |
| (cold-start) | 0.8814 | 0.5863 | 0.5603 |
| (Ours) | 0.9145 | 0.6399 | 0.6423 |
| Metric | GCN | SenBERT | RoBERTa | ENGINE | GCN | TAPE | GraphGPT | LLaGA | LLM | SHiFT (Ours) |
|---|---|---|---|---|---|---|---|---|---|---|
| GPU Mem. (GB) | 4.79 | 9.98 | 46.10 | 7.08 | 7.36 | 46.10 | 60.41 | 41.94 | 69.13 | 16.76 † |
| Total Time | 51s | 7m | 41m | 2.6h | 1.4h | 37.4h | 7.8h | 7.7h | 36.3h | 5.5h |
| † SHiFT runs on a 32 GB V100; methods with 40 GB memory require 80 GB A100/H100 GPUs. | ||||||||||
| Phase | LLM Calls | Reduction vs. Init. |
|---|---|---|
| Taxonomy Initialization | 1,217 | – |
| Incremental Update 1 | 285 | 76.6% |
| Incremental Update 2 | 270 | 77.8% |
| LLM Used | Cora | Citeseer | WikiCS |
|---|---|---|---|
| DeepSeek-V3 (Default) | 84.83 ±0.58 | 73.96 ±0.92 | 82.40 ±0.48 |
| Qwen3-32B | 82.44 ±0.37 | 73.24 ±1.03 | 82.04 ±0.41 |
| Qwen3-8B (Lightweight) | 84.14 ±0.60 | 72.97 ±0.27 | 81.65 ±0.18 |
| w/o LLM (GCN Backbone) | 81.70 ±1.01 | 69.71 ±0.64 | 79.95 ±0.15 |
| Cora | Citeseer | |
|---|---|---|
| 1.0 (equal) | 84.21 | 73.18 |
| 1.25 | 84.52 | 73.67 |
| 1.5 (default) | 84.83 | 73.96 |
| 2.0 | 84.45 | 73.40 |
| Depth | Cora | Citeseer | WikiCS |
|---|---|---|---|
| 2 | 84.40 ±0.30 | 73.57 ±0.63 | 81.63 ±0.17 |
| 3 (Default) | 84.83 ±0.58 | 73.96 ±0.92 | 82.40 ±0.48 |
| 4 | 84.20 ±0.20 | 72.70 ±0.82 | 81.85 ±0.65 |
| Cora Ground Truth | SHiFT Induced Concept ( ) |
|---|---|
| Neural Networks | Neural Network Modeling |
| Rule Learning | Decision Tree Learning |
| Reinforcement Learning | RL with Function Approximation |
| Probabilistic Methods | Bayesian Graphical Models |
| Theory | Agnostic Learning Theory |
| Genetic Algorithms | Evolutionary Algorithms |
Text-Attributed Graph Learning
Text-attributed graph learning combines node text and graph structure to improve classification, retrieval, anomaly detection, and reasoning.
See all 62 papers