《计算机应用》唯一官方网站 ›› 2024, Vol. 44 ›› Issue (6): 1767-1774.DOI: 10.11772/j.issn.1001-9081.2023050709

• 人工智能 • 上一篇    

基于知识增强和提示学习的小样本新闻主题分类方法

余新言1, 曾诚1,2,3(), 王乾1, 何鹏2,3,4, 丁晓玉1   

  1. 1.湖北大学 人工智能学院, 武汉 430062
    2.湖北省软件工程技术研究中心(湖北大学), 武汉 430062
    3.智慧政务与人工智能应用湖北省工程研究中心(湖北大学), 武汉 430062
    4.湖北大学 网络空间安全学院, 武汉 430062
  • 收稿日期:2023-06-06 修回日期:2023-11-15 接受日期:2023-12-05 发布日期:2024-01-04 出版日期:2024-06-10
  • 通讯作者: 曾诚
  • 作者简介:余新言(1995—),女,湖北荆州人,硕士研究生,主要研究方向:自然语言处理、小样本学习
    王乾(1999—),男,河南洛阳人,硕士研究生,CCF会员,主要研究方向:自然语言处理、文本分类
    何鹏(1988—),男,江西宜春人,教授,博士,CCF专业会员,主要研究方向:软件质量分析、缺陷预测
    丁晓玉(1998—),女,湖北孝感人,硕士研究生,主要研究方向:自然语言处理、知识图谱。
  • 基金资助:
    国家自然科学基金资助项目(62102136);湖北省重点研发计划项目(2021BAA188)

Few-shot news topic classification method based on knowledge enhancement and prompt learning

Xinyan YU1, Cheng ZENG1,2,3(), Qian WANG1, Peng HE2,3,4, Xiaoyu DING1   

  1. 1.School of Artificial Intelligence,Hubei University,Wuhan Hubei 430062,China
    2.Hubei Software Engineering Technology Research Center (Hubei University),Wuhan Hubei 430062,China
    3.Hubei Engineering Research Center of Intelligent Government Affairs and Artificial Intelligence Application (Hubei University),Wuhan Hubei 430062,China
    4.School of Cyber Science and Technology,Hubei University,Wuhan Hubei 430062,China
  • Received:2023-06-06 Revised:2023-11-15 Accepted:2023-12-05 Online:2024-01-04 Published:2024-06-10
  • Contact: Cheng ZENG
  • About author:YU Xinyan, born in 1995, M. S. candidate. Her research interests include natural language processing, few-shot learning.
    WANG Qian, born in 1999, M. S. candidate. His research interests include natural language processing, text classification.
    HE Peng, born in 1988, Ph. D., professor. His research interests include software quality analysis, defect prediction.
    DING Xiaoyu, born in 1998, M. S. candidate. Her research interests include natural language processing, knowledge graph.
  • Supported by:
    National Natural Science Foundation of China(62102136);Key R&D Project in Hubei Province(2021BAA188)

摘要:

基于预训练微调的分类方法通常需要大量带标注的数据,导致无法应用于小样本分类任务。因此,针对中文小样本新闻主题分类任务,提出一种基于知识增强和提示学习的分类方法KPL(Knowledge enhancement and Prompt Learning)。首先,利用预训练模型在训练集上学习最优的提示模板;其次,将提示模板与输入文本结合,使分类任务转化为完形填空任务;同时利用外部知识扩充标签词空间,丰富标签词的语义信息;最后,对预测的标签词与原始的标签进行映射。通过在THUCNews、SHNews和Toutiao这3个新闻数据集上进行随机采样,形成小样本训练集和验证集进行实验。实验结果表明,所提方法在上述数据集上的1-shot、5-shot、10-shot和20-shot任务上整体表现有所提升,尤其在1-shot任务上提升效果突出,与基线小样本分类方法相比,准确率分别提高了7.59、2.11和3.10个百分点以上,验证了KPL在小样本新闻主题分类任务上的有效性。

关键词: 新闻主题分类, 提示学习, 知识增强, 小样本学习, 文本分类

Abstract:

Classification methods based on fine-tuning pre-trained models usually require a large amount of annotated data, resulting in the inability to be used for few-shot classification tasks. Therefore, a Knowledge enhancement and Prompt Learning (KPL) method was proposed for Chinese few-shot news topic classification. Firstly, an optimal prompt template was learned from the training set by using a pre-trained model. Then the template was integrated with the input text, effectively transforming the classification task into a cloze-filling task, simultaneously external knowledge was utilized to expand the label word space, enhancing the semantic richness of label words. Finally, predicted label words were subsequently mapped back to the original labels. Experiments were conducted on a few-shot training set and a few-shot validation set randomly sampled from three news datasets, THUCNews, SHNews and Toutiao. The experimental results show that the proposed method improves the overall performance on the 1-shot, 5-shot, 10-shot and 20-shot tasks on the above datasets. Notably, a significant improvement is observed in the 1-shot task. Compared to baseline few-shot classification method, the accuracy increases by at least 7.59, 2.11 and 3.10 percentage points, respectively, confirming the effectiveness of KPL in few-shot news topic classification tasks.

Key words: news topic classification, prompt learning, knowledge enhancement, Few-Shot Learning (FSL), text classification

中图分类号: