Journal of Computer Applications

    Next Articles

Chinese story ending generation model based on bidirectional contrastive training

SHUAI Qi 1, WANG Hairui 1, ZHU Guifu 2   

  1. 1. Faculty of information Engineering and Automation, Kunming University of Science and Technology 2. Information Technology Construction Management Center, Kunming University of Science and Technology
  • Received:2023-09-11 Revised:2023-11-17 Online:2024-03-21 Published:2024-03-21
  • About author:SHUAI Qi, born in 1999, M.S. candidate. His research interests include Natural Language Process. WANG Hairui, born in 1969, Ph.D., professor. His research interests include Fundamentals of Computer Applications, Engineering Technology. ZHU Guifu, born in 1984, M.S, senior engineer. His research interests include computer vision.
  • Supported by:
    National Natural Science Foundation of China (61863016)

基于双向对比训练的中文故事结尾生成模型 

帅奇1,王海瑞1,朱贵富2   

  1. 1.昆明理工大学 信息工程与自动化学院 2. 昆明理工大学 信息化建设管理中心
  • 通讯作者: 朱贵富
  • 作者简介:帅奇(1999—),男,四川眉山人,硕士研究生,主要研究方向:自然语言处理;王海瑞(1969—),男,云南昆明人,教授,博士,主要研究方向:计算机应用基础、工程技术;朱贵富(1984—),男,江西赣州人,高级工程师,硕士,主要研究方向:图像处理。
  • 基金资助:
    国家自然科学基金资助项目(61863016)

Abstract: Chinese Story Ending Generation (SEG) is one of the downstream tasks in natural language processing.CLSEG (Contrastive Learning of Story Ending Generation) based on completely incorrect performs well in terms of story consistency. However, due to the fact that the wrong ending also contains the same content as the original ending text, using only the wrong ending for comparative training can result in the main part of the generated text with the correct ending being stripped off. Therefore, adding forward ending enhancement training on the basis of CLSEG to preserve the correct parts lost in comparative training. At the same time, by introducing forward endings, the generated endings have stronger diversity and relevance. The proposed model consisted of two main parts: 1) multi ended sampling, which obtains positive enhanced endings and reverse contrasted erroneous endings through different model methods; 2) compare training and modify the loss function during the training process to make the generated end close to the positive end and away from the wrong end. Experimental results on the publicly available story dataset OutGen show that the compared to models such as Gpt2.ft, and Della, the proposed model achieves better results in BERTScore, Meteor, and other indicators, resulting in more diverse and correlated endings.

Key words: Chinese story ending generation, contrastive training, text sampling, text generation, natural language process

摘要: 中文故事结尾生成(SEG)是自然语言处理中的一个下游任务之一。基于全错误结尾的CLSEG(Contrastive Learning of Story Ending Generation)在故事的一致性方面表现较好。然而,由于错误结尾中也包含与原结尾文本相同的内容,仅使用错误结尾的对比训练会导致生成文本中原结尾正确的主要部分被剥离。因此,在CLSEG基础上增加正向结尾增强训练,以保留对比训练中损失的正确部分;同时,通过正向结尾的引入,使生成的结尾具有更强的多样性和关联性。所提模型包含两个主要部分:1)多结尾采样,通过不同的模型方法获取正向增强的结尾和反向对比的错误结尾;2)对比训练,在训练过程中修改损失函数,使生成的结尾接近正向结尾,远离错误结尾。在公开的故事数据集OutGen上的实验结果表明,相较于Gpt2.ft、Della等模型,所提模型的BERTScore、Meteor等指标均取得了较优的结果,生成的结尾更具有多样性和关联性。

关键词: 中文故事结尾生成, 对比训练, 文本采样, 文本生成, 自然语言处理

CLC Number: