Flexible Generation from Fragmentary Linguistic Input (2022)

Abstract: The dominant paradigm for high-performance models in novel NLP tasks today is direct specialization for the task via training from scratch or fine-tuning large pre-trained models. But does direct specialization capture how humans approach novel language tasks? We hypothesize that human performance is better characterized by flexible inference through composition of basic computational motifs available to the human language user. To test this hypothesis, we formulate a set of novel fragmentary text completion tasks, and compare the behavior of three direct-specialization models against a new model we introduce, GibbsComplete, which composes two basic computational motifs central to contemporary models: masked and autoregressive word prediction. We conduct three types of evaluation: human judgments of completion quality, satisfaction of syntactic constraints imposed by the input fragment, and similarity to human behavior in the structural statistics of the completions. With no task-specific parameter tuning, GibbsComplete performs comparably to direct-specialization models in the first two evaluations, and outperforms all direct-specialization models in the third evaluation. These results support our hypothesis that human behavior in novel language tasks and environments may be better characterized by flexible composition of basic computational motifs rather than by direct specialization.

## introduction representation learning has tremendously benefited engineering for language comprehension and generation systems. general frameworks such as encoder-decoder or auto-regressive model can be flexibly applied to a diverse range of problems. with scaled models, enormous data, and wellchosen training objective functions, generative pretraining extracts useful and transferable information from unlabeled text data @xcite . these generic representations can then be finetuned to quickly yield performant models directly specialized for downstream tasks @xcite @xcite . while the broad idea of exploiting rich statistical information in general-purpose representations has proven practically effective for deep learning models since a decade ago @xcite , it remains an open question how well this "direct specialization" approach yields models that behave similarly to humans in flexible linguistic behavior in novel situations. here we take this "direct specialization" approach as a scientific hypothesis regarding the nature of linguistic knowledge and its flexible deployment in the human mind: that the human capacity of processing linguistic information in novel tasks arises from directly specializing and reshaping a generic yet versatile representation. we contrast it with an alternative hypothesis: that flexible knowledge deployment reflects algorithmic composition of a constrained repertoire of simple, reusable inference motifs. we depict these competing hypotheses in figure 1 . in the "compositional inference" hypothesis, the basic motifs arise from learning processes and could potentially involve distinct internal representations, but can be recombined into new inference routines guided by the principles of approximate probabilistic inference. in this hypothesis, the computational-level specifications @xcite of motif functional forms play a crucial role. as a theory of how the human mind approaches new and potentially complex problems, the "direct specialization" hypothesis entails generic starting representations, task-specific supervision, and specialization. the "compositional inference" hypothesis, in contrast, entails novel combinations of solutions to old problems. ## the fragment completion challenge for purposes of this paper, we define a fragmentary linguistic input, or simply a fragment, as a sequence of word strings. completing a fragment involves adding a word string of any length between adjacent strings in the input to yield a single overall well-formed sentence. the fragment completion problem is formally equivalent to the text infilling problem studied in a number of recent papers @xcite @xcite @xcite , but here we study considerably more open-ended completion problems from potentially much briefer input than has been studied before. for example, many native english speakers find the simple fragmentary input published won . ## discussion in this paper we have considered the directspecialization approach to novel tasks dominant in contemporary nlp today as a cognitive hypothesis: that the knowledge structures and processes humans deploy for novel language tasks are best captured by the end result of fine-tuning or from-scratch training on the novel task itself. we have contrasted this with a competing hypothesis, namely that human behavior in novel tasks is better captured by inferences resulting from flexibly composing existing basic computational motifs, which relates to the idea explored in compositional use of neural modules @xcite . to compare these hypotheses, we have developed and tested new, more challenging, and more open-ended versions of the text infilling task, which we term fragmentary input completion, and evaluated the performance of different models instantiating the two our results are generally favorable for the compositional inference hypothesis as exemplified by our novel gibbscomplete algorithm, which composes the two fundamental language modelling motifs central to today's language models, masked word prediction and autoregressive modeling. the motifs themselves need to be learned in the first place, but there is a strong case that these motifs reflect tasks fundamental to everyday language use: identifying an uncertain word using bidirectional context @xcite @xcite and predicting upcoming input @xcite @xcite . the idea we advance here, that these fundamental motifs are pre-existing and flexibly deployed for novel tasks, echoes a long-standing perspective in cognitive science well-summarized by @xcite , that "thinking is not the acquisition of knowledge, but the use of knowledge in the interest of solving problems". of course, we do not interpret these results as suggesting that the human mind is literally a gibbs sampler. but there are broader arguments that sampling-based approaches may capture important general features of human inferential patterns @xcite . furthermore, the compositional inference approach to modelling flexible language generation by no means diminishes the value of learning or fine-tuning-indeed, fine-tuned models can themselves be composed (see also our exploratory work in appendix g.2). rather, we hope that this work may help widen the perspective on the relationship between learning and inference in novel language tasks and contexts. ## conclusion scaled learning and quick adaptation of linguistic representation have enabled huge progress in the engineering of high-performance nlp systems, but our results suggest that flexible redeployment of basic computational motifs may have advantages for capturing how humans flexibly use language in novel circumstances where they do not have extensive experience. our studies offer systematic model comparisons with materials designed to highlight subtle features of grammatical knowledge and featural statistics of human completion preferences, and point to the need for longer-term efforts in understanding and modeling human cognitive flexibility in computational terms. as an initial step, we explored the "compositional inference" hypothesis by sketching out an inference algorithm based on the principles of approximate bayesian inference. the results suggest certain advantages of an inference-oriented view of human language generation, and an alternative path towards building models that process linguistic information as flexibly as humans do.