Skip to main content
QUICK REVIEW

[Paper Review] Tractable Control for Autoregressive Language Generation

Honghua Zhang, Meihua Dang|arXiv (Cornell University)|Apr 15, 2023
Topic ModelingComputer Science3 citations
TL;DR

This paper proposes GeLaTo, a framework that uses tractable probabilistic models (TPMs), specifically distilled hidden Markov models, to enable efficient and exact enforcement of complex lexical constraints in autoregressive language generation. By computing conditional probabilities from the TPM to guide decoding, GeLaTo achieves state-of-the-art performance on constrained text generation benchmarks while guaranteeing 100% constraint satisfaction.

ABSTRACT

Despite the success of autoregressive large language models in text generation, it remains a major challenge to generate text that satisfies complex constraints: sampling from the conditional distribution ${\Pr}( ext{text} | α)$ is intractable for even the simplest lexical constraints $α$. To overcome this challenge, we propose to use tractable probabilistic models (TPMs) to impose lexical constraints in autoregressive text generation models, which we refer to as GeLaTo (Generating Language with Tractable Constraints). To demonstrate the effectiveness of this framework, we use distilled hidden Markov models, where we can efficiently compute ${\Pr}( ext{text} | α)$, to guide autoregressive generation from GPT2. GeLaTo achieves state-of-the-art performance on challenging benchmarks for constrained text generation (e.g., CommonGen), beating various strong baselines by a large margin. Our work not only opens up new avenues for controlling large language models but also motivates the development of more expressive TPMs.

Motivation & Objective

  • To address the intractability of conditional generation in autoregressive language models when enforcing complex lexical constraints.
  • To develop a method that guarantees constraint satisfaction while maintaining high generation quality in both supervised and unsupervised settings.
  • To explore the integration of tractable probabilistic models (TPMs) as a reliable, efficient mechanism for guiding large language model generation.
  • To demonstrate the effectiveness of TPMs—specifically distilled HMMs—as a scalable and general-purpose solution for constrained text generation.
  • To motivate the development of more expressive tractable probabilistic models for future applications in language model control.

Proposed method

  • Train a tractable probabilistic model (specifically, a distilled HMM) via maximum likelihood estimation on data sampled from a pre-trained language model, minimizing KL divergence between the TPM and the LM.
  • Use the trained TPM to compute the conditional probability $\Pr_{\text{TPM}}(x_{t+1} \mid x_{1:t}, \alpha)$ efficiently at generation time, where $\alpha$ is a lexical constraint.
  • Combine the TPM's conditional probability with the autoregressive LM's next-token distribution to approximate $\Pr_{\text{LM}}(x_{t+1} \mid x_{1:t}, \alpha)$, enabling constrained decoding.
  • Implement a dynamic programming algorithm to efficiently compute $\Pr_{\text{HMM}}(\cdot \mid \alpha)$ for constraints expressed as conjunctive normal forms (CNFs) over keyword phrases.
  • Represent each constraint $\alpha$ as a logical formula requiring at least one occurrence of a keyword or its inflection (as a multi-token string) in the output.
  • Apply the framework to GPT2-large by fine-tuning it on downstream tasks and distilling its behavior into the HMM-based TPM for inference.

Experimental results

Research questions

  • RQ1Can tractable probabilistic models be used to efficiently compute conditional probabilities for complex lexical constraints in autoregressive generation?
  • RQ2Can a distilled HMM-based TPM approximate the generation behavior of a large language model well enough to guide high-quality text generation?
  • RQ3Does the proposed framework achieve both high generation quality and 100% constraint satisfaction across diverse benchmarks?
  • RQ4Can the same trained TPM be reused across different types of lexical constraints without retraining?
  • RQ5How does the method compare to existing baselines in terms of BLEU scores and constraint enforcement in both supervised and unsupervised settings?

Key findings

  • GeLaTo achieves state-of-the-art BLEU-4 scores on the CommonGen, News, and Yelp!Review benchmarks, outperforming strong baselines such as InsNet, NADO, and FUDGE.
  • On the CommonGen dataset, GeLaTo achieves a BLEU-4 score of 6.6 in the unsupervised setting, significantly outperforming the next-best method (NADO) at 6.0.
  • On the News dataset, GeLaTo achieves a BLEU-4 score of 5.4 in the unsupervised setting, surpassing the best baseline (InsNet) at 5.0.
  • GeLaTo guarantees 100% constraint satisfaction across all evaluated benchmarks, including those requiring keywords to appear in specific orders.
  • The method generalizes across constraint types: it successfully handles both unordered keyword sets and ordered keyword sequences with minimal modification to the core algorithm.
  • The distilled HMM-based TPM effectively approximates the GPT2-large model’s behavior, enabling accurate and efficient conditional probability inference for constraint-guided decoding.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.