Few-shot Hierarchical Text Classification with Bidirectional Path Constraint by label weighting

Mingbao Zhang, Rui Fang Song, Xiang Li, Adriano Tavares, Hao Xu · Pattern Recognition Letters · 2025

Hierarchical Text Classification (HTC) organizes candidate labels into a hierarchical structure and uses one or more paths within the hierarchy as the ground-truth labels, which has been applied to various downstream tasks, e.g., sentiment analysis and harmful text detection. Existing works often involve data-driven models that are trained on large-scale datasets. However, creating annotated datasets is labor-intensive and time-consuming. To address this issue, recent work has focused on the few-shot HTC task, where each class has only a few samples, e.g., 5. These approaches perform classification at each layer separately and leverage the prompt learning capability of pre-trained models like BERT. However, we find that these methods always neglect the inter-layer relationships. To solve this problem, we propose a new model called Bidirectional Path Constraint by Label Weighting ( Bpc-lw ). Its basic idea is to use a pre-defined label embedding matrix and a feed-forward neural network for information propagation between layers, while also designing a bidirectional label weighting method to constrain the predictions of each layer to be along the same path in the label hierarchy. In addition, we employ a contrastive learning-based method to enhance the discriminative capacity of the hierarchical embeddings. We compare our proposed method with recent few-shot HTC baseline models across 3 benchmark datasets, and the experimental results demonstrate the effectiveness of Bpc-lw . • We argue that current methods neglect inter-layer information propagation. • We design label embedding matrices and feed-forward neural networks to transmit the label features. • Extensive experiments are conducted.

Read the paper · More papers on PaperTik