Roll out & verify
Sample multiple agent trajectories for one repository issue. Execute tests, then group attempts by their pass or fail outcome.
Learn from how an agent debugs, even when the tests fail.
A richer training signal, anchored in executable verification.
Research preprint · 2026
1 Pennsylvania State University2 AG2AI3 Microsoft Research
The intuition
Three attempts. The same test outcome. Different debugging quality.
Same task.
Same verifier outcome.
Training reward
Different rewards provide a learning signal.
Illustrative rewards for a three-failure group, using the main setting’s ±0.15 bound. Switch modes to see the learning signal that BSR adds.
Reinforcement learning with verifiable rewards (RLVR) provides reliable supervision for software engineering agents through executable tests, but binary rewards cannot distinguish attempts with different debugging quality. Behavioral Self-Rewarding (BSR) reuses the current policy to compare observable behavior among trajectories from the same task with the same verifier outcome. It aggregates pairwise preferences into task-local scores and maps them to bounded auxiliary rewards that preserve the verifier-defined pass/fail ordering. This adds supervision from already-collected trajectories without new environment interactions or a separately trained reward model. Experiments on SWE-bench Verified and SWE-bench-Live Lite show consistent gains across the evaluated Qwen3-14B and Qwen3-32B configurations, with additional improvements on Terminal-Bench 2.1.
How BSR works
A reward-refinement layer for group-relative reinforcement learning.

Sample multiple agent trajectories for one repository issue. Execute tests, then group attempts by their pass or fail outcome.
The same policy model judges pairs within an outcome group using the task, reference patch, and a rubric focused on observable debugging behavior.
Fit task-local Bradley–Terry scores. A soft deadzone suppresses small differences; centering and bounding control the auxiliary reward.
Add the behavioral signal to the verifier reward and train. The main BSR setting refines only failures, keeping success at reward 1.
R = Rverifier + rbehavior
Behavior adds nuance; executable verification defines success. Choosing amplitudes with a₀ + a₁ < 1 preserves the pass/fail reward ordering.
Core method details
The judge adds contrast only where the executable verifier cannot.
Trajectories are compared only within the same task and verifier-outcome bucket. A good failure and a good success remain separate concepts.
The post-rollout judge sees compact action traces, the task, verifier outcome, and reference patch. The acting policy never sees the reference patch.
Pairwise judgments use slight, clear, or strong preference weights. Pair order is randomized to reduce positional artifacts.
Task-local Bradley–Terry scores are normalized, passed through a soft deadzone, centered, and bounded before they become rewards.
Experimental results
Trained on 4,578 filtered R2E-Gym tasks. Evaluated on SWE-bench Verified and SWE-bench-Live Lite.
+2.6pp
32.1% 34.7%
+2.34pp
11.33% 13.67%
BSR improves average accuracy and Pass@3 in every reported model and training-budget setting.
| Model | Steps | Method | SWE-bench Verified | SWE-bench-Live Lite | ||
|---|---|---|---|---|---|---|
| Avg. accuracy ± std. | Pass@3 | Avg. accuracy ± std. | Pass@3 | |||
| Qwen3-14B | 270 | Verifier-only RL | 31.0 ± 0.5 | 45.0 | 7.11 ± 0.19 | 13.33 |
| BSR ours | 33.2 ± 1.4 | 46.6 | 8.67 ± 0.88 | 15.33 | ||
| Qwen3-14B | 400 | Verifier-only RL | 32.1 ± 1.1 | 46.6 | 6.33 ± 0.34 | 11.33 |
| BSR ours | 34.7 ± 1.0 | 48.0 | 8.11 ± 1.02 | 13.67 | ||
| Qwen3-32B | 270 | Verifier-only RL | 34.4 ± 1.7 | 48.8 | 7.67 ± 0.88 | 12.33 |
| BSR ours | 35.5 ± 0.8 | 50.6 | 8.56 ± 0.51 | 13.67 | ||
SWE-bench Verified contains 500 tasks; SWE-bench-Live Lite contains 300. Evaluation uses temperature 1, a maximum of 50 agent steps, and three runs. Standard deviations are across runs; Pass@3 is the fraction of tasks solved by at least one of the three attempts. Values are from the reported checkpoints, rather than independently maximizing each metric. “pp” denotes percentage points.
Paper Table 8: 89 tasks with three independent evaluation trials. BSR improves both reported metrics in all three settings.
| Model | Steps | Method | Avg. accuracy | Pass@3 |
|---|---|---|---|---|
| Qwen3-14B | 270 | Verifier-only RL | 7.12 | 14.61 |
| BSR | 7.87 | 15.73 | ||
| Qwen3-14B | 400 | Verifier-only RL | 6.74 | 14.61 |
| BSR | 8.24 | 15.73 | ||
| Qwen3-32B | 270 | Verifier-only RL | 4.87 | 8.99 |
| BSR | 5.62 | 13.48 |
Training signal and SWE-bench Verified average accuracy throughout 270 training steps.




Behavior analysis
Across 1,500 Qwen3-14B evaluation trajectories per method on SWE-bench Verified, the aggregate pattern is consistent with stronger investigation, follow-through, and verification.
73.3%→74.8%
46.5%→49.4%
30.1%→31.1%
4.74→4.06
13.38→12.76
1,132 s→1,069 s
Ablations
Qwen3-14B on SWE-bench Verified. Select any study. The view advances every 3 seconds and pauses while you hover or interact with it.
Failure-only BSR performs best and avoids the extra judgment cost of comparing successful trajectories.
| Training group | Avg. | Pass@3 |
|---|---|---|
| Pass bucket only | 32.0 | 44.0 |
| Pass + fail buckets | 33.1 | 44.6 |
| Fail bucket only (BSR) | 33.2 | 46.6 |
Random auxiliary rewards use the same amplitude as BSR but discard behavioral rankings. They do not improve the baseline.
| Method | Avg. | Pass@3 |
|---|---|---|
| Verifier-only baseline | 31.0 | 45.0 |
| Random reward | 30.9 | 42.8 |
| BSR | 33.2 | 46.6 |
The deadzone alone raises average accuracy but lowers Pass@3. Combining it with softness improves both metrics over either simplified mapping.
| Reward mapping | Avg. | Pass@3 |
|---|---|---|
| No deadzone, no softness | 32.0 | 45.6 |
| Deadzone, no softness | 32.6 | 44.0 |
| Deadzone + softness (BSR) | 33.2 | 46.6 |
1 / 3 Advances every 3 seconds
@article{wu2026beyond,
title = {Beyond Binary Verifiable Rewards: Behavioral Self-Rewarding for SWE Agents},
author = {Wu, Yiran and Zhao, Andrew and Chang, Yurui and Wu, Qingyun and Feng, Xuan},
journal = {arXiv preprint arXiv:2610.12598},
year = {2026}
}