提出新损失函数,让文本与标签在层级中精准对齐。
Modeling Text-Label Alignment for Hierarchical Text Classification
- 用对比学习构建文本与标签的动态对齐机制。
- 在多个基准数据集上优于现有方法,提升分类精度。
- 适合需要精细层级分类的场景,如知识图谱标注。
层次化文本分类(HTC)旨在基于结构化标签层级对文本进行分类,使预测标签形成子层级树。文本语义需与该子层级中的标签语义对齐。由于每个样本的子层级不同,文本-标签对齐具有动态性,现有方法通常独立处理文本与标签,难以应对这一挑战。为此,本文提出文本-标签对齐(TLA)损失,为给定文本及其正标签集生成负标签集,通过对比学习使文本嵌入靠近正标签、远离负标签。在此框架基础上,提出层次化文本-标签对齐(HTLA)模型,采用BERT作为文本编码器,GPTrans作为图编码器,并融合文本-标签嵌入生成具备层级感知的表示。在多个基准数据集上的实验表明,HTLA在性能上显著优于现有基线方法。
原文摘要 · Abstract (English)
Hierarchical Text Classification (HTC) aims to categorize text data based on a structured label hierarchy, resulting in predicted labels forming a sub-hierarchy tree. The semantics of the text should align with the semantics of the labels in this sub-hierarchy. With the sub-hierarchy changing for each sample, the dynamic nature of text-label alignment poses challenges for existing methods, which typically process text and labels independently. To overcome this limitation, we propose a Text-Label Alignment (TLA) loss specifically designed to model the alignment between text and labels. We obtain a set of negative labels for a given text and its positive label set. By leveraging contrastive learning, the TLA loss pulls the text closer to its positive label and pushes it away from its negative label in the embedding space. This process aligns text representations with related labels while distancing them from unrelated ones. Building upon this framework, we introduce the Hierarchical Text-Label Alignment (HTLA) model, which leverages BERT as the text encoder and GPTrans as the graph encoder and integrates text-label embeddings to generate hierarchy-aware representations. Experimental results on benchmark datasets and comparison with existing baselines demonstrate the effectiveness of HTLA for HTC.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。