TL;DR
This paper investigates how Large Language Models (LLMs) handle information based on its position within a long context, across different languages and model architectures. They found that position bias is mainly driven by the model itself, not the language, and surprisingly, explicit instructions to focus on relevant context can actually hurt performance.
What Problem Does This Paper Address?
As LLMs are increasingly used in applications requiring them to process long documents (like retrieval-augmented generation or research), understanding how they handle information spread across these long contexts becomes crucial. A known issue is "position bias," where LLMs tend to pay less attention to information located in the middle of a text, often favoring information at the beginning or end. While this has been studied in English, its behavior in multilingual settings and across different LLM architectures was unclear. This paper aims to fill that gap by exploring how position bias manifests in various languages and models, and how it interacts with prompting strategies.
Methods
The researchers conducted a comprehensive multilingual study using five typologically diverse languages (English, Russian, German, Hindi, and Vietnamese) and five popular open-source multilingual LLM architectures. They designed experiments to test how LLMs perform when the relevant information for a question is placed at different positions within a context (top, middle, bottom). They also explored the impact of different prompting strategies:
- Aligned: The relevant context is given a score of 1, others 0.
- All Zero: All contexts, including the relevant one, are scored 0.
- No Scores: No relevance scores are provided.
They evaluated performance using accuracy and also analyzed "predictive entropy" to understand the model's uncertainty.
Datasets
The study utilized existing open-ended question-answering datasets:
- SQuAD2.0: For English.
- MTS-SQuAD: For Russian.
- MLQA: For German, Hindi, and Vietnamese.
For each language, they sampled 2,000 question-answer pairs.
Key Insights and Ideas
- Model-Driven Bias: The most striking finding is that position bias is primarily a characteristic of the LLM architecture and its training, rather than being dictated by the language itself. While languages have nuances, the core preference for early or late tokens is a model trait.
- Challenging the "Early Token" Assumption: Contrary to the common belief that LLMs universally favor early tokens, some models (like Qwen2.5-7B-Instruct and DeepSeek 7B Chat) actually show a preference for late positions. This highlights the diversity in LLM behavior.
- Prompting Pitfalls: Explicitly telling an LLM that a specific piece of context is "relevant" (using scoring mechanisms) can surprisingly decrease accuracy, especially when the distractors are random. This questions standard prompt-engineering practices that rely on such explicit guidance.
- Confident Errors: When relevant information is in the middle of the context (where performance is worst), the models don't necessarily show higher uncertainty (entropy). This suggests LLMs can be confidently wrong, failing to use mid-context information without realizing their own lack of confidence.
Key Results
- Language Performance: English and Russian performed best, while German, Hindi, and Vietnamese showed lower accuracy, suggesting challenges with lower-resource or morphologically complex languages.
- Model Performance: Qwen2.5-7B and Mistral-7B generally performed better than DeepSeek-7B and Llama3.1-8B, with Gemma-7B lagging significantly.
- Prompting Strategy Impact: The "No Scores" strategy consistently outperformed "Aligned" and "All Zero" strategies, indicating that providing explicit relevance scores can be detrimental. For instance, accuracy drops were observed when using "Aligned" compared to "No Scores."
- Positional Bias Variation: While the "lost in the middle" phenomenon was observed across models, the specific preference for top vs. bottom varied significantly between models (e.g., Llama3.1-8B favored early, while DeepSeek 7B and Qwen2.5-7B favored late).
Limitations and Future Work
- LLM-as-a-Judge Reliance: The study relied on an LLM (Mistral Large) as an evaluator. While validated against human evaluation, this introduces a dependency on the LLM's own judgment capabilities.
- Context Volume: While they experimented with different context lengths (5, 10, 15), they settled on five for the main experiments due to computational constraints. The impact of very long contexts might still hold nuances.
- Multilingual Nuances: While the core bias is model-driven, the paper acknowledges that language-specific patterns might exist and could be further explored, especially concerning morphological complexity and word order.
- Future Work: The authors suggest further investigation into how position bias interacts with uncertainty quantification strategies and the need for model- and language-aware context handling in RAG systems. They also highlight the importance of understanding how LLMs process different languages, as their internal "thinking" might shift across layers.
Summary updated