Organizations: Department of Computer Science, Columbia University, New York, USA · Computer Science Department, University of California, Los Angeles, California, USA.
The deployment of coding agents in privacy-sensitive and resource-constrained environments drives the demand for capable open-weight Small Language Models (SLMs). However, they suffer from a fundamental capability gap: unlike frontier large models, they lack the inference-time strong generalization to handle complicated, unfamiliar codebases. We identify that the prevailing Task-Centric Learning (TCL) approach, which scales exposure across disparate repositories, fails to address this limitation. In response, we propose Repository-Centric Learning (RCL), a shift that prioritizes vertical, single-repository depth over horizontal, single-task breadth for SLM training. To accomplish this depth, we design a four-unit Repository-Centric Experience, transforming static codebases into interactive learning signals, to train SWE-Spot-4B, a family of highly compact models built as repo-specialized experts. Under controlled comparisons with the same teacher and data budget, RCL consistently outperforms TCL across tasks, teachers, model scales, and programming languages. On seven target repositories, SWE-Spot-4B experts match or exceed existing open-weight models up to 8× larger (e.g., CWM by Meta, Qwen3-Coder-30B) and surpass or match efficiency-focused commercial models (e.g., GPT-4.1-mini, GPT-5-nano) across multiple SWE tasks. Further analysis reveals that RCL yields higher training and inference efficiency, deep knowledge acquisition, and can scale to repository-cluster experts. Our work emphasizes that for building efficient intelligence, repository mastery is a distinct, necessary, and practical dimension that complements general coding capability.
Figures & tables
Figure 1: A Four-Unit Design of Repository-Centric Experience (RCX)
Task
Target Repo
TCL
RCL
Issue Resolving
Django
16.95
20.62
Test Generation
Django
4.09
11.01
Feature Impl.
Sympy
2.15
4.84
Codebase QA
Django
71.59
75.79
Issue Res. †
Django
17.3
21.7
Exec Avg ‡
Django
20.1
34.9
Table 1: Controlled Comparison between RCL and TCL. Bottom rows: † weaker teacher, ‡ 30B student, § JavaScript repository.
Table 2: Leave-one-out Ablation of RCX Units (Django).
Model
Size
SWE Training Data
Issue Resolving
Test Gen
Feature Impl
Exec Avg
Codebase QA
(Pass %)
(Pass %)
(Pass %)
(Pass %)
(Score 0-100)
Efficency-focused Commercial LLM APIs
GPT-4.1-mini
[10, 100]B
-
21.79
22.27
5.70
17.85
80.28
Gemini-2.5-Flash-Lite
[0.1, 10]B
-
8.80
10.74
0.88
7.46
73.36
GPT-5-nano
[0.1, 10]B
-
6.49
0.00
1.75
2.97
35.64
Open-Weight Generalist Models
Table 3: End-to-end Repository-Centric Evaluation on Four Agentic SWE Tasks. Exec Avg : average pass rate over the three execution-based tasks.
Metric
Baseline
Gap
95% CI
p (Holm)
Exec Avg
CWM-32B
+0.90
[ − 1.35, +3.17]
0.903
Qwen3-Coder-30B
+5.89
[+3.31, +8.47]
6.0e-5
Mini-Coder-4B
+8.19
[+5.95, +10.49]
4.0e-5
GPT-4.1-mini
− 0.31
[ − 2.86, +2.19]
0.903
Codebase QA
CWM-32B
+4.97
[+3.58, +6.33]
1.6e-4
Qwen3-Coder-30B
+12.57
[+10.34, +14.84]
1.6e-4
Table 4: Paired significance tests for SWE-Spot -4B against off-the-shelf baselines. Gap = SWE-Spot − baseline (percentage points for Exec Avg, score points for QA).
Figure 3: Probe-predicted repository likeness explains and guides cross-repository transfer . (a) Pairwise transfer effect on Django vs. probe likeness score. (b) Joint training on the positive (Django + top-3) vs. negative (Django + bottom-3) cluster.
Figure 4: SWE-Spot Expert Issue-Resolution Rate vs. SWE-bench-Verified Issue Date. Experts are trained only on repository knowledge before the cutoff date; their issue-resolution rate shows no significant correlation with issue creation date over nearly three years ( p=0.498 ).
Small language models are compact neural language systems designed to deliver useful text and reasoning capabilities with limited compute, memory, and energy.
Agentic repository-level code understanding is essential for automating complex software engineering tasks, yet the field lacks reliable benchmarks. Existing evaluations often overlook the long tail topics and rely on popular repositories where Large Language Models (LLMs) can cheat via memorized knowledge. To address this, we introduce SWE-QA-Pro, a benchmark constructed from diverse, long-tail repositories with executable environments. We enforce topical balance via issue-driven clustering to cover under-represented task types and apply a rigorous difficulty calibration process: questions solvable by direct-answer baselines are filtered out. This results in a dataset where agentic workflows significantly outperform direct answering (e.g., a ~13-point gap for Claude Sonnet 4.5), confirming the necessity of agentic codebase exploration. Furthermore, to tackle the scarcity of training data for such complex behaviors, we propose a scalable synthetic data pipeline that powers a two-stage training recipe: Supervised Fine-Tuning (SFT) followed by Reinforcement Learning from AI Feedback (RLAIF). This approach allows small open models to learn efficient tool usage and reasoning. Empirically, a Qwen3-8B model trained with our recipe surpasses GPT-4o by 2.3 points on SWE-QA-Pro and substantially narrows the gap to state-of-the-art proprietary models, demonstrating both the validity of our evaluation and the effectiveness of our agentic training workflow.
Songcheng Cai, Zhiheng Lyu, Yuansheng Ni +13
University of Waterloo · University of Toronto · The Hong Kong University of Science and Technology +2
A prerequisite for coding agents to perform tasks on large repositories is code localization - the identification of relevant files, classes, and functions to work on. While repository-level code localization has been performed using embedding-based retrieval approaches such as vector search, recent work has focused on developing agents to localize relevant code either as a standalone precursor to or interleaved with performing actual work. Most prior methods on agentic code search equip the agent with complex, specialized tools, such as repository graphs derived from static analysis. In this paper, we demonstrate that, with an effective reinforcement learning recipe, a coding agent equipped with nothing more than a standard Unix terminal can be trained to achieve strong results. Our experiments on three benchmarks (SWE-Bench Verified, Pro, and Lite) reveal that our models consistently achieve superior or competitive performance over 2-18x larger base and post-trained LLMs and sometimes approach performance provided by closed models like Claude Sonnet, even when using specialized scaffolds. Our work particularly focuses on techniques for re-purposing existing coding agent environments for code search, reward design, and RL optimization. We release the resulting model family, CodeScout, along with all our code and data for the community to build upon.
Lintang Sutawika, Aditya Bharat Soni, Bharath Sriraam R R +8
Carnegie Mellon University · Independent · OpenHands
Modern LLM coding agents such as Claude Code and OpenHands share a common inefficiency: they spend much of their token budget finding the file to patch, rather than patching it. On SWE-Bench Verified, a 30B OpenHands agent averages 23 rounds and 631K tokens per resolved issue, with many calls spent on grep, glob, and view_file during repository exploration. We introduce CodeGrep, a 14B retrieval agent trained end-to-end with GRPO to issue multi-turn parallel grep, glob, and read tool calls and return candidate files to a frozen downstream coding agent. On all 500 SWE-Bench Verified instances, CodeGrep preserves resolve rate while substantially improving efficiency: 27.0% versus 25.8% for the no-retrieval baseline, with 15% fewer rounds and 19% fewer tokens on resolved instances. Across retrievers, downstream utility follows a precision threshold: BM25 with precision 0.375 degrades the agent, Jina with precision 0.445 is neutral, and CodeGrep with precision 0.677 crosses the threshold at which retrieval begins to reduce rollout cost. To enable this study, we mine supervision from 67K open-source agent trajectories using CATM and build a Git-worktree environment for multi-turn agent RL. In our setting, applying the efficiency signal at the advantage layer rather than the reward layer reduces KL drift and translates cleanly into downstream efficiency. We will release the model, training pipeline, RL environment, and evaluation harnesses.
Wuya Chen, Yihao yang, Yang Cao +1
1Netease Guangzhou AI Lab · 2Independent Researcher