Abstract
Large Language Models (LLMs) frequently exhibit self-contradictions in multi-turn dialogues, undermining their reliability and persona consistency. This paper presents a comprehensive framework and dataset for detecting, explaining, and resolving these logical inconsistencies. By fine-tuning models to act as 'analyzers' and 'red teamers,' we demonstrate that explicit logical explanations significantly enhance a model's ability to maintain conversational coherence, reducing contradiction rates from nearly 50% to approximately 4%.
Introduction
Modern conversational AI is incredibly fluent, yet it suffers from a glaring flaw: logical inconsistency. An LLM might claim it is terrified of the ocean in one turn, only to brag about its love for scuba diving a few messages later. This phenomenon, known as self-contradiction, shatters user trust and ruins the anthropomorphic feel of human-machine interaction. While previous research has focused on hallucination detection in static text, few studies have addressed semantic conflicts within interactive dialogues.
The Challenge of Dialogue Consistency
Self-contradiction occurs when a model generates statements that are mutually exclusive within the same conversational context. As shown in Figure 1, even advanced models like GPT-3.5 and LLaMA2 struggle to identify or explain these lapses in logic without specialized training. Detection alone is insufficient; models often fail to comprehend the underlying semantic conflict between their own utterances.
The Red Teaming Framework
The authors propose a three-step Red Teaming framework that utilizes collaborative LMs to police and correct dialogue:
- Contradiction Detection: An 'analyzer LM' (aLM) is fine-tuned to output a binary label indicating whether a self-contradiction exists.
- Contradiction Explanation: To ensure the model understands the underlying logic, the aLM is trained to generate a natural language explanation pinpointing the conflicting utterances and the nature of the conflict.
- Dialogue Modification: A 'red teaming LM' (rLM) takes the flawed dialogue and the generated explanation to rewrite the text. Strategies include Direct Edits (modifying only the later statement) or Joint Edits (modifying both statements to create a new cohesive narrative).
Dataset Construction and Pipeline
Because high-quality contradictory dialogues are rare in the wild, the authors developed a synthetic dataset of 12,387 human-machine dialogues. The creation process involves a multi-stage pipeline starting from Wikipedia topics to generate diverse conversational scenarios, as illustrated in Figure 3.
Key Results and Insights
Detection vs. Comprehension
A critical finding is that detection does not equal comprehension. Off-the-shelf LLMs might guess a contradiction exists but fail to explain why. Fine-tuning is essential for logical auditing; for instance, fine-tuned Mistral-7B reached 97.4% detection accuracy, compared to much lower baseline scores for vanilla models.
The Power of Explanations
When the rewriting model (rLM) is provided with an explicit explanation, its success rate improves dramatically. Without explanations, the contradiction rate in modified dialogues was 9.90%; with generated explanations, this plummeted to 4.25%. This suggests that logical rationales act as crucial anchors for model edits, preventing the model from being distracted by dialogue context.
Conclusion
Addressing self-contradiction is vital for the next generation of conversational agents. By employing a detect-explain-modify pipeline, this research demonstrates that LLMs can be trained to audit their own logic effectively. Future work will focus on preventing these contradictions during the initial generation phase to reduce the computational overhead of post-hoc corrections.
Summary updated