Conversation Style Transfer using Few-Shot Learning

Shamik Roy, Raphael Shu, Nikolaos Pappas, Elman Mansimov, Yi Zhang, Saab Mansour, Dan Roth · DOI

TL;DR

Researchers at AWS AI Labs have developed a few-shot learning framework for Conversation Style Transfer, moving beyond simple sentence-level swaps to handle the nuances of multi-turn dialogues. By using "style-free" text as a neutral pivot and leveraging Large Language Models (LLMs), their approach allows a chatbot to adopt a specific human persona (like a friendly Chipotle agent or a formal service rep) using only a handful of examples, significantly improving the appropriateness and flow of the conversation.

What Problem Does This Paper Address?

Traditional Text Style Transfer (TST) usually operates at the sentence level. If you want to make a sentence "more formal," you feed it into a model, and it spits out a formal version. However, in a conversation, style is holistic and context-dependent. A response that is stylistically perfect but ignores the previous turns of the conversation is a failure.

Existing methods struggle with two main things:

  1. Contextual Blindness: Sentence-level models often produce "out-of-context" responses because they don't see the dialogue history.
  2. Attribute Bottlenecks: Most TST defines style using rigid labels like "formal" or "polite." In reality, a specific brand persona (like a "Chipotle agent style") is a complex mix of friendliness, specific vocabulary, and even structural quirks that are hard to capture with a single label.
Utterance-level vs. Conversation-level style transfer.

Methods

The authors propose a two-step In-Context Learning (ICL) approach using LLMs (specifically GPT-NeoX 20B and Bloom 176B).

  • The Style-Free Pivot: Instead of trying to map Style A directly to Style B (which requires rare parallel data), they use a neutral "style-free" version as a bridge.
  • Step 1 (Style Reduction): The model is prompted to strip the style from the source utterance, leaving only the core intent.
  • Step 2 (Transfer to Target): The model rewrites that style-free intent into the target style.
The two-step style transfer process using a style-free pivot.
  • Dynamic Prompt Selection: Rather than giving the LLM the same few examples every time, the system uses a sentence transformer to find the most semantically similar examples from a small pool of "gold" dialogues. This helps the model understand how to handle specific situations (e.g., a customer being angry vs. asking a simple question).
  • Conversation-Level Context: Unlike baseline models that only see one turn, this method includes 2 to 5 previous turns of dialogue in the prompt to ensure the generated response actually makes sense in context.

Datasets

The study utilized two major Task-Oriented Dialogue (TOD) sources:

  • TWCS (Twitter Customer Support): Specifically used to extract the "Chipotle" agent style ($H_2$), characterized by being casual, friendly, and signing off with a name.
  • DSTC11 (Intent Induction Track): Used for a formal human style ($H_1$) and a "crisp/direct" chatbot style ($B$).
  • Human-Annotated "Style-Free" Data: The authors had experts rewrite a small number of dialogues (about 5-7 per style) into a neutral, style-free format to serve as the few-shot examples for the LLM.

Key Insights and Ideas

  • The "Appropriateness" Trade-off: The researchers found a tension between style and substance. Utterance-level models (which ignore context) are actually better at hitting the target style markers, but they often produce nonsensical or repetitive replies. Adding context makes the style slightly "weaker" but makes the conversation much more coherent and "human."
  • Style is Holistic: By analyzing Pointwise Mutual Information (PMI), they showed that styles are defined by much more than just "politeness." For example, the Chipotle style ($H_2$) uses words like "bummer," "awesome," and "fam," while the formal style ($H_1$) sticks to "mister," "kindly," and "pleasure."
  • Few-Shot is Enough: You don't need thousands of parallel sentences. By using the right prompts and a style-free pivot, an LLM can learn a complex persona from just a dozen examples.

Key Results

  • Human Evaluation: In ranking tests, the conversation-level models (using 2-5 turns of context) were rated significantly higher for appropriateness and semantic correctness than the utterance-level baselines.
  • Model Comparison: The larger Bloom (176B) model generally outperformed the smaller GPT-NeoX (20B), particularly in maintaining semantic similarity to the original message while increasing context.
  • Downstream Gains: The authors tested if style transfer could help other AI tasks. By "translating" human-to-human training data into a "chatbot style" to match the test data, they saw a statistically significant boost in Intent Classification F1 scores (e.g., an increase from 94.4 to 97.7 in the Banking domain).

Limitations and Future Work

  • Manual Bottleneck: Currently, the "style-free" examples must be written by humans. The authors suggest that automating this "style reduction" step is a key area for future research.
  • Context Limits: LLMs have a "context window" limit. As conversations get longer, the prompts become too large, meaning the model can't see the entire history.
  • Language Scope: The study was limited to English. Since style is deeply tied to culture and social norms, testing this on other languages is a necessary next step.

Summary updated

BibTeX
@inproceedings{roy2023conversation,
  author = {Shamik Roy and Raphael Shu and Nikolaos Pappas and Elman Mansimov and Yi Zhang and Saab Mansour and Dan Roth},
  title = {{Conversation Style Transfer using Few-Shot Learning}},
  booktitle = {IJCNLP},
  year = {2023},
  doi = {10.18653/v1/2023.ijcnlp-main.9},
}
Figure