Controllable Active-Passive Voice Generation using Prefix Tuning (2023)

Abstract: The prompting paradigm is an uprising trend in the field of Natural Language Processing (NLP) that aims to learn tasks by finding appropriate prompts rather than fine-tuning the model weights. Such prompts can express an intention, e.g., they can instruct a language model to generate a summary of a given event. In this paper, we study how to influence (”control”) the language generation process such that the outcome fulfills a requested linguistic property. More specifically, we look at controllable active-passive (AP) voice generation, i.e., we require the model to generate a sentence in the requested voice. We build upon the prefix tuning approach and introduce control tokens that are trained on controllable AP generation. We create an AP subset of the WebNLG dataset to fine-tune these control tokens. Among four different models, the one trained with a contrastive learning approach yields the best results in terms of AP accuracy ( 95%) but at the cost of decreased performance on the original WebNLG task.

## introduction prompt-based learning is an uprising trend in natural language processing. in contrast to the pretrain and fine-tune paradigm, prompt-based methods aim to adapt to new downstream tasks by finding or using new prompts that maximize the task performance. in that way, arbitrary tasks can be wrapped as language modeling tasks @xcite . this approach has the advantage that the pre-trained model parameters remain intact, and a single model can be used to solve many tasks by using the appropriate prompt without having to readjust all model parameters. however, it poses the challenge of finding a prompt with satisfactory performance. manually finding such prompts can be tedious, and the results can sometimes be unintuitive @xcite . to that end, many techniques have been proposed to automatically find good discrete @xcite or continuous prompts @xcite @xcite . our work investigates the use of continuous prompts, as proposed by @xcite , for controllable generation. more specifically, we attempt to guide a generative model to create sentences that are formulated in either active or passive voice. for instance, the fact that "j.v. jones" wrote the book "a fortress of grey ice" can be formulated in either active voice (the author of a fortress of grey ice is j.v. jones.) or passive voice (a fortress of grey ice was written by j. v. jones.). we use the data-to-text dataset webnlg @xcite as a benchmark and measure both task performance and the model's ability to generate outputs in the requested voice. we use task-specific prefix tokens and additional control prefix tokens (cf. figure 1 ), similar to @xcite , and propose three different training objectives to train the additional control prefix tokens: implicit training, classifier guidance, and contrastive learning. we compare these three approaches and use the model without control prefix tokens as the baseline. both implicit training and classifier guidance achieve only minor improvements in terms of control abilities but pre-serve most of the task performance. in contrast, a contrastive learning approach achieves the highest active-passive (ap) voice generation accuracy of ≈ 95%. however, the semantic accuracy of the generated sentences is decreased compared to the other approaches, which is reflected in our qualitative and quantitative analyses. the core contributions of this paper are as follows: first, we propose two new datasets that are derived from the webnlg dataset called webnlg-ap and webnlg-ap-pairs, which can be used to train on active/passive voice generation. second, based on gpt-2 @xcite , we compare four training setups and assess their ability to control the voice while accurately performing the data-to-text task. last, we make our dataset publicly available. foot_0 ## related work controllable text generation is the task of generating natural language text while controlling secondary aspects of the output @xcite . these aspects can for instance be the sentiment, formality, persona, or content. @xcite control the length of generated sentences, as well as the sentence split, i.e., how many sentences are generated and how many facts each sentence contains. @xcite propose a categorization of generative tasks involving control, including data to text and format control. therefore, the webnlg task can be seen as a control task where the control aspect is the information content, while our active-passive control falls into the category of format control. li and liang (2021) propose prefix tuning, a prompt-based method that trains a set of continuous prompts that are prepended to the input. to increase the expressiveness of the method, a set of prefix tokens is not only learned for the input layer, but for every layer. this was later found to be beneficial for natural-language understanding (nlu) as well @xcite . based on empirical results, the authors decide to reparameterize the prefix tokens using a multi-layer perceptron in order to stabilize training and improve performance. they find that prefix tuning outperforms other lightweight fine-tuning methods like adapters @xcite settings. @xcite extend the prefix tuning method by adding input-dependent control tokens. for each of the domain categories, a set of control tokens is created and dynamically chosen based on the category. contrary to our work, their main goal is to improve task performance and the control tokens are trained with a regular language modeling loss. ## discussion this section provides detailed insights into the results of our models by analyzing the generated 29 sentences. this helps to understand why the contrastive learning approach decreases original performance scores far more significantly than the other approaches. our analysis provides guidance for possible improvements for future research. ## conclusion and outlook we studied controllable active-passive generation using continuous prefix prompts on top of a generative language model. our goal was to explicitly guide a generative model into generating sentences formulated in either active or passive voice. three different approaches that we tested have shown different strengths and weaknesses. it becomes clear that there is a trade-off between the semantic quality of generated sentences and the strict enforcement of active or passive voice. the model which is trained using contrastive learning achieves the best results in terms of controllable ap generation. however, the quality of the generated sentences decreased, as reflected by bleu and bleurt scores, as well as a qualitative analysis of the generated sentences. on the contrary, the model trained using classifier guidance was able to maintain the task performance quite well but only improved voice control very slightly. future work should investigate how to maintain more of the task performance while achieving a high ap accuracy. the most apparent technique towards that goal would be to combine the contrastive learning and classifier guidance objective functions, given that their results were complementary: one is good at maintaining task performance while the other is good at controlling the voice. it could also be beneficial to include additional loss functions in the experiments, like less strict contrastive loss functions or directly optimizing the bleurt score @xcite . furthermore, a promising direction for future research is instance-dependent prompt tuning @xcite , where the prefix tokens depend on the input rather than being static per task or control class. in the broader context of applying prompt tuning methods to controllable text generation, future research should investigate whether our insights from studying active-passive voice control generalize to other control tasks such as sentiment or formality control. in particular, it would be interesting to see if control prefix tokens are composable (flexibly controlling multiple aspects at the same time) and transferable between domains and datasets @xcite @xcite .