TL;DR
The Long Question Coreference Adaptation (LQCA) framework significantly improves how Large Language Models (LLMs) handle long documents by explicitly resolving coreferences (like pronouns or ambiguous nouns) before the model even sees the text. By replacing vague references with their specific "representative" entities across massive contexts, LQCA achieves a 3.61% average improvement on GPT-4o and helps mitigate the notorious "lost in the middle" phenomenon.
The Challenge: Context Gaps in Long Documents
Modern LLMs boast context windows of 128k tokens or more, yet they still struggle with "long-contextual understanding." A major reason for this is the context gap: as a document grows, the distance between an entity (e.g., "Zhejiang University") and a reference to it (e.g., "the institution" or "it") increases.
When these references are separated by thousands of words, LLMs often lose the thread, leading to hallucinations or an inability to answer questions about the middle of a text. Current solutions like RAG (Retrieval-Augmented Generation) or text compression often discard the very nuances needed to resolve these linguistic links. The authors argue that the bottleneck isn't merely the size of the context window, but the ambiguity of the text within it.
The Solution: Long Question Coreference Adaptation (LQCA)
The authors introduce LQCA, a four-step preprocessing pipeline designed to "clean" long-form text for LLM consumption:
- Sub-document Partitioning & Local Resolution: Since state-of-the-art coreference resolution (CR) models have their own token limits, LQCA slices the long text into overlapping sub-documents. It uses the Maverick model (based on DeBERTa-v3) to identify coreference clusters within each slice.
- Global Mention Distance Computation: To link references across different slices, the framework builds a sparse matrix of relationships. It uses a "multiplication principle" and a Longest Dot Product Path algorithm (similar to Dijkstra’s) to determine if a mention in slice A refers to the same entity as a mention in slice Z.
- Defining Representative Mentions: For every cluster of related mentions, the system must pick a "winner" to represent the group. It uses spaCy for part-of-speech tagging and selects the most frequent, non-pronoun noun phrase that appears earliest in the text.
- Mention Replacement: Finally, the original text is modified. Vague pronouns and modifiers are replaced with their representative mentions. This "resolved" text is then fed to the LLM for the actual question-answering or summarization task.
Datasets & Evaluation
The researchers evaluated LQCA across nine datasets categorized into three major benchmarks:
- LooGLE: Focused on long-dependency tasks like Arxiv paper summarization and long-context QA.
- L-Eval: Used for closed-ended tasks, including TOEFL, Coursera, and Law-related multiple-choice questions.
- LongBench: Specifically the multi-document QA subsets: HotpotQA, 2WikiMultihopQA, and MuSiQue.
Key Insights and Results
- Text Quality > Window Size: The paper suggests that simply giving a model more "memory" (context) isn't enough if the "data" (text) is linguistically ambiguous. Explicitly "de-anonymizing" the text via CR is a powerful shortcut.
- Solving "Lost in the Middle": One of the most striking findings is that LQCA specifically boosts accuracy for information located in the middle of a document—the area where LLMs typically perform worst. In the Coursera QA dataset, accuracy for information located in the [0.4, 0.6] interval of the text increased by +6.1% compared to providing the raw context.
- Graph-Based Stitching: The use of a dot-product path algorithm to merge coreference clusters across document slices is a clever way to bypass the input limits of specialized CR models.
- Model Agnostic Benefits: While the biggest gains were seen in top-tier models like GPT-4o (+3.61%) and OpenAI-o1-mini (+3.18%), even smaller open-source models like Llama-3-8b showed improved reasoning capabilities when provided with the resolved text.
- Long-Dependency Tasks: On the HotpotQA dataset (which requires connecting disparate facts), GPT-4o saw a massive +7.59% improvement.
- Comparison to RAG: LQCA consistently outperformed standard RAG and RECOMP (a compression method), proving that maintaining the full (but clarified) context is often better than retrieving isolated snippets.
Limitations and Future Work
- Computational Overhead: Running a specialized CR model (Maverick) and a graph algorithm on a massive document before sending it to an LLM adds significant latency and compute cost.
- Cascading Errors: If the initial coreference resolution step misidentifies an entity, the replacement step will propagate that error throughout the entire document, potentially confusing the LLM further.
- Complexity of Ambiguity: The authors note that extremely complex or poetic language might still baffle the CR model, leading to inaccurate replacements.
- Future Direction: The authors suggest integrating causal inference to better understand relationships between entities, moving beyond simple linguistic similarity to "who did what to whom" logic.
Check out the code: https://github.com/OceannTwT/LQCA
Summary updated