Source-linked AI summary
SWE-TRACE: Optimizing Long-Horizon SWE Agents Through Rubric Process Reward Models and Heuristic Test-Time Scaling
Hao Han, Jin Xie, Xuehao Ma, Weiquan Zhu, Ziyao Zhang, ZhiLiang Long, Hongkai Chen, Qingwen Ye
TL;DR
Long-horizon SWE agents face inefficient demonstration data, sparse delayed execution rewards, and costly test-time scaling. SWE-TRACE combines curated trajectory synthesis, rubric-guided reinforcement learning, and PRM-guided inference-time pruning. Its experiments report gains across agent quality and efficiency on both compact and larger models.
Problem
SWE agents face inefficient supervised trajectories, sparse delayed outcome rewards that complicate intermediate-step credit assignment, and costly test-time sampling of full trajectories.
Source: §1 · pp. 1–2Method
SWE-TRACE combines curated, cascaded shortest-path supervision, memory-augmented rubric-conditioned RL, and reuse of learned rubric signals to prune weak actions during inference.
Source: §1 · p. 2, §7 · p. 18Results
Across 4B and 30B-A3B models, curated SFT and shortest-path compression improve policy quality and token efficiency, rubric-conditioned RL improves long-horizon optimization, and heuristic-guided TTS improves the latency–performance trade-off; the 30B model reaches 71.2% under heuristic-guided TTS.
Source: §6.2 · p. 14, §6.6 · p. 17Takeaways & Limitations
The results support improving how open SWE agents are taught, rewarded, and guided throughout the lifecycle as a route to better practical efficiency.
Source: §6.6 · p. 17, §7 · p. 18
Abstract
from arXiv · showhide
Resolving real-world software engineering (SWE) issues with autonomous agents requires complex, long-horizon reasoning. Current pipelines are bottlenecked by unoptimized demonstration data, sparse execution rewards, and computationally prohibitive inference scaling, which collectively exacerbate token bloat, reward hacking, and policy degradation. We present SWE-TRACE (Trajectory Reduction and Agentic Criteria Evaluation), a unified framework optimizing the SWE agent lifecycle across data curation, reinforcement learning (RL), and test-time inference. First, we introduce an LLM multi-task cascading method, utilizing stepwise oracle verification to distill a 60K-instance Supervised Fine-Tuning (SFT) corpus strictly biased toward token-efficient, shortest-path trajectories. Second, to overcome the instability of sparse outcome rewards, we design a MemoryAugmented Agentic RL pipeline featuring a Rubric-Based Process Reward Model (PRM). An auxiliary Rubric-Agent provides dense, fine-grained heuristic feedback on intermediate steps, guiding the model through long-horizon tasks. Finally, we bridge training and inference by repurposing the PRM for heuristic-guided Test-Time Scaling (TTS). By dynamically evaluating and pruning action candidates at each step, SWE-TRACE achieves superior search efficiency without the latency overhead of standard parallel sampling. Extensive experiments on standard SWE benchmarks demonstrate that SWE-TRACE significantly advances the state-of-the-art, maximizing resolution rates while drastically reducing both token consumption and inference latency.
1 INTRODUCTION
SWE-TRACE addresses inefficient demonstrations, sparse delayed rewards, and costly test-time scaling by optimizing the SWE agent lifecycle around process efficiency. It combines curated, token-efficient supervision, rubric-guided reinforcement learning, and inference-time action pruning; experiments report improved SWE-bench Verified capability for 4B and 30B models.
1 INTRODUCTION
- SWE-agent development is challenged by redundant supervised traces, delayed outcome-only rewards, and costly sampling and reranking of full trajectories.These challenges span data curation, long-horizon credit assignment, and inference-time scaling.Source: §1 · pp. 1–2
- The integrated recipe substantially improves 4B and 30B models on SWE-bench Verified, narrowing the gap with much larger frontier systems.The authors frame process quality across the agent lifecycle, rather than model size or rollout count alone, as a path toward stronger SWE agents.Source: §1 · p. 2
- The data pipeline expands synthetic issue construction to 77 repositories and produces 60K high-quality training instances from 140K candidates.The corpus also includes distilled trajectories from frontier closed-source and strong open-source teachers.Source: §1 · p. 2
- LLM multi-task cascading uses stepwise oracle verification to select strong continuations, yielding shorter, higher-fidelity SFT trajectories.The method generates candidate actions at each step and selects the best continuation.Source: §1 · p. 2
- Memory-augmented agentic RL uses rubric-based process rewards to provide dense, interpretable, design-aware feedback beyond sparse execution rewards.The rubric signals guide long-horizon optimization with intermediate process feedback.Source: §1 · p. 2
- The trained PRM is reused for heuristic-guided test-time scaling that steers step-level action sampling and prunes weak branches early.This inference strategy aims to avoid spending computation on weak branches rather than only reranking completed trajectories.Source: §1 · p. 2
2 RELATED WORK
Related work covers repository-level benchmarks and agent frameworks, scalable training data, and reinforcement learning with learned verifiers. These strands provide the context for SWE-TRACE's focus on data, process feedback, and inference-time search.
2.1 SOFTWARE ENGINEERING BENCHMARKS AND AGENT FRAMEWORKS
- SWE-bench and its human-validated Verified subset evaluate real-world GitHub issue resolution, while agent frameworks support repository navigation, editing, and execution.SWE-agent and OpenHands exemplify tool-using interaction loops; Agentless shows that competitive performance can also come from structured localization–repair–validation pipelines.Source: §2.1 · pp. 2–3
2.2 SCALABLE DATA CONSTRUCTION AND EXECUTABLE TRAINING ENVIRONMENTS
- SWE-Gym, SWE-smith, and R2E-Gym advance executable training environments and synthetic task construction, making data scale and environment availability first-class research bottlenecks.The passage reports 2,438 tasks for SWE-Gym, 50K instances across 128 repositories for SWE-smith, and over 8K tasks for R2E-Gym.Source: §2.2 · p. 3
2.3 REINFORCEMENT LEARNING, REWARD MODELS, AND PROCESS SUPERVISION
- SWE-agent RL and learned-verifier research includes execution-environment post-training, test-time scaling, and verifier discrimination and calibration; process supervision provides step-level feedback for complex reasoning.The cited work spans CodeRL, DeepSWE, SWE-Master, and SWE-RM.Source: §2.3 · p. 3
3 TOKEN-EFFICIENT TRAJECTORY SYNTHESIS.
SWE-TRACE curates test-grounded repair instances and compresses successful teacher rollouts into shorter supervision. Its cascading procedure generates diverse actions and uses stepwise, progress-aware oracle selection to prune weak branches.
3.1 MASSIVE-SCALE SWE DATA CURATION AND HIGH-FIDELITY TRAJECTORY SYNTHESIS
- Repository screening retains Docker-buildable projects with runnable tests, while an agent-based onboarding pipeline prepares environments and validates test execution.Screening starts from more than 1,000 repositories and retains 77 for data construction.Source: §3.1 · pp. 3–4
- Test-aware synthesis ties bug injection to test-relevant functions, grounding the generated issue, failure, and target patch in shared executable test semantics.The paper says this improves synthesis success and issue-construction quality.Source: §3.1 · p. 4
- 140K candidate bug instances are filtered to 60K high-quality samples through environment, test, issue-consistency, difficulty, and stability checks.The samples are built across 77 selected repositories.Source: §3.1 · pp. 4–5
3.2 LLM MULTI-TASK CASCADING FOR TOKEN-EFFICIENT TRAJECTORY OPTIMIZATION
- Multi-task cascading elicits different operational intents at each step, unlike ordinary best-of-N decoding, and combines their candidate actions for selection.The modes include localization, inspection, editing, validation, and summarization.Source: §3.2 · p. 5
- Stepwise, progress-aware oracle selection prunes weak branches before they become costly trajectories and can reward localization or patch improvements before resolution.The oracle evaluates candidate actions using hidden construction metadata during generation.Source: §3.2 · pp. 5–6
- A second compression pass removes actions whose deletion preserves executability, reducing redundant inspection, validation, discarded edits, and verbose shell interaction.The resulting trajectories preserve debugging's causal structure while reducing token overhead.Source: §3.2 · p. 6
4 PROCESS-GUIDED AGENTIC REINFORCEMENT LEARNING
SWE-TRACE couples memory-augmented architecture with rubric-based process scoring and GRPO to address sparse execution feedback in long-horizon SWE tasks.
4.1 MEMORY-AUGMENTED LONG-HORIZON ARCHITECTURE
- Memory stores verbatim anchors with original step indices, preserving actions, tool outputs, and observations whose precise details may be lost through paraphrase.The authors cite filenames, stack traces, command outputs, and patch content as details sensitive to omission or rewriting.Source: §4.1 · pp. 7–8
- When history exceeds the context budget, a PRM-guided memory buffer retains critical steps alongside a recent interaction window, prioritizing steps tied to success or failure.If the memory exceeds its token budget, the highest-scoring entries are retained while preserving the latest local window.Source: §4.1 · pp. 7–8
4.2 WHY EXECUTION-ONLY REWARDS FAIL IN LONG-HORIZON SWE
- Execution-only rewards collapse successful and failed rollouts into two classes, overlooking efficiency and process quality while noisy or incomplete tests can destabilize policy learning.Terminal rewards also provide weak credit assignment when sampled trajectories all fail.Source: §4.2 · pp. 8–9
4.3.1 RUBRIC AGENT
- An auxiliary Rubric Agent generates issue-specific criteria covering target localization, edit constraints, trajectory discipline, and step-budget awareness.Criteria combine a natural-language rule, a structured target descriptor, and a weight.Source: §4.3.1 · p. 9
4.3.2 TRAJECTORY-LEVEL PROCESS SCORING
- Rather than scoring each generation step, the PRM scores completed trajectories against the rubric and distinguishes process quality among rollouts with the same execution outcome.It can rank failed rollouts by progress toward the fault region and successful ones by the discipline of their problem-solving process.Source: §4.3.2 · p. 9
4.4 RUBRIC-BASED PRM TRAINING
- PRM training first uses generated rubrics as SFT data, then fits a ranking model on execution-outcome and rubric-judged trajectory preference pairs.A frozen rubric-conditioned judge supplies pairwise labels; optional crucial-step indices support memory construction, not dense per-step RL rewards.Source: §4.4 · p. 10
4.5 GRPO WITH MARGIN-SEPARATED RUBRIC-CONDITIONED REWARDS
- GRPO combines terminal execution outcomes with rubric-conditioned trajectory scores, preserving passing-over-failing preference while ranking process quality within each outcome class.The formulation uses a fixed margin to separate passing and failing trajectories.Source: §4.5 · pp. 10–11
5 HEURISTIC-GUIDED TEST-TIME SCALING
SWE-TRACE repurposes its rubric-conditioned evaluator for step-level test-time guidance, pruning weak action branches before they incur extensive environment interaction.
5.1 REPURPOSING THE PRM AS AN INFERENCE-TIME GUIDE
- The trained rubric-conditioned evaluator scores a candidate action as an issue-specific estimate of how promising the resulting partial rollout is.The same rubric and evaluator support both training-time trajectory ranking and inference-time guidance, without an additional supervision object.Source: §5.1 · pp. 11–12
5.2 STEP-LEVEL HEURISTIC-GUIDED ACTION SAMPLING
- At each step, heuristic scores adjust action sampling and prune candidates; the strict low-latency setting retains and executes only the single most promising action.The guidance strength β controls concentration on rubric-favored actions, while retained width B can preserve some exploration when set above one.Source: §5.2 · p. 12
5.3 LATENCY–PERFORMANCE TRADE-OFF
- When guide evaluation is substantially cheaper than environment branching, step-level pruning offers a more favorable latency profile by discarding weak branches before tool calls and interactions accumulate.The approach concentrates search on early decisions and is presented as suitable for constrained-latency deployments that can still afford some inference-time scaling.Source: §5.3 · p. 13
6 EXPERIMENTS
The experiments evaluate SWE-TRACE’s training and inference pipeline on SWE-BENCH VERIFIED using Qwen3-4B and Qwen3-30B-A3B backbones.
6 EXPERIMENTS
- The evaluation targets long-horizon software engineering performance on SWE-BENCH VERIFIED, a human-validated benchmark subset of 500 repository-level issues.The study examines resolve rate alongside trajectory quality, token efficiency, and inference-time compute allocation.Source: §6 · p. 13
6.1 EXPERIMENTAL SETUP
- Resolve rate (Pass@1) is the primary metric, with fixed-rollout-budget resolve rates for test-time scaling and token, latency, and environment-execution measures for efficiency.Pass@1 is the percentage of issues whose patches pass the benchmark evaluation protocol.Source: §6.1 · p. 13
- Experiments use Qwen3-4B and Qwen3-30B-A3B, applying SFT, rubric-conditioned GRPO, and inference-time heuristic guidance under a shared scaffold and evaluation harness.Qwen3-30B-A3B has 30.5B total parameters and 3.3B activated parameters.Source: §6.1 · p. 13
6.2 MAIN RESULTS
On SWE-bench Verified, SWE-TRACE improves the performance of compact open SWE agents, with the 30B-A3B model reaching the top band of open-weight systems. Its results support the importance of data quality, process-guided RL, and guided inference alongside model scale.
6.2 MAIN RESULTS
- SWE-TRACE substantially improves over prior 4B-class open SWE agents, while its 30B-A3B model enters the top band of open-weight SWE-agent performance.The comparison is on SWE-bench Verified.Source: §6.2 · p. 13, Table 2 · p. 14
- 71.2% Pass@1 under heuristic-guided TTS slightly surpasses the strongest public open 32B-class TTS result in this comparison.SWE-TRACE’s 30B model reaches 63.5% Pass@1, exceeding SWE-MASTER-32B by +2.1 points and SWE-RM-ENHANCED by +1.5 points.Source: §6.2 · p. 14
- The results indicate that SWE-TRACE’s gains are not merely due to larger models or heavier inference budgets.The paper argues that supervision, rewards, and guidance matter at least as much as raw parameter count for long-horizon SWE agents.Source: §6.2 · p. 14
6.3 ABLATION STUDIES
The ablations report gains from cascaded shortest-path supervision, rubric-conditioned RL, and heuristic-guided TTS. Across the tested model scales, these methods improve resolution while also reducing token use or improving the latency–performance trade-off.
6.3.1 DATA ABLATION: STANDARD SFT VS. CASCADED SHORTEST-PATH SFT
- Cascaded SFT improves resolve rate at both scales while reducing interaction steps and generated tokens.On 4B, it yields +4.2 points, with steps down 10.8% and tokens down 21.5%; on 30B, it yields +2.8 points, with steps down 10.4% and tokens down 29.3%.Source: §6.3.1 · p. 14, Table 3 · p. 15
6.3.2 RL ABLATION: SPARSE EXECUTION RL VS. RUBRIC-PRM RL
- Rubric-conditioned RL improves final performance over sparse execution-only RL while reducing average token usage per issue on both models.The gains are +2.7 points on 4B and +2.4 points on 30B; training dynamics show higher, steadier final performance, especially on 30B, as token use falls rather than inflates.Source: §6.3.2 · p. 15, Figure 2 · p. 16, Figure 3 · p. 16
6.3.3 TTS ABLATION: GREEDY VS. PARALLEL ROLLOUT VS. HEURISTIC-GUIDED TTS
- Heuristic-guided TTS improves over greedy decoding and delivers a better latency–performance trade-off than parallel rollout.On 30B, it gains +7.7 points over greedy and +1.3 points over parallel rollout while using substantially less wall-clock latency and fewer environment executions; it dominates parallel rollout in low- and medium-budget regimes.Source: §6.3.3 · p. 15
6.4 ADDITIONAL EFFICIENCY ANALYSIS
The efficiency analysis examines SWE-TRACE across trajectory-difficulty buckets and test-time rollout budgets. Gains become more pronounced on longer-horizon instances, while heuristic-guided TTS is reported to dominate parallel rollout at low and medium budgets.
6.4 ADDITIONAL EFFICIENCY ANALYSIS
- SWE-TRACE’s gains are modest in the lowest-token bucket and grow in higher-token, longer-horizon buckets.The analysis compares baseline and SWE-TRACE variants by trajectory token budget.Source: §6.4 · p. 16
- Table 5 compares TTS methods under comparable rollout budgets and reports latency as average wall-clock minutes per issue.Source: Table 5 · p. 17
- Heuristic-guided TTS dominates parallel rollout in the low- and medium-budget regimes, with a clearer advantage on 30B than on 4B.Figure 4 plots resolve rate against latency over multiple inference budgets.Source: Figure 4 · p. 17
6.5 QUALITATIVE ANALYSIS
The django-16032 case study illustrates how the rubric-conditioned evaluator and memory mechanism affect a long-horizon rollout. The corrected rollout reaches a valid patch with less wasted exploration.
6.5 QUALITATIVE ANALYSIS
- The rubric-conditioned evaluator suppresses an unproductive branch before it expands into a long failed trajectory.Source: §6.5 · p. 17
- The memory mechanism preserves earlier evidence needed to recover as the rollout’s context grows.Source: §6.5 · p. 17
- The corrected rollout reaches a valid patch with fewer redundant evaluations and less wasted exploration.Source: §6.5 · p. 17
6.6 SUMMARY OF FINDINGS
SWE-TRACE combines efficient supervision, rubric-guided RL, and heuristic-guided test-time scaling, improving efficiency and long-horizon performance across compact and efficient open models. Its gains are especially pronounced in higher-token, longer-horizon tasks, with a case study illustrating how rubric guidance and memory can redirect a failing search.
6.6 SUMMARY OF FINDINGS
- SWE-TRACE improves token efficiency and long-horizon optimization while offering a better latency–performance trade-off than trajectory-level scaling across 4B and 30B-A3B models.The reported TTS advantage is strongest in the low- and medium-budget regime.Source: §6.6 · p. 17
- Curated SFT data and cascaded shortest-path compression improve policy quality and token efficiency.The cascade uses rubric-independent shortest-path compression as part of the broader findings summarized here.Source: §6.6 · p. 17
- Rubric-conditioned RL improves long-horizon optimization beyond sparse execution-only rewards through better trajectory-level discrimination.Source: §6.6 · p. 17
- The largest SWE-TRACE gains appear in higher-token, longer-horizon tasks, and a django-16032 case shows rubric guidance and memory redirecting search to a successful repair.In the case study, the baseline follows an incorrect localization branch and fails near the end of the horizon.Source: Figure 5 · p. 18, Figure 6 · p. 18
7 CONCLUSION
SWE-TRACE combines test-grounded data curation, shortest-path supervision, rubric-conditioned RL, and early action pruning at inference. Across its 4B and 30B models, it reports strong SWE-bench Verified performance alongside improved token efficiency and search control.
7 CONCLUSION
- SWE-TRACE combines test-grounded data curation, cascaded shortest-path supervision, rubric-conditioned trajectory evaluation, memory-augmented GRPO, and early pruning of weak inference-time actions.Source: §7 · p. 18
- Across SWE-TRACE-4B and SWE-TRACE-30B, the system achieves strong SWE-BENCH VERIFIED performance while improving token efficiency and search control.Source: §7 · p. 18
- The conclusion argues that open SWE-agent progress depends on improving how agents are taught, rewarded, and guided, not only on larger models or heavier search.Source: §7 · p. 18