CTGGAN: Controllable Text Generation with Generative Adversarial Network
Open Access
- 8 April 2024
- journal article
- research article
- Published by MDPI AG in Applied Sciences
- Vol. 14 (7) , 3106
Abstract
Controllable Text Generation (CTG) aims to modify the output of a Language Model (LM) to meet specific constraints. For example, in a customer service conversation, responses from the agent should ideally be soothing and address the user’s dissatisfaction or complaints. This imposes significant demands on controlling language model output. However, demerits exist among traditional methods. Promoting and fine-tuning language models exhibit the “hallucination” phenomenon and cannot guarantee complete adherence to constraints. Conditional language models (CLM), which map control codes into LM representations or latent space, require training the modified language models from scratch and a high amount of customized dataset is demanded. Decoding-time methods employ Bayesian Rules to modify the output of the LM or model constraints as a combination of energy functions and update the output along the low-energy direction. Both methods are confronted with the efficiency sampling problem. Moreover, there are no methods that consider the relation between constraints weights and the contexts, as is essential in actual applications such as customer service scenarios. To alleviate the problems mentioned above, we propose Controllable Text Generation with Generative Adversarial Networks (CTGGAN), which utilizes a language model with logits bias as the Generator to produce constrained text and employs the Discriminator with learnable constraint weight combinations to score and update the generation. We evaluate the method in the text completion task and Chinese customer service dialogues scenario, and our method shows superior performance in metrics such as PPL and Dist-3. In addition, CTGGAN also exhibits efficient decoding compared to other methods.Keywords
Funding Information
- China Mobile Holistic Artificial Intelligence Major Project Funding (R22105ZS, R22105ZSC01, 2021ZD0140408, L222006)
- National Key Research and Development Program of China (R22105ZS, R22105ZSC01, 2021ZD0140408, L222006)
- Natural Science Foundation of Beijing Municipality (R22105ZS, R22105ZSC01, 2021ZD0140408, L222006)
This publication has 20 references indexed in Scilit:
- A Survey of Controllable Text Generation Using Transformer-based Pre-trained Language ModelsACM Computing Surveys, 2023
- Gradient-based Constrained Sampling from Language Models2022
- Controllable Natural Language Generation with Contrastive Prefixes2022
- Attribute Alignment: Controlling Text Generation from Pre-trained Language Models2021
- GeDi: Generative Discriminator Guided Sequence Generation2021
- DExperts: Decoding-Time Controlled Text Generation with Experts and Anti-Experts2021
- GSum: A General Framework for Guided Neural Abstractive Summarization2021
- FUDGE: Controlled Text Generation With Future Discriminators2021
- Exploring Controllable Text Generation Techniques2020
- Don’t Stop Pretraining: Adapt Language Models to Domains and Tasks2020