arXiv:2611.12420cs.CLNov 2026

Manuscript Offprint

arXiv:2611.12420

Path-Level Structural and Semantic Alignment for Hierarchical Multi-Label Text Classification

Xindi Wang, Aifen Xiong, Baiyang Wang, Xuri Ge, Robert Mercer, Frank Rudzicz, Yifan Peng, Zhumin Chen, Hongjun Wang

Abstract

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.

1 Introduction

Hierarchical multi-label text classification (HMTC) assigns multiple labels organized in a predefined hierarchy to a document (Liu et al., 2023a) (Figure 1). It arises in applications such as news topic classification (Kowsari et al., 2019), scientific publication categorization (Chen et al., 2024), and book genre annotation (Zhou et al., 2020). Unlike flat

Figure

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.

multi-label classification, HMTC must account for dependencies among labels at different levels of granularity, ranging from broad categories to fine-grained concepts (Zhong et al., 2026).

Two challenges are particularly important in this setting. First, standard label-wise objectives treat labels largely as independent prediction targets and do not explicitly capture structural relations such as ancestry and siblinghood (Zhu et al., 2023). This limitation becomes more consequential in deep hierarchies, where closely related labels may share substantial hierarchical context but differ only at lower levels. Second, label names alone often pro-vide insufficient semantic information for distinguishing fine-grained categories (Chen et al., 2021; Baldini Soares et al., 2019). Effective HMTC therefore requires supervision that reflects both the structural proximity among labels and their document-specific semantic meanings.

Existing work incorporates hierarchical information primarily through prediction-level constraints or hierarchy-aware representation learning. Prediction-level approaches use structured inference, top-down decoding, or specialized prediction modules to enforce parent-child consistency (Kim et al., 2024; Vaswani et al., 2025). Representation-based approaches encode hierarchical relations using graph encoders, hierarchical attention, or structured label embeddings (Sadat and Caragea, 2022; Zhu et al., 2024; Zhang et al., 2026). Other methods employ re-weighting, sampling, or metric-learning strategies to improve the prediction of fine-grained labels (Cao et al., 2019; Huang et al., 2021). Although effective, these methods often model structure and label semantics separately, leaving complete root-to-node paths underexplored as a common supervision unit for both.

In this work, we propose a path-level representation learning framework with complementary structural and semantic objectives. Each non-root label is associated with its root-to-node path, which preserves its full ancestral context. Our structural objective, PathSimNCE, aligns document and path representations using hierarchy-aware contrastive targets. It assigns graded supervision to structurally related paths while preserving explicit supervision for the ground-truth paths. Our semantic objective aligns documents with LLM-generated, document-conditioned descriptions of the same positive paths, providing fine-grained semantic supervision beyond static label names. Both objectives are used only during training and complement the standard label-wise classification loss. At inference time, only the text encoder and multi-label classifier are retained.

Our contributions are summarized as follows:

  • We propose a path-level framework that uses root-to-node paths as a common unit for structural and semantic supervision, without introducing additional inference-time components.

  • We introduce PathSimNCE, a structural alignment objective that uses hierarchy-aware contrastive targets to provide graded supervision over hierarchical paths while preserving explicit supervision for the ground-truth paths.

  • We introduce a complementary semantic alignment objective based on document-conditioned path descriptions generated offline by an LLM, providing fine-grained semantic supervision.

  • We conduct experiments on three HMTC benchmarks and analyze the proposed objectives across hierarchy depths, label frequencies, and representation spaces.