SWE-QA: A Dataset and Benchmark for Complex Code Understanding

Laïla Elkoussy, Julien Perez
4/27/2026
cs.SEcs.AI
benchmark-dataset

No confident code implementation found for this paper.

Abstract

In this paper, we introduce SWE-QA, a text and code corpus aimed at benchmarking multi-hop code comprehension, addressing the gap between simplified evaluation tasks and the complex reasoning required in real-world software development. While existing code understanding benchmarks focus on isolated snippets, developers must routinely connect information across multiple dispersed code segments.

Show full abstract

The dataset comprises 9,072 multiple-choice questions systematically generated from 12 Python repositories of SWE-bench, evaluating several recurrent reasoning patterns like Declaration-and-Call questions that link entity definitions to their usage, and Interacting-Entity questions that examine the dynamic relationships among multiple collaborating components. Generated through parsing-based entity extraction and Large Language Model assisted question construction with carefully validated distractors, the benchmark distinguishes genuine comprehension from superficial pattern matching. Evaluation of 15 language models (360M to 671B parameters) reveals significant challenges in multi-hop reasoning, with best performance reaching 74.41% accuracy. Dense architectures consistently outperform mixture-of-experts models by 10-14 percentage points, while reasoning-enhanced variants show inconsistent benefits.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{elkoussy2026sweqa,
  title  = {SWE-QA: A Dataset and Benchmark for Complex Code Understanding},
  author = {Laïla Elkoussy and Julien Perez},
  year   = {2026},
  eprint = {2604.24814},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2604.24814v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2604.24814.svg)](https://codeofpaper.com/paper/2604.24814)

Discussion