LIC-GAN: Language Information Conditioned Graph Generative GAN Model

Robert Lo, Arnhav Datar, Abishek SridhararXiv 2023 · DOI

Abstract

LIC-GAN is a novel generative adversarial network (GAN) designed to synthesize small graphs directly from natural language descriptions. By combining a transformer-based language encoder with a graph-generating GAN, the model circumvents expensive graph-matching procedures and significantly outperforms large language models like GPT-3.5 when scaling to larger, more complex graph structures. Experimental results demonstrate that LIC-GAN maintains structural consistency where general-purpose models fail.

Introduction

Generating graphs is notoriously difficult because the search space is discrete, vast, and permutation-invariant. While deep learning has made strides in unconditional graph generation—such as creating new drug-like molecules—conditional generation from natural language remains a frontier. Existing methods often rely on expensive graph-matching algorithms to calculate likelihoods or are limited to simple scene graphs derived from images.

The general GAN framework for graph generation, featuring a generator, discriminator, and reward network.

LIC-GAN (Language Information Conditioned GAN) addresses this gap, enabling the transformation of text queries like "a graph with 10 nodes, 20 edges, and a diameter of 5" into valid mathematical objects. This capability has potential applications in city planning, task assignment, and automated software testing.

Methods

LIC-GAN builds upon the MOLGAN architecture, introducing several key innovations for text conditioning:

  • Language Encoding: The model utilizes a frozen RoBERTa-base encoder. Experimental results showed that using Multi-Head Attention to allow the generator to access the entire text embedding performed better than relying on the standard [CLS] token.
  • The Generator: To handle discrete graph structures in a differentiable manner, the generator employs a Hard Gumbel Sigmoid activation. It features two distinct output heads: one for the adjacency matrix and one for node indicators, allowing the representation of isolated vertices.
  • The Discriminator: Unlike many graph models that use Graph Convolutional Networks (GCNs), LIC-GAN employs a weight-shared Fully Connected Network (FCN) to better enforce symmetry and improve performance on property matching.
  • Training Objective: The model is trained using a Wasserstein GAN with Gradient Penalty (WGAN-GP) loss, supplemented by a reward network that provides feedback on structural constraints.
Detailed architecture of LIC-GAN, highlighting the natural language conditioning via RoBERTa and the discrete graph generation process.

Experimental Setup

Since no standard benchmark existed for this task, the authors created a synthetic dataset using the NetworkX library. The Simple Dataset contains descriptions limited to node and edge counts, while the Complex Dataset includes five additional graph-theoretic properties: Diameter, Cycle existence, Maximum Degree, Minimum Degree, and Number of Connected Components. The dataset consists of 100,000 training samples covering graphs ranging from 5 to 50 nodes.

Key Results and Insights

The model was evaluated using PropMatch (percentage of properties perfectly matched) and Closeness (an exponential distance metric). LIC-GAN achieved a PropMatch of 0.36 and a Closeness of 0.48 on the complex dataset.

  • Scalability vs. LLMs: While GPT-3.5 is effective for tiny graphs (1-5 nodes), its performance drops significantly as graphs grow. For graphs with 26-50 nodes, GPT-3.5's PropMatch for node counts dropped to 0.178, whereas LIC-GAN remained robust.
  • Semantic Understanding: "Shuffled numbers" experiments confirmed that the RoBERTa encoder extracts semantic meaning from text rather than performing simple numerical mapping.
  • The "Hard" Gumbel Advantage: Switching to a Hard Gumbel Sigmoid for adjacency matrix prediction was crucial for convergence, helping the model navigate the discrete nature of edges.

Conclusion

LIC-GAN demonstrates that specialized GAN models can effectively learn the underlying rules of graph construction from natural language, outperforming general-purpose LLMs at scale. Future work will focus on scaling to larger, directed, and weighted graphs, and developing mechanisms to identify "impossible" queries where no valid graph can be constructed.

Summary updated

BibTeX
@misc{lo2023lic,
  author = {Robert Lo and Arnhav Datar and Abishek Sridhar},
  title = {{LIC-GAN: Language Information Conditioned Graph Generative GAN Model}},
  year = {2023},
  eprint = {2306.01937},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2306.01937},
}
Figure