Google Cloud AI Research, with UNC-Chapel Hill, Stanford and Washington University in St. Louis, has released RRSI (Regularized Recursive Self-Improvement). It lets an LLM agent rewrite its own harness: prompts, tools, memory, control flow and sub-agents. Model weights never change. RRSI constrains the improvement loop itself, so gains hold on benchmarks the agent never optimized against.
Deployable? Yes, as a research framework. The code is Apache 2.0, needs Python 3.10+, and accepts any LiteLLM model string. Defaults assume Claude Opus 4.8 on Vertex AI.
Why Self-Improving Harnesses Overfit
Harness evolution loops propose edits, score them on a fixed evolve set and keep the winner. The same tasks are reused every round, so the loop can memorize them. The RRSI research names 3 failure modes: benchmark-specific fitting, noise chasing and complexity accumulation. Each one widens the gap between evolve-set scores and real transfer.
How RRSI Works
RRSI keeps every harness component editable. It regularizes how the search moves instead.
Proposal side
- Annealed edit budget: a cosine schedule lets early rounds bundle several edits. Late rounds allow a single attributable change.
- Evidence-aware credit: each candidate is logged with its component, hypothesis, diff, score change and cost change. The proposer reads this ledger, so falsified ideas are not retried.
- Structured exploration: when progress stalls inside the noise band, budget shifts to components the run never touched.
Selection side
- Leakage critic: rejects task names, entities, answers or benchmark-specific logic before any scoring.
- Noise-adjusted floor: gains must clear the variance measured on the unchanged base harness.
- Cost rule: extra inference tokens must be paid for by measured gain.
- Pruning: components that stop producing gains become deletion targets.
The research team frame these as analogies to classic regularizers. The edit budget maps to L0, pruning to Lasso (L1) and the cost rule to Ridge (L2).
Results Across 8 Benchmarks
- Terminal-Bench 2.1 (evolve split): 74.2% to 80.2%.
- SWE-bench Verified (never used for selection): 82.0% to 83.8%.
- Out of distribution: JobBench +4.7, GDPval +3.5 and APEX-Agents +3.7 points.
- EngDesign (evolve) +4.9; Frontier-Eng +4.3 Medal points.
- Harvey LAB: +1.1 on the evolve split, +2.3 on its held-out split.
All 6 held-out splits improved. With Gemini 3.5 Flash as the policy, Terminal-Bench 2.1 rose from 64.6 to 78.7. SWE-bench Verified rose from 76.8 to 79.0.
The harness is also lighter. On the agentic workspace instance, RRSI uses 2.42M policy tokens per trial. Unregularized evolution uses 3.80M. The abstract reports this as 30% fewer; the project page says 36%.
RRSI vs Closest Competitors
Scores come from Table 1 of the RRSI research paper. All methods share the same starting harness, policy, evolve split and candidate budget.
| Feature | RRSI | Meta-Harness | AHE | TTHE | HarnessX |
|---|---|---|---|---|---|
| Core idea | Regularized proposal and selection | Agentic proposer over code, scores and traces of all prior candidates | Observability-driven loop; edits paired with verified predictions | Evolves harness during test time, no gold labels | Modular typed primitives, trace-driven adaptation |
| Model weights | Frozen | Frozen | Frozen | Frozen | Frozen |
| Cost rule and pruning | Yes | No* | No* | No* | No* |
| Harvey LAB evolve score | 90.5 | 93.0 | 90.7 | 91.1 | 91.8 |
| OOD average (H0 = 39.7) | 43.6 | 40.6 | 39.2 | 38.0 | 39.7 |
*Per the RRSI research team. OOD average is the mean of JobBench, GDPval and APEX-Agents, computed from Table 1.
Meta-Harness leads on the Harvey LAB evolve split. RRSI has the smallest evolve gain but the only OOD average more than 1 point above H0.
Interactive Explainer
#mtp-rrsi-x{–bg:#111318;–card:#1a1d24;–line:#2a2f3a;–txt:#e8eaed;–mut:#9aa0a6;–blue:#4285F4;–red:#EA4335;–yel:#FBBC05;–grn:#34A853;background:var(–bg)!important;color:var(–txt)!important;font-family:Roboto,”Segoe UI”,Helvetica,Arial,sans-serif!important;border:1px solid var(–line)!important;border-radius:14px!important;padding:22px!important;max-width:880px;margin:0 auto;box-sizing:border-box;line-height:1.5}
#mtp-rrsi-x *{box-sizing:border-box}
#mtp-rrsi-x hr,#mtp-rrsi-x p:empty,#mtp-rrsi-x del,#mtp-rrsi-x s{display:none!important}
#mtp-rrsi-x .hd{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
#mtp-rrsi-x .dots span{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:4px}
#mtp-rrsi-x h3{margin:0!important;font-size:20px!important;color:var(–txt)!important;font-weight:700}
#mtp-rrsi-x .sub{color:var(–mut)!important;font-size:13.5px;margin:6px 0 16px}
#mtp-rrsi-x .tabs{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:16px}
#mtp-rrsi-x .tab{background:var(–card)!important;color:var(–mut)!important;border:1px solid var(–line)!important;border-radius:999px;padding:7px 14px;font-size:13px;cursor:pointer;font-weight:600;transition:all .25s}
#mtp-rrsi-x .tab.on{background:var(–blue)!important;color:#fff!important;border-color:var(–blue)!important}
#mtp-rrsi-x .pane{display:none;animation:rrFade .35s ease}
#mtp-rrsi-x .pane.on{display:block}
@keyframes rrFade{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
#mtp-rrsi-x .card{background:var(–card)!important;border:1px solid var(–line)!important;border-radius:12px;padding:16px}
#mtp-rrsi-x .btn{background:transparent!important;color:var(–txt)!important;border:1px solid var(–line)!important;border-radius:8px;padding:7px 11px;font-size:12.5px;cursor:pointer;transition:all .2s}
#mtp-rrsi-x .btn:hover{border-color:var(–blue)!important}
#mtp-rrsi-x .btn.on{border-color:var(–yel)!important;color:var(–yel)!important}
#mtp-rrsi-x .btn.go{background:var(–blue)!important;border-color:var(–blue)!important;color:#fff!important;font-weight:700}
#mtp-rrsi-x .row{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}
#mtp-rrsi-x .pipe{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;position:relative;margin:14px 0 10px}
#mtp-rrsi-x .node{background:#14171d!important;border:1.5px solid var(–line)!important;border-radius:10px;padding:10px 8px;text-align:center;min-height:92px;transition:all .35s;position:relative}
#mtp-rrsi-x .node b{display:block;font-size:13px;color:var(–txt)!important}
#mtp-rrsi-x .node small{display:block;font-size:11px;color:var(–mut)!important;margin-top:3px}
#mtp-rrsi-x .node .st{display:block;font-size:18px;margin-top:4px;height:22px}
#mtp-rrsi-x .node.act{border-color:var(–blue)!important;box-shadow:0 0 0 3px rgba(66,133,244,.25);animation:rrPulse .8s ease infinite}
#mtp-rrsi-x .node.ok{border-color:var(–grn)!important}
#mtp-rrsi-x .node.no{border-color:var(–red)!important;box-shadow:0 0 0 3px rgba(234,67,53,.2)}
#mtp-rrsi-x .node.skip{opacity:.35}
@keyframes rrPulse{50%{box-shadow:0 0 0 7px rgba(66,133,244,.08)}}
#mtp-rrsi-x .prog{height:6px;background:#22262f!important;border-radius:6px;overflow:hidden}
#mtp-rrsi-x .prog i{display:block;height:100%;width:0;background:linear-gradient(90deg,var(–blue),var(–grn));transition:width .6s ease}
#mtp-rrsi-x .ledger{margin-top:12px;font-family:ui-monospace,Menlo,Consolas,monospace!important;font-size:12px;color:var(–mut)!important;background:#0d0f13!important;border:1px solid var(–line)!important;border-radius:8px;padding:10px;max-height:150px;overflow:auto}
#mtp-rrsi-x .ledger div{padding:2px 0;animation:rrFade .3s}
#mtp-rrsi-x .msg{margin-top:12px;font-size:14px;min-height:44px}
#mtp-rrsi-x .ctl{display:grid;grid-template-columns:1fr 1fr;gap:12px 18px;margin-bottom:14px}
#mtp-rrsi-x label{font-size:12.5px;color:var(–mut)!important;display:block}
#mtp-rrsi-x label em{font-style:normal;color:var(–yel)!important;font-weight:700;float:right}
#mtp-rrsi-x input[type=range]{width:100%;accent-color:#4285F4}
#mtp-rrsi-x .bars{display:flex;align-items:flex-end;gap:4px;height:170px;border-bottom:1px solid var(–line);padding-top:10px}
#mtp-rrsi-x .bars div{flex:1;background:var(–blue)!important;border-radius:4px 4px 0 0;position:relative;transition:height .5s cubic-bezier(.2,.8,.2,1),background .3s;min-width:6px}
#mtp-rrsi-x .bars div span{position:absolute;top:-17px;left:0;right:0;text-align:center;font-size:10.5px;color:var(–txt)!important}
#mtp-rrsi-x .xl{display:flex;justify-content:space-between;font-size:11px;color:var(–mut)!important;margin-top:4px}
#mtp-rrsi-x .formula{font-family:ui-monospace,Menlo,Consolas,monospace!important;font-size:12.5px;background:#0d0f13!important;color:#c8e6c9!important;padding:8px 10px;border-radius:8px;border:1px solid var(–line)!important;overflow-x:auto;white-space:nowrap}
#mtp-rrsi-x .checks{display:grid;gap:8px;margin-top:10px}
#mtp-rrsi-x .chk{display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:9px;border:1px solid var(–line)!important;background:#14171d!important;font-size:13px;transition:all .3s}
#mtp-rrsi-x .chk .ic{width:22px;height:22px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:13px;flex:none;color:#111!important}
#mtp-rrsi-x .verdict{margin-top:12px;padding:12px;border-radius:10px;text-align:center;font-weight:800;font-size:16px;transition:all .35s}
#mtp-rrsi-x .hb{margin:7px 0}
#mtp-rrsi-x .hb .lb{font-size:12px;color:var(–mut)!important;display:flex;justify-content:space-between}
#mtp-rrsi-x .hb .tr{height:12px;background:#22262f!important;border-radius:6px;position:relative;overflow:hidden;margin-top:3px}
#mtp-rrsi-x .hb .tr i{position:absolute;left:0;top:0;bottom:0;border-radius:6px;width:0;transition:width .7s cubic-bezier(.2,.8,.2,1)}
#mtp-rrsi-x .tag{display:inline-block;font-size:10.5px;padding:1px 7px;border-radius:999px;margin-left:6px;border:1px solid var(–line)!important;color:var(–mut)!important}
#mtp-rrsi-x .note{font-size:11.5px;color:var(–mut)!important;margin-top:10px}
#mtp-rrsi-x .ft{margin-top:16px;padding-top:12px;border-top:1px solid var(–line);display:flex;justify-content:space-between;flex-wrap:wrap;gap:6px;font-size:11.5px;color:var(–mut)!important}
#mtp-rrsi-x .ft a{color:var(–blue)!important;text-decoration:none}
#mtp-rrsi-x .ft .mtp{color:#76B900!important;font-weight:700}
@media(max-width:640px){#mtp-rrsi-x{padding:14px!important}#mtp-rrsi-x .pipe{grid-template-columns:1fr 1fr}#mtp-rrsi-x .pipe .node:last-child{grid-column:span 2}#mtp-rrsi-x .ctl{grid-template-columns:1fr}#mtp-rrsi-x h3{font-size:17px!important}#mtp-rrsi-x .bars{height:130px}}
How RRSI Regularizes Agent Self-Improvement
(function(){
var R=document.getElementById(‘mtp-rrsi-x’);
function $(s){return R.querySelector(s)}function $$(s){return R.querySelectorAll(s)}
function resize(){try{window.parent.postMessage({mtpRrsiH:R.offsetHeight+40},’*’)}catch(e){}}
$$(‘.tab’).forEach(function(b){b.onclick=function(){$$(‘.tab’).forEach(function(x){x.classList.remove(‘on’)});b.classList.add(‘on’);$$(‘.pane’).forEach(function(p){p.classList.toggle(‘on’,p.getAttribute(‘data-p’)===b.getAttribute(‘data-t’))});if(b.getAttribute(‘data-t’)===’3′)chart(view);setTimeout(resize,60)}});
/* PANE 1 */
var C=[
{n:’tools/read_file: add retry on transient error’,stop:5,ds:’+2.3′,dc:’+6%’,m:’Accepted. A generic mechanism clears the noise floor and pays for its extra tokens, so it becomes the new incumbent and is logged with credit.’,v:’ACCEPT’},
{n:’prompt: if task == “” do X’,stop:1,ds:’n/a’,dc:’n/a’,m:’Blocked before scoring. The critic rejects task names, entities, answers or benchmark-specific logic, so the leak never earns an inflated score.’,v:’REJECT (leakage)’},
{n:’prompt: reword planning instructions’,stop:3,ds:’+0.4′,dc:’+2%’,m:’Not accepted as a gain. The improvement sits inside the noise band measured on the unchanged base harness, so it cannot be credited as real progress.’,v:’REJECT (within noise)’},
{n:’subagent: double-check every step’,stop:3,ds:’+1.9′,dc:’+85%’,m:’Rejected by the cost rule. The score went up, but the extra policy tokens are far larger than the measured gain can justify.’,v:’REJECT (cost rule)’},
{n:’memory: notes file unused for many rounds’,stop:5,prune:1,ds:’+0.0′,dc:’-9%’,m:’Flagged by pruning. The component stopped producing a positive measured gain over the pruning window, so it is handed to the proposer as a deletion target.’,v:’PRUNE’}
],cur=0,busy=0;
$$(‘#rr-cands .btn[data-c]’).forEach(function(b){b.onclick=function(){if(busy)return;$$(‘#rr-cands .btn[data-c]’).forEach(function(x){x.classList.remove(‘on’)});b.classList.add(‘on’);cur=+b.getAttribute(‘data-c’)}});
$(‘#rr-run’).onclick=function(){
if(busy)return;busy=1;var c=C[cur],nodes=$$(‘#rr-pipe .node’),i=0;
nodes.forEach(function(n){n.className=’node’;n.querySelector(‘.st’).textContent=”});
$(‘#rr-prog’).style.width=’0′;$(‘#rr-msg’).textContent=’Running round…’;
function step(){
if(i>0){var p=nodes[i-1];p.classList.remove(‘act’);}
if(i>=nodes.length||i>c.stop){finish();return}
var n=nodes[i];n.classList.add(‘act’);$(‘#rr-prog’).style.width=((i+1)/nodes.length*100)+’%’;
setTimeout(function(){
n.classList.remove(‘act’);
var fail=(i===c.stop&&c.stop<4);
if(fail){n.classList.add('no');n.querySelector('.st').textContent='u2715';for(var k=i+1;k<nodes.length;k++)nodes[k].classList.add('skip');finish();return}
n.classList.add('ok');n.querySelector('.st').textContent=(i===4&&c.prune)?'u2702':'u2713';
if(i===4&&c.prune){n.classList.remove('ok');n.style.borderColor='#FBBC05'}
i++;step()},650)}
function finish(){busy=0;$('#rr-msg').innerHTML='‘+c.v+’ · ‘+c.m;
var d=document.createElement(‘div’);d.textContent=c.n+’ | ‘+c.ds+’ | ‘+c.dc+’ | ‘+c.v;$(‘#rr-ledger’).appendChild(d);$(‘#rr-ledger’).scrollTop=9999;resize()}
step()};
/* PANE 2 */
function budget(){var bx=+$(‘#s-bmax’).value,bn=+$(‘#s-bmin’).value,T=+$(‘#s-T’).value;if(bn>bx){bn=bx;$(‘#s-bmin’).value=bn}
$(‘#v-bmax’).textContent=bx;$(‘#v-bmin’).textContent=bn;$(‘#v-T’).textContent=T;
var h=”,vals=[];for(var t=0;t=bx?’#EA4335′:’#4285F4′;h+=’
‘});
var B=$(‘#rr-bars’);B.innerHTML=h;setTimeout(function(){B.querySelectorAll(‘div’).forEach(function(d){d.style.height=d.getAttribute(‘data-h’)+’%’})},30)}
[‘#s-bmax’,’#s-bmin’,’#s-T’].forEach(function(s){$(s).oninput=budget});budget();
/* PANE 3 */
function setChk(id,st){var e=$(id),ic=e.querySelector(‘.ic’);var col=st===1?’#34A853′:st===0?’#EA4335′:’#5f6368′;ic.style.background=col;ic.textContent=st===1?’u2713′:st===0?’u2715′:’-‘;e.style.borderColor=col}
function gate(){var ds=+$(‘#s-ds’).value,dc=+$(‘#s-dc’).value,d=+$(‘#s-d’).value,b1=+$(‘#s-b1’).value,b0=5;
$(‘#v-ds’).textContent=ds.toFixed(1);$(‘#v-dc’).textContent=dc;$(‘#v-d’).textContent=d.toFixed(1);$(‘#v-b1’).textContent=b1;
var allow=b0+b1*ds;$(‘#c3t’).innerHTML=’Cost rule: ΔC ≤ β0 + β1ΔS = ‘+allow.toFixed(1)+’%’;
var f=ds>=-d,clear=ds>d,cost=dc<=allow,V=$('#rr-verdict'),txt,col;
setChk('#c1',f?1:0);
if(!f){setChk('#c2',-1);setChk('#c3',-1);txt='REJECT: fell below the noise-adjusted floor';col='#EA4335'}
else if(!clear){setChk('#c2',0);setChk('#c3',-1);txt='WITHIN NOISE: not credited as a clear gain';col='#FBBC05'}
else{setChk('#c2',1);setChk('#c3',cost?1:0);txt=cost?'ACCEPT: real gain that pays for its tokens':'REJECT: gain does not pay for extra tokens';col=cost?'#34A853':'#EA4335'}
V.textContent=txt;V.style.background=col+'22';V.style.color=col;V.style.border='1px solid '+col}
['#s-ds','#s-dc','#s-d','#s-b1'].forEach(function(s){$(s).oninput=gate});gate();
/* PANE 4 */
var D=[
{t:'H0 vs RRSI, frozen Claude Opus 4.8 (evolve split marked)',max:100,u:'',rows:[
['Terminal-Bench 2.1','evolve',74.2,80.2],['SWE-bench Verified','OOD',82.0,83.8],['Harvey LAB','evolve',89.4,90.5],['Harvey LAB held-out','ID held-out',86.9,89.2],['JobBench','OOD',36.0,40.7],['GDPval','OOD',48.8,52.3],['APEX-Agents','OOD',34.2,37.9],['EngDesign','evolve',50.0,54.9],['Frontier-Eng','OOD',17.7,22.0]],
n:'Grey bar = unevolved harness H0, blue bar = RRSI. Frontier-Eng is Medal points; GDPval is win rate vs human experts; Harvey LAB is rubric criteria passed.'},
{t:'Out-of-distribution average (JobBench, GDPval, APEX-Agents)',max:50,u:'',single:1,rows:[['H0 (no evolution)','',39.7],['Meta-Harness','',40.6],['AHE','',39.2],['TTHE','',38.0],['HarnessX','',39.7],['RRSI','',43.6]],
n:'Averages computed from Table 1 of the RRSI paper. All methods start from the same H0, policy, evolve split and candidate budget.'},
{t:'Policy tokens per trial (millions), agentic workspace',max:4,u:'M',single:1,rows:[['H0 (no evolution)','OOD 39.7',1.56],['Unregularized evolution','OOD 40.3',3.80],['w/o acceptance regularizers','OOD 41.0',3.59],['w/o proposal regularizers','OOD 41.9',2.69],['RRSI','OOD 43.6',2.42]],
n:'From the ablation table: RRSI uses 2.42M tokens per trial vs 3.80M for unregularized evolution, about 36% fewer, with the best OOD average.'}],view=0;
function chart(v){var d=D[v],h='
‘;
d.rows.forEach(function(r){var isR=r[0]===’RRSI’;
if(d.single){h+=’
‘}
else{h+=’
‘}});
$(‘#rr-chart’).innerHTML=h;$(‘#rr-cnote’).textContent=d.n;
setTimeout(function(){$$(‘#rr-chart i’).forEach(function(i){i.style.width=i.getAttribute(‘data-w’)+’%’});resize()},40)}
$$(‘#rr-views .btn’).forEach(function(b){b.onclick=function(){$$(‘#rr-views .btn’).forEach(function(x){x.classList.remove(‘on’)});b.classList.add(‘on’);view=+b.getAttribute(‘data-v’);chart(view)}});
chart(0);
window.addEventListener(‘load’,resize);window.addEventListener(‘resize’,resize);setTimeout(resize,300);
})();
Getting Started
git clone https://github.com/google-research/rrsi.git && cd rrsi
pip install -e ".[dev]"
python3 rrsi.py --domain coding baseline
python3 rrsi.py --domain coding run
Each round drafts 2 candidates in separate git worktrees, screens them, evaluates both and fast-forwards the branch to the winner. The coding instance also needs Docker and harbor. New domains plug in through a single adapter module.
Key Takeaways
- RRSI evolves prompts, tools, memory and workflows while model weights stay frozen.
- A leakage critic, noise floor, cost rule and pruning decide which edits stick.
- Terminal-Bench 2.1 rose from 74.2% to 80.2% with Claude Opus 4.8.
- SWE-bench Verified, never used for selection, rose from 82.0% to 83.8%.
- Apache 2.0 code on GitHub; research-grade, not an official Google product.
Check out the Paper, Codes and Technical details. All credit goes to the researcher of this project. Also, feel free to follow us on Twitter and don’t forget to join our 150k+ML SubReddit and Subscribe to our Newsletter. Wait! are you on telegram? now you can join us on telegram as well.
Need to partner with us for promoting your GitHub Repo OR Hugging Face Page OR Product Release OR Webinar etc.? Connect with us
The post Google Research Open-Sources RRSI: AI Agents That Improve Their Own Harness Without Overfitting appeared first on MarkTechPost.
This article was originally published on MarkTechPost (AI research simplified). Click below to read the complete article.