首页|期刊导航|计算机工程与应用|基于主题约束采样的文本生成方法

基于主题约束采样的文本生成方法OA

Text Generation Method Based on Topic Constraint Sampling

中文摘要英文摘要

预训练语言模型通过精调使其能够具有本地语料的相关知识和用语习惯,但通常面临高昂的训练成本和资源开销.因此,提出了一种基于主题约束的采样方法.该方法利用本地语料构建潜在狄利克雷分布(latent Dirichlet allocation,LDA)主题模型;利用LDA对输出内容进行主题约束.一方面,这种方法简单易实现;另一方面,该方法增强了模型在本地语料上的泛化能力.实验结果表明,所提出的方法在多样性指标和泛化性指标上相较于基线模型明显提升.

Pre-trained large language models can be fine-tuned to incorporate relevant knowledge and linguistic conven-tions of a local corpus,though this process typically involves high training costs and computing resources.Therefore,this paper proposes a sampling method based on topic-constrained.The method employs a local corpus to construct a latent Dirichlet distribution(LDA)topic model.LDA is used to topic-constrained the output content.On the one hand,this method is easy to implement.On the other hand,it enhances the generalization capabilities of model on local corpus.Experimental results reveal that the proposed method achieves better performance than the baseline model in both diversity and generalization.

冉文议;万家强;喻靖峰;李琪玥;陈鼎丽;邢欣来

重庆理工大学 两江人工智能学院,重庆 401135重庆理工大学 两江人工智能学院,重庆 401135重庆理工大学 两江人工智能学院,重庆 401135重庆理工大学 两江人工智能学院,重庆 401135重庆理工大学 两江人工智能学院,重庆 401135重庆理工大学 两江人工智能学院,重庆 401135

信息技术与安全科学

预训练语言模型主题约束文本生成采样策略

pre-trained language modeltopic constrainedtext generationsampling strategy

《计算机工程与应用》 2026 (6)

134-145,12

重庆市教委科学技术研究计划项目(KJQN202301153).

10.3778/j.issn.1002-8331.2412-0005

评论