Built independently by an author, for readers. Read the story and support ChapterPal

keyword

hierarchical text classification

Hierarchical text classification is a machine learning task in which textual documents are automatically assigned to one or more predefined categories that are organized into a structured hierarchy, such as a tree or a directed acyclic graph. Unlike flat text classification, which treats all categories as independent and isolated labels, hierarchical classification accounts for the parent-child and ancestor-descendant relationships between coarse and fine-grained concepts. This structural framework reflects real-world taxonomies where broad subjects encompass progressively specialized subtopics, requiring classification models to capture complex inter-label dependencies, enforce taxonomic consistency across paths, and address severe data imbalance across different hierarchical levels.

2 items

HPT: Hierarchy-aware Prompt Tuning for Hierarchical Text Classification

HPT: Hierarchy-aware Prompt Tuning for Hierarchical Text Classification

Zihan Wang, Peiyi Wang, Tianyu Liu, Binghuai Lin, Yunbo Cao, Zhifang Sui, Houfeng Wang

OrganizationsPeking UniversityTencent

Why you should read this

Proposes a hierarchy-aware prompt tuning framework that reformulates hierarchical text classification into a multi-label masked language modeling task using soft prompts and a zero-bounded cross-entropy loss, significantly improving performance under low-resource and class-imbalanced conditions.

Hierarchical text classification (HTC) is a challenging subtask of multi-label classification due to its complex label hierarchy. Recently, the pretrained language models (PLM) have been widely adopted in HTC through a fine-tuning paradigm. However, in this paradigm, there exists a huge gap between the classification tasks with sophisticated label hierarchy and the masked language model (MLM) pre-training tasks of PLMs and thus the potential of PLMs cannot be fully tapped. To bridge the gap, in this paper, we propose HPT, a Hierarchy-aware Prompt Tuning method to handle HTC from a multi-label MLM perspective. Specifically, we construct a dynamic virtual template and label words that take the form of soft prompts to fuse the label hierarchy knowledge and introduce a zero-bounded multi-label cross-entropy loss to harmonize the objectives of HTC and MLM. Extensive experiments show HPT achieves state-of-the-art performances on 3 popular HTC datasets and is adept at handling the imbalance and low resource situations. Our code is available at https://github.com/wzh9969/HPT.

Added

2026-10-02

Incorporating Hierarchy into Text Encoder: a Contrastive Learning Approach for Hierarchical Text Classification

Incorporating Hierarchy into Text Encoder: a Contrastive Learning Approach for Hierarchical Text Classification

Zihan Wang, Peiyi Wang, Lianzhe Huang, Xin Sun, Houfeng Wang

OrganizationsKey Laboratory of Computational LinguisticsPeking University

Why you should read this

Proposes a hierarchy-guided contrastive learning framework that directly embeds taxonomic label relationships into the text encoder using modified Graphormer structures, removing the need for separate, redundant label representations during inference.

Hierarchical text classification is a challenging subtask of multi-label classification due to its complex label hierarchy. Existing methods encode text and label hierarchy separately and mix their representations for classification, where the hierarchy remains unchanged for all input text. Instead of modeling them separately, in this work, we propose Hierarchy-guided Contrastive Learning (HGCLR) to directly embed the hierarchy into a text encoder. During training, HGCLR constructs positive samples for input text under the guidance of the label hierarchy. By pulling together the input text and its positive sample, the text encoder can learn to generate the hierarchy-aware text representation independently. Therefore, after training, the HGCLR enhanced text encoder can dispense with the redundant hierarchy. Extensive experiments on three benchmark datasets verify the effectiveness of HGCLR.

Added

2026-09-26