Abstract
The core of the dialogue system is to generate relevant, informative, and human-like responses based on extensive dialogue history. Recently, the dialogue generation domain has seen mainstream adoption of large language models (LLMs), due to their powerful capability in generating utterances. However, there is a natural deficiency for such models: inherent position bias, which may lead them to pay more attention to nearby utterances instead of causally relevant ones, resulting in generic responses in long-term dialogue. To alleviate this, we propose the Causal Perception long-term Dialogue framework (CPD). CPD employs a perturbation-based causal variable discovery method to extract causally relevant utterances and enhances model causal perception during fine-tuning. Specifically, a local-position awareness method is proposed for inter-sentence position correlation elimination. Then, a causal-perception fine-tuning strategy is proposed to enhance the capability of discovering causal invariant factors. Experimental results on two datasets prove that our method effectively alleviates position bias for multiple LLMs and achieves significant progress compared with existing baselines.
The Challenge of Position Bias in Long-Term Dialogue
In long-term dialogues, a response often depends on a specific detail mentioned many turns ago. However, Large Language Models (LLMs) suffer from a severe position bias: they tend to focus on the "last few turns" (recency bias) or the very beginning, often failing to "see" relevant information buried in the middle of a long history.
Standard fine-tuning doesn't solve this because datasets often have an imbalanced distribution where the most relevant information is near the end, leading the model to learn a spurious correlation: "Position = Importance." When the relevant context is actually further back, the model generates generic or irrelevant "safe" responses because it isn't truly perceiving the causal links between past utterances and the required response.
The CPD Framework
The authors propose the CPD framework, which consists of two main phases designed to break the dependence on positional shortcuts and focus on causal relevance.
1. Causally Relevant Utterance Extraction
To find out which turns are truly important without the model's position bias interfering, the authors modify the attention mechanism.
- Local-Position Awareness: They restrict position embeddings to stay within individual sentences, while inter-sentence attention relies only on semantic correlations.
- Treatment Effect (TE) Measurement: They borrow from causal inference by "perturbing" (replacing) individual turns with meaningless phrases and measuring the change in the model's perplexity. If removing a turn causes a significant spike in perplexity, that turn is deemed "causally relevant."
- Clustering: K-means categorizes the dialogue history into "Causal" and "Non-causal" sets based on these TE scores.
2. Causal Perception Fine-Tuning
- Invariant Risk Minimization (IRM): The model is trained to ensure its output remains consistent even when non-causal turns are perturbed.
- Maximizing Treatment Effect (MTE): Conversely, the model is trained to produce a very different output when causally relevant turns are perturbed.
- Positional Difference Sampling: To break the "Position = Importance" habit, they oversample perturbations at positions where relevant utterances are statistically rare in the training data.
Experimental Results
The CPD framework was tested using Llama2-7B-chat and Qwen-14B-chat as backbones on two popular long-term dialogue benchmarks: ESConv (Emotional Support Conversation) and MSC (Multi-Session Chat).
- Quantitative Performance: CPD achieved the highest scores across BLEU, ROUGE-L, and Distinct-n metrics. For example, on the MSC dataset with Qwen-14B, CPD reached a BLEU-1 of 0.1462, significantly outperforming retrieval-based methods like CONSTRAIN (0.1258).
- Human Evaluation: In blind tests, humans rated CPD responses as more Relevant and Informative than all baselines, with an average improvement of 5% and 7% respectively over state-of-the-art methods.
- Ablation Studies: Removing the IRM or MTE components led to a drop in performance, proving that both "ignoring the noise" and "valuing the signal" are necessary for true causal perception.
Conclusion
The CPD framework demonstrates that position bias in LLMs is essentially a failure of causal perception. By framing dialogue history through a causal lens and using perturbation-based discovery, CPD "forces" models to look for invariant features (the actual content) rather than positional shortcuts. This leads to significantly more coherent and contextually aware responses in long-term interactions.
Summary updated