Evaluating Long Range Dependency Handling in Code Generation LLMs
Yannick Assogba, Donghao Ren

TL;DR
This paper evaluates how well large language models for code generation handle long-range dependencies within extended context windows, revealing significant performance degradation and proposing simple prompt modifications for improvement.
Contribution
It introduces a suite of multi-step key retrieval tasks for long context evaluation and demonstrates how prompt modifications can enhance model performance.
Findings
Performance drops up to 2x for long-range references
Sliding window attention models struggle with references beyond window size
Prompt modifications using call graph info can improve retrieval by up to 3x
Abstract
As language models support larger and larger context sizes, evaluating their ability to make effective use of that context becomes increasingly important. We analyze the ability of several code generation models to handle long range dependencies using a suite of multi-step key retrieval tasks in context windows up to 8k tokens in length. The tasks progressively increase in difficulty and allow more nuanced evaluation of model capabilities than tests like the popular needle-in-the-haystack test. We find that performance degrades significantly for many models (up to 2x) when a function references another function that is defined later in the prompt. We also observe that models that use sliding window attention mechanisms have difficulty handling references further than the size of a single window. We perform simple prompt modifications using call graph information to improve multi-step…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsData Quality and Management · Service-Oriented Architecture and Web Services · Advanced Text Analysis Techniques
MethodsSoftmax · Attention Is All You Need
