Text Infilling
Wanrong Zhu, Zhiting Hu, Eric Xing
TL;DR
The paper tackles the general task of text infilling with multiple, potentially long blanks in a template. It proposes a Transformer-based self-attention model with segment-aware positional encoding to capture global and surrounding context, and compares it against seq2seq and GAN baselines. Through extensive supervised experiments on Yelp, Grimm tales, and NBA data, the self-attention approach consistently yields higher automatic and human-evaluated quality, establishing a strong baseline for future research. The work also discusses connections to pre-trained language models like BERT and outlines avenues for leveraging such representations in infilling tasks.
Abstract
Recent years have seen remarkable progress of text generation in different contexts, such as the most common setting of generating text from scratch, and the emerging paradigm of retrieval-and-rewriting. Text infilling, which fills missing text portions of a sentence or paragraph, is also of numerous use in real life, yet is under-explored. Previous work has focused on restricted settings by either assuming single word per missing portion or limiting to a single missing portion to the end of the text. This paper studies the general task of text infilling, where the input text can have an arbitrary number of portions to be filled, each of which may require an arbitrary unknown number of tokens. We study various approaches for the task, including a self-attention model with segment-aware position encoding and bidirectional context modeling. We create extensive supervised data by masking out text with varying strategies. Experiments show the self-attention model greatly outperforms others, creating a strong baseline for future research.
