Source-linked AI summary
Hallucinate at the Last in Long Response Generation: A Case Study on Long Document Summarization
Joonho Yang, Seunghyun Yoon, Hwan Chang, Byeongjeong Kim, Hwanhee Lee
TL;DR
Because the positional distribution of factual errors in generated text has received limited attention, the paper investigates hallucinations in long-context document summarization. It analyzes faithfulness across summary positions and finds that it tends to decline toward the end, especially in longer summaries.
Problem
Research has paid limited attention to where factual errors occur within generated sequences, particularly in long responses produced from long contexts.
Source: §1 · pp. 1–2Method
The paper investigates positional hallucination in long document summarization, using faithfulness scores across five equal-length summary bins for positional analysis.
Source: §1 · p. 2, §3.2 · p. 3Results
Hallucinations concentrate toward the end of generated summaries, with the decline in faithfulness becoming more pronounced as summaries get longer.
Source: §1 · p. 2, §3.3 · p. 4, §7 · p. 9Takeaways & Limitations
The findings position output-error location as an important dimension for future research on long-form generation, particularly summarization.
Source: Limitations · p. 9The study covers four domains but not books, dialogues, movie scripts, or meeting transcripts, which lacked suitable input lengths or sufficient samples or were too long.
Source: Limitations · p. 9
Abstract
from arXiv · showhide
Large Language Models (LLMs) have significantly advanced text generation capabilities, including tasks like summarization, often producing coherent and fluent outputs. However, faithfulness to source material remains a significant challenge due to the generation of hallucinations. While extensive research focuses on detecting and reducing these inaccuracies, less attention has been paid to the positional distribution of hallucination within generated text, particularly in long outputs. In this work, we investigate where hallucinations occur in LLM-based long response generation, using long document summarization as a key case study. Focusing on the challenging setting of long context-aware long response generation, we find a consistent and concerning phenomenon: hallucinations tend to concentrate disproportionately in the latter parts of the generated long response. To understand this bias, we explore potential contributing factors related to the dynamics of attention and decoding over long sequences. Furthermore, we investigate methods to mitigate this positional hallucination, aiming to improve faithfulness specifically in the concluding segments of long outputs.
1 Introduction
The paper addresses the limited study of where factual errors occur in long generated outputs by investigating hallucinations in long-context document summarization. It reports that faithfulness tends to decline toward the end, especially in longer summaries, and examines contributing factors and mitigation strategies.
1 Introduction
- For long summaries, faithfulness significantly decreases toward the end, where hallucinations tend to concentrate; the authors call this positional pattern “hallucinate at the last.”Figure 1 compares faithfulness scores for summaries of around 50, 200, and 800 words generated with GPT-4o mini.Source: Figure 1 · p. 1, §1 · p. 2
- The study targets a gap in research on the positional distribution of factual errors in long responses generated from long contexts.Prior work had examined positional biases in processing input contexts, while output-position errors—especially for long responses from long contexts—were less studied.Source: §1 · pp. 1–2
- The investigation focuses on long-context-aware long-response generation, using long document summarization as its case study.The authors contrast this setting with prior work focused primarily on long inputs or short outputs.Source: §1 · p. 2
- The paper empirically characterizes the late-stage hallucination pattern, investigates potential contributing factors, and explores mitigation strategies tailored to positional errors.Its stated research questions address where hallucinations occur, what contributes to them, and how they might be mitigated.Source: §1 · p. 2
2 Generating Summaries
This section describes how the authors generated and selected summaries for analysis, varying input and output lengths. It also reports a preliminary overall-faithfulness evaluation before the paper’s finer-grained positional analysis.
2 Generating Summaries
- Summaries were generated from original documents, and outputs with excessive length, repetitions, or repeated paragraphs were excluded to support fair comparisons.The authors note that controlling summary length became harder with longer input contexts and larger target ranges.Source: §2 · p. 2
2.1 Input Context Lengths
- The evaluation used input contexts over 4K tokens, extending to 12K and 16K tokens for Llama.Source: §2.1 · p. 2
2.2 Output Length Categories
- The study contrasts standard summaries of 100–200 words with long summaries up to 30% of the input context length.The two output categories support comparison of positional patterns across standard and substantially longer summaries.Source: §2.2 · p. 2
2.3 Overall Faithfulness
- FineSurE was used for a preliminary overall-faithfulness check of Llama3.1-8B-Instruct summaries on Wikipedia, with sentence-level source comparisons.The passage reports alignment with CNNDM results, where Llama3-70B-Instruct achieved 85.5% faithfulness; Table 1 is scoped to overall faithfulness on Wikipedia.Source: §2.3 · pp. 2–3, Table 1 · p. 3
3 Where Do Hallucinations Most Frequently Occur?
The section measures positional faithfulness across models and settings, finding end-position declines common but not universal.
3.1 Experimental Setup
- The setup tests four LLMs across four datasets, sampling 20 examples per dataset; all summaries use greedy decoding.The models include Llama3.1-8B-Instruct, Gemma3-12B-Instruct, Qwen2.5-7B-Instruct, and GPT-4o mini.Source: §3.1 · p. 3
3.2 Evaluation Metric
- Faithfulness scores average filtered atomic-fact scores after source-document checking; sensitivity captures positional differences across five equal-length bins.Scores range from 0 to 1, and positive sensitivity indicates lower faithfulness in the final bin than earlier bins.Source: §3.2 · p. 3
3.3 Hallucinate at the Last
- In long summaries, faithfulness declines toward the end for three models, eventually below 0.75, while Qwen dips mid-summary then recovers.Figure 2 compares faithfulness scores across models on Wikipedia.Source: §3.3 · p. 4, Figure 2 · p. 4
- Human evaluation is consistent with Llama having the highest sensitivity; annotators agreed on 515 of 543 facts (94.8% raw agreement).Table 4 reports human-evaluated faithfulness and sensitivity for Llama long summaries on Wikipedia.Source: §3.3 · pp. 4–5, Table 4 · p. 5
- With Llama, sensitivity remains high at 12K and 16K context lengths, so positional discrepancies are not significantly affected by longer input contexts.Table 3 covers standard and long summaries at both context lengths.Source: §3.3 · p. 4, Table 3 · p. 5
- Across datasets, later summary segments are least faithful, and the decline becomes more severe in longer summaries.Figure 3 compares Llama3.1-8B-Instruct summaries across domains.Source: Figure 3 · p. 4, §3.3 · p. 5
- For Llama and Gemma, faithfulness is lowest near the end across decoding strategies; η-sampling takes Llama from above 0.8 early to below 0.7 in the final bin.Qwen generally does not show this end decline; its lowest faithfulness is in the middle.Source: §3.3 · p. 5, Figure 4 · p. 5
4 Why Do Hallucinations Frequently Occur at the Last?
The section tests whether summary structure and attention shifts contribute to hallucinations near the end of long outputs. Generated-summary faithfulness declines at the end, while the attention analysis finds contrasting patterns across Llama and Qwen.
4 Why Do Hallucinations Frequently Occur at the Last?
- The section considers summary structure and increasing attention to previously generated tokens, rather than the original context, as possible contributors to end-position hallucinations.The first hypothesis is that key information appears early in summaries, leaving less important content for later; the second proposes an attention shift as outputs grow.Source: §4 · p. 6, §4.1 · p. 6, §4.2 · p. 6
4.1 Is it Intrinsic to Summarization?
- Generated CNNDM summaries fall below 0.65 faithfulness in the final segment, while human references dip mid-summary and recover.This comparison suggests the end-position pattern is not solely due to summarization’s inherent structure.Source: §4.1 · p. 6
4.2 Is it Intrinsic to Attention?
- Llama assigns nearly three times more attention to its final summary sentence than to the first or middle, while Qwen’s attention is similar across all three positions.The authors report that greater attention to previously generated text correlates with a higher likelihood of hallucination.Source: §4.2 · p. 6
5 How to Mitigate the Hallucinate at the Last?
For models without sliding-window attention, the section compares mitigation methods and finds chunkwise summarization followed by merging most effective among those tested. The approach also improves overall summary quality, but relies on chunking and merging.
Experimental Setup
- The evaluation compares four mitigation methods against Llama3.1-8B-Instruct on Wikipedia summaries: chunk-and-merge summarization, sparse attention, long-output fine-tuning with DPO, and context-aware decoding.The methods are BOOOOKSCORE, MINFERENCE, LONGWRITER-LLAMA3.1-8B, and ADACAD.Source: §5 · p. 7
Results & Analysis
- BOOOOKSCORE has the lowest sensitivity (0.0) and highest faithfulness, especially in the final bin, avoiding the sharp end-of-summary decline seen with other methods.The authors report that it also improves overall summary quality; Figure 7 shows faithfulness trends across increasing output lengths, and Table 6 reports faithfulness and sensitivity.Source: §5 · p. 8, Figure 7 · p. 8, Table 6 · p. 8
- BOOOOKSCORE is a practical mitigation for models without sliding-window attention, but does not fundamentally resolve the issue because it relies on chunking and merging.The authors call for methods that maintain faithfulness during direct generation from long contexts.Source: §5 · p. 8
6 Related Work
Prior work addresses hallucination detection and reduction, but often does not examine how errors are distributed within long generated outputs. This study presents a dedicated investigation of positional patterns, contributing factors, and mitigation in long document summarization.
- Most prior hallucination work focuses on detection or reduction rather than the distribution of errors within long generated sequences.Related studies of long-output generation often use tasks not grounded in contextual input, limiting their applicability to real-world summarization.Source: §6 · p. 8
- Studies of large vision-language models report that hallucinations tend to increase toward the end of generated image descriptions.Source: §6 · p. 8
- The study presents the first dedicated investigation of where hallucinations occur in LLM-based long document summarization, including positional patterns, contributing factors, and mitigation.Source: §6 · p. 8
7 Conclusion
The conclusion characterizes hallucinations as disproportionately increasing toward the end of long outputs, with the bias amplified in longer summaries. It summarizes the investigation of contributing factors and mitigation strategies, and motivates research into positionally aware generation.
- Hallucinations disproportionately increase toward the end of long outputs, and the bias is amplified in longer summaries.Source: §7 · p. 9
- The study investigated contributing factors and explored targeted mitigation strategies for the Hallucinate at the Last phenomenon.Source: §7 · p. 9
- The findings highlight output faithfulness and motivate future research into positionally aware generation techniques.Source: §7 · p. 9
Limitations
The study covers four domains selected for suitable input lengths, but leaves several long-form domains unexamined. The authors describe the work as a foundation for future research on long-form generation, particularly summarization.
Limitations
- Books, dialogues, movie scripts, and meeting transcripts were not investigated.Books were excluded because they were excessively long; the other domains lacked datasets with suitable input lengths or sufficient sample sizes.Source: Limitations · p. 9
- The four studied domains were selected because their datasets provided input contexts of the desired length.Source: Limitations · p. 9
- The authors present the work as a foundation for future research on long-form output generation, particularly summarization.Source: Limitations · p. 9
Ethics Statement
The appendix reports reproducibility and model-use details, formalizes attention measurements over the input and summary, and describes atomic-fact evaluation. It also reports that the positional trend persists with finer-grained bins.
Ethics Statement
- The study used publicly available datasets and reports that experiments were conducted consistently without data or result manipulation or omission.Source: Ethics Statement · p. 9
A Attention Weight Calculation
- Attention measurements average the attention from each 100-token block to the summary’s first, middle, and last sentences.The full sequence comprises the input context and generated summary, and the target sentences have lengths T1, T2, and T3.Source: A Attention Weight Calculation · p. 13
B Details for Atomic Fact Generation
- The authors manually labeled 1,569 atomic facts as true or false, agreeing on 1,541 for 98.2% raw agreement.They report raw agreement because chance-corrected coefficients can be unstable or difficult to interpret for binary labels with skewed class distributions.Source: B Details for Atomic Fact Generation · p. 13
C Details for Model Usage
- The study used Llama3.1-8B-Instruct, Gemma3-12B-Instruct, Qwen2.5-7B-Instruct, and GPT-4o mini; summaries used greedy decoding with float16 precision.Atomic-fact evaluation used Llama3.1-8B-Instruct with vLLM; the appendix also reports results with five-bin and ten-bin settings.Source: C Details for Model Usage · pp. 13–14
- The Hallucinate at the Last trend persists when results are calculated with ten bins instead of five.Source: C Details for Model Usage · p. 14
D More Results with Different Methods
The appendix tests faithfulness assessments beyond MiniCheck using NLI, ROUGE-L, and FineSurE. The reported NLI and FineSurE results broadly retain late-position error patterns for Llama and GPT, with a stated exception for Qwen under FineSurE.
D More Results with Different Methods
- The appendix compares faithfulness and sensitivity using NLI, ROUGE-L, and LLM-based FineSurE in addition to MiniCheck.It reports results for standard and long summaries across output bins on Wikipedia; the supplied passages do not state ROUGE-L outcomes.Source: D More Results with Different Methods · p. 14
NLI Based
- NLI results show high sensitivity for Llama and GPT, while Qwen occasionally has sensitivity values below zero.Source: D More Results with Different Methods · p. 14
LLM Based
- Llama and GPT show their highest FineSurE error rates in the final bin for standard and long summaries, while Qwen does not.Source: D More Results with Different Methods · p. 14
E More Results on Varying Datasets
Across dataset analyses, sensitivity patterns differ between standard and long summaries, and some standard-summary values fall below zero. The appendix also details mitigation implementations, length matching, and the disclosed role of an AI assistant.
E More Results on Varying Datasets
- For standard summaries, below-zero sensitivities occur frequently and affect more than half of PubMed values; for long summaries, they are rare and absent in PubMed.Source: E More Results on Varying Datasets · p. 14
- NLI-based sensitivity for standard summaries across domains includes values below zero.Source: E More Results on Varying Datasets · pp. 14–15
F Details for Mitigation Methods
- BOOOOKSCORE summarizes 2048-token chunks with Llama3.1-8B-Instruct and hierarchically merges the partial summaries; LONGWRITER uses its Llama3.1-8B model with greedy decoding and bfloat16.Source: F Details for Mitigation Methods · p. 15
G Details for Generating Summaries
- Because longer contexts and larger target ranges made output length difficult to control, the analysis retained comparable-length summaries, including 28 sentences for 4K contexts and 40 for 8K.Source: G Details for Generating Summaries · p. 15
H Use of Large Language Model
- ChatGPT-5.1 was used for grammar correction and clarity refinement, not content generation or research ideation.Source: H Use of Large Language Model · p. 16
Related papers
This paper cites
- GPT-4 Technical Report2023
- Efficient Memory Management for Large Language Model Serving with PagedAttention2023
- Gemini 1.5: Unlocking multimodal understanding across millions of tokens of context2024
- A Survey on Hallucination in Large Language Models: Principles, Taxonomy, Challenges, and Open Questions2023
- Teaching Machines to Read and Comprehend2015
- Generating Long Sequences with Sparse Transformers2019