Download

Abstract

Small language models (SLMs) offer compelling advantages in cost, latency, and adaptability, but have so far 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 sole 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 shallow expert usage. We lightly post-train Qwen2.5-Coder-7B-Instruct to achieve 42.4% Pass@1 on SWE-bench Verified with SWE-agent, 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).


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}: Learning to Selectively Collaborate With an Expert Unlocks Small Language Models as Software Engineering Agents}, 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} }