大型语言模型的可控文本生成:一项调查
Controllable Text Generation for Large Language Models: A Survey
August 22, 2024
作者: Xun Liang, Hanyu Wang, Yezhaohui Wang, Shichao Song, Jiawei Yang, Simin Niu, Jie Hu, Dan Liu, Shunyu Yao, Feiyu Xiong, Zhiyu Li
cs.AI
摘要
在自然语言处理(NLP)中,大型语言模型(LLMs)展示了高质量的文本生成能力。然而,在现实应用中,LLMs必须满足日益复杂的要求。除了避免误导性或不当内容外,LLMs还被期望满足特定用户需求,比如模仿特定的写作风格或生成具有诗意丰富性的文本。这些多样化的需求推动了可控文本生成(CTG)技术的发展,确保输出符合预定义的控制条件,如安全性、情感、主题一致性和语言风格,同时保持高水准的帮助性、流畅性和多样性。
本文系统地审视了LLMs的CTG的最新进展,提供了其核心概念的全面定义,并澄清了控制条件和文本质量的要求。我们将CTG任务分为两种主要类型:内容控制和属性控制。讨论了关键方法,包括模型重新训练、微调、强化学习、提示工程、潜在空间操作和解码时干预。我们分析了每种方法的特点、优势和局限性,为实现生成控制提供了细致的见解。此外,我们审查了CTG评估方法,总结了其在各领域的应用,并解决了当前研究中的关键挑战,包括流畅性和实用性的降低。我们还提出了几点建议,如在未来研究中更加重视实际应用。本文旨在为该领域的研究人员和开发人员提供有价值的指导。我们的参考文献列表和中文版本均已在https://github.com/IAAR-Shanghai/CTGSurvey 开源。
English
In Natural Language Processing (NLP), Large Language Models (LLMs) have
demonstrated high text generation quality. However, in real-world applications,
LLMs must meet increasingly complex requirements. Beyond avoiding misleading or
inappropriate content, LLMs are also expected to cater to specific user needs,
such as imitating particular writing styles or generating text with poetic
richness. These varied demands have driven the development of Controllable Text
Generation (CTG) techniques, which ensure that outputs adhere to predefined
control conditions--such as safety, sentiment, thematic consistency, and
linguistic style--while maintaining high standards of helpfulness, fluency, and
diversity.
This paper systematically reviews the latest advancements in CTG for LLMs,
offering a comprehensive definition of its core concepts and clarifying the
requirements for control conditions and text quality. We categorize CTG tasks
into two primary types: content control and attribute control. The key methods
are discussed, including model retraining, fine-tuning, reinforcement learning,
prompt engineering, latent space manipulation, and decoding-time intervention.
We analyze each method's characteristics, advantages, and limitations,
providing nuanced insights for achieving generation control. Additionally, we
review CTG evaluation methods, summarize its applications across domains, and
address key challenges in current research, including reduced fluency and
practicality. We also propose several appeals, such as placing greater emphasis
on real-world applications in future research. This paper aims to offer
valuable guidance to researchers and developers in the field. Our reference
list and Chinese version are open-sourced at
https://github.com/IAAR-Shanghai/CTGSurvey.Summary
AI-Generated Summary