Controllable Text Generation for Large Language Models: A Survey

Xun Liang,Hanyu Wang,Yezhaohui Wang,Shichao Song,Jiawei Yang,Simin Niu,Jie Hu,Dan Liu,Shunyu Yao,Feiyu Xiong,Zhiyu Li
2024-08-23
Abstract: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 <a class="link-external link-https" href="https://github.com/IAAR-Shanghai/CTGSurvey" rel="external noopener nofollow">this https URL</a>.
Computation and Language
What problem does this paper attempt to address?
### What problem does the paper attempt to solve? The paper primarily explores the Controlled Text Generation (CTG) technology in Natural Language Processing (NLP) using Large Language Models (LLMs). Although LLMs have made significant progress in the quality of text generation, they still need to meet more complex and stringent requirements in practical applications. Specifically, the paper aims to address the following core issues: 1. **Meeting specific control conditions**: - Avoid generating misleading or inappropriate content, such as the requirements in the financial and news reporting fields. - Mimic specific writing styles or generate poetic text. 2. **Ensuring text quality**: - Maintain the fluency, usefulness, and diversity of the generated text to make it more effective in practical applications. The paper categorizes CTG tasks into two types: content control (hard control) and attribute control (soft control). Content control focuses on specific structures and vocabulary, while attribute control focuses on higher-level language attributes such as emotion, style, and thematic consistency. The paper discusses various methods for achieving CTG, including: - Model retraining - Fine-tuning - Reinforcement learning - Prompt engineering - Latent space manipulation - Decoding-time intervention Additionally, the paper analyzes the characteristics, advantages, and limitations of each method and provides in-depth insights into achieving generation control. It also reviews the evaluation methods for CTG, summarizes its applications in different fields, and points out the key challenges in current research, including reducing issues of fluency and practicality. Finally, the paper proposes several directions for future research, emphasizing the importance of focusing on practical applications. In summary, the paper aims to provide valuable guidance for researchers and developers.