Control Prefixes for Text Generation

Jordan Clive, Kris Cao, Marek ReiarXiv 2021

Abstract

Prefix-tuning is a powerful lightweight technique for adapting a large pre-trained language model to a downstream application. However, it uses the same dataset-level tuned prompt for all examples in the dataset. We extend this idea and propose a dynamic method, Control Prefixes, which allows for the inclusion of conditional input-dependent information, combining the benefits of prompt tuning and controlled generation. The method incorporates attribute-level learnable representations into different layers of a pre-trained transformer, allowing for the generated text to be guided in a particular direction. We provide a systematic evaluation of the technique and apply it to five datasets from the GEM benchmark for natural language generation (NLG). Although the aim is to develop a parameter-efficient model, we show Control Prefixes can even outperform full fine-tuning methods. We present state-of-the-art results on several data-to-text datasets, including WebNLG.

Introduction

Adapting massive Pre-trained Language Models (PLMs) like T5 or BART to specific tasks typically requires "full fine-tuning," which involves updating billions of parameters. This process is computationally expensive, requires significant storage for each task-specific model, and risks overwriting the general language understanding acquired during pre-training.

While "parameter-efficient" alternatives like prefix-tuning keep the model frozen and only train a small set of "prefix" vectors, they are often "one-size-fits-all." Standard prefix-tuning uses the same learned prompt for every example in a dataset, lacking the ability for dynamic, input-dependent control. For instance, summarizing a sports article requires different stylistic guidance than summarizing a technical paper. This paper introduces Control Prefixes to bridge this gap, enabling fine-grained steering without the overhead of full fine-tuning.

Methods

The Control Prefixes approach maintains the efficiency of prefix-tuning while introducing flexibility through a dual-prefix architecture. The base PLM remains completely frozen, while two types of learnable parameters are introduced:

  1. General Task Prefix: A static prompt learned for the overall task (e.g., summarization).
  2. Control Prefixes: Dynamic prompts that vary based on a "guidance signal," such as a data category or a desired output length.
Comparison between standard prefix-tuning and the proposed Control Prefixes architecture.

Unlike simple control tokens added only to the input layer, these prefixes are integrated into the Key and Value matrices of every attention layer in the transformer. To stabilize training, a small, shared feed-forward network (MLP) generates these prefixes, forcing the model to coordinate control within a shared vector space. For categories not seen during training, the system uses GloVe word embeddings to map the unseen category to the most semantically similar "seen" category, enabling zero-shot control.

Results

The method was evaluated on five datasets from the GEM benchmark, covering data-to-text, text simplification, and summarization. The results demonstrate that dynamic, example-level prompts significantly boost performance over static dataset-level prompts.

Performance comparison on DART, WebNLG, and E2E Clean datasets.

Key findings include:

  • Outperforming Full Fine-Tuning: On WebNLG, Control Prefixes achieved a BLEU score 0.83 points higher than the state-of-the-art (SOTA) fully fine-tuned model. On DART, it outperformed SOTA by 1.29 BLEU points.
  • Human Evaluation SOTA: On the XSum summarization task, the model attained the highest human-assessed performance on the GENIE leaderboard, surpassing much larger and fully fine-tuned models.
  • Parameter Efficiency: These gains were achieved by training only 0.1% to 3% of the parameters required for full fine-tuning.
  • Length Control: In simplification tasks, the model successfully followed length control signals, demonstrating precise steering of the output's verbosity.

Conclusion

Control Prefixes demonstrate that large PLMs already possess the necessary knowledge for complex generation tasks; they simply require an effective "steering wheel." By moving from static to dynamic prefixes, this method achieves state-of-the-art performance with minimal parameter updates. Future work may explore continuous guidance signals and methods to improve robustness against input ordering in data-to-text tasks.

Summary updated

BibTeX
@misc{clive2021control,
  author = {Jordan Clive and Kris Cao and Marek Rei},
  title = {{Control Prefixes for Text Generation}},
  year = {2021},
  eprint = {2110.08329},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2110.08329},
}
Figure