Context-Tuning: Learning Contextualized Prompts for Natural Language Generation

Tianyi Tang, Junyi Li, Wayne Xin Zhao, Ji-Rong Wen
1/21/2022
cs.CL

Official code: RUCAIBox/Context-Tuning (11 stars, MIT, last commit 2022-10-16).

Abstract

Recently, pretrained language models (PLMs) have had exceptional success in language generation. To leverage the rich knowledge encoded by PLMs, a simple yet powerful paradigm is to use prompts in the form of either discrete tokens or continuous embeddings.

Show full abstract

In existing studies, these prompting methods are typically independent of the inputs, lacking sufficient consideration of input semantics. To address this issue, we propose a novel continuous prompting approach, called context-tuning, to fine-tuning PLMs for natural language generation. Firstly, the prompts are derived based on the input text to elicit useful knowledge from PLMs for generation. We refer to such prompts as contextualized prompts. Secondly, we use continuous inverse prompting to improve the process of natural language generation by modeling an inverse generation process from output to input, making the generated text more relevant to the inputs. Furthermore, we utilize a lightweight context-tuning method that fine-tunes only 0.12% of the parameters while maintaining good performance. Our code is publicly available at https://github.com/RUCAIBox/Context-Tuning.

View on arXivView PDF

Code Implementations(1)

MIT

This is the repository for COLING 2022 paper "Context-Tuning: Learning Contextualized Prompts for Natural Language Generation".

111Aug 28, 20224 years agoMIT
natural-language-generation

Similar Papers

Cite this paper

@article{tang2022contexttuning,
  title  = {Context-Tuning: Learning Contextualized Prompts for Natural Language Generation},
  author = {Tianyi Tang and Junyi Li and Wayne Xin Zhao and Ji-Rong Wen},
  year   = {2022},
  eprint = {2201.08670},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2201.08670}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2201.08670.svg)](https://codeofpaper.com/paper/2201.08670)

Discussion