Lost-in-Distance: Impact of Contextual Proximity on LLM Performance in Graph Tasks
Not on the map. Why?
Abstract (arXiv)
Despite significant advancements, Large Language Models (LLMs) exhibit blind spots that impair their ability to retrieve and process relevant contextual data effectively. We demonstrate that LLM performance in graph tasks with complexities beyond the "needle-in-a-haystack" scenario-where solving the problem requires cross-referencing and reasoning across multiple subproblems jointly-is influenced by the proximity of relevant information within the context, a phenomenon we term "lost-in-distance". We examine two fundamental graph tasks: identifying common connections between two nodes and assessing similarity among three nodes, and show that the model's performance in these tasks significantly depends on the relative positioning of common edges. We evaluate three publicly available LLMs using various graph encoding techniques that represent graph structures for LLM input. We propose a formulation for the lost-in-distance phenomenon and demonstrate that lost-in-distance and lost-in-the middle phenomenas occur independently. Results indicate that model accuracy can decline by up to 6x as the distance between node connections increases, independent of graph encoding and model size.
Key facts. Cited by 8 papers in the map (data through 7 Oct 2026). Builds on 37 of its 48 references that are in the map. First posted on arXiv 2 Oct 2024.
Builds on
37 of 48 references.
References · 37
- 2017Attention Is All You Needcited by 59,932
- 2023GPT-4 Technical Reportcited by 18,132
- 2024The Llama 3 Herd of Modelscited by 14,192
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2020Scaling Laws for Neural Language Modelscited by 6,411
- 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,383
- 2019Language Models as Knowledge Bases?cited by 1,922
- 2021Multitask Prompted Training Enables Zero-Shot Task Generalizationcited by 1,462
- 2022No Language Left Behind: Scaling Human-Centered Machine Translationcited by 1,290
- 2018Graph Convolutional Neural Networks for Web-Scale Recommender Systemscited by 1,133
- 2022Language Models as Zero-Shot Planners: Extracting Actionable Knowledge for Embodied Agentscited by 1,029
- 2022Large Language Models Are Human-Level Prompt Engineerscited by 1,020
25 more
- 2023Extending Context Window of Large Language Models via Positional Interpolationcited by 721
- 2020Graph Neural Networks in Recommender Systems: A Surveycited by 493
- 2022Recommendation as Language Processing (RLP): A Unified Pretrain, Personalized Prompt & Predict Paradigm (P5)cited by 396
- 2023Larger language models do in-context learning differentlycited by 386
- 2022Selection-Inference: Exploiting Large Language Models for Interpretable Logical Reasoningcited by 331
- 2023Challenges and Applications of Large Language Modelscited by 251
- 2023Can Language Models Solve Graph Problems in Natural Language?cited by 249
- 2023Talk like a Graph: Encoding Graphs for Large Language Modelscited by 175
- 2022A Review on Language Models as Knowledge Basescited by 156
- 2022Language Models as Agent Modelscited by 131
- 2024Make Your LLM Fully Utilize the Contextcited by 118
- 2023Retrieval meets Long Context Large Language Modelscited by 114
- 2024Let Your Graph Do the Talking: Encoding Structured Data for LLMscited by 112
- 2019Hierarchical Graph Network for Multi-hop Question Answeringcited by 83
- 2022Efficient Long-Text Understanding with Short-Text Modelscited by 71
- 2024Understanding Transformer Reasoning Capabilities via Graph Algorithmscited by 64
- 2024GraphTranslator: Aligning Graph Model to Large Language Model for Open-ended Taskscited by 63
- 2023LLM4DyG: Can Large Language Models Solve Spatial-Temporal Problems on Dynamic Graphs?cited by 40
- 2023Graph-Aware Language Model Pre-Training on a Large Graph Corpus Can Help Multiple Graph Applicationscited by 33
- 2020Exploiting Structured Knowledge in Text via Graph-Guided Representation Learningcited by 26
- 2021Combining pre-trained language models and structured knowledgecited by 25
- 2022Target-aware Molecular Graph Generationcited by 18
- 2024A Graph is Worth K Words: Euclideanizing Graph using Pure Transformercited by 10
- 2017Graph-based Features for Automatic Online Abuse Detectioncited by 5
- 2024Enhancing Stability for Large Language Models Training in Constrained Bandwidth Networkscited by 1
Built on by
Citing papers per year: 2025: 6; 2026: 2.
8 papers.
- 2025PathRAG: Pruning Graph-based Retrieval Augmented Generation with Relational Pathscited by 60
- 2025GraphThought: Graph Combinatorial Optimization with Thought Generationcited by 9
- 2025Masks Can Be Distracting: On Context Comprehension in Diffusion Language Modelscited by 7
- 2025Court of LLMs: Evidence-Augmented Generation via Multi-LLM Collaboration for Text-Attributed Graph Anomaly Detectioncited by 3
- 2025NoteEx: Interactive Visual Context Manipulation for LLM-Assisted Exploratory Data Analysis in Computational Notebookscited by 2
- 2025Glance for Context: Learning When to Leverage LLMs for Node-Aware GNN-LLM Fusioncited by 1
- 2026Formalizing and Mitigating Structural Distortion in LLM Attention for Graph Reasoningcited by 0
- 2026GTA: Graph Theory Agent and Benchmark for Algorithmic Graph Reasoning with LLMscited by 0
- 2026GTA: Graph Theory Agent and Benchmark for Algorithmic Graph Reasoning with LLMs10 Sep 2026
- 2026Formalizing and Mitigating Structural Distortion in LLM Attention for Graph Reasoning14 Jun 2026
- 2025Masks Can Be Distracting: On Context Comprehension in Diffusion Language Models26 Nov 2025
- 2025NoteEx: Interactive Visual Context Manipulation for LLM-Assisted Exploratory Data Analysis in Computational Notebooks10 Nov 2025
- 2025Glance for Context: Learning When to Leverage LLMs for Node-Aware GNN-LLM Fusion12 Oct 2025
- 2025Court of LLMs: Evidence-Augmented Generation via Multi-LLM Collaboration for Text-Attributed Graph Anomaly Detection1 Aug 2025
- 2025PathRAG: Pruning Graph-based Retrieval Augmented Generation with Relational Paths18 Feb 2025
- 2025GraphThought: Graph Combinatorial Optimization with Thought Generation17 Feb 2025