Download

Abstract

Small language models (SLMs) offer compelling advantages in cost, latency, and adaptability, but have lagged behind larger models on long-horizon software engineering tasks such as SWE-bench, where they suffer from pervasive action looping and low resolution rates. We introduce SWE-Protégé, a post-training framework that reframes software repair as an expert–protégé collaboration problem. In SWE-Protégé, an SLM remains the primary decision-maker while learning to selectively seek guidance from a strong expert model, recognize stalled states, and follow through on expert feedback. Our approach combines supervised fine-tuning on expert-augmented trajectories with agentic reinforcement learning that explicitly discourages degenerative looping and unproductive expert collaboration. We lightly post-train Qwen2.5-Coder-7B-Instruct to achieve 42.4% Pass@1 on SWE-bench Verified with SWE-agent and Claude Opus 4.1 as the expert, a +25.4% improvement over the prior SLM state of the art, while using expert assistance sparsely (≈4 calls per task and 11% of total tokens). With Claude Sonnet 4.5 as the expert, it reaches 41.0% at a median expert API cost of $0.15 per task, 8.2× lower than running the expert alone.


Figure 1: (a) Our two-phase pipeline yields SWE-Protégé-7B: Phase 1 uses SFT on expert-augmented trajectories; Phase 2 applies GRPO with trajectory-level rewards. (b) Paraphrased trajectories before and after each phase.


Citation

@inproceedings{kon2026sweprotege, title = {SWE-Prot{'e}g{'e}: Small Language Models for Software Engineering Through Learned Expert Collaboration}, author = {Kon, Patrick Tser Jern and Pradeep, Archana and Chen, Ang and Ellis, Alexander P. and Hunt, Warren and Wang, Zijian and Yang, John and Thompson, Samuel}, booktitle = {Advances in Neural Information Processing Systems (NeurIPS)}, year = {2026} }