登录

  • 登录
  • 忘记密码?点击找回

注册

  • 获取手机验证码 60
  • 注册

找回密码

  • 获取手机验证码60
  • 找回
毕业论文网 > 毕业论文 > 计算机类 > 计算机科学与技术 > 正文

基于GAN的文本自动生成系统的设计与实现毕业论文

 2021-12-15 23:08:55  

论文总字数:26014字

摘 要

本文主要内容是文本自动生成的方法和优化。自动文本生成本质上也是离散序列生成,生成器学习的是词和词之间的关联性,判别器用来为给生成器提供梯度指导做准备,两者之间是对抗网络的关系。对于生成对抗网络来说,其在图像领域近些年来取得了巨大的成功,但在生成离散序列方面还有很大的局限,最重要的原因是离散序列的情况下无法很好的更新梯度。除此之外,对于序列的奖励也要在序列完整性的前提下,那么该项任务可以引入强化学习方面的思想来解决。对于一个不完整的序列,我们通过蒙特卡洛搜索配合判别器来传递强化学习奖励信号。

本文描述了生成器即LSTM模型,其对于过去的序列有长记忆性,可以更好的体现词和词之间的局部关联。同时描述了判别器即CNN模型,最后的输出显然是一个概率值,即判别该序列为真实序列的概率,也可以理解为该序列与真实序列的相似度。

本文详细说明了系统的判别模型的不足,即只能评估一个完整的序列。对于一个部分生成的序列,很难去权衡当前的序列得分和未来的最终序列得分,因为会有Exposure Bias,即局部错误累积效应。与传统的旧思路不同,策略梯度提供了和强化学习DQN之类的创新方法,但是从完美性上考虑,reinforce算法在这方面不算完善。由于是蒙特卡洛算法,其使用收获的期望来计算状态价值。

关键词:自然语言生成、生成对抗网络、策略梯度、LSTM

Abstract

This paper focuses on the method and optimization of automatic text generation. In essence, automatic text generation is also discrete sequence generation. The generator learns the relevance between words. The discriminator is used to provide gradient guidance for the generator. The relationship between the two is antagonistic network. For the generation of confrontation network, it has achieved great success in the field of image in recent years, but there are still great limitations in the generation of discrete sequence, the most important reason is that the discrete sequence can not update the gradient very well. In addition, the reward for the sequence should also be based on the sequence integrity, so the task can be solved by introducing the idea of reinforcement learning. For an incomplete sequence, we use Monte Carlo search with discriminator to transmit reinforcement learning reward signal.

As for generators, the popular LSTM model in the field of natural language processing can be selected, which has long memory for the past sequences and can better reflect the local association between words. As for the discriminator, CNN model can be selected, and the final output is obviously a probability value, that is, the probability of identifying the sequence as a real sequence, or the similarity between the sequence and the real sequence.

The discriminant model can only evaluate a complete sequence, but for a partially generated sequence, it is difficult to weigh the current sequence score and the future sequence score. Strategy gradient provides a new idea different from dqn, but Monte Carlo strategy gradient reinforcement algorithm is not perfect. Because of the Monte Carlo algorithm, we need complete sequence samples to do the iteration of the algorithm, and Monte Carlo uses the expectation of harvest to calculate the state value.

Key Words: Natural language generation , Generate adversial network , Policy Gradient , LSTM

目 录

摘 要 II

第一章 绪论 1

1.1 课题的背景及意义 1

1.2 国内外研究现状 2

1.3 本文的主要研究工作 2

1.4 论文组织结构 3

1.5 本章小结 3

第二章 相关理论与技术 4

2.1 生成对抗网络(Generative Adversial Networks) 4

2.2 长短期记忆网络(LSTM) 6

2.3 策略梯度(Policy Gradient) 9

2.4 本章小结 12

第三章 系统分析 13

3.1 模型的流程概述 13

3.2 Token生成过程分析 13

第四章 系统实现 18

4.1 项目代码//按模块 18

4.2 项目结果展示 32

4.3 本章小结 33

第五章 总结与展望 34

5.1 总结 34

5.2 展望 34

参考文献 36

  1. 绪论

本章介绍了课题的研究背景和意义,阐述了国内外基于文本自动生成的研究现状,之后描述了本课题中的主要工作内容,最后简要说明了本文章的组织架构。

1.1 课题的背景及意义

自然语言处理是人工智能发展的一个重要方面,相比于计算机视觉领域,自然语言处理所面临的任务显得更加复杂,更加难解,因为人类语言是由人类大脑几千年发展进化的产物,而里面充斥着诸多不可解释的因素,人类对大脑的研究进步也十分有限,可以说人脑的工作机制和理解机制到目前也没有科学家可以完美的给出理论解释,这也就造成了自然语言处理任务中的诸多挑战。比如机器理解一段文本,在机器的代码中,文本被分解成若干个token,机器的核心任务就是去分析这些token而得出规律,去学习相应的算法。

和图像不同,图像的像素深度可以是实数,即连续型表示,而文本中的token是离散的状态,相比于前者,后者的导数梯度更加难以把握。

请支付后下载全文,论文总字数:26014字

您需要先支付 80元 才能查看全部内容!立即支付

企业微信

Copyright © 2010-2022 毕业论文网 站点地图