Effective Unsupervised Constrained Text Generation based on Perturbed Masking (2022)

Abstract: Unsupervised constrained text generation aims to generate text under a given set of constraints without any supervised data. Current state-of-the-art methods stochastically sample edit positions and actions, which may cause unnecessary search steps. In this paper, we propose PMCTG to improve effectiveness by searching for the best edit position and action in each step. Specifically, PMCTG extends perturbed masking technique to effectively search for the most incongruent token to edit. Then it introduces four multi-aspect scoring functions to select edit action to further reduce search difficulty. Since PMCTG does not require supervised data, it could be applied to different generation tasks. We show that under the unsupervised setting, PMCTG achieves new state-of-the-art results in two representative tasks, namely keywords- to-sentence generation and paraphrasing.

## introduction constrained text generation is the task of generating text that satisfies a given set of constraints, and it serves many real-world text generation applications, such as dialogue generation @xcite and summarization @xcite . there are broadly two types of constraints: hard constraints such as including a set of given words or phrases in the generated text. example 1 in you, beautiful you are so beautiful . what are the effective ways to learn cs? dedicated to improving the local edit-based methods, in this paper, we propose a framework pmctg (perturbed masking for constrained text generation) for constrained text generation. pm-ctg focuses on controlling the search direction and reducing the search steps by searching for the best edit position and action at each step. specifically, pmctg extends perturbed masking @xcite ) from a pre-trained bert model @xcite to find the best edit position in the sequence. perturbed masking aims to estimate the correlation between tokens in a sequence, which can be naturally used to find the edit location. we also propose a series of scoring functions for different tasks to select the edit action. pmctg does not rely on supervised data and only needs a pre-trained bert model to perform perturbed masking. we evaluate pmctg in two constrained text generation tasks, namely keywords-to-sentence generation and paraphrasing. experimental results show that pmctg tends to achieve new state-of-the-art performance over multiple baselines. in summary, the contributions are as follows: ## methodology in this section, we would introduce the proposed pmctg by first introducing the specific process of using perturbed masking to select edit positions, and then explaining the proposed scoring functions and the use of them to select the edit actions. ## experiments we evaluate our method on two constrained text generation tasks, namely keywords-to-sentence generation and paraphrasing. ## conclusion we propose a method pmctg to improve the previous stochastic searching methods in the topic of unsupervised constrained generation. pmctg leverages perturbed masking technique to find the best edit position and leverages newly designed multiple scoring functions to decide the best edit action. we evaluate the proposed method on two representative tasks: keywords-to-sentence generation (hard constraints) and paraphrasing (soft constraints). experimental results demonstrate the effectiveness of the proposed method which achieves competitive results on three datasets over multiple advanced baseline methods. we plan to improve the diversity and relevance of the generated sentences in future work.