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

TreeGAN:基于生成对抗网络的句法感知序列生成

TreeGAN: Syntax-Aware Sequence Generation with Generative Adversarial Networks

Worcester Polytechnic Institute(伍斯特理工学院);Apple(苹果公司);Huawei(华为)

Xinyue Liu, Xiangnan Kong, Lei Liu, Kuorong Chiang

摘要:

生成对抗网络(GANs)在图像生成方面表现出了很大的能力,其中判别模型指导生成模型的训练以构建类似于真实图像的图像。最近,GANs已经从生成图像扩展到生成序列(例如,诗歌、音乐和密码)。现有的序列生成GANs主要集中在一般序列上,这是无语法的。然而,在许多实际应用中,我们需要用一种形式语言生成序列,并受其相应文法的约束。例如,要测试数据库的性能,可能需要生成一个SQL查询集合,这些查询不仅与真实用户的查询相似,而且遵循目标数据库的SQL语法。生成这样的序列是非常具有挑战性的,因为GANs的生成器和编译器都需要考虑序列的结构和形式语言中的给定语法。为了解决这些问题,我们研究了使用GANs的语法感知序列生成问题,其中将真实序列的集合和一组预定义的语法规则赋予生成器和生成器。我们提出了一种新的GAN框架,即TreeGAN,将一个给定的上下文无关文法(CFG)的序列生成过程。在TreeGAN中,生成器采用递归神经网络(RNN)来构建解析树。然后,每个生成的解析树可以被转换为给定语法的有效序列。该算法使用树结构的RNN来区分生成的树和真实的树。我们证明了TreeGAN可以为任何CFG生成序列,并且它的生成完全符合给定的语法。在合成和真实数据集上的实验表明,TreeGAN显着提高了上下文无关语言中序列生成的质量。

英文摘要:

Generative Adversarial Networks (GANs) have shown great capacity on image generation, in which a discriminative model guides the training of a generative model to construct images that resemble real images. Recently, GANs have been extended from generating images to generating sequences (e.g., poems, music and codes). Existing GANs on sequence generation mainly focus on general sequences, which are grammar-free. In many real-world applications, however, we need to generate sequences in a formal language with the constraint of its corresponding grammar. For example, to test the performance of a database, one may want to generate a collection of SQL queries, which are not only similar to the queries of real users, but also follow the SQL syntax of the target database. Generating such sequences is highly challenging because both the generator and discriminator of GANs need to consider the structure of the sequences and the given grammar in the formal language. To address these issues, we study the problem of syntax-aware sequence generation with GANs, in which a collection of real sequences and a set of pre-defined grammatical rules are given to both discriminator and generator. We propose a novel GAN framework, namely TreeGAN, to incorporate a given Context-Free Grammar (CFG) into the sequence generation process. In TreeGAN, the generator employs a recurrent neural network (RNN) to construct a parse tree. Each generated parse tree can then be translated to a valid sequence of the given grammar. The discriminator uses a tree-structured RNN to distinguish the generated trees from real trees. We show that TreeGAN can generate sequences for any CFG and its generation fully conforms with the given syntax. Experiments on synthetic and real data sets demonstrated that TreeGAN significantly improves the quality of the sequence generation in context-free languages.

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

↑