United States of Banan is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.
Get full access to United States of Banan at konradb.substack.com/subscribe
Audio and video play straight from the show's own hosting. PodSubs stores and serves no media.
Transcript
From the show. Tap a time to play from there.
SWIRL represents a breakthrough in applying reinforcement learning to enhance large
SPEAKER_00language models for software engineering tasks. Previous RL approaches in this space focused primarily on competitive coding and math problems. But SWIRL extends this to practical software engineering challenges faced by developers daily. What makes SWE-RL unique is its ability to learn directly from the rich history of software evolution available in open-source repositories, including how developers modify code, fix bugs, and manage issues throughout a project's lifecycle. The approach uses a simple but effective reward mechanism based
on the similarity
SPEAKER_00between model-generated solutions and actual developer solutions. Figure 1 illustrates the SWE-RL workflow. The process begins by curating a dataset from GitHub pull requests, which serves as the seed data for reinforcement learning. Each data point includes an issue description, relevant code context, and the oracle patch that resolved the issue. During training, the policy LLM is presented with an issue and code context, and must generate code changes to fix the problem.
The model is rewarded based on how closely its solution matches the ground truth,
SPEAKER_00using a similarity score that ranges from 0 to 1. To maintain output quality, responses with incorrect formatting receive a negative reward. The training uses Group Relative Policy Optimization , which helps the model efficiently learn from multiple samples per input. SWEROL's methodology involves several sophisticated data processing steps. The researchers first collect GitHub events and clone repositories to capture the entire history of software changes. Each PR is processed to extract relevant information,
SPEAKER_00including issue descriptions, user discussions, and code modifications. A notable innovation is predicting relevant but unchanged files, which helps the model avoid the bias of modifying every file it sees. During training, the model is prompted to first reason through a problem before generating concrete edits, encouraging deeper understanding. The researchers found that using continuous similarity-based rewards, rather than simple pass-fail signals, significantly improved learning by providing more nuanced feedback on partial solutions.
Figure 3 highlights the structured reasoning process that SWERL encourages. The training prompt contains specific sections – a thinking phase where the model
SPEAKER_00works through the problem step by step, followed by a solution phase with concrete code edits. This approach enables what the researchers call AHA moments – instances where the model reflects on initial assumptions, explores alternatives, and breaks problems into manageable parts. Remarkably, this structured reasoning transfers to entirely different domains. The continuous reward function is crucial, as it provides meaningful feedback even when solutions aren't exactly correct, allowing the model to learn from partial matches and gradually
improve its
SPEAKER_00problem-solving strategies. The evaluation results are impressive. LAMA3 SWE RL70B solved 41% of issues in SWE Bench Verified, setting a new record for medium-sized language models under 100B parameters, and rivaling proprietary models like GPT-40. This was achieved without using any proprietary data for training, unlike competing approaches. Scaling experiments showed that generating more candidate patches and using more
SPEAKER_00test samples for validation significantly boosted performance. Perhaps most surprising was the model's generalization capabilities. Despite being trained solely on software engineering tasks, it showed improved performance on out-of-domain tasks like mathematical reasoning and general language understanding, outperforming both the base model and supervised fine-tuning baselines. SWERL represents a significant advancement in using reinforcement learning to improve LLMs for software engineering tasks.
The approach not only enhances performance on targeted tasks like bug fixing, but also improves general reasoning capabilities that transfer to entirely
SPEAKER_00different domains. The research clearly demonstrates that continuous rewards better capture the nuanced nature of code edits compared to simple discrete rewards. Looking ahead, the researchers plan to develop more agentic approaches where models can interact with repositories, incorporate execution feedback, and improve sample efficiency. This work opens an exciting new direction for enhancing AI coding assistance by learning directly from the rich history of open-source software development.
Paper: https://arxiv.org/abs/2504.11159 United States of Banan is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber. Get full access to United States...
Paper: https://arxiv.org/abs/2604.16748 United States of Banan is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber. Get full access to United States...
Paper: https://arxiv.org/html/2604.01845v1 United States of Banan is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber. Get full access to United...
Paper: https://arxiv.org/abs/2604.13253 United States of Banan is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber. Get full access to United States...
Paper: https://arxiv.org/abs/2604.05257 United States of Banan is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber. Get full access to United States...