Table of Contents
Fetching ...

LiFi: Lightweight Controlled Text Generation with Fine-Grained Control Codes

Chufan Shi, Deng Cai, Yujiu Yang

TL;DR

LiFi introduces a lightweight, fine-grained control framework for text generation that uses a learned attribute classifier to produce continuous control codes and adapters to steer a pre-trained LM. By treating control as continuous and nonexclusive, LiFi achieves stronger attribute control with minimal parameter overhead, facilitated by adapter fusion and a temperature-controlled weighting mechanism. Empirical results across sentiment, topic, and stylistic novel writing demonstrate substantial gains in control strength and fluency while maintaining efficiency, largely owing to a reliance on unlabeled data and parameter-efficient adapters. This approach offers practical impact for controllable generation in writing assistance, content creation, and stylistic storytelling, with robust performance and scalability.

Abstract

In the rapidly evolving field of text generation, the demand for more precise control mechanisms has become increasingly apparent. To address this need, we present a novel methodology, LIFI, which offers a lightweight approach with fine-grained control for controlled text generation. Unlike previous studies that train pre-trained language models to follow discrete, categorical, and exclusive control codes, LIFI learns controlled text generation under the guidance of continuous, relative, and nonexclusive control codes. These fine-grained codes are automatically derived from an attribute classifier, initially trained with a small amount of labeled data and subsequently employed to label abundant unlabeled data, thus garnering more extensive supervision signals. Moreover, to achieve efficient control, we incorporate the fine-grained control codes with adapters, a parameter- and compute-efficient way to steer a pre-trained language model. We evaluate LIFI on two conventional tasks -- sentiment control and topic control -- and one newly proposed task -- stylistic novel writing. Comprehensive experimental results validate the effectiveness of our proposed methods, demonstrating substantial performance improvements over existing baselines.

LiFi: Lightweight Controlled Text Generation with Fine-Grained Control Codes

TL;DR

LiFi introduces a lightweight, fine-grained control framework for text generation that uses a learned attribute classifier to produce continuous control codes and adapters to steer a pre-trained LM. By treating control as continuous and nonexclusive, LiFi achieves stronger attribute control with minimal parameter overhead, facilitated by adapter fusion and a temperature-controlled weighting mechanism. Empirical results across sentiment, topic, and stylistic novel writing demonstrate substantial gains in control strength and fluency while maintaining efficiency, largely owing to a reliance on unlabeled data and parameter-efficient adapters. This approach offers practical impact for controllable generation in writing assistance, content creation, and stylistic storytelling, with robust performance and scalability.

Abstract

In the rapidly evolving field of text generation, the demand for more precise control mechanisms has become increasingly apparent. To address this need, we present a novel methodology, LIFI, which offers a lightweight approach with fine-grained control for controlled text generation. Unlike previous studies that train pre-trained language models to follow discrete, categorical, and exclusive control codes, LIFI learns controlled text generation under the guidance of continuous, relative, and nonexclusive control codes. These fine-grained codes are automatically derived from an attribute classifier, initially trained with a small amount of labeled data and subsequently employed to label abundant unlabeled data, thus garnering more extensive supervision signals. Moreover, to achieve efficient control, we incorporate the fine-grained control codes with adapters, a parameter- and compute-efficient way to steer a pre-trained language model. We evaluate LIFI on two conventional tasks -- sentiment control and topic control -- and one newly proposed task -- stylistic novel writing. Comprehensive experimental results validate the effectiveness of our proposed methods, demonstrating substantial performance improvements over existing baselines.
Paper Structure (40 sections, 3 equations, 3 figures, 12 tables)

This paper contains 40 sections, 3 equations, 3 figures, 12 tables.

Figures (3)

  • Figure 1: Illustration of LiFi. The attribute classifier is pre-trained on labeled data. During training, LiFi can be trained with unlabeled text and fine-grained control codes derived from the attribute classifier. During testing, an user-specified attribute is transformed into a fine-grained control code.
  • Figure 2: Effect of unlabeled data.
  • Figure 3: Effect of control strength (averaged on four topics).