Abstract
Hierarchical Text Classification (HTC) involves assigning documents to labels organized within a taxonomy. Most previous research on HTC has focused on supervised methods. However, in real-world scenarios, employing supervised HTC can be challenging due to a lack of annotated data. Moreover, HTC often faces issues with large label spaces and long-tail distributions. In this work, we present Knowledge Graphs for zero-shot Hierarchical Text Classification (KG-HTC), which aims to address these challenges of HTC in applications by integrating knowledge graphs with Large Language Models (LLMs) to provide structured semantic context during classification. Our method retrieves relevant subgraphs from knowledge graphs related to the input text using a Retrieval-Augmented Generation (RAG) approach. Our KG-HTC can enhance LLMs to understand label semantics at various hierarchy levels. We evaluate KG-HTC on three open-source HTC datasets: WoS, DBpedia, and Amazon. Our experimental results show that KG-HTC significantly outperforms three baselines in the strict zero-shot setting, particularly achieving substantial improvements at deeper levels of the hierarchy. This evaluation demonstrates the effectiveness of incorporating structured knowledge into LLMs to address HTC's challenges in large label spaces and long-tailed label distributions. Our code is available at: this https URL.
Abstract (translated)
层次文本分类(HTC)涉及将文档分配到按照知识体系组织的标签中。大多数关于HTC的先前研究都集中在监督方法上。然而,在实际场景中,由于缺乏标注数据,使用监督式HTC可能会面临挑战。此外,HTC通常会遇到大规模标签空间和长尾分布的问题。在本文工作中,我们提出了用于零样本层次文本分类的知识图谱(KG-HTC),旨在通过将知识图与大型语言模型(LLMs)相结合来解决应用中HTC的这些难题,并提供结构化的语义上下文以进行分类处理。我们的方法利用检索增强生成(RAG)的方法从知识图中提取与输入文本相关的子图。我们的KG-HTC能够提升LLMs在不同层次上理解标签语义的能力。我们在三个开源HTC数据集:WoS、DBpedia和Amazon上评估了KG-HTC的性能,实验证明KG-HTC在严格的零样本设置下显著优于三种基准方法,并且特别在层级更深的情况下取得了重大改进。这一评估表明,将结构化知识融入LLMs中可以有效应对HTC在大规模标签空间和长尾分布问题上的挑战。我们的代码可在以下网址获得:this https URL.
URL
https://arxiv.org/abs/2505.05583