TreeGAN: Syntax-Aware Sequence Generation with Generative Adversarial Networks
Not on the map. Why?
Abstract (arXiv)
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.
Key facts. Cited by 6 papers in the map (data through 7 Oct 2026). First posted on arXiv 22 Aug 2018.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2021: 1; 2022: 1; 2023: 1; 2024: 1; 2025: 2.
6 papers.
- 2023HyP-NeRF: Learning Improved NeRF Priors using a HyperNetworkcited by 14
- 2021Automatic Code Generation using Pre-Trained Language Modelscited by 8
- 2024Multi-scale Latent Point Consistency Models for 3D Shape Generationcited by 6
- 2025A Continuous-Time Consistency Model for 3D Point Cloud Generationcited by 2
- 2022Assessing Project-Level Fine-Tuning of ML4SE Modelscited by 1
- 2025Designing ReLU Generative Networks to Enumerate Trees with a Given Tree Edit Distancecited by 1
- 2025Designing ReLU Generative Networks to Enumerate Trees with a Given Tree Edit Distance12 Oct 2025
- 2025A Continuous-Time Consistency Model for 3D Point Cloud Generation1 Sep 2025
- 2024Multi-scale Latent Point Consistency Models for 3D Shape Generation27 Dec 2024
- 2023HyP-NeRF: Learning Improved NeRF Priors using a HyperNetwork9 Jun 2023
- 2022Assessing Project-Level Fine-Tuning of ML4SE Models7 Jun 2022
- 2021Automatic Code Generation using Pre-Trained Language Models21 Feb 2021