Saved in:
Bibliographic Details
Main Authors: Chen, Huiyao, Zhao, Yu, Chen, Zulong, Wang, Mengjia, Li, Liangyue, Zhang, Meishan, Zhang, Min
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2406.17534
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866909233963859968
author Chen, Huiyao
Zhao, Yu
Chen, Zulong
Wang, Mengjia
Li, Liangyue
Zhang, Meishan
Zhang, Min
author_facet Chen, Huiyao
Zhao, Yu
Chen, Zulong
Wang, Mengjia
Li, Liangyue
Zhang, Meishan
Zhang, Min
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2406_17534
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Retrieval-style In-Context Learning for Few-shot Hierarchical Text Classification
Chen, Huiyao
Zhao, Yu
Chen, Zulong
Wang, Mengjia
Li, Liangyue
Zhang, Meishan
Zhang, Min
Computation and Language
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.
title Retrieval-style In-Context Learning for Few-shot Hierarchical Text Classification
topic Computation and Language
url https://arxiv.org/abs/2406.17534