Skip to main content
QUICK REVIEW

[Paper Review] A Distributional Approach to Controlled Text Generation

Muhammad Khalifa, Hady Elsahar|arXiv (Cornell University)|Dec 21, 2020
Topic ModelingComputer Science55 references31 citations
TL;DR

The paper introduces a Distributional Control framework (GDC) that unifies pointwise and distributional constraints for pretrained language models by deriving an optimal Energy-Based Model that minimizes KL divergence from the original LM, and then trains an autoregressive policy via a KL-adaptive Distributional Policy Gradient.

ABSTRACT

We propose a Distributional Approach for addressing Controlled Text Generation from pre-trained Language Models (LMs). This approach permits to specify, in a single formal framework, both "pointwise" and "distributional" constraints over the target LM -- to our knowledge, the first model with such generality -- while minimizing KL divergence from the initial LM distribution. The optimal target distribution is then uniquely determined as an explicit EBM (Energy-Based Model) representation. From that optimal representation we then train a target controlled Autoregressive LM through an adaptive distributional variant of Policy Gradient. We conduct a first set of experiments over pointwise constraints showing the advantages of our approach over a set of baselines, in terms of obtaining a controlled LM balancing constraint satisfaction with divergence from the initial LM. We then perform experiments over distributional constraints, a unique feature of our approach, demonstrating its potential as a remedy to the problem of Bias in Language Models. Through an ablation study, we show the effectiveness of our adaptive technique for obtaining faster convergence. (Code available at https://github.com/naver/gdc)

Motivation & Objective

  • Formalize controlled text generation as a constraint satisfaction problem over the target distribution to satisfy both pointwise and distributional requirements.
  • Minimize the KL divergence from the pretrained LM to retain linguistic quality while enforcing constraints.
  • Derive a unique optimal target distribution in EBM form and enable practical sampling via a learnable autoregressive policy.
  • Demonstrate bias-mitigation potential and demonstrate faster convergence through an adaptive sampling approach.

Proposed method

  • Define moment constraints as expectations of feature functions under the target distribution p.
  • Obtain the unique p by minimizing D_KL(p||a) subject to moment constraints, yielding p(x) ∝ a(x) exp( sum_i λ_i φ_i(x) ).
  • Approximate the EBM with Self-NN Importance Sampling to estimate moments and solve for λ via SGD (Algorithm 1).
  • Train an autoregressive policy π_θ to approximate p using KL-Adaptive Distributional Policy Gradient (Algorithm 2).
  • Decouple the process into pivoting on the EBM and then efficient sampling for inference, enabling monitoring of D_KL(p||π_θ) and D_KL(π_θ||a).
  • Provide pointwise, distributional, and hybrid constraint handling within a single framework.

Experimental results

Research questions

  • RQ1Can pointwise and distributional constraints be satisfied within a single, KL-minimizing framework while staying close to the original LM?
  • RQ2Does the optimal target distribution form an Energy-Based Model that uniquely satisfies the constraints?
  • RQ3Can KL-Adaptive DPG efficiently approximate the optimal distribution for autoregressive sampling?
  • RQ4How does Distributional Control compare to baselines in terms of constraint satisfaction, diversity, and bias mitigation?

Key findings

  • GDC outperforms baselines on constraint satisfaction while maintaining lower divergence from the pretrained GPT-2 and preserving diversity.
  • In distributional experiments, GDC mitigates bias by increasing targeted demographic or topical proportions (e.g., female biographies from 7.4% to 35.6% in one setup).
  • In profession/biography experiments, GDC achieved targeted increases/decreases (e.g., Science from 1.5% to 20.1% and Art from 11.4% to 88.6% in hybrid settings; see table values).
  • GDC demonstrates more stable convergence with lower D_KL(p||π_θ) compared to baselines and yields richer vocabulary (lower Self-BLEU-5 in many cases).
  • The approach avoids degeneration observed with some RL baselines by keeping proximity to the original LM while enforcing constraints.

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.