Toward Unified Controllable Text Generation via Regular Expression
Instruction
- URL: http://arxiv.org/abs/2309.10447v2
- Date: Wed, 20 Sep 2023 02:18:06 GMT
- Title: Toward Unified Controllable Text Generation via Regular Expression
Instruction
- Authors: Xin Zheng, Hongyu Lin, Xianpei Han and Le Sun
- Abstract summary: Our paper introduces Regular Expression Instruction (REI), which utilizes an instruction-based mechanism to fully exploit regular expressions' advantages to uniformly model diverse constraints.
Our method only requires fine-tuning on medium-scale language models or few-shot, in-context learning on large language models, and requires no further adjustment when applied to various constraint combinations.
- Score: 56.68753672187368
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: Controllable text generation is a fundamental aspect of natural language
generation, with numerous methods proposed for different constraint types.
However, these approaches often require significant architectural or decoding
modifications, making them challenging to apply to additional constraints or
resolve different constraint combinations. To address this, our paper
introduces Regular Expression Instruction (REI), which utilizes an
instruction-based mechanism to fully exploit regular expressions' advantages to
uniformly model diverse constraints. Specifically, our REI supports all popular
fine-grained controllable generation constraints, i.e., lexical, positional,
and length, as well as their complex combinations, via regular expression-style
instructions. Our method only requires fine-tuning on medium-scale language
models or few-shot, in-context learning on large language models, and requires
no further adjustment when applied to various constraint combinations.
Experiments demonstrate that our straightforward approach yields high success
rates and adaptability to various constraints while maintaining competitiveness
in automatic metrics and outperforming most previous baselines.
Related papers
- Intertwining CP and NLP: The Generation of Unreasonably Constrained Sentences [49.86129209397701]
This paper presents the Constraints First Framework to remedy this issue.
It is solved by a constraint programming method that combines linguistic properties with more classical constraints.
The effectiveness of this approach is demonstrated by tackling a new more tediously constrained text generation problem.
arXiv Detail & Related papers (2024-06-15T17:40:49Z) - Controllable Text Generation in the Instruction-Tuning Era [3.310278632293704]
We find that prompting-based approaches outperform controllable text generation methods on most datasets and tasks.
We provide an algorithm that uses only a task dataset and a Large Language Model with in-context capabilities to automatically generate a constraint dataset.
arXiv Detail & Related papers (2024-05-02T17:24:30Z) - 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) - 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) - Controllable Text Generation with Language Constraints [39.741059642044874]
We consider the task of text generation in language models with constraints specified in natural language.
Our benchmark contains knowledge-intensive constraints sourced from databases like Wordnet and Wikidata.
We propose a solution to leverage a language model's own internal knowledge to guide generation.
arXiv Detail & Related papers (2022-12-20T17:39:21Z) - An Extensible Plug-and-Play Method for Multi-Aspect Controllable Text
Generation [70.77243918587321]
Multi-aspect controllable text generation that controls generated text in multiple aspects has attracted increasing attention.
We provide a theoretical lower bound for the interference and empirically found that the interference grows with the number of layers where prefixes are inserted.
We propose using trainable gates to normalize the intervention of prefixes to restrain the growing interference.
arXiv Detail & Related papers (2022-12-19T11:53:59Z) - COLD Decoding: Energy-based Constrained Text Generation with Langevin
Dynamics [69.8062252611486]
Cold decoding is a flexible framework that can be applied directly to off-the-shelf left-to-right language models.
Our experiments on constrained generation tasks point to the effectiveness of our approach, both in terms of automatic and human evaluation.
arXiv Detail & Related papers (2022-02-23T18:59:27Z)
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.