智能体
dev.to ·
@Prabhakar Chaudhary
RRSI:用正则化阻止Agent harness过拟合自身基准
过去一年AI开发的一个变化是harness工程的兴起——围绕冻结的语言模型设计提示、控制流、工具接口、记忆管理和反馈循环,而非改动模型本身。研究者正通过递归自我改进(RSI)自动化改进这些组件,但自动化RSI容易“作弊”:当Agent用同一评测集反复优化自身harness时,它学到的是钻评测集的空子,而非可复用的能力。Google Cloud AI Research的论文《RRSI: Regularized Recursive Self-Improvement of Agent Harnesses》将经典正则化思想引入harness自改进以应对该问题。
AI推荐理由 聚焦Agent harness工程与递归自我改进(RSI)中的评测集过拟合问题,并介绍Google Cloud AI Research的RRSI论文,将经典正则化思路用于harness自改进,属于Agent训练/评测方法层面的具体新信息。局限在于正文片段仅给出问题描述与论文标题,未提供方法细节、实验设置或量化结果,无法判断实际效果。
74
正文
RRSI: How Regularization Stops Agent Harnesses from Overfitting Their Own Benchmarks
One of the quieter but consequential shifts in AI development over the past year has been the rise of harness engineering — designing the scaffolding around a frozen language model rather than the model itself. Prompts, control flow, tool interfaces, memory management, and feedback loops increasingly determine whether an agent succeeds or fails in production. Researchers are now automating the improvement of those components through recursive self-improvement (RSI).
The problem is that automated RSI tends to cheat. Not intentionally — but when an agent iteratively refines its own harness using the same evaluation set it's being scored on, it learns to game that set rather than develop genuinely reusable capabilities. A new paper from Google Cloud AI Research, RRSI: Regularized Recursive Self-Improvement of Agent Harnesses, addresses this directly by applying classical regularization ideas to the harness evolution loop.
What Is a Harness, and Why Does It Matter?
Before getting into RRSI, it helps to be precise about what a "harness" is. In the context of LLM agents, the harness is everything that surrounds the frozen backbone model: the system prompt, the tool definitions, the memory retrieval logic, the context management strategy, the retry and error-handling code, and the control flow that decides when to call which tool.
As harness engineering has matured, it has become clear that agent reliability is largely a harness-level property. A capable model with a poorly designed harness will fail on tasks that a weaker model with a well-designed harness handles reliably.
Recursive self-improvement closes the loop: an agent evaluates its own harness, proposes edits, tests them, and keeps the changes that improve performance. In principle, this should compound over time. In practice, it runs into a familiar machine learning problem.
The Overfitting Problem in Recursive Self-Improvement
When an agent repeatedly proposes and evaluates harness edits against the same benchmark tasks, it starts to encode benchmark-specific patterns. It might add a prompt clause that happens to work well on the training examples but fails on anything outside that distribution. It might accumulate complexity — extra tool calls, longer prompts, redundant memory lookups — that improves scores on the evolution set while making the harness slower and less generalizable.
This is adaptive overfitting, structurally similar to the overfitting problem in supervised learning. The "model" being overfit is the harness itself; the "training data" is the evaluation benchmark.
RRSI treats this as a regularization problem and borrows the same toolkit machine learning uses to prevent overfitting: sparsity constraints, complexity penalties, and leakage detection.
How RRSI Works
The framework operates in two phases — proposal and selection — and applies regularization to both.
Regularized Proposal
The proposer generates candidate harness edits. Without constraints, it tends to bundle many changes together and revisit the same successful patterns repeatedly. RRSI introduces two constraints:
Annealed update sparsity. The proposer operates under a temporally annealed budget that limits how many edits can be bundled into a single candidate. Early in the evolution process, the budget is larger to allow exploration; it tightens over time to prevent noise-chasing as the harness matures. This is analogous to L0 regularization — penalizing the number of active parameters rather than their magnitude.
Evidence-aware credit assignment. The proposer tracks which mechanisms have been tried and whether they succeeded or failed. Successful mechanisms receive explicit credit; rejected ones are treated as negative evidence. When progress stalls, the system reserves budget to explore components that haven't been exercised yet, preventing the search from getting trapped in local optima.
Regularized Selection
Once candidates are proposed, the selector decides which ones to adopt. RRSI adds three filters:
Leakage screening. A critic examines each proposal for benchmark-specific logic — task names, dataset-specific patterns, or hardcoded responses that would only work on the evaluation set. Proposals that appear to be memorizing the benchmark are rejected.
Complexity-aware acceptance. Any increase in token cost must be justified by sufficient performance gains. This is a ridge-style (L2) penalty: small improvements that come with large computational overhead are rejected. The harness is kept lean.
Structural pruning. Components that show consistently zero or negative gains over a window of evaluations are removed. This Lasso-style (L1) pruning keeps the harness sparse and prevents the accumulation of dead weight.
What the Results Show
RRSI was evaluated across eight benchmarks covering coding, agentic workspace tasks, and engineering design. The results were tested with two different backbone models — Claude Opus 4.8 and Gemini 3.5 Flash — to verify that the gains weren't model-specific.
On the evolution split (the tasks used during harness development), RRSI achieved gains of up to 14.1 points over unregularized baselines. More importantly, on five out-of-distribution benchmarks — tasks the harness had never seen during evolution — it improved performance by up to 4.7 points. Unregularized RSI typically degrades on OOD benchmarks because the harness has overfit to the training distribution.
The regularized harnesses also required 30% fewer policy tokens than those produced by unregularized evolution — they generalized better and ran more efficiently. Complexity penalties and structural pruning removed the accumulated cruft that unregularized evolution tends to leave behind.
Why This Matters for Practitioners
If you're building systems that automatically improve their own agent harnesses — through automated prompt optimization, tool selection, or control flow refinement — you need to treat the evolution process as a learning problem with all the associated risks of overfitting.
RRSI provides a concrete framework for doing that. The regularization techniques it applies are adaptations of ideas standard in machine learning for decades. What's new is applying them to the harness evolution loop rather than to model weights.
The AI4AI-Bench paper released in August 2026 found that most agents default to superficial changes — batch sizes, checkpointing — rather than genuine algorithmic improvements, partly because surface-level changes are easier to score on the evaluation set. RRSI's leakage screening is a direct response: it detects when a proposed change is exploiting the evaluation rather than solving the underlying problem.
Limits and Open Questions
RRSI doesn't eliminate the need for careful benchmark design. If the evaluation set is too narrow or too easy to game structurally, regularization can only do so much. The framework also assumes the backbone model remains frozen — it optimizes the harness, not the model — so it can't compensate for fundamental capability gaps in the underlying LLM.
Like any regularization approach, it introduces hyperparameters: the annealing schedule, the complexity penalty weight, the pruning window. These need tuning, and the right values will depend on the task domain and backbone model.
Conclusion
RRSI is a useful contribution to the toolkit for building reliable agentic systems. By treating harness evolution as a regularized optimization problem rather than an unconstrained search, it produces harnesses that generalize to new tasks and run more efficiently — two properties that matter in production.
The deeper lesson is that the same failure modes affecting supervised learning — overfitting, complexity accumulation, benchmark gaming — appear in agent self-improvement too. Recognizing that and applying the same remedies is a sensible engineering response. The full paper is worth reading for the implementation details, particularly the leakage screening mechanism.