NeurIPS 2026QuestionsPapersAreasAboutMarkdown

SWE-Protégé: Learning to Selectively Collaborate With an Expert Unlocks Small Language Models as Software Engineering Agents

Patrick Tser Jern Kon, Archana Pradeep, Ang Chen, Alex Ellis, Warren Hunt, Zijian Wang, John Yang, Samuel Thompson

NeurIPS page · OpenReview · alphaXiv · Open on the map

Category: LLM Agents, Evals & Benchmarks › LLM-Augmented Problem Solving · Type: new method · Keywords: small language models, software engineering, expert collaboration, SWE-bench, post-training, agentic reinforcement learning

Areas: LLM Reasoning › Agentic Reasoning › LLM Agents; Code & Coding Agents › Code Verification › Software engineering agents; AI Agents › Agentic Decision Making › Agent Architectures; RL for LLMs & Agents › Language Model Agents › Credit Assignment for Reasoning

Summary

SWE-Protégé is a post-training framework that enables small language models to selectively collaborate with an expert to improve performance on software engineering tasks.

Explained to a 5-year-old

Small AI helpers called language models are good at fixing computer code but sometimes get stuck in loops. The researchers taught these helpers to ask a bigger AI for help only when they need it. They also learned to notice when they are stuck and to follow the advice they get. This way they avoid wasting time and can fix more problems correctly. Now the small helpers can work like useful software engineers without needing a lot of computer power.

Explained to a 5-year-old, longer

Small language models are like little computer brains that can write and fix code. They are cheap and fast, but they often get stuck when trying to solve big problems. The researchers gave them a new way to work, like a partnership between a student and a teacher. The student (the small model) can ask the teacher (a big expert model) for help when it needs it. They also learned to notice when they are stuck and to stop looping. The teacher only gives a few tips, so the student doesn't become too dependent. The student uses these tips to keep trying until the problem is solved. This teamwork helps the small model fix more bugs correctly. It also saves computer power because the small model doesn't need to be huge. The researchers trained the model on many examples of how experts solve problems. They also used a special learning method that rewards good behavior and avoids bad loops. As a result, the small model can act like a useful software engineer on its own.

For a technical reader

SWE-Protégé is a post-training framework that turns a small language model into a software-engineering agent. It learns to request guidance from a larger expert model only when it detects a stalled state, reducing unnecessary calls. The system combines supervised fine-tuning on expert-augmented trajectories with reinforcement learning that penalizes looping. On the SWE-bench Verified benchmark the approach reaches 42.4% Pass@1, a 25.4% boost over prior small models. By using expert help sparsely (≈4 calls per task, 11% of tokens) it keeps inference costs low while improving performance.

Problem

Small language models struggle on long-horizon software engineering tasks, often getting stuck in action loops and achieving low resolution rates.

Method

The approach fine-tunes a small language model using expert-augmented trajectories and employs agentic reinforcement learning to discourage looping and unproductive collaboration, enabling the model to request expert guidance selectively.

Results

The approach achieves 42.4% Pass@1 on SWE-bench Verified, a +25.4% improvement over prior small language model results, while using expert assistance only about four times per task and 11% of tokens.

Contributions

It introduces a post-training framework that frames software repair as expert-protégé collaboration, enabling small models to request expert guidance selectively and avoid looping, and demonstrates substantial performance gains on software engineering benchmarks.

Research questions this paper is counted under

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction