arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2005.00048cs.CLcs.LG
收藏

基于上下文的LSTM网络文本生成

Context based Text-generation using LSTM networks

Institute for Software Technology(软件技术研究所)

Sivasurya Santhanam

摘要:

基于序列模型的长短期记忆(LSTM)单元由于其学习长期依赖的能力而被用于翻译、问答系统、分类任务。在自然语言生成中,LSTM网络通过学习具有语法稳定语法的语言模型,在文本生成模型上提供了令人印象深刻的结果。但缺点是网络无法了解上下文。该网络只学习输入输出函数,并在给定一组输入单词的情况下生成文本,而不考虑语用。由于模型是在没有任何这样的上下文的情况下训练的,因此生成的句子之间没有语义一致性。所提出的模型经过训练,可以为给定的一组输入单词以及上下文向量生成文本。上下文向量类似于段落向量,它掌握句子的语义(上下文)。在这项工作中提出了几种方法提取的上下文向量。在训练语言模型时,除了输入-输出序列之外,上下文向量也与输入一起训练。由于这种结构,该模型学习输入词,上下文向量和目标词之间的关系。给定一组上下文术语,经过良好训练的模型将围绕所提供的上下文生成文本。基于计算上下文向量的性质,该模型已经尝试了两个变化(词的重要性和词聚类)。在词聚类方法中,还探索了不同领域之间的合适嵌入。根据生成的文本与给定上下文的语义接近程度来评估结果。

英文摘要:

Long short-term memory(LSTM) units on sequence-based models are being used in translation, question-answering systems, classification tasks due to their capability of learning long-term dependencies. In Natural language generation, LSTM networks are providing impressive results on text generation models by learning language models with grammatically stable syntaxes. But the downside is that the network does not learn about the context. The network only learns the input-output function and generates text given a set of input words irrespective of pragmatics. As the model is trained without any such context, there is no semantic consistency among the generated sentences. The proposed model is trained to generate text for a given set of input words along with a context vector. A context vector is similar to a paragraph vector that grasps the semantic meaning(context) of the sentence. Several methods of extracting the context vectors are proposed in this work. While training a language model, in addition to the input-output sequences, context vectors are also trained along with the inputs. Due to this structure, the model learns the relation among the input words, context vector and the target word. Given a set of context terms, a well trained model will generate text around the provided context. Based on the nature of computing context vectors, the model has been tried out with two variations (word importance and word clustering). In the word clustering method, the suitable embeddings among various domains are also explored. The results are evaluated based on the semantic closeness of the generated text to the given context.

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

↑