Path-Level Structural and Semantic Alignment for Hierarchical Multi-Label Text Classification
Authors: Xindi Wang, Aifen Xiong, Baiyang Wang, Xuri Ge, Robert Mercer, Frank Rudzicz, Yifan Peng, Zhumin Chen, Hongjun Wang
Organizations: School of Artificial Intelligence, Shandong University, Jinan, China · School of Information Science and Engineering, Shandong University, Qingdao, China · Department of Computer Science, Western University, London, Ontario, Canada · Faculty of Computer Science, Dalhousie University, Halifax, Nova Scotia, Canada · Department of Population Health Sciences, Weill Cornell Medicine, New York, NY, USA
Hierarchical multi-label text classification (HMTC) requires models to capture both structural dependencies among labels and the fine-grained semantics of labels at different hierarchy levels. Existing methods often model hierarchy through prediction constraints or representations of individual labels and local relations. Structural and semantic supervision, however, are usually formulated separately. We instead use complete root-to-node label paths as a shared unit for both. Our framework introduces two auxiliary training objectives while retaining a standard multi-label classifier at inference. PathSimNCE aligns document representations with hierarchical paths using hierarchy-aware contrastive targets. These targets provide graded supervision for structurally related paths while preserving explicit supervision for the ground-truth paths. The complementary semantic objective uses LLM-generated, document-conditioned descriptions of the same positive paths. It thereby provides context-specific label semantics beyond static label representations. Experiments on three benchmarks show consistent improvements: structural alignment is particularly beneficial in deeper hierarchies, while semantic alignment provides additional gains for fine-grained labels.
Figures & tables
Figure 1: An example of HMTC. Labels are organized in a top-down hierarchy from coarse to fine. Labels sharing the same color correspond to nodes along the same hierarchical label path.
Figure 2: Overview of the proposed hierarchy-aware representation learning framework. (a) Instead of treating labels as isolated identifiers, each label is associated with its root-to-node path in the hierarchy. The model is jointly optimized with three objectives: binary cross-entropy (BCE), PathSimNCE, and description alignment. (b) Description alignment uses LLM-generated path descriptions to provide complementary semantic supervision during training only. (c) PathSimNCE performs hierarchy-aware contrastive learning by combining text–path and path–path similarities to generate soft structural supervision targets.
Model
WOS
BGC
NYT
Micro-F1
Macro-F1
Micro-F1
Macro-F1
Micro-F1
Macro-F1
RoBERTa-base
86.45
78.89
81.40
67.13
81.79
72.06
HGCLR ( Wang et al., 2022 )
86.90
80.98
81.24
67.00
81.08
71.45
HiTIN ( Zhu et al., 2023 )
86.63
80.92
80.45
66.22
80.30
69.80
HILL ( Zhu et al., 2024 )
87.35
82.04
81.15
66.03
80.96
70.21
HALB ( Zhang et al., 2024 )
86.97
81.26
81.34
67.00
80.70
70.93
Table 1: Performance comparison with previous methods on the WOS, BGC, and NYT datasets. To ensure a fair comparison, all reproduced methods use the same RoBERTa-base encoder, regardless of the encoders originally adopted in their respective papers. Results for our method are reported as mean ± standard deviation over three runs. Bold indicates the best result in each column. Except for HYDRA Local, whose results are taken from the original paper, all reported results are obtained from our own experiments.
Dataset
#Labels
Depth
Avg # label
Avg length
WOS
141
2
2.00
207.62
BGC
146
4
3.01
162.88
NYT
166
8
7.58
605.90
Table 2: Statistics of the datasets.
WOS
BGC
NYT
Model
Micro-F1
Macro-F1
Micro-F1
Macro-F1
Micro-F1
Macro-F1
BCE
86.45 ± 0.16
78.89 ± 0.18
81.40 ± 0.13
67.13 ± 0.30
81.79 ± 0.18
72.06 ± 0.22
BCE+PathSimNCE
87.53 ± 0.23
80.66 ± 0.33
81.68 ± 0.19
67.85 ± 0.29
82.29 ± 0.12
72.94 ± 0.31
BCE+DESC
87.11 ± 0.22
79.68 ± 0.32
81.60 ± 0.15
67.73 ± 0.30
82.14 ± 0.21
72.43 ± 0.33
No Description
87.53 ± 0.23
80.66 ± 0.33
81.68 ± 0.19
67.85 ± 0.29
82.29 ± 0.12
72.94 ± 0.31
Template Description
86.17 ± 0.14
77.76 ± 0.22
81.72 ± 0.19
67.90 ± 0.29
82.32 ± 0.13
72.98 ± 0.36
Table 3: Ablation results on the three datasets. The upper block examines the contributions of the training objectives, and the lower block compares different forms of semantic supervision while retaining BCE and PathSimNCE. Results are reported as mean ± standard deviation over three runs.
Figure 3: Depth-wise Micro-F1 and Macro-F1 on NYT. Labels at depths of four or greater are grouped into the 4+ category because of data sparsity. The virtual Top label at depth 0 is excluded.
Figure 4: Document–path cosine similarity heatmaps on BGC for (a) BCE+PathSimNCE and (b) the full model. Each row represents a group of test documents sharing the corresponding ground-truth path, and each column represents a selected path embedding. Both panels use the same color scale, and darker colors indicate higher average cosine similarity.
Parameter
Value
Micro-F1
Macro-F1
β
0.3
82.06
72.70
0.2
82.52
73.18
0.1
82.20
72.83
βdesc
0.2
82.32
72.88
0.1
82.52
73.18
τh
0.10
82.30
72.66
Table 4: Hyperparameter sensitivity on the NYT dataset. Bold indicates the hyperparameter settings used in the final model and their corresponding performance.
Appendix figures & tables3 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 5: Macro-F1 gains over the BCE baseline across label-frequency percentile groups on NYT. Labels are ranked by their numbers of training instances and divided into five equally sized groups from the most frequent to the least frequent. Positive values indicate improvements over BCE.
Item
Case 1: Count Zero
Case 2: Coriolanus
Input Text
A stylish, streetsmart, frighteningly probable parable of the future … A corporate mercenary wakes in a reconstructed body, a beautiful woman by his side. Then Hosaka Corporation reactivates him, for a mission more dangerous than the one he’s recovering from: to get a defecting chief of R&D—and the biochip he’s perfected—out intact. … But this proves to be of supreme interest to certain other parties—some of whom aren’t remotely human …
The legendary Pelican Shakespeare series features authoritative and meticulously researched texts paired with scholarship by renowned Shakespeareans. Each book includes an essay on the theatrical world of Shakespeare’s time, an introduction to the individual play, and a detailed note on the text used. … With more than 1,800 titles, Penguin Classics represents a global bookshelf of the best works throughout history and across genres and disciplines.
Table 5: Predicted label sets of four model variants on two BGC test cases.
Figure 7: T-SNE visualization of text and path representations on the BGC dataset using the same 15 representative paths as in Figure 4 . Circles of the same color denote text representations whose ground-truth label sets contain the corresponding path, while the star marker of the same color denotes that path representation. (a) BCE + PathSimNCE. (b) Full Model. The spatial proximity between each text group and its corresponding path representation provides a complementary view of the document–path alignment shown by the cosine-similarity heatmaps.
Hierarchical multi-label classification (HMLC) is essential for modeling structured label dependencies in remote sensing. Yet existing approaches struggle in multi-path settings, where images may activate multiple taxonomic branches, leading to underuse of hierarchical information. We propose MAPLE (Multi-Path Adaptive Propagation with Level-Aware Embeddings), a framework that integrates (i) hierarchical semantic initialization from graph-aware textual descriptions, (ii) graph-based structure encoding via graph convolutional networks (GCNs), and (iii) adaptive multi-modal fusion that dynamically balances semantic priors and visual evidence. An adaptive level-aware objective automatically selects appropriate losses per hierarchy level. Evaluations on CORINE-aligned remote sensing datasets (AID, DFC-15, and MLRSNet) show consistent improvements of up to +42% in few-shot regimes while adding only 2.6% parameter overhead, demonstrating that MAPLE effectively and efficiently models hierarchical semantics for Earth observation (EO).
Boshko Koloski, Marjan Stoimchev, Jurica Levatić +2
Jožef Stefan Institute, Ljubljana, Slovenia · Jožef Stefan International Postgraduate School, Ljubljana, Slovenia
Large-scale multi-label text classification assigns a small subset of relevant labels to each document from a vocabulary containing thousands or tens of thousands of candidate labels. Although pretrained language models have improved semantic text representations, most representation-based approaches center their prediction pipelines on a primary encoder or combine auxiliary features within a single ranker. The complementarity between heterogeneous language models therefore remains insufficiently explored. We propose DualMLC, a dual-branch framework that processes the same document through an autoregressive decoder-only language model and a bidirectional encoder. Each branch maintains its own representation pathway and independently estimates relevance scores over the shared label space. DualMLC combines the two score vectors through late logit fusion, allowing shared evidence to reinforce relevant labels and branch-specific evidence to compensate for limitations in the other branch's representation. DualMLC achieves state-of-the-art results on three widely used large-scale multi-label text classification benchmarks. Ablation results further confirm that integrating the heterogeneous predictors produces stronger rankings than either branch alone. The source code is publicly available at https://github.com/huiyegit/DualMLC.
Hui Ye, Jing Zhang, Xiulong Yang +1
Department of Computer Science, Georgia State University, Atlanta, GA 30303, USA · Amazon, San Diego, CA, USA · School of Computer Science, Central China Normal University, Wuhan 430079, China
Hierarchical multi-label classification (HMLC) is essential for modeling complex label dependencies in remote sensing. Existing methods, however, struggle with multi-path hierarchies where instances belong to multiple branches, and they rarely exploit unlabeled data. We introduce HELM (Hierarchical and Explicit Label Modeling), a novel framework that overcomes these limitations. HELM: (i) uses hierarchy-specific class tokens within a Vision Transformer to capture nuanced label interactions; (ii) employs graph convolutional networks to explicitly encode the hierarchical structure and generate hierarchy-aware embeddings; and (iii) integrates a self-supervised branch to effectively leverage unlabeled imagery. We perform a comprehensive evaluation on four remote sensing image (RSI) datasets (UCM, AID, DFC-15, MLRSNet). HELM achieves state-of-the-art performance, consistently outperforming strong baselines in both supervised and semi-supervised settings, demonstrating particular strength in low-label scenarios.
Marjan Stoimchev, Boshko Koloski, Jurica Levatić +2
Jožef Stefan Institute, Ljubljana, Slovenia · Jožef Stefan International Postgraduate School, Ljubljana, Slovenia