Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

Retrieval-style In-Context Learning for Few-shot Hierarchical Text Classification

About

Hierarchical text classification (HTC) is an important task with broad applications, while few-shot HTC has gained increasing interest recently. While in-context learning (ICL) with large language models (LLMs) has achieved significant success in few-shot learning, it is not as effective for HTC because of the expansive hierarchical label sets and extremely-ambiguous labels. In this work, we introduce the first ICL-based framework with LLM for few-shot HTC. We exploit a retrieval database to identify relevant demonstrations, and an iterative policy to manage multi-layer hierarchical labels. Particularly, we equip the retrieval database with HTC label-aware representations for the input texts, which is achieved by continual training on a pretrained language model with masked language modeling (MLM), layer-wise classification (CLS, specifically for HTC), and a novel divergent contrastive learning (DCL, mainly for adjacent semantically-similar labels) objective. Experimental results on three benchmark datasets demonstrate superior performance of our method, and we can achieve state-of-the-art results in few-shot HTC.

Huiyao Chen, Yu Zhao, Zulong Chen, Mengjia Wang, Liangyue Li, Meishan Zhang, Min Zhang• 2024

Related benchmarks

TaskDatasetResultRank
Hierarchical Text ClassificationWOS
Macro-F173.66
78
Hierarchical Text ClassificationRCV1 v2
Macro-F136.16
68
Hierarchical Text ClassificationDBpedia
Micro-F196.2
30
Relation ExtractionCodRED closed setting
Micro F111.22
15
Relation ExtractionCodRED open setting
Micro F110.55
15
Showing 5 of 5 rows

Other info

Follow for update