Hybrid Topic-Semantic Labeling and Graph Embeddings for Unsupervised Legal Document Clustering
Organizations: Department of Mathematical Sciences, Salisbury University · Department of Mathematics and Statistics, Carleton College
Abstract
Legal documents pose substantial challenges for unsupervised knowledge discovery due to specialized domain terminology, multi-scale document lengths, and scarce expert annotations. This paper introduces Topic-Graph Spherical Fusion (TGSF), a dual-manifold representation learning framework for unsupervised legal document clustering that unifies dense topic-semantic discovery and relational graph embeddings on a joint unit hypersphere. Instantiating dense topic discovery via Top2Vec and biased second-order random walks via Node2Vec, TGSF constructs a connected multi-relational document-topic graph combining multi-topic centroid bridges with temperature-sharpened semantic k-Nearest Neighbor (k-NN) document edges, guaranteeing a single connected component. The resulting L2-normalized semantic and graph representations are fused via modality-weighted concatenation onto a joint unit hypersphere prior to KMeans partitioning, decomposing squared chordal distance into a convex combination of semantic and structural cosine similarities. Evaluations across three legal benchmarks (ACORD, CUAD, and LEDGAR) show that TGSF outperforms semantic-only, structural-only, Latent Dirichlet Allocation (LDA), Non-Negative Matrix Factorization (NMF), and TF-IDF baselines. Across 216 factorial grid configurations and 240 Bayesian TPE and Multi-Objective NSGA-II Pareto optimization trials per dataset (720 trials total), TGSF improves Normalized Mutual Information (NMI) from 0.606 to 0.653 on LEDGAR (ARI = 0.425), 0.228 to 0.284 on ACORD (ARI = 0.260), and 0.535 to 0.570 on CUAD (ARI = 0.282). Functional ANOVA and Pareto frontier diagnostics further characterize hyperparameter sensitivity for reproducible legal text mining.
Figures & tables
| Benchmark | Legal Text Granularity | Documents ( ) | Discovered Topics ( ) | Eval. Clusters ( ) | Source Repository |
| LEDGAR ( Tuggener et al., 2020 ) | Functional Contract Provisions | SEC EDGAR / LexGLUE | |||
| ACORD ( Wang et al., 2025 ) | Retrieval Clauses & Queries | Atticus Project | |||
| CUAD ( Hendrycks et al., 2021 ) | Full Commercial Agreements | SEC EDGAR / Atticus |
| Dataset | Model Configuration | Silhouette ( ) | DBI ( ) | CHS ( ) | NMI ( ) | ARI ( ) |
| LEDGAR ( ) | TF-IDF + KMeans | 0.085 | 4.564 | 25.9 | 0.523 | 0.213 |
| LDA ( ) | 0.594 | 1.138 | 601.0 | 0.567 | 0.331 | |
| NMF ( ) | 0.336 | 1.041 | 439.4 | 0.509 | 0.176 | |
| Top2Vec Only (Semantic, ) | 0.117 | 3.063 | 61.2 | 0.553 | 0.324 | |
| Node2Vec Only (Structural , ) | 0.271 | 2.015 | 110.5 | 0.593 | 0.356 | |
| TGSF (Grid Search, MiniLM, ) | 0.203 | 2.421 | 88.1 | 0.606 | 0.395 |
| Dataset | Statistic | NMI | ARI | Silhouette | DBI | CHS |
| LEDGAR ( ) | Mean SD | |||||
| Min – Max | ||||||
| Optimal Config | ||||||
| ACORD ( ) | Mean SD | |||||
| Min – Max | ||||||
| Optimal Config | ||||||
| Dataset | HPO Statistic / Optimal Regime | NMI ( ) | ARI ( ) | Silhouette ( ) | DBI ( ) | CHS ( ) |
| LEDGAR ( ) | 216-Grid Best (MiniLM, ) | |||||
| Bayesian HPO Best (Trial #131) | ||||||
| Max-ARI Trial (Trial #50) | ||||||
| 240-Trial Mean SD | ||||||
| 240-Trial Min – Max | ||||||
| Optimal Hyperparameters ( ) | Legal-BERT, | |||||
| Dataset | Model Configuration | Silhouette ( ) | CHS ( ) | DBI ( ) | NMI ( ) | ARI ( ) |
| LEDGAR ( ) | TF-IDF + KMeans (Lexical Baseline) | 0.085 | 25.9 | 4.564 | 0.523 | 0.213 |
| Top2Vec + KMeans (Semantic-Only, ) | 0.117 | 61.2 | 3.063 | 0.553 | 0.324 | |
| Node2Vec + KMeans (Structural-Only, ) | 0.271 | 110.5 | 2.015 | 0.593 | 0.356 | |
| TGSF (Balanced Spherical Fusion, ) | 0.203 | 88.1 | 2.421 | 0.606 | 0.395 | |
| TGSF (Bayesian HPO Spherical Fusion, ) | 0.316 | 137.2 | 1.916 | 0.653 | 0.422 | |
| ACORD ( ) | TF-IDF + KMeans (Lexical Baseline) | 0.045 | 26.6 | 5.084 | 0.173 | 0.145 |