Generating texts under constraint through discriminator-guided MCTS
- URL: http://arxiv.org/abs/2109.13582v1
- Date: Tue, 28 Sep 2021 09:29:15 GMT
- Title: Generating texts under constraint through discriminator-guided MCTS
- Authors: Antoine Chaffin, Vincent Claveau, Ewa Kijak
- Abstract summary: We formalize constrained generation as a tree exploration process guided by a discriminator.
Using a discriminator to guide this generation, rather than fine-tuning the LM, allows to apply the constraint more finely and dynamically.
We show that our methods achieves state-of-the-art results in constrained generation, without having to tune the language model.
- Score: 1.3750624267664153
- License: http://creativecommons.org/licenses/by-nc-sa/4.0/
- Abstract: Large pre-trained language models (LM) based on Transformers allow to
generate very plausible long texts. In this paper, we explore how this
generation can be further controlled to satisfy certain constraints (eg. being
non-toxic, positive or negative, convey certain emotions, etc.) without
fine-tuning the LM. Precisely, we formalize constrained generation as a tree
exploration process guided by a discriminator according to how well the
associated sequence respects the constraint. Using a discriminator to guide
this generation, rather than fine-tuning the LM, in addition to be easier and
cheaper to train, allows to apply the constraint more finely and dynamically.
We propose several original methods to search this generation tree, notably the
Monte Carlo Tree Search (MCTS) which provides theoretical guarantees on the
search efficiency, but also simpler methods based on re-ranking a pool of
diverse sequences using the discriminator scores. We evaluate these methods on
two types of constraints and languages: review polarity and emotion control in
French and English. We show that MCTS achieves state-of-the-art results in
constrained generation, without having to tune the language model, in both
tasks and languages. We also demonstrate that our other proposed methods based
on re-ranking can be really effective when diversity among the generated
propositions is encouraged.
Related papers
- Constraints First: A New MDD-based Model to Generate Sentences Under
Constraints [45.498315114762484]
This paper introduces a new approach to generating strongly constrained texts.
We use multivalued decision diagrams (MDD), a well-known data structure to deal with constraints.
We get hundreds of bona-fide candidate sentences when compared with the few dozen sentences usually available in the well-known vision screening test (MNREAD)
arXiv Detail & Related papers (2023-09-21T18:29:52Z) - Controlled Text Generation with Natural Language Instructions [74.88938055638636]
InstructCTG is a controlled text generation framework that incorporates different constraints.
We first extract the underlying constraints of natural texts through a combination of off-the-shelf NLP tools and simple verbalizes.
By prepending natural language descriptions of the constraints and a few demonstrations, we fine-tune a pre-trained language model to incorporate various types of constraints.
arXiv Detail & Related papers (2023-04-27T15:56:34Z) - Generating Sequences by Learning to Self-Correct [64.0249217590888]
Self-Correction decouples an imperfect base generator from a separate corrector that learns to iteratively correct imperfect generations.
We show that Self-Correction improves upon the base generator in three diverse generation tasks.
arXiv Detail & Related papers (2022-10-31T18:09:51Z) - Language Detoxification with Attribute-Discriminative Latent Space [59.167432249229584]
Transformer-based Language Models (LMs) have achieved impressive results on natural language understanding tasks.
They can also generate toxic text such as insults, threats, and profanity, limiting their real-world applications.
We propose an effective yet efficient method for language detoxification using an attribute-discriminative latent space.
arXiv Detail & Related papers (2022-10-19T06:54:42Z) - Bridging the Gap Between Training and Inference of Bayesian Controllable
Language Models [58.990214815032495]
Large-scale pre-trained language models have achieved great success on natural language generation tasks.
BCLMs have been shown to be efficient in controllable language generation.
We propose a "Gemini Discriminator" for controllable language generation which alleviates the mismatch problem with a small computational cost.
arXiv Detail & Related papers (2022-06-11T12:52:32Z) - Controllable Natural Language Generation with Contrastive Prefixes [120.12778570283956]
GPT2 generation utilizes a set of small attribute-specific vectors, called prefixes, to steer natural language generation.
We propose a novel supervised method and also an unsupervised method to train the prefixes for single-aspect control.
Experimental results on both single-aspect and multi-aspect control show that our methods can guide generation towards the desired attributes while keeping high linguistic quality.
arXiv Detail & Related papers (2022-02-27T00:31:03Z) - Language Generation via Combinatorial Constraint Satisfaction: A Tree
Search Enhanced Monte-Carlo Approach [24.897552102098324]
We present a framework to allow specification of constraints for sentence generation.
We propose TSMH, an efficient method to generate high likelihood sentences with respect to a pre-trained language model.
Our approach is highly flexible, requires no task-specific training, and leverages efficient constraint satisfaction solving techniques.
arXiv Detail & Related papers (2020-11-24T19:21:00Z) - GeDi: Generative Discriminator Guided Sequence Generation [53.15651536569169]
We propose GeDi as an efficient method for using smaller LMs as generative discriminators to guide generation from large LMs.
We find that GeDi gives stronger controllability than the state of the art method while also achieving generation speeds more than 30 times faster.
arXiv Detail & Related papers (2020-09-14T17:45:36Z) - ColdGANs: Taming Language GANs with Cautious Sampling Strategies [29.943949944682196]
Generative Adversarial Networks (GANs) can mitigate limitations but the discrete nature of text has hindered their application to language generation.
We show how classical sampling results in unstable training.
We propose to consider alternative exploration strategies in a GAN framework that we name ColdGANs, where we force the sampling to be close to the distribution modes to get smoother learning dynamics.
For the first time, to the best of our knowledge, the proposed language GANs compare favorably to MLE, and obtain improvements over the state-of-the-art on three generative tasks.
arXiv Detail & Related papers (2020-06-08T14:48:14Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.