《计算机应用》唯一官方网站 ›› 2025, Vol. 45 ›› Issue (6): 1732-1740.DOI: 10.11772/j.issn.1001-9081.2024070909

• 第十二届CCF大数据学术会议 • 上一篇    

基于对比学习增强双注意力机制的多标签文本分类方法

余明峰1,2,3, 秦永彬1,2,3(), 黄瑞章1,2,3, 陈艳平1,2,3, 林川1,2,3   

  1. 1.文本计算与认知智能教育工程研究中心(贵州大学),贵阳 550025
    2.公共大数据国家重点实验室(贵州大学),贵阳 550025
    3.贵州大学 计算机科学与技术学院,贵阳 550025
  • 收稿日期:2024-06-29 修回日期:2024-08-04 接受日期:2024-08-20 发布日期:2024-09-25 出版日期:2025-06-10
  • 通讯作者: 秦永彬
  • 作者简介:余明峰(1999—),男,四川成都人,硕士研究生,CCF会员,主要研究方向:自然语言处理、文本分类
    秦永彬(1980—),男,山东烟台人,教授,博士,CCF高级会员,主要研究方向:大数据管理与应用、多源数据融合 ybqin@gzu.edu.cn
    黄瑞章(1979—),女,天津人,教授,博士,CCF会员,主要研究方向:大数据、数据挖掘、信息提取
    陈艳平(1980—),男,贵州长顺人,教授,博士,CCF会员,主要研究方向:人工智能、自然语言处理
    林川(1975—),男,四川自贡人,副教授,硕士,CCF会员,主要研究方向:大数据分析与处理。
  • 基金资助:
    国家自然科学基金资助项目(62066008);贵州省科学技术基金重点项目([2024]003)

Multi-label text classification method based on contrastive learning enhanced dual-attention mechanism

Mingfeng YU1,2,3, Yongbin QIN1,2,3(), Ruizhang HUANG1,2,3, Yanping CHEN1,2,3, Chuan LIN1,2,3   

  1. 1.Text Computing and Cognitive Intelligence Engineering Research Center of National Education Ministry (Guizhou University),Guiyang Guizhou 550025,China
    2.State Key Laboratory of Public Big Data (Guizhou University),Guiyang Guizhou 550025,China
    3.College of Computer Science and Technology,Guizhou University,Guiyang Guizhou 550025,China
  • Received:2024-06-29 Revised:2024-08-04 Accepted:2024-08-20 Online:2024-09-25 Published:2025-06-10
  • Contact: Yongbin QIN
  • About author:YU Mingfeng, born in 1999, M. S. candidate. His research interests include natural language processing, text classification.
    QIN Yongbin, born in 1980, Ph. D., professor. His research interests include big data management and application, multi-source data fusion.
    HUANG Ruizhang, born in 1979, Ph. D., professor. Her research interests include big data, data mining, information extraction.
    CHEN Yanping, born in 1980, Ph. D., professor. His research interests include artificial intelligence, natural language processing.
    LIN Chuan, born in 1975, M. S., associate professor. His research interests include big data analysis and processing.
  • Supported by:
    National Natural Science Foundation of China(62066008);Key Project of Science and Technology Foundation of Guizhou Province([2024]003)

摘要:

针对现有的基于注意力机制的方法难以捕捉文本之间复杂的依赖关系的问题,提出一种基于对比学习增强双注意力机制的多标签文本分类方法。首先,分别学习基于自注意力和基于标签注意力的文本表示,并融合二者以获得更全面的文本表示捕捉文本的结构特征以及文本与标签之间的语义关联;其次,给定一个多标签对比学习目标,利用标签引导的文本相似度监督文本表示的学习,以捕捉文本之间在主题、内容和结构层面上复杂的依赖关系;最后,使用前馈神经网络作为分类器进行文本分类。实验结果表明,相较于LDGN(Label-specific Dual Graph neural Network),所提方法在EUR-Lex(European Union Law Document)数据集与Reuters-21578数据集上的排名第5处的归一化折现累积收益(nDCG@5)值分别提升了1.81和0.86个百分点,在AAPD(Arxiv Academic Paper Dataset)数据集与RCV1(Reuters Corpus Volume Ⅰ)数据集上也都取得了有竞争力的结果。可见,所提方法能有效捕捉文本之间在主题、内容和结构层面上复杂的依赖关系,从而在多标签文本分类任务上取得较优结果。

关键词: 多标签文本分类, 对比学习, 双注意力, 标签注意力, 自注意力

Abstract:

To address the problem that the existing methods based on attention mechanism are difficult to capture complex dependencies among texts, a multi-label text classification method based on contrastive learning enhanced dual-attention mechanism was proposed. Firstly, text representations based on self-attention and label attention were learned respectively, and the two were fused to obtain a more comprehensive text representation for capturing structural features of the text and semantic associations among the text and labels. Then, a multi-label contrastive learning objective was given to supervise the learning of text representations by label-guided text similarity, thereby capturing complex dependencies among the texts at topic, content, and structural levels. Finally, a feedforward neural network was used as a classifier for text classification. Experimental results demonstrate that compared with LDGN (Label-specific Dual Graph neural Network), the proposed method improves the normalized Discounted Cumulative Gain at top-5 (nDCG@5) value by 1.81 and 0.86 percentage points, respectively, on EUR-Lex (European Union Law Document) dataset and Reuters-21578 dataset, and achieves competitive results on AAPD (Arxiv Academic Paper Dataset) dataset and RCV1 (Reuters Corpus Volume Ⅰ) dataset. It can be seen that this method can capture the complex dependencies among texts at topic, content, and structural levels effectively, resulting in good performance in multi-label text classification tasks.

Key words: multi-label text classification, contrastive learning, dual-attention, label attention, self-attention

中图分类号: