Replace Docker environments with learned LLM surrogates comprising a lightweight sandbox for deterministic file operations, a transition model predicting execution feedback, and a reward model acting as virtual test runner. Reduces training infrastructure costs while scaling SWE agent training data.
Replace Docker environments with learned LLM surrogates comprising a lightweight sandbox for deterministic file operations, a transition model predicting execution feedback, and a reward model acting as virtual test runner. Reduces training infrastructure costs while scaling SWE agent training data.
SWE-World: LLM-Based Surrogate Training Environments
Training software engineering agents typically requires expensive infrastructure to run code in isolated Docker containers. SWE-World replaces this with learned surrogates that simulate execution feedback, dramatically reducing infrastructure overhead while enabling larger-scale training data.
The key insight is that execution can be decomposed: deterministic file operations (navigation, editing) can be handled directly, while non-deterministic execution effects (stdout, exit codes, test results) are predicted by lightweight models. This hybrid approach maintains fidelity while eliminating Docker overhead.
Core Concept
SWE-World comprises three components working in tandem:
Lightweight Sandbox: Handles all deterministic state transitions (file system operations) directly without invoking external processes
Transition Model (SWT): Predicts step-level execution output—stdout, stderr, exit codes—based on file state and command
Reward Model (SWR): Acts as a virtual test runner, generating test reports and binary success signals
This design preserves task semantics while replacing expensive runtime dependencies with efficient learned components.
Architecture Overview
Deterministic Sandbox: Fast, stateless file operation handling (read, write, delete, navigate) with in-memory state
SWT (Transition Model): Small LLM fine-tuned to predict execution trace outputs given command and file context
SWR (Reward Model): Outputs test success/failure signals, trained on real test execution traces
Training Loop: Agents generate sequences of commands; sandbox updates file state; models predict execution effects
Data Scaling: Larger training sets possible since models are faster than real Docker execution
Implementation
Step 1: Build the Deterministic Sandbox
Create a lightweight virtual file system that tracks state without external process invocation.
Key results: Qwen2.5-Coder improved from 6.2% to 52.0% resolve rate via Docker-free SFT, reaching 68.2% with test-time scaling. Public code released; training scaled from thousands to 16.6K task instances.