arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1808.09012cs.CL
收藏

基于神经变分模型的自然语言生成

Natural Language Generation with Neural Variational Models

University of Waterloo(滑铁卢大学)

Hareesh Bahuleyan

摘要:

在这篇论文中,我们探索使用深度神经网络来生成自然语言。具体来说,我们实现了两个序列到序列的神经变分模型-变分自编码器(VAE)和变分编码器-解码器(VED)。由于与损失函数的Kullback-Leibler(KL)发散项消失为零相关联的问题,用于文本生成的VAE难以训练。通过KL权值退火和字丢弃等优化算法,成功地训练了VAE.我们还通过随机采样、线性插值和从输入的邻域采样等实验证明了这种连续潜在空间的有效性。我们认为,如果VAE设计不当,可能会导致绕过连接,从而导致潜在空间在训练过程中被忽略。我们的实验表明,解码器隐藏状态初始化的例子,这样的旁路连接降低VAE到一个确定性的模型,从而减少了生成的句子的多样性。我们发现,传统的注意力机制用于序列到序列VED模型作为一个旁路连接,从而恶化了模型的潜在空间。为了规避这个问题,我们提出了变分注意力机制,其中的注意力上下文向量建模为一个随机变量,可以从一个分布采样。我们的经验表明,使用自动评价指标,即熵和不同的措施,我们的变分注意力模型比确定性注意力模型产生更多样化的输出句子。与人类评价研究的定性分析证明,我们的模型同时产生的句子是高质量的,同样流利的确定性注意对应物所产生的。

英文摘要:

In this thesis, we explore the use of deep neural networks for generation of natural language. Specifically, we implement two sequence-to-sequence neural variational models - variational autoencoders (VAE) and variational encoder-decoders (VED). VAEs for text generation are difficult to train due to issues associated with the Kullback-Leibler (KL) divergence term of the loss function vanishing to zero. We successfully train VAEs by implementing optimization heuristics such as KL weight annealing and word dropout. We also demonstrate the effectiveness of this continuous latent space through experiments such as random sampling, linear interpolation and sampling from the neighborhood of the input. We argue that if VAEs are not designed appropriately, it may lead to bypassing connections which results in the latent space being ignored during training. We show experimentally with the example of decoder hidden state initialization that such bypassing connections degrade the VAE into a deterministic model, thereby reducing the diversity of generated sentences. We discover that the traditional attention mechanism used in sequence-to-sequence VED models serves as a bypassing connection, thereby deteriorating the model's latent space. In order to circumvent this issue, we propose the variational attention mechanism where the attention context vector is modeled as a random variable that can be sampled from a distribution. We show empirically using automatic evaluation metrics, namely entropy and distinct measures, that our variational attention model generates more diverse output sentences than the deterministic attention model. A qualitative analysis with human evaluation study proves that our model simultaneously produces sentences that are of high quality and equally fluent as the ones generated by the deterministic attention counterpart.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