Response Generation with Context-Aware Prompt Learning

Xiaodong Gu, Kang Min Yoo, Sang-Woo LeearXiv 2021

Abstract

Traditional fine-tuning of large pre-trained language models (PLMs) for dialogue generation often suffers from catastrophic forgetting and data scarcity. While prompt learning offers a parameter-efficient alternative, existing methods typically rely on static prompts that fail to capture the dynamic nature of conversation. We present DialogPrompt, a context-aware prompt learning framework that utilizes a dynamic prompt encoder to adapt to conversation history. By keeping the underlying PLM frozen and only training a small encoder, DialogPrompt generates more coherent and informative responses than standard fine-tuning and static prompt-tuning baselines.

Introduction

Fine-tuning large-scale pre-trained language models like GPT-2 has become the standard approach for dialogue systems. However, this process is computationally expensive and risks "catastrophic forgetting," where the model loses general-purpose knowledge in favor of narrow task-specific patterns. Recent advances in prompt learning, such as Prefix-Tuning, mitigate these issues by keeping the PLM frozen and optimizing a small set of continuous prompt tokens.

Despite their efficiency, standard prompt-tuning methods use static prompts—a fixed set of embeddings applied uniformly across all inputs. In dialogue, where context and intent shift rapidly, static prompts are often too rigid. DialogPrompt addresses this limitation by introducing a dynamic, context-aware prompt mechanism that "steers" the model based on the current state of the conversation.

Methodology: From Static to Dynamic Prompts

The core innovation of DialogPrompt is the replacement of static prompt tokens with a Dynamic Prompt Encoder. Unlike Prefix-Tuning, which prepends a fixed sequence of trainable vectors to the input, DialogPrompt generates these vectors based on the current dialogue context.

Comparison of Fine-Tuning, Prefix-Tuning, and the proposed DialogPrompt architecture.

The DialogPrompt Architecture

As illustrated in the figure above, DialogPrompt consists of three main components:

  1. Frozen Backbone: A pre-trained GPT-2 model remains frozen, preserving its original linguistic knowledge and preventing weight distortion.
  2. Dynamic Prompt Encoder: A small, trainable autoregressive Transformer that processes the dialogue context $C$.
  3. Context-Aware Prompts: The encoder produces a sequence of prompt encodings $P = \{P_1, P_2, P_3, P_4\}$ that serve as "past hidden states" for the frozen GPT-2.
Detailed view of the DialogPrompt mechanism, showing how context-aware prompts are generated and fed into the frozen PLM.

By conditioning the prompt on the conversation history, the model effectively elicits the right knowledge from the PLM rather than attempting to rewrite its internal weights.

Experimental Setup

The researchers evaluated DialogPrompt on two distinct dialogue benchmarks:

  • DailyDialog: A dataset of 13,118 high-quality human-labeled daily conversations, focusing on everyday topics, emotions, and social exchange.
  • MultiWOZ: A complex, task-oriented dataset containing 8,438 dialogues across multiple domains (e.g., hotels, restaurants), requiring specific domain knowledge.

Results and Discussion

DialogPrompt demonstrated superior performance across both quantitative metrics and human evaluations, particularly in "chit-chat" scenarios.

Quantitative Performance

On the DailyDialog dataset, DialogPrompt achieved a BLEU score of 13.94, significantly outperforming standard fine-tuning (12.65). Improvements were also observed in NIST, METEOR, and ROUGE-L metrics. Furthermore, DialogPrompt tended to generate longer, more substantive responses, with an average length of 16.90 tokens compared to 15.60 for fine-tuning.

Knowledge Reuse and Human Evaluation

In head-to-head comparisons, human judges preferred DialogPrompt over fine-tuning 58.13% of the time for coherence and 56.43% of the time for informativeness. Qualitative case studies revealed that DialogPrompt produces more specific and knowledgeable responses. For instance, while a fine-tuned model might provide a generic response about a product, DialogPrompt could specify a particular entity (e.g., "Imperial Porter"), indicating better utilization of the PLM's internal knowledge base. This suggests that keeping the model frozen allows it to access the vast world knowledge it learned during its initial massive pre-training phase more effectively.

Conclusion

DialogPrompt represents a significant step forward in parameter-efficient dialogue generation. By introducing context-awareness into the prompt learning paradigm, it allows frozen language models to adapt dynamically to conversation history without the risks associated with full fine-tuning. While improvements on task-oriented datasets like MultiWOZ were less dramatic—likely due to the need for specific domain knowledge not present in general PLMs—the approach shows great promise for creating more human-like and informative conversational agents.

Summary updated

BibTeX
@misc{gu2021response,
  author = {Xiaodong Gu and Kang Min Yoo and Sang-Woo Lee},
  title = {{Response Generation with Context-Aware Prompt Learning}},
  year = {2021},
  eprint = {2111.02643},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2111.02643},
}
Figure