Abstract
Standard approaches to sequential neural structured prediction, primarily based on Maximum Likelihood Estimation (MLE) and fixed left-to-right generation, often suffer from degeneration—manifesting as repetitive loops, logical contradictions, and non-termination. This paper summarizes research into two transformative shifts in model training: unlikelihood training, which explicitly penalizes undesirable behaviors, and non-monotonic generation, which allows models to learn flexible, data-dependent generation orders. Our findings demonstrate that these methods significantly reduce repetition in large language models and improve performance on complex structural tasks like dependency parsing.
Introduction
In Natural Language Processing (NLP), the dominant paradigm involves training models to predict the next token in a sequence moving strictly from left to right. While this approach has powered the success of large-scale autoregressive models, it possesses inherent flaws. Models trained solely via MLE are taught to maximize the probability of correct sequences but are never explicitly taught to avoid incorrect or "degenerate" ones. Consequently, these models often fall into infinite loops or produce logically inconsistent text. Furthermore, the assumption of a fixed, canonical order is often arbitrary for structured data such as sets or trees. This research addresses these limitations by rethinking how models learn and the order in which they generate information.
Addressing Degeneration: Unlikelihood Training
The primary cause of degeneration in text generation is the "one-sided" nature of MLE. Because MLE only focuses on maximizing the likelihood of the ground-truth tokens, it fails to account for the model's own biases during inference. To solve this, we introduce unlikelihood training.
This method adds a secondary loss term that minimizes the probability of "negative candidates"—tokens that the model should not produce in a given context. For instance, if a model begins to repeat a phrase, unlikelihood training specifically penalizes those repeating tokens, pushing their probability mass down.
Ensuring Termination
Beyond repetition, many models suffer from non-termination, where they continue generating text indefinitely. We propose a self-terminating model architecture. By utilizing a modified neural layer that ensures the probability of the "End of Sentence" (EOS) token increases over time, we provide a mathematical guarantee that the model will eventually reach a stopping point, preventing the infinite-sequence trap common in greedy search decoding.
Beyond the Linear Constraint: Non-Monotonic Generation
Most structured objects, such as dependency trees in linguistics or sets of objects in an image, do not have a natural linear order. Forcing a model to generate these in a fixed sequence can hinder its learning efficiency. We propose a non-monotonic generation framework that treats the generation process as a policy in an imitation learning setup.
In this framework, the model is not restricted to a left-to-right path. Instead, it learns to pick the "easiest" or most certain parts of the structure to generate first. To facilitate this, we utilize a coaching oracle. This training signal adjusts to the model's current state, favoring actions the model is already inclined toward, which simplifies the search space and allows the model to develop its own optimal generation strategy.
Experimental Framework and Datasets
The efficacy of these methods was evaluated across diverse domains:
- Text and Dialogue: Using Wikitext-103, ConvAI2, and ELI5 to test for repetition and flow.
- Dialogue NLI: A novel dataset created to frame dialogue consistency as a Natural Language Inference task. It labels utterance pairs as entailing, neutral, or contradictory, providing a benchmark for logical coherence.
- Structural Data: MNIST Multisets for synthetic image sets, MS COCO for object detection, and CoNLL 2018 for dependency parsing across 19 languages.
Key Results
Repetition and Coherence
Applying unlikelihood training to GPT-2 (117M) yielded dramatic improvements in text quality. Specifically, 4-gram repetition rates dropped from 50% to 0.06%, resulting in text that appears significantly more human-like. Furthermore, models trained with the Dialogue NLI dataset and unlikelihood loss showed a marked increase in logical consistency, successfully avoiding contradictory responses.
Structural Flexibility
The non-monotonic approach proved superior for complex data. In the CoNLL dependency parsing task, the non-monotonic graph parser outperformed traditional fixed-order models on 12 out of 19 languages. Observations of the model's behavior revealed an "easy-first" strategy: the model typically generates punctuation or simple pronouns to establish a structural skeleton before filling in more complex linguistic components.
Conclusion and Future Work
This research demonstrates that breaking the traditional constraints of MLE and fixed-order generation is essential for the next generation of structured prediction models. Unlikelihood training provides a necessary mechanism for negative supervision, while non-monotonic generation allows for more natural and efficient structural learning.
Future work will focus on automating the selection of negative candidates for unlikelihood training, which currently requires manual design. Additionally, scaling these techniques to trillion-parameter models and reducing the computational overhead of non-monotonic generation remain key priorities for making these methods standard in large-scale AI applications.
Summary updated