TL;DR
DependEval is a new hierarchical, multilingual benchmark designed to evaluate how well Large Language Models (LLMs) comprehend repository-level code dependencies. By testing over 25 major LLMs across eight programming languages, the study reveals that while models are decent at mapping simple file relationships, they severely struggle with complex, coordinated multi-file editing and directory structure design.
What Problem Does This Paper Address?
While LLMs excel at generating isolated functions or single-file code snippets (as measured by traditional benchmarks like HumanEval or MBPP), real-world software engineering happens at the repository scale. Developing software requires an intricate understanding of how files interact, how project architectures are structured, and how a change in one module ripples across multiple dependencies.
Existing repository-level benchmarks either focus narrowly on end-to-end bug fixing (like SWE-bench) or lack fine-grained, isolated metrics to evaluate why a model fails. To bridge this gap, the authors introduce DependEval, a benchmark specifically built to assess an LLM's structural and architectural reasoning across complex codebases.
Methods
DependEval evaluates LLMs using a hierarchical framework consisting of three progressively challenging tasks:
- Dependency Recognition (DR): Tests the model's ability to infer the correct invocation order of a set of interdependent code files.
- Repository Construction (RC): Evaluates whether a model can generate a coherent, modular project layout and dependency graph given natural language requirements and functional file descriptions.
- Multi-file Editing (ME): Challenges the model to implement new features across multiple files simultaneously. This includes both In-place Edits (modifying existing files) and Expansion Edits (creating new files and updating existing ones to call them) while maintaining strict cross-file consistency.
To ensure rigorous evaluation, the authors use distinct metrics for each task: Exact Match Rate (EMR) for Dependency Recognition; a custom Graph Match F1-Score (combining node and edge accuracy) for Repository Construction; and a multi-aspect LLM-as-a-judge framework (evaluating Correctness, Purpose Alignment, Functionality Accuracy, Completeness, and Code Quality) for Multi-file Editing.
Datasets
The benchmark was constructed using a rigorous data curation pipeline:
- Source: 15,576 high-quality, real-world public GitHub repositories created before December 16, 2024, filtered for popularity (over 50 stars) and activity.
- Languages: Eight major programming languages: C, C++, C#, TypeScript, JavaScript, Java, PHP, and Python.
- Final Benchmark Size: 2,683 meticulously curated test cases containing invocation chains of varying lengths (2, 3, and 4 files).
- Human-in-the-Loop: A team of human annotators manually reviewed, corrected, and verified the LLM-generated requirements and code modifications to establish reliable gold-standard labels.
Key Insights and Ideas
- Domain Specific Tuning Beats Raw Scale: One of the most notable findings is that code-specific models like
Qwen2.5-Coder-32Bfrequently outperform much larger general-purpose models (such asLlama-3.3-70B-InstructandQwen-2.5-72B-Instruct). This demonstrates that targeted pre-training on high-quality code repositories is more effective than simply scaling parameter size. - The Static vs. Dynamic Language Divide: LLMs perform significantly better at dependency recognition and repository construction in languages with explicit, clean import structures like Python, JavaScript, and TypeScript. Conversely, they struggle with languages like PHP (due to flexible file inclusions) and C# (due to complex project configurations).
- Multi-File Editing is the Ultimate Bottleneck: While many models achieve decent scores in recognizing dependencies, their performance plummets when forced to execute coordinated edits across multiple files. Maintaining global state and pointer tracking (especially in C/C++) remains a massive hurdle for current architectures.
- Directory Structure Blind Spot: LLMs consistently score lower on Repository Construction than on Dependency Recognition, indicating they lack the inherent prior knowledge required to organize hierarchical project directories logically.
Key Results
The authors evaluated more than 25 open-source and closed-source LLMs.
- Top Performers:
DeepSeek-V3andClaude-3.5-Sonnetemerged as the clear leaders. - Task Specialization:
DeepSeek-V3dominated the simpler Dependency Recognition tasks, showcasing incredible static analysis capabilities. However,Claude-3.5-Sonnetproved superior in architectural reasoning, leading the pack in Repository Construction and Multi-file Editing. - Open vs. Closed Source: While top-tier open-source models (like DeepSeek-V3 and Qwen2.5-Coder) are highly competitive in structural tasks, closed-source commercial APIs still maintain a slight edge in complex multi-file reasoning and generalization.
Limitations and Future Work
The authors openly acknowledge a few limitations in DependEval's current iteration:
- Language Scope: While 8 languages cover a massive footprint, emerging languages (like Rust or Go) are not yet included.
- Task Scope: The benchmark focuses heavily on structural dependencies but does not yet evaluate other crucial repository-level tasks like multi-file debugging, code refactoring, or performance optimization.
- Evolving Model Pool: As the LLM landscape shifts rapidly, keeping the benchmark updated with the latest frontier models will be an ongoing requirement.
The authors have open-sourced their dataset and curation scripts on GitHub to allow the community to expand the benchmark to new languages and tasks.
Summary updated