Instances and Labels: Hierarchy-aware Joint Supervised Contrastive Learning for Hierarchical Multi-Label Text Classification

Simon Yu, Jie He, Víctor Gutiérrez-Basulto, Jeff Z. Pan
10/8/2023
cs.CLcs.AIcs.LG

Official code: simonucl/HJCL (17 stars, Apache-2.0, last commit 2023-10-11).

Abstract

Hierarchical multi-label text classification (HMTC) aims at utilizing a label hierarchy in multi-label classification. Recent approaches to HMTC deal with the problem of imposing an over-constrained premise on the output space by using contrastive learning on generated samples in a semi-supervised manner to bring text and label embeddings closer. However, the generation of samples tends to introduce noise as it ignores the correlation between similar samples in the same batch. One solution to this issue is supervised contrastive learning, but it remains an underexplored topic in HMTC due to its complex structured labels. To overcome this challenge, we propose $\textbf{HJCL}$, a $\textbf{H}$ierarchy-aware $\textbf{J}$oint Supervised $\textbf{C}$ontrastive $\textbf{L}$earning method that bridges the gap between supervised contrastive learning and HMTC. Specifically, we employ both instance-wise and label-wise contrastive learning techniques and carefully construct batches to fulfill the contrastive learning objective. Extensive experiments on four multi-path HMTC datasets demonstrate that HJCL achieves promising results and the effectiveness of Contrastive Learning on HMTC.

View on arXivView PDF

Code Implementations(1)

simonucl/HJCLOfficial100%
Apache-2.0
173Shell, PythonOct 11, 20233 years agoApache-2.0

Cite this paper

@article{yu2023instances,
  title  = {Instances and Labels: Hierarchy-aware Joint Supervised Contrastive Learning for Hierarchical Multi-Label Text Classification},
  author = {Simon Yu and Jie He and Víctor Gutiérrez-Basulto and Jeff Z. Pan},
  year   = {2023},
  eprint = {2310.05128},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2310.05128v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2310.05128.svg)](https://codeofpaper.com/paper/2310.05128)

Discussion