English

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

Computation and Language 2022-03-24 v2

Abstract

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.

Keywords

Cite

@article{arxiv.2203.03825,
  title  = {Incorporating Hierarchy into Text Encoder: a Contrastive Learning Approach for Hierarchical Text Classification},
  author = {Zihan Wang and Peiyi Wang and Lianzhe Huang and Xin Sun and Houfeng Wang},
  journal= {arXiv preprint arXiv:2203.03825},
  year   = {2022}
}

Comments

ACL 2022 main conference

R2 v1 2026-06-24T10:05:29.015Z