Toward Unified Controllable Text Generation via Regular Expression Instruction

09/19/2023
by   Xin Zheng, et al.
0

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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
04/27/2023

Controlled Text Generation with Natural Language Instructions

Large language models generate fluent texts and can follow natural langu...
research
12/20/2022

Controllable Text Generation with Language Constraints

We consider the task of text generation in language models with constrai...
research
10/24/2020

NeuroLogic Decoding: (Un)supervised Neural Text Generation with Predicate Logic Constraints

Conditional text generation often requires lexical constraints, i.e., wh...
research
03/24/2022

Mix and Match: Learning-free Controllable Text Generation using Energy Language Models

Recent work on controlled text generation has either required attribute-...
research
07/17/2023

COLLIE: Systematic Construction of Constrained Text Generation Tasks

Text generation under constraints have seen increasing interests in natu...
research
02/16/2022

XFBoost: Improving Text Generation with Controllable Decoders

Multimodal conditionality in transformer-based natural language models h...
research
05/27/2022

Diffusion-LM Improves Controllable Text Generation

Controlling the behavior of language models (LMs) without re-training is...

Please sign up or login with your details

Forgot password? Click here to reset