IAAR-Shanghai / CTGSurvey

Controllable Text Generation for Large Language Models: A Survey
https://arxiv.org/abs/2408.12599
141 stars 8 forks source link
controllable-text-generation controlled-text-generation ctg decoding survey

Controllable Text Generation for Large Language Models: A Survey

Xun Liang1*, Hanyu Wang1*, Yezhaohui Wang2*,
Shichao Song1, Jiawei Yang1, Simin Niu1, Jie Hu3, Dan Liu3, Shunyu Yao3, Feiyu Xiong2, Zhiyu Li2†

1Renmin University of China
2Institute for Advanced Algorithms Research, Shanghai
3China Telecom Research Institute

*Equal contribution.
Corresponding author: Zhiyu Li (lizy@iaar.ac.cn).

[!IMPORTANT]

🌟 Star Us! If you find our work helpful, please consider staring our GitHub to stay updated with the latest in Controllable Text Generation!🌟

📰 News

🔗 Introduction

Welcome to the GitHub repository for our survey paper titled "Controllable Text Generation for Large Language Models: A Survey." This repository includes all the resources, code, and references related to the paper. Our objective is to provide a thorough overview of the techniques and methodologies used to control text generation in large language models (LLMs), with an emphasis on both theoretical underpinnings and practical implementations.

Survey Framework

Our survey explores the following key areas:

🎯 Demands of Controllable Text Generation

Controllable Text Generation (CTG) must meet two main requirements:

  1. Meeting Predefined Control Conditions: Ensuring that the generated text adheres to specified criteria, such as thematic consistency, safety, and stylistic adherence.

  2. Maintaining Text Quality: Ensuring that the text produced is fluent, helpful, and diverse while balancing control with overall quality.

📜 Formal Definition of Controllable Text Generation

We define CTG as follows:

  1. Relationship with LLM Capabilities: CTG is an ability dimension that is orthogonal to the objective knowledge capabilities of LLMs, focusing on how information is presented to meet specific needs, such as style or sentiment.

  2. Injection of Control Conditions: Control conditions can be integrated into the text generation process at various stages using resources like text corpora, graphs, or databases.

  3. Quality of CTG: High-quality CTG strikes a balance between adherence to control conditions and maintaining fluency, coherence, and helpfulness in the generated text.

🗂️ Classification of Controllable Text Generation Tasks

CTG tasks are categorized into two main types:

  1. Content Control (Linguistic Control/Hard Control): Focuses on managing content structure, such as format and vocabulary.

  2. Attribute Control (Semantic Control/Soft Control): Focuses on managing attributes like sentiment, style, and safety.

🔧 Controllable Text Generation Method Classification

CTG methods are systematically categorized into two stages:

  1. Training-Stage Methods: Techniques such as model retraining, fine-tuning, and reinforcement learning that occur during the training phase.

  2. Inference-Stage Methods: Techniques such as prompt engineering, latent space manipulation, and decoding-time intervention applied during inference.

📊 Evaluation Methods and Applications

We review the evaluation methods and their applications in CTG:

  1. Evaluation Methods: We introduce a range of automatic and human-based evaluation metrics, along with benchmarks that assess the effectiveness of CTG techniques, focusing on how well they balance control and text quality.

  2. Applications: We explore CTG applications across both specialized vertical domains and general tasks.

🚀 Challenges and Future Directions

This survey addresses key challenges in CTG research and suggests future directions:

  1. Key Challenges: Issues such as achieving precise control, maintaining fluency and coherence, and handling multi-attribute control in complex scenarios.

  2. Proposed Appeals: We advocate for a greater focus on real-world applications and the development of robust evaluation frameworks to advance CTG techniques.

This paper aims to provide valuable insights and guidance for researchers and developers working in the field of Controllable Text Generation. All references, along with a Chinese version of this survey, are open-sourced and available at https://github.com/IAAR-Shanghai/CTGSurvey.

📚 Paper List

We’ve compiled a comprehensive spreadsheet of all the papers we reviewed, accessible here. A more user-friendly table format is in progress.

Below, you'll find a categorized list of papers from 2023 and 2024, organized by Type, Phase, and Classification.

Type: Method

Training Stage

Retraining
Fine-Tuning
Reinforcement Learning

Inference Stage

Prompt Engineering
Latent Space Manipulation
Decoding-time Intervention

Type: Survey