Introduction
In the evolution of large language models (LLMs), the generation of "nonsense"—content that is repetitive, contradictory, or contextually invalid—remains a persistent challenge. In complex, multi-turn dialogue environments like the strategy game Diplomacy, these errors are particularly disruptive. Traditionally, detecting such errors has relied on external supervised classifiers. However, these classifiers are data-hungry, requiring extensive manual annotation, and they fail to leverage the internal probabilistic knowledge of the generative model itself.
This paper introduces AutoReply, an introspective detection method. Instead of training a separate model, AutoReply uses the dialogue model’s own likelihood estimates for specific "discriminative" follow-up replies to identify when its own previous output is problematic.
The Introspective Detection Framework
The core intuition behind AutoReply is that a model "knows" when it has made a mistake if it assigns a high probability to a partner responding with confusion or correction. Formally, for a candidate message $x$, the model evaluates the probability $P(r|x)$ of a follow-up reply $r$ (e.g., "That doesn't make sense").
The AutoReply Algorithm
Finding the most effective discriminative replies is a non-trivial search problem. AutoReply automates this through a three-stage process:
- Recursive Search: The algorithm explores the token space using a breadth-first search to construct potential replies token-by-token.
- Contrastive Pruning: To ensure the discovered replies are truly discriminative, the algorithm compares their likelihood following "nonsense" examples versus "sensible" examples. This prevents the selection of generic phrases like "Okay" or "I see," which might have high probability regardless of the preceding message's quality.
- Ensembling: Rather than relying on a single phrase, AutoReply generates a diverse set of thousands of candidate replies. A voting-based ensemble then aggregates these signals to produce a final classification.
The DiplomacyNonsense Benchmark
To test this approach, the authors developed DiplomacyNonsense, a dataset grounded in the complex strategic environment of Diplomacy. Unlike standard dialogue datasets (e.g., ConvAI2) which feature short exchanges, DiplomacyNonsense contains dialogues with an average length of over 140 messages.
Expert players annotated messages from BART-based agents, identifying specific categories of nonsense:
- Invalid Order Proposals: Suggesting moves that are impossible given the game state.
- Wrong Justifications: Providing illogical reasons for a proposed action.
- Contradictions: Statements that conflict with previous claims.
Notably, only 12% of the messages in the dataset are labeled as nonsense, creating a realistic but challenging class imbalance for detection models.
Experimental Results
The performance of AutoReply was compared against a fully fine-tuned supervised BART classifier and a set of 14 hand-crafted discriminative replies designed by experts.
Performance Comparison
- Parity with Supervised Learning: AutoReply achieved an F1 score of 36.92, nearly matching the 37.50 F1 of the data-intensive supervised model.
- Superiority over Manual Engineering: The automated search significantly outperformed the hand-crafted baseline, which only reached an F1 of 26.26. This suggests that the model’s internal "logic" for what constitutes a confusing message is more nuanced than human intuition can easily capture.
- High Precision: AutoReply demonstrated higher precision (28.80) than the supervised model (25.24). In practical applications, this means the system is less likely to falsely flag sensible messages as nonsense, preserving the flow of conversation.
Efficiency and Scaling
The authors also tested a "Single-Reply" version of the algorithm. By using only the single most discriminative reply found during the search, the model achieved an F1 of 29.17. While lower than the ensemble, this still outperformed the expert-designed ensemble while significantly reducing the computational overhead during inference.
Discussion and Limitations
While AutoReply offers a powerful low-resource alternative to supervised detection, it is not without costs. The initial search process is computationally intensive, requiring approximately 200 GPU hours to navigate the token space. Furthermore, the method relies on the availability of a small set of "good" dialogue examples to perform contrastive pruning effectively.
Conclusion
AutoReply demonstrates that dialogue models possess an inherent, introspective capacity to recognize their own failures. By automatically discovering discriminative follow-up signals, researchers can build robust nonsense detectors that match supervised performance without the need for massive annotated datasets. Future work may extend this technique to detect offensive content or factual hallucinations in broader conversational AI contexts.
Summary updated