Directed Beam Search: Plug-and-Play Lexically Constrained Language
Generation
- URL: http://arxiv.org/abs/2012.15416v1
- Date: Thu, 31 Dec 2020 03:05:44 GMT
- Title: Directed Beam Search: Plug-and-Play Lexically Constrained Language
Generation
- Authors: Damian Pascual, Beni Egressy, Florian Bolli, Roger Wattenhofer
- Abstract summary: State-of-the-art language models are too large to be trained from scratch in a manageable time.
We propose Directed Beam Search (DBS), a plug-and-play method for lexically constrained language generation.
- Score: 6.2211479935811775
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- Abstract: Large pre-trained language models are capable of generating realistic text.
However, controlling these models so that the generated text satisfies lexical
constraints, i.e., contains specific words, is a challenging problem. Given
that state-of-the-art language models are too large to be trained from scratch
in a manageable time, it is desirable to control these models without
re-training them. Methods capable of doing this are called plug-and-play.
Recent plug-and-play methods have been successful in constraining small
bidirectional language models as well as forward models in tasks with a
restricted search space, e.g., machine translation. However, controlling large
transformer-based models to meet lexical constraints without re-training them
remains a challenge. In this work, we propose Directed Beam Search (DBS), a
plug-and-play method for lexically constrained language generation. Our method
can be applied to any language model, is easy to implement and can be used for
general language generation. In our experiments we use DBS to control GPT-2. We
demonstrate its performance on keyword-to-phrase generation and we obtain
comparable results as a state-of-the-art non-plug-and-play model for lexically
constrained story generation.
Related papers
- Plug and Play with Prompts: A Prompt Tuning Approach for Controlling Text Generation [16.49758711633611]
Large Language Models (LLMs) have shown exceptional language generation capabilities in response to text-based prompts.
In this work, we explore the use of Prompt Tuning to achieve controlled language generation.
We demonstrate the efficacy of our method towards mitigating harmful, toxic, and biased text generated by language models.
arXiv Detail & Related papers (2024-04-08T01:54:28Z) - FiLM: Fill-in Language Models for Any-Order Generation [71.42044325886194]
Fill-in Language Model (FiLM) is a new language modeling approach that allows for flexible generation at any position without adhering to a specific generation order.
During inference, FiLM can seamlessly insert missing phrases, sentences, or paragraphs.
FiLM outperforms existing infilling methods that rely on left-to-right language models trained on rearranged text segments.
arXiv Detail & Related papers (2023-10-15T19:37:39Z) - Most Language Models can be Poets too: An AI Writing Assistant and
Constrained Text Generation Studio [0.5097809301149341]
We find that most language models generate compelling text even under significant constraints.
We present a technique for modifying the output of a language model by compositionally applying filter functions to the language models vocabulary.
We also present a Huggingface space web-app presenting this technique called Gadsby.
arXiv Detail & Related papers (2023-06-28T05:10:51Z) - Extrapolating Multilingual Understanding Models as Multilingual
Generators [82.1355802012414]
This paper explores methods to empower multilingual understanding models the generation abilities to get a unified model.
We propose a textbfSemantic-textbfGuided textbfAlignment-then-Denoising (SGA) approach to adapt an encoder to a multilingual generator with a small number of new parameters.
arXiv Detail & Related papers (2023-05-22T15:33:21Z) - Tractable Control for Autoregressive Language Generation [82.79160918147852]
We propose to use tractable probabilistic models (TPMs) to impose lexical constraints in autoregressive text generation models.
We show that GeLaTo achieves state-of-the-art performance on challenging benchmarks for constrained text generation.
Our work opens up new avenues for controlling large language models and also motivates the development of more expressive TPMs.
arXiv Detail & Related papers (2023-04-15T00:19:44Z) - 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) - Few-shot Prompting Towards Controllable Response Generation [49.479958672988566]
We first explored the combination of prompting and reinforcement learning (RL) to steer models' generation without accessing any of the models' parameters.
We apply multi-task learning to make the model learn to generalize to new tasks better.
Experiment results show that our proposed method can successfully control several state-of-the-art (SOTA) dialogue models without accessing their parameters.
arXiv Detail & Related papers (2022-06-08T14:48:06Z) - A Plug-and-Play Method for Controlled Text Generation [38.283313068622085]
We present a plug-and-play decoding method for controlled language generation that is so simple and intuitive, it can be described in a single sentence.
Despite the simplicity of this approach, we see it works incredibly well in practice.
arXiv Detail & Related papers (2021-09-20T17:27:03Z) - 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)
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.