PPL-MCTS: Constrained Textual Generation Through Discriminator-Guided Decoding - Inria - Institut national de recherche en sciences et technologies du numérique Accéder directement au contenu
Communication Dans Un Congrès Année : 2021

PPL-MCTS: Constrained Textual Generation Through Discriminator-Guided Decoding

Résumé

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 that indicates 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. These methods are evaluated 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.
Fichier principal
Vignette du fichier
PPL_MCTS_CTRLGen_Camera_Ready.pdf (505.12 Ko) Télécharger le fichier
Origine : Fichiers produits par l'(les) auteur(s)

Dates et versions

hal-03494695 , version 1 (19-12-2021)

Identifiants

  • HAL Id : hal-03494695 , version 1

Citer

Antoine Chaffin, Vincent Claveau, Ewa Kijak. PPL-MCTS: Constrained Textual Generation Through Discriminator-Guided Decoding. CtrlGen 2021 - Workshop on Controllable Generative Modeling in Language and Vision at NeurIPS 2021, Dec 2021, virtual, United States. pp.1-19. ⟨hal-03494695⟩
190 Consultations
215 Téléchargements

Partager

Gmail Facebook X LinkedIn More