Focused Prefix Tuning for Controllable Text Generation (2023)

Abstract: In a controllable text generation dataset, there exist unannotated attributes that could provide irrelevant learning signals to models that use it for training and thus degrade their performance. We propose focused prefix tuning (FPT) to mitigate the problem and to enable the control to focus on the desired attribute. Experimental results show that FPT can achieve better control accuracy and text fluency than baseline models in single-attribute control tasks. In multi-attribute control tasks, FPT achieves comparable control accuracy with the state-of-the-art approach while keeping the flexibility to control new attributes without retraining existing models.

## introduction controllable text generation aims to generate text associated with a specific attribute. for example, given an attribute @xmath0," a model is supposed to generate a continuation whose topic is sports, such as "there is a tennis match ...". in datasets for the controllable text generation task, there exists the annotated attribute, and we call it an explicit attribute (e.g. the topic attribute in the agnews dataset). in addition to the explicit attributes, the datasets tend to have their own tendency. for example, up to 98% of training data pieces in the imdb dataset exhibit "@xmath1, while up to 94% of training data pieces exhibit "@xmath2. 1 we call the tendency an implicit attribute (e.g. the topic attribute in the imdb dataset). the existence of the implicit attributes could degrade the performance in controlling for an explicit attribute when models are trained on the datasets. since implicit attributes are of dataset-level and related to undesired explicit attributes, the probability of generating content with the implicit attributes is first likely to increase. when the text with the implicit attributes was generated, the probability of generating content with other undesired explicit attributes would increase, and the text with them might be generated next. as a result, as shown in to mitigate the effect of the attribute transfer, we propose focused prefix tuning (fpt), which makes the generation focused on the desired explicit attribute. fpt uses specific and general prefixes to encode the explicit and implicit attributes, respectively. fpt combines the control power of the two prefixes via logits manipulation at inference time. experimental results show that fpt achieved better control accuracy and fluency in single-attribute control tasks. in multi-attribute control tasks, fpt can achieve comparable performance with the state-ofthe-art approach. moreover, we show, since fpt enables the training of each attribute prefix individually, we can incrementally add new attributes without retraining all prefixes. ## focused prefix tuning the task of controllable generation is, given a sequence of prompt tokens @xmath3.g. @xmath4, to generate a sequence of tokens as a continuation x that conforms to both the prompt and specified attribute. ## conclusion we proposed fpt, a prefix tuning-based method, to mitigate the effect of attribute transfer. fpt could encode implicit attributes in a dataset by a general prefix and use it to suppress the attribute transfer via inference-time logits manipulation. results in the single-attribute control experiments showed that, with fpt, the generated texts can be more effectively controlled under the desired attribute with higher text fluency. experimental results in the multi-attribute control suggested that fpt can achieve comparable performance to the state-ofthe-art approach while keeping the flexibility of adding new prefixes without retraining.