TL;DR
SIA-W is a framework for self-improving agents that combines two powerful optimization levers: evolving the agent's external "scaffold" (its tools, prompts, and code) and fine-tuning the model's internal weights via test-time Reinforcement Learning (RL). By layering these techniques, the system achieves significant performance boosts on complex tasks in law, systems programming, and biology that neither method could reach alone.
What Problem Does This Paper Address?
Building effective LLM agents usually involves two separate paths: harness engineering (improving the prompts and tools surrounding the model) or policy training (changing the model's internal weights).
While prompt engineering and tool design can take an agent far without retraining, they eventually hit a plateau. Conversely, fine-tuning a model for every specific task is often computationally prohibitive or lacks the necessary feedback loop to be truly autonomous. The authors of SIA-W address this gap by asking: Can an agent autonomously improve both its external "brain" (the code it uses) and its internal "intuition" (its weights) in a single, unified loop?
Methods
SIA-W operates in a generational loop consisting of three specialized agents:
- Meta-Agent: Initializes the first "scaffold" (the Python program wrapping the LLM).
- Target Agent: The agent actually performing the task in a sandboxed environment.
- Feedback Agent: Analyzes the Target Agent's execution logs (trajectories) to identify failures and write an improved version of the scaffold for the next generation.
The framework uses a two-phase approach:
- Phase 1 (Harness Improvement): For the first five generations, the Feedback Agent iterates only on the scaffold—refining prompts, fixing parsing logic, and adjusting search strategies—while the model weights remain fixed.
- Phase 2 (Weight Updates): Once the scaffold improvements plateau, the harness is frozen. The system then uses test-time RL to update the model weights (using LoRA adapters).
The RL phase employs an entropic-utility objective. This includes an adaptive temperature ($\beta$) that automatically balances between "expected-reward maximization" (standard RL) and "best-of-N selection" (focusing only on the very best outcomes). This ensures the model learns from high-quality successes without becoming unstable.
Datasets
The authors evaluated SIA-W on three diverse, high-stakes domains:
- LawBench: A criminal charge classification task involving 191 possible categories in Chinese law.
- GPU-Mode TriMul: A systems engineering task where the agent must write and optimize low-level Triton kernels for GPU hardware (specifically H100s).
- Single-cell RNA Denoising: A biology task where the agent tunes parameters for a statistical tool used to clean up noisy biological measurement data.
Key Insights and Ideas
- Internalization vs. Externalization: The paper argues that harness improvements capture "external" fixes (like better tool selection), while weight updates capture "internalized" structure (like domain-specific logic and subtle patterns) that a fixed model simply cannot reach by editing its prompts alone.
- The "Aha" Moment in Biology: In the denoising task, the weight-updated model independently "discovered" that its outputs needed to be rounded to whole integers. This requirement was never mentioned in the prompts or the scaffold code; the model learned it purely through the RL feedback loop.
- Generalization over Memorization: In the GPU optimization task, the model didn't just memorize one fast kernel. The training dynamics showed it exploring the design space, briefly over-exploiting a peak, and then recovering with a broader, more robust understanding of kernel design.
- Sequential Synergy: The results show a clear "second wind." After the performance of the evolved scaffold flatlined, the weight updates provided a significant new lift, proving the two methods are complementary.
Key Results
Combining both levers delivered substantial gains over scaffold iteration alone:
- LawBench: Accuracy jumped by 16 percentage points during the weight-update phase, reaching a final accuracy of 87%.
- GPU Kernels: The agent achieved a 19% reduction in runtime, effectively doubling the reward score compared to the best Phase 1 scaffold.
- Biology Denoising: Performance improved by 19% (measured by MSE-norm) once weight updates were introduced.
- Compute Efficiency: The authors provide a "Return-on-Compute" analysis, showing that while RL is more expensive than prompt editing, the performance gains (especially in systems and biology) justify the cost.
Limitations and Future Work
The authors identify two main "drifts" that can break the autonomous loop:
- Format Drift: The model might start emitting tool calls in a format the scaffold's parser no longer understands.
- Interface Drift: A regenerated agent might accidentally change its own command-line interface, causing it to crash when the orchestrator tries to run it.
Future Directions: * Interleaved Updates: Instead of doing Phase 1 then Phase 2, the authors suggest alternating between scaffold edits and weight updates so the code and the model can co-evolve. * Synchronized Feedback: Updating the Feedback Agent itself with the new weights so it can better reason about the improved Target Agent's capabilities. * Action-Space Mutation: Allowing the Feedback Agent to introduce entirely new tools (like a new file reader or grader) rather than just editing existing logic.
Summary updated