Source-linked AI summary

Toward Controlled Generation of Text

Zhiting Hu, Zichao Yang, Xiaodan Liang, Ruslan Salakhutdinov, Eric P. Xing

arXiv:1703.00955v4cs.LGcs.AIcs.CLstat.ML

TL;DR

Generic natural-language generation remains challenging, especially when sentence attributes must be controlled. The paper combines VAEs with holistic attribute discriminators, differentiable text optimization, and explicit independence constraints to learn disentangled representations. It reports plausible controlled sentences, improved sentiment and tense accuracy, and effective learning from limited or word-level supervision, while noting failures and restricted sentence length.

  • Problem

    Natural-language generation has seen less success than visual generation, and controlling multiple sentence attributes requires disentangled representations.

  • Method

    The model combines VAEs with holistic attribute discriminators, differentiable softmax approximation, explicit independence constraints, and an extended wake-sleep training procedure.

  • Results

    The model generates plausible sentences with specified sentiment and tense, improves attribute-generation accuracy, and learns structured representations from limited or word-level supervision.

  • Takeaways & Limitations

    Independent labeled datasets and even word-level annotations can provide attribute semantics for sentence-level controlled generation.

  • Takeaways & Limitations

    Observed failures include implausible sentences, unintended irrelevant-attribute variation, inaccurate attribute generation, and restricted sentence length.

Abstract

from arXiv · show

Generic generation and manipulation of text is challenging and has limited success compared to recent deep generative modeling in visual domain. This paper aims at generating plausible natural language sentences, whose attributes are dynamically controlled by learning disentangled latent representations with designated semantics. We propose a new neural generative model which combines variational auto-encoders and holistic attribute discriminators for effective imposition of semantic structures. With differentiable approximation to discrete text samples, explicit constraints on independent attribute controls, and efficient collaborative learning of generator and discriminators, our model learns highly interpretable representations from even only word annotations, and produces realistic sentences with desired attributes. Quantitative evaluation validates the accuracy of sentence and attribute generation.

1. Introduction

The paper targets controlled text generation by learning disentangled latent representations whose attributes can be dynamically specified. It combines VAEs, holistic attribute discriminators, differentiable text generation, and collaborative training to produce plausible sentences with controlled sentiment and tense.

  • Controlled text generation seeks realistic sentences whose attributes are specified through disentangled latent representations.
  • Discrete text prevents direct gradient back-propagation from holistic discriminators, while policy-learning alternatives can suffer high training variance.
  • The proposed model combines VAEs with holistic attribute discriminators and differentiable softmax approximation for end-to-end optimization.The VAE encoder also acts as a discriminator for implicitly modeled aspects, helping avoid entanglement during attribute manipulation.
  • An extended wake-sleep procedure alternates generator and discriminator learning, allowing generated samples to provide training signals and enabling efficient mutual bootstrapping.The paper reports that hundreds of annotated sentences can suffice for structured representation learning.
  • Discriminators for different attributes can be trained independently on separate labeled datasets, rather than requiring every sentence to carry all annotations.This design supports combining independently learned attribute semantics for controllable generation.
  • Quantitative experiments show improved accuracy for specified-attribute generation and classification using generated samples, with plausible sentences controlled for sentiment and tense.

2. Related Work

Prior deep generative work established VAEs and discriminator-based learning, but text generation remained less developed. This paper combines VAEs with holistic discriminators and explicitly constrains independence between structured codes and other attributes.

  • VAEs encode examples into latent representations and generate samples from latent space, training through a variational lower bound on data log-likelihood.
  • Discriminators provide generator-learning feedback by assessing whether generated samples resemble real examples, motivating VAE–discriminator combinations.
  • Unlike prior approaches focused mainly on structured latent components, this model constrains dependence between structured codes and attributes not explicitly encoded.The paper reports improved interpretability from this independency constraint.

3. Controlled Generation of Text

