A Recipe for Arbitrary Text Style Transfer with Large Language Models
Emily Reif1 Daphne Ippolito1,2* Ann Yuan1 Andy Coenen1 Chris Callison-Burch2 Jason Wei1 1Google Research 2University of Pennsylvania {ereif, annyuan, andycoenen, {daphnei, Equal contribution
Abstract
In this paper, we leverage large language models (LMs) to perform zero-shot text style transfer. We present a prompting method that we call augmented zero-shot learning, which frames style transfer as a sentence rewriting task and requires only a natural language instruction, without model fine-tuning or exemplars in the target style. Augmented zero-shot learning is simple and demonstrates promising results not just on standard style transfer tasks such as sentiment, but also on natural language transformations such as “make this melodramatic” or “insert a metaphor.”
中文速览
把任意风格的文本改写难题交给大型语言模型(Large Language Model, LLM)来解决——研究者提出了一种叫做"增强零样本学习(Augmented Zero-shot Learning)"的提示方法,只需用自然语言告诉模型"把这句话改得更戏剧化"或"加一个比喻",无需任何针对目标风格的训练数据或示例句,模型就能完成改写。具体做法是构造一组涵盖多种改写操作的示例提示,让模型从中归纳出"按要求重写句子"这一通用行为模式,从而推广到从未见过的风格。人工评测表明,该方法在"更正式""更有戏剧感""插入一个隐喻"等六种非标准风格以及情感、正式度两种标准风格上,表现与人类改写质量相当,也优于纯零样本基线,并在 GPT-3 和 LaMDA 两个不同大模型上均有效。这项工作的意义在于,它把风格迁移从少数预设类别扩展到用户可自由定义的任意风格,为 AI 辅助写作等应用开辟了更灵活的可能性。
原文 arXiv:2109.03910;中英对照 + 大白话阅读 https://aha.fim.ai/paper/2109.03910v4