Attribute Alignment: Controlling Text Generation from Pre-trained Language Models

Dian Yu, Zhou Yu, Kenji Sagae
3/20/2021
cs.CL

Official code: DianDYu/attribute_alignment (4 stars, Python, last commit 2022-02-02).

Abstract

Large language models benefit from training with a large amount of unlabeled text, which gives them increasingly fluent and diverse generation capabilities. However, using these models for text generation that takes into account target attributes, such as sentiment polarity or specific topics, remains a challenge.

Show full abstract

We propose a simple and flexible method for controlling text generation by aligning disentangled attribute representations. In contrast to recent efforts on training a discriminator to perturb the token level distribution for an attribute, we use the same data to learn an alignment function to guide the pre-trained, non-controlled language model to generate texts with the target attribute without changing the original language model parameters. We evaluate our method on sentiment- and topic-controlled generation, and show large performance gains over previous methods while retaining fluency and diversity.

View on arXivView PDF

Code Implementations(1)

40PythonSep 10, 20214 years ago

Similar Papers

Cite this paper

@article{yu2021attribute,
  title  = {Attribute Alignment: Controlling Text Generation from Pre-trained Language Models},
  author = {Dian Yu and Zhou Yu and Kenji Sagae},
  year   = {2021},
  eprint = {2103.11070},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2103.11070}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2103.11070.svg)](https://codeofpaper.com/paper/2103.11070)

Discussion