Skip to Main content Skip to Navigation
New interface
Preprints, Working Papers, ...

Generating texts under constraint through discriminator-guided MCTS

Antoine Chaffin 1 Vincent Claveau 1 Ewa Kijak 1 
1 LinkMedia - Creating and exploiting explicit links between multimedia fragments
Inria Rennes – Bretagne Atlantique , IRISA-D6 - MEDIA ET INTERACTIONS
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.
Complete list of metadata

https://hal.archives-ouvertes.fr/hal-03430611
Contributor : Vincent Claveau Connect in order to contact the contributor
Submitted on : Tuesday, November 16, 2021 - 12:21:58 PM
Last modification on : Friday, August 5, 2022 - 2:54:52 PM

Links full text

Identifiers

  • HAL Id : hal-03430611, version 1
  • ARXIV : 2109.13582

Citation

Antoine Chaffin, Vincent Claveau, Ewa Kijak. Generating texts under constraint through discriminator-guided MCTS. 2021. ⟨hal-03430611⟩

Share

Metrics

Record views

22