The model combines VAEs with attribute discriminators to generate sentences whose designated attributes are controlled through disentangled latent codes. Differentiable text approximation, independence constraints, and alternating collaborative learning support semantic control and semi-supervised training.

  • Model overview: The framework augments VAE latent code z with structured variables c, each targeting an independent semantic feature for controllable generation.The generator conditions on (z, c), while z captures unstructured variation and c encodes attributes such as sentiment or formality.
  • Model overview: Individual attribute discriminators assess whether generated samples match their specified codes and provide holistic feedback to the generator.Separate discriminators can be trained with independent labeled data and combined to control multiple attributes.
  • Differentiable generation: A softmax approximation with decreasing temperature replaces discrete token samples during attribute modeling, enabling gradient propagation from discriminators to the generator.As τ approaches zero, the distributions become increasingly peaked and emulate discrete sampling while retaining low-variance, fast-converging optimization.
  • Disentangled controls: The model explicitly separates irrelevant attributes into z so changing a structured code c does not entangle unspecified attributes with the controlled feature.The encoder is reused as an additional discriminator for enforcing this independence constraint.
  • Collaborative learning: The VAE reconstructs real sentences and regularizes the encoder toward the prior, while discriminators enforce coherence between generated attributes and structured codes.The VAE loss combines reconstruction with KL regularization, and discriminator feedback supplies additional generator learning signals.
  • Collaborative learning: Extended wake-sleep training alternates discriminator and generator updates using synthesized samples, enabling semi-supervised learning from independent attribute labels.The method can use labeled words or phrases, and the paper reports that little supervision is sufficient for learning structured representations.

4. Experiments

Experiments evaluate controlled sentiment and tense generation, attribute accuracy, classifier augmentation, and disentangled representation learning under limited supervision. The model improves sentiment-generation and classifier-augmentation performance, while some implausible sentences and attribute errors remain.

  • Experimental setup: The model generates short sentences with controlled sentiment and tense, learning disentangled representations with few labels or word annotations.The experiments use sentences of length at most 15 and evaluate generation accuracy with trained classifiers.
  • Experimental setup: The evaluation uses an IMDB corpus of approximately 1.4M sentences, alongside labeled sentiment datasets and a tense lexicon.The IMDB-derived corpus has a 16K-word vocabulary; the tense lexicon contains 5,250 labeled words and phrases.
  • Accuracy of Generated Attributes: Sentiment-generation accuracy is measured on 30K generated sentences using a pretrained classifier, and the model consistently outperforms S-VAE across the evaluated datasets.The classifier used for automatic evaluation achieves 90% accuracy on the SST test set; with only 250 labeled SST-small examples, the model still achieves reasonable generation accuracy.
  • Accuracy of Generated Attributes: Classifiers augmented with the model’s generated samples achieve the best performance across four sentiment datasets, including 0.733 accuracy on Lexicon versus 0.701 for Std.The “Ours” augmentation combines minimum-entropy regularization with the generated sentiment code.
  • Disentangled Representation: The experiments also assess interpretability and the explicit independency constraint for disentangled control.The study examines whether changing designated controls avoids unintended variation in other attributes.
  • Disentangled Representation: Observed failure cases include implausible sentences, unexpected variation in irrelevant attributes, and inaccurate attribute generation.The paper suggests improved decoders, beam search, and more systematic quantitative evaluation as future directions.

5. Discussions

The model learns interpretable latent representations for controlled sentence generation, while its semi-supervised framework supports attribute discrimination and structured manipulation. Results include improved sentiment and tense accuracy, but failures remain and broader evaluation is needed.

  • Results: The model learns interpretable latent representations and generates sentences with specified attributes, including sentiment and tense.The paper reports meaningful generation under restricted sentence length and improved accuracy for these attributes.
  • Attribute control: Table 2 compares sentiment-controlled sentence pairs generated with negative versus positive codes while fixing the unstructured code z.The samples use the SST-full dataset and contrast models with or without the independency constraint.
  • Attribute control: Table 3 varies the tense code while fixing the sentiment code and z, isolating the effect of tense control.Each displayed example is a triple of generated sentences.
  • Latent representation: Table 4 varies the unstructured code z while holding sentiment and tense codes at specified values, illustrating variation outside the designated attributes.The fixed structured settings span positive/negative sentiment and past/present/future tense.
  • Implications: Interpretability provides an interface for imposing structured constraints or connecting the generator to dialogue systems with structured dialogue states.The paper gives logic rules, probabilistic structured models, and dialogue responses as examples.
  • Limitations and extensions: The collaborative semi-supervised framework can improve discriminators by generating labeled samples for data augmentation, while failures include implausible sentences and inaccurate attributes.The authors also seek improved modeling, longer outputs, more attributes, and better systematic quantitative evaluations.
Loading 1703.00955v4…