Position Debiasing Fine-Tuning for Causal Perception in Long-Term Dialogue

Shixuan Fan, Wei Wei, Wendi Li, Xian-Ling Mao, Wenfeng Xie

Abstract

Large Language Models (LLMs) frequently struggle with "position bias" in long-term dialogues, where they over-prioritize recent turns at the expense of earlier, causally significant context. This paper presents the Causal Perception long-term Dialogue (CPD) framework, designed to enhance the model's ability to identify and utilize relevant historical information regardless of its position. CPD integrates local-position awareness into the attention mechanism, utilizes a perturbation-based method for causal utterance extraction, and employs Invariant Risk Minimization (IRM) and Maximizing Treatment Effect (MTE) during fine-tuning. Evaluated on MSC and ESConv benchmarks, CPD demonstrates superior performance over state-of-the-art baselines, effectively mitigating recency bias and improving conversational relevance.

The Position Bias Problem

While LLMs are impressive conversationalists, they often exhibit a "goldfish memory" problem known as position bias. In long-term dialogues, models tend to over-rely on the last few turns (spurious position correlation) while disregarding historical context that actually drives the conversation.

Figure 1: An example of position bias where a model fails to link a current question to a specific detail mentioned much earlier in the conversation.

As shown in Figure 1, if a user mentions a specific problem in Turn 5 but asks a related question in Turn 21, a standard LLM might provide a generic response because it has "forgotten" the causal link to the earlier turn. Existing solutions like summarization or retrieval often fail to fix the model's inherent bias toward the end of the input window.

The CPD Framework

The authors propose the CPD framework to fix the model's "causal perception"—its ability to understand which past turns actually necessitate the current response. The framework consists of three main pillars:

  1. Local-Position Awareness: To break the habit of using distance as a proxy for relevance, the attention mechanism is modified. Position embeddings are restricted to operate within individual sentences, forcing the model to rely on semantic correlations for inter-sentence attention.
  2. Causal Utterance Extraction: Using a perturbation-based method, the system identifies "causally relevant" turns. By replacing a turn with a generic phrase and measuring the change in perplexity, the model determines which turns are critical ($C$) versus non-causal ($S$).
  3. Causal Perception Fine-Tuning: The model is trained using auxiliary losses:
  4. Invariant Risk Minimization (IRM): Ensures output consistency even when non-causal turns are shuffled.
  5. Maximizing Treatment Effect (MTE): Increases sensitivity to causal turns, ensuring the model recognizes when a response is no longer valid if a causal turn changes.

Key Results and Analysis

The CPD framework was tested using Llama2-7B-chat and Qwen-14B-chat backbones on the Multi-Session Chat (MSC) and Emotional Support Conversation (ESConv) benchmarks.

Figure 3: Comparison of causal perception across different training strategies. 'Ours' (d) shows the most stable separation between causal and uncausal signals across dialogue turns.

As illustrated in Figure 3, the CPD approach (Ours) maintains a distinct separation between causal and uncausal signals throughout the dialogue history. In contrast, raw models and standard fine-tuning often see these signals converge, indicating a loss of causal perception as the dialogue length increases.

Quantitatively, CPD consistently outperformed state-of-the-art baselines like RSM and CONSTRAIN. On the MSC dataset with Llama2, CPD improved BLEU-1 from 0.1037 (standard fine-tuning) to 0.1245. Human evaluations also favored CPD, with significant improvements in relevance and informativeness.

Conclusion

By treating position as a confounding variable in a causal graph, the CPD framework successfully "detoxifies" LLMs from their reliance on recency. Through attention modification and specialized fine-tuning, models can be taught that "background noise" should not alter the core meaning of a response, leading to more coherent and contextually aware long-term interactions.

Summary updated

BibTeX
@inproceedings{fan2024position,
  author = {Shixuan Fan and Wei Wei and Wendi Li and Xian-Ling Mao and Wenfeng Xie},
  title = {{Position Debiasing Fine-Tuning for Causal Perception in Long-Term Dialogue}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2024},
  url = {https://openreview.net/forum?id=vak3yKcvUi},
}
Figure