Token LabSearch

RSI / RESEARCH / ENGINEERING

Recursive self-improvement: mechanisms, evidence and the engineering of trustworthy loops

A systematic RSI review: self-training, memory, code evolution, meta-improvement, frontier papers, protected architecture and reproducible local practice.

Sources & version details

You will learn to identify the editable component, explain how feedback becomes a persistent change, trace an auditable architecture, distinguish empirical gains from selection effects, and design a bounded improvement study. Prerequisites are explained before the mechanisms.

In this article

1. What changes when an AI improves itself?

Consider a coding assistant that repeatedly forgets to inspect a repository before editing it. Asking it to reconsider one answer may repair one patch. Saving a repository-inspection checklist may improve future sessions. Training on successful repairs may alter model weights. Rewriting the agent’s search policy may change how it discovers future improvements. These are different interventions, with different persistence, costs and evidence requirements.

Recursive self-improvement (RSI) is a process in which an AI system contributes to changes to itself, and an improved version participates in subsequent improvement cycles. In a stronger, operational sense, the improvement mechanism itself becomes an object of improvement: a better system should discover useful changes more effectively, not merely solve one task better. This review separates that stronger claim from ordinary iteration. There is no universally agreed threshold that turns every self-modifying program into general RSI.

Represent the deployed system as weights θ, executable code c, prompts p, memory m and tools T. Its improvement procedure I and evaluator E are additional components. State which components can change, who changes them, what persists and who judges success. An assistant editing a file is not necessarily changing its weights; an updated weight checkpoint is not necessarily improving its training algorithm. An intelligence explosion is a further hypothesis about sustained accelerating gains, not a synonym for any of these mechanisms.

Follow one change across two generations

Suppose version A searches a repository by filename, while its proposed version B adds symbol lookup. If B merely solves the current bug, the evidence supports a better task solution. If B is saved and repairs later bugs, the evidence supports a reusable agent improvement. If B then uses symbol lookup to find defects in its own improvement code and proposes C, the recorded process is recursive. A further comparison is still needed to show that B produces better descendants than A with equal resources. These claims have increasing evidential requirements; none follows just from a program containing a self-edit command.

Specify the system boundary before counting generations. A frozen foundation model plus changing tools can form a changing AI system, even though the model itself is unchanged. Conversely, a human replacing the foundation model between rounds is an external intervention that must be reported. Record human edits, model substitutions and evaluator changes separately so that the lineage does not attribute their gains to autonomous improvement.

2. The foundations: learning, feedback and inheritance

Optimization chooses a change that improves an objective. Generalization asks whether that improvement survives on cases not used to select the change. These are separate questions: a search process can optimize a misleading objective extremely well. A gradient is a local sensitivity of a differentiable loss to parameters; an agent that edits Python is usually searching discrete programs instead. Neither procedure guarantees better behavior outside its objective and data.

Feedback supplies information about consequences. A compiler error locates a concrete failure; a unit-test pass only covers its assertions; a preference judgment measures a rater’s preferences. A sentence saying “I reflected carefully” is not independent feedback. Inheritance means that an artifact—weights, memory, code or an algorithm—actually enters the next generation. Without inheritance, repeated successful attempts are repeated inference, not accumulating system changes.

Version control is therefore conceptual infrastructure, not clerical work. A parent hash, candidate diff, dataset snapshot and evaluator version make “what improved?” answerable. Our running example is a repository-repair agent whose editable search policy chooses which files and tools to inspect. The model, permissions and external acceptance rules remain fixed, so a gain can be attributed to a bounded mechanism rather than an unspecified upgrade.

Why a good signal can still teach the wrong lesson

A test that checks only whether a function returns a sorted list leaves out whether it preserves the input elements. A candidate returning an empty list can satisfy a careless sortedness check. The observed reward is real, but the specification is incomplete. Adding a permutation check supplies missing information; asking the candidate to think harder about the same incomplete test does not. This is why task understanding, specification and feedback quality belong before optimization in the knowledge chain.

Inheritance also has a scope. A memory stored under one repository’s identifier should not automatically become a global rule. A successful repair can depend on a particular library version. Persist both the rule and its applicability conditions; retrieval should check them, and a contradictory later observation should update or invalidate the memory rather than append another incompatible rule.

3. A history of increasingly editable loops

Feedback control changes actions in response to an error signal; it need not learn a new controller. Evolutionary search retains and recombines promising candidates; the mutation and selection rules can remain human-designed. AutoML searches model or pipeline choices; meta-learning learns a procedure across tasks. These ideas supply components of RSI, but their presence alone does not establish that the improvement process improves itself.

Schmidhuber’s Gödel-machine proposal makes self-rewrites conditional on a proof of utility under encoded assumptions. This is a theoretical construction with demanding proof requirements, not a practical guarantee for an LLM patch [1]. Modern systems often replace proof with empirical evidence. That makes implementation feasible while weakening the claim: observed success is conditional on the cases, instruments and budgets used.

The progression is therefore not a ladder on which every later paper supersedes the earlier one. Inference refinement, self-generated training data, agent memory, code evolution and algorithm discovery modify different substrates. Some can be combined: a code-search agent can propose a new data filter, whose training run creates a new model. The combined system inherits every stage’s costs and failure modes.

Three axes are more useful than a hype timeline

Classify historical systems by the search space they can edit, the source of their feedback and the location of their outer loop. A hyperparameter search can explore millions of configurations while its search rule remains fixed. A learned optimizer changes an update rule, but the meta-training procedure can still be human-designed. A self-editing agent may change its search code while retaining a fixed acceptance controller. Each advances a different axis rather than occupying one universal intelligence scale.

The proof-versus-measurement distinction also changes the failure mode. A proof depends on its axioms and the formalized objective; empirical evidence depends on coverage and measurement integrity. An impeccable proof of the wrong objective does not solve the real task, and a large empirical score does not provide a proof. Practical systems can combine formal checks for narrow invariants with empirical checks for broader behavior.

4. Five mechanisms—and what each can retain

1. Output refinement alternates generation and critique. Self-Refine is a representative example; weights remain fixed [3]. The retained object may be only the final answer. It is useful when a critique exposes a tractable omission, but repeated critique can also replace a correct answer with a persuasive error.

2. Memory-based adaptation stores experience for later retrieval. Reflexion uses linguistic feedback rather than weight updates [4]. A useful memory names a failure condition, action and scope. “Always retry” is dangerous if the action charges a customer twice. Memory needs expiration, provenance and conflict resolution, not just an ever-growing transcript.

3. Weight-level improvement generates or selects training material, then optimizes parameters. STaR connects generated rationales to answer supervision [2]; Self-Rewarding models also generate preference signals [6]. The mechanism can persist beyond a session, but correctness of an answer does not prove correctness of every reasoning step. Filtering changes the data distribution and can erase rare skills.

4. Agent-code improvement changes orchestration, tools or search. DGM is an empirical example [7]. 5. Meta-improvement changes how candidates are proposed or selected, or how learning algorithms work. To distinguish the fifth from the fourth, hold downstream tasks and budgets fixed and ask whether the new improver generates better descendants. A modified function named “improve” is insufficient evidence.

Choose the smallest layer that can fix the failure

If the agent lacks a repository fact, retrieval may solve the problem without learning. If it repeatedly forgets a stable procedure, scoped memory is a plausible intervention. If a broad behavior remains poor across many contexts, weight updates may be appropriate. If the failure comes from tool ordering or context truncation, change the harness. If the search repeatedly proposes uninformative changes, inspect the improver. This diagnosis prevents expensive retraining from masking a simple orchestration defect.

The layers interact. A better model may make an old verbose prompt unnecessary; a memory can help one task and consume context needed by another. Compare combinations as well as single-component changes. Removing memory after changing the harness is not the same intervention as removing it from the original system. Keep the reference state explicit and record interactions rather than assuming that isolated gains add linearly.

Concept map: output, memory, weights, agent code and the improvement procedure are different editable layers. Arrows mark inheritance, not measured capability growth.
Concept map: output, memory, weights, agent code and the improvement procedure are different editable layers. Arrows mark inheritance, not measured capability growth. View full-size diagram

5. How self-generated data changes weights

Suppose the repair agent generates several solutions for a development issue. A verifier selects a solution whose behavior satisfies the available specification. Supervised fine-tuning then increases the probability of its token sequence. In the equation, x is the issue and context, y is a selected solution, and y<j is its preceding token prefix. The sum is over output tokens; normalizing by token count changes how long solutions are weighted. The model learns the selected distribution, not an abstract property called truth.

If the selection rule favors short easy tasks, their frequency grows in the next training set. Hard cases can disappear even while training loss improves. Preserve a mixture of authentic data, carefully checked synthetic examples and protected retention tasks. Deduplicate by problem family before splitting; changing variable names does not make a new independent example. Store the producer model, prompt, verifier and parent version with every sample.

Preference optimization instead compares a chosen and rejected answer. DPO increases their log-probability margin relative to a reference policy. The reference controls the comparison; β controls its scale, not a guaranteed safety level. When the same model creates answers and judges them, style preferences and shared blind spots can reinforce one another. External answer checks, independent human review or a separate calibrated judge remain valuable. Repeated fine-tuning with an unchanged optimizer is iterative learning, not evidence that the optimizer improved. [17]

A small calculation exposes the selection bias

Suppose 100 development problems produce 400 candidate solutions, of which 80 pass the verifier. The training set has 80 solutions, not 400 independent successes. If those 80 come from only 20 easy problems, there is little evidence about the other 80 problems. Weighting each accepted solution equally also gives problems with more accepted variants more influence. A per-problem cap or explicit sampling weights can reduce that imbalance, but the chosen policy must be recorded.

For one preference pair, suppose the chosen/reference probability ratio is 2 and the rejected/reference ratio is 0.5. Their log-ratio difference is log(4). With β, the sigmoid is 0.8 and the pair loss is −log(0.8), about 0.223. This is a teaching calculation for sequence probabilities, not a measured training run. It shows how the loss rewards a relative margin; it does not establish that the selected answer deserves preference. A bad preference label trains precisely the wrong margin.

6. An end-to-end architecture with a protected referee

The reference design below is Token Lab’s engineering proposal, not a vendor’s internal architecture. A controller selects a parent from a version archive and gives a bounded development task to the improver. The improver returns a patch plus a manifest of intended changes. A worker applies it to a disposable copy and emits execution traces and candidate artifacts. The worker cannot promote itself.

A separate evaluator reads the candidate artifact and executes its own checks. Its acceptance report is evidence linked to an artifact hash, not text trusted because the candidate printed “PASS”. A release controller verifies this binding, constraints and authorization, then atomically changes the active-version pointer in its own registry. That registry transaction does not make training, object storage and deployment one cross-system transaction. Objects are written immutably first; the pointer references a complete artifact.

Rejected variants stay in the archive with reasons and costs. Accepted variants may become the next parent, but a deployment canary is a separate decision. A failed canary restores the previous pointer and drains in-flight work. Reused task identifiers make bookkeeping idempotent; retrying a model call may still consume money twice. A timeout cancels workers and produces an incomplete record, never an assumed success. The diagram distinguishes proposal flow, evaluator evidence and release authority.

Trace the artifact, not just the arrows

For repair job J, the controller records parent hash P and dataset snapshot D. The worker returns candidate hash C; the evaluator report must reference J, P, C, D and evaluator version E. If the deployed artifact has a different hash, the report is irrelevant to it. The release controller should therefore validate identities as well as scores. A stale report for an earlier candidate cannot authorize the latest patch.

If a worker crashes after uploading C but before recording completion, reconciliation can discover the immutable artifact and resume evaluation. It must not infer acceptance from the object’s existence. If two workers finish the same job, use a unique job/candidate key to avoid duplicate promotion. These are separate concerns from cancellation: a canceled job may leave useful artifacts, but they remain unaccepted until a new authorized decision.

Reference architecture: candidates propose changes; protected evaluation supplies evidence; only the release controller changes the active version. No line grants candidates access to audit secrets.
Reference architecture: candidates propose changes; protected evaluation supplies evidence; only the release controller changes the active version. No line grants candidates access to audit secrets. View full-size diagram

8. The mathematics of improvement and its limits

A useful objective is a vector: target capability, retained capability, latency, cost and risk. A scalar utility can help rank feasible candidates, but mandatory safety and authorization constraints must remain outside that scalar. Otherwise a sufficiently large target score can compensate for a forbidden action. Define units: a quality change is in percentage points; dollars, GPU-seconds and input/output tokens are different ledgers.

For paired binary task outcomes, let dᵢ be candidate success minus parent success. Then dᵢ is −1, 0 or 1. The mean estimates a capability difference for that task distribution; the standard error depends on the variability of paired differences, not two independent-binomial assumptions. Repeated runs, task clustering and adaptive candidate selection complicate this simple estimate. It is a teaching approximation, not a universal acceptance theorem.

To make an acceleration claim, measure improvement per total resource, including unsuccessful children and verification. Write the next gain as a function g of capability, resources and environment. Nothing in recursion forces g to grow: easier improvements run out, verification becomes expensive, data quality degrades and physical compute remains finite. A curve through three winning checkpoints does not identify an exponential law. A fixed-cost plateau is a substantive result, not a failure to report.

Make the denominator as explicit as the gain

In an invented budget example, ten candidates each cost 2 compute-hours to generate and 1 to verify. The search costs 30 hours even if only one survives. If the accepted descendant gains 3 percentage points, the observed yield is 0.1 percentage points per compute-hour, not 1 point per hour obtained by counting only its own three hours. Hardware, model and task distribution must still be matched before comparing that yield across systems.

Also distinguish absolute and relative changes. Moving from 60% to 65% is +5 percentage points but about +8.33% relative accuracy. Reducing failure from 40% to 35% is a 12.5% relative error reduction. All describe the same outcomes; selecting whichever sounds largest changes presentation, not evidence. Report the counts and denominators so the reader can reconstruct each quantity.

9. The frontier: four distinct research bottlenecks

Algorithm discovery is not the same as general self-upgrading. AlphaEvolve searches executable algorithms with evaluators; Google DeepMind reports applications to infrastructure and mathematical problems [8]. The important boundary is the specification: optimizing a kernel under correctness checks is narrower than choosing which social objective should govern an autonomous system. A verifier that can check a construction cheaply makes search much more attractive.

Recent work separates several missing capabilities. PAST-Bench studies retained experience across fresh sessions: 26 scenarios and 204 episodes [10]. AI4AI-Bench studies training-algorithm edits: ten repositories, four hours on one B300 per task and subsequent fresh reruns up to twelve hours [11]. Its normalized scores are not accuracy percentages. AIDE² reports seven accepted improvements in an eight-day research-agent run, with transfer to held-out benchmarks [12]. Flex-RSI separates task-solution changes from edits to the executor and improver harness under a fixed budget [13]. These are version-pinned preprint reports, not our replications.

Their value is in asking different questions: does experience survive; does an algorithm change; does the new researcher improve subsequent research; does editing the harness matter beyond editing the answer? A system may succeed on one and fail on another. Do not pool these heterogeneous scores into an “RSI capability ranking”. The evidence matrix below is a reading map, not a market leaderboard.

Read a frontier result as a chain of claims

For each paper, first identify the edited artifact and the unchanged infrastructure. Then ask which feedback the learner received, how candidate selection used it and whether the reported tasks were still independent after selection. Finally check whether the successor actually performed later improvement. A positive endpoint establishes a narrower claim than a demonstrated improvement in the rate of producing good descendants.

The evidence map should guide implementation choices. Memory research informs persistence and correction; algorithm-design research informs training-rule search; harness research informs tools and control flow. Transferring a method to another substrate requires a new argument. A successful code verifier does not automatically become a reliable judge of an open-ended scientific proposal, and a simulator’s scalar reward does not automatically specify safe real-world behavior.

Evidence map: what each study isolates

Verify inheritance, a fair budget and independent evidence before interpreting a gain.

StudyEditable object / boundary
STaR [2]Weights / selected rationales
Self-Refine [3]Answer / fixed weights
Reflexion [4]Memory / verbal feedback
DGM [7]Agent code / archived variants
AlphaEvolve [8]Algorithms / executable verifiers
PAST-Bench [10]Experience / cross-session persistence
AI4AI-Bench [11]Learning algorithm / fresh reruns
AIDE² [12]Research agent / inherited rewrites
Flex-RSI [13]Executor and improver / fixed budget
RSI-Env [14]Persistent model–harness environment
SelfImprove-Bench [15]Generalization levels G0–G4
RSI-Dojo [16]Learning to conduct post-training

10. How an improvement loop fools itself

A private evaluator is not automatically independent. Every score, accept/reject bit or detailed traceback reveals information. Repeated adaptation can fit that information without ever reading labels. Leakage also enters through public benchmark solutions, near-duplicate tasks, retrieval memory and generated explanations. Protecting a file is necessary, but it does not eliminate statistical contamination.

Winner’s curse is a second problem. If each of many equally capable candidates has noisy measured performance, selecting the maximum tends to select positive noise. The expected maximum of independent Gaussian noise grows roughly with σ√(2 log K); this is an asymptotic illustration, not a correction formula for arbitrary correlated agents. Publishing only the selected lineage hides K and the rejected costs. Fresh tasks and independent repetitions are needed before interpreting a small gain.

A third problem is feedback degradation. An inaccurate critic can reinforce its own mistakes; intrinsic self-correction has documented limitations [5]. Synthetic-data replacement can lose distribution tails, as studied in model-collapse work [9]. Neither result means all self-feedback or synthetic data is useless. The actionable distinction is whether new reliable information enters the loop and whether rare but important behavior survives.

Finally, reward hacking improves the measurement rather than the intended task. A patch may skip a slow test, inspect evaluator files, fabricate tool traces or exploit a flawed parser. Treat all candidate-produced content as untrusted. Separate semantic correctness, evaluator integrity and permission compliance; one cannot substitute for another.

Separate accidental shortcuts from adversarial behavior

A candidate may exploit a weak test without any intention to deceive. Returning a cached answer for a known task can improve the measured score while failing on new inputs. A different candidate may deliberately alter logs or inspect protected data. Both can invalidate the result, but the diagnosis and remediation differ: repair task coverage for the shortcut, and repair isolation and provenance for tampering. Do not infer intentions from a score alone.

Feedback loops can amplify small errors. If a judge prefers confident language, selected answers become more confident; retraining on those answers can then make the same judge prefer the next generation even more. An independent factual check may show no improvement. Preserve separate records of task outcomes, stylistic preferences and constraint violations so that a rising preference score cannot silently stand in for factual correctness.

11. From experiment to production: bounded authority

Give the improver read access to approved development material and write access only to a candidate workspace. Keep production credentials, evaluation secrets and deployment permissions in a separate control plane. A container is useful packaging, not a complete security boundary for hostile code: isolation strength, host mounts, network access and resource limits still matter. A research loop should not silently acquire cloud purchasing or physical-actuation rights.

Persist an append-only event ledger: parent hash, patch hash, data and evaluator versions, random seed, tool transcript, resource usage, verdict and release identifier. Store raw results outside the candidate’s writable workspace. Redact sensitive task data in logs and limit retention. Attribution requires real tool events; a model’s narrative about a command is not an execution receipt.

Use a state machine with explicit proposed, running, rejected, accepted, canary, active and rolled-back states. Unknown or missing evidence blocks promotion. Restarting a worker resumes from a known immutable artifact rather than accepting a half-written checkpoint. For robots, add simulation-to-real validation and an independent safety controller: improving a policy in simulation does not authorize motion near people.

The commercial control point is often the reliable evaluation-and-release service, not a chat prompt saying “improve yourself”. Research teams buy reproducibility and better experiments; platform teams buy safe integration and cost bounds. Model providers supply inference or training; orchestration and observability suppliers supply infrastructure. None of these product categories alone proves RSI. This review does not claim undisclosed market shares or acquisition-driven product integration.

Use separate clocks for research and release

The research loop can explore frequently while production stays on a stable release. Promotion should reference a reproducible bundle: model identity, agent code, prompts, tool schemas, memory policy and dependency versions. Rolling back only the code is insufficient if the new version also changed persistent memory or a tool schema. Keep compatibility checks and a documented migration or invalidation policy for that state.

Operational limits must be enforced outside candidate code. A budget counter controlled by the agent can be deleted; a timeout enforced only in its own process can be ignored. An external scheduler should cap work and terminate expired jobs. Observability should distinguish proposed, executed and confirmed actions, including cancellations and partial failures. The next generation must not inherit an unverified statement that an external operation succeeded.

12. What remains unresolved—and when not to use RSI

The hardest bottleneck is often verification, not generation. A compiler can check syntax, but a scientific claim may require months of experiments; a social outcome may have no agreed scalar ground truth. Increasing proposal throughput then increases the burden on oversight. A better improver can also become better at exploiting a weak judge. Capability gain and trustworthiness must be studied separately.

Meta-improvement needs causal evidence across generations: does an updated search strategy generate better descendants than a frozen strategy under equal total resources? Transfer requires new task families, not renamed old tasks. Long-term stability requires retention, memory correction and recovery from bad updates. Scalable oversight, provenance of synthetic data, diverse search and secure evaluation are active problems; a single positive benchmark does not close them.

Use a bounded loop when candidate effects are reversible, a meaningful verifier exists, failures are affordable and the target distribution is sufficiently specified. Prefer a human-reviewed engineering change when validation is weak or the system controls irreversible assets. Sometimes better retrieval, ordinary supervised training or a fixed workflow solves the actual problem more cheaply.

The expert-level mental model is a constrained information-producing process: propose a change, acquire trustworthy evidence, preserve useful state and inherit only justified changes. It is not an incantation that turns iteration into unlimited intelligence. The final section makes that distinction executable with a deliberately small local example.

Turn an open question into a bounded research agenda

For verification, ask which important failure classes remain unobservable and what independent signal could reveal them. For transfer, ask whether the improvement depends on task wording, repository conventions or one model family. For efficiency, ask whether the same gain can be obtained by a simpler fixed search. For safety, ask whether permissions and recovery still hold after several accepted changes. Each question names an uncertainty rather than promising that more recursion will solve it.

A sensible stopping decision can be “keep the current system”. Stop when the remaining budget cannot distinguish useful gains from noise, when the verifier no longer covers the proposed changes, or when retained capability crosses a protected floor. Stopping is part of a well-designed improvement process. An unlimited loop without a credible stopping condition may accumulate uncertainty faster than capability.

13. Practice & verification: build evidence, not a success story

Worked example: improvement, forgetting and uncertainty

The parent solves 60/100 target tasks and 80/100 retention tasks. A solves 72 and 72: +12 target points but −8 retention points. B solves 65 and 79: +5 and −1. With minimum gain 3, maximum loss 2 and cost ceiling 100, only B passes. C has a supplied integrity failure; D costs 180. Integrity is an input assertion in this toy, not a contamination detector. For B’s target gain, 15 tasks newly pass, 10 regress, 50 pass in both versions and 25 fail in both. The paired differences give mean 0.05, sample variance 0.25 and SE 0.05. A normal-approximation 95% interval is −4.8 to +14.8 percentage points. The gate accepts B as a policy fixture, but this small sample does not establish a positive capability difference.

Synthetic fixture: target gain and retention change for A–D. C fails integrity; D exceeds budget. Bars are invented teaching values, not model measurements.
Synthetic fixture: target gain and retention change for A–D. C fails integrity; D exceeds budget. Bars are invented teaching values, not model measurements. View full-size diagram

Local promotion-gate experiment

CandidateTarget gain (pp)Retention change (pp)Cost unitsDecision

Predict before changing the slider: A passes at tolerance 8; C and D remain rejected. Runs entirely in this browser, with no uploads, model calls or training.

Reproduce the audit in Python

Download the file below and run python3 rsi-audit.py with Python 3.11 or later. Standard library only; no dependencies, model downloads or API keys. Fixtures are deterministic, so no random seed is needed. The output below was actually checked. This implementation audits recorded scores; it does not generate patches, sandbox hostile code or implement an autonomous model.

Download reference implementation · rsi-audit.py

Python · Download reference implementation
"""Deterministic RSI teaching audit; Python 3.11+, standard library only.
No model, network, generated-code execution, or real capability measurements.
"""
from dataclasses import dataclass
from math import isfinite, sqrt
from statistics import mean, stdev

@dataclass(frozen=True)
class Candidate:
    name: str
    target: int
    retention: int
    cost: float
    integrity: bool

PARENT_TARGET, PARENT_RETENTION, N = 60, 80, 100
CANDIDATES = (
    Candidate('A', 72, 72, 100, True),
    Candidate('B', 65, 79, 100, True),
    Candidate('C', 78, 80, 100, False),
    Candidate('D', 68, 80, 180, True),
)

def gate(c, min_gain=3, max_drop=2, max_cost=100):
    values = (c.target, c.retention, c.cost, min_gain, max_drop, max_cost)
    if not all(isfinite(x) for x in values):
        raise ValueError('Non-finite audit value')
    if not (0 <= c.target <= N and 0 <= c.retention <= N):
        raise ValueError('Invalid success count')
    if c.cost < 0 or max_drop < 0 or max_cost < 0 or type(c.integrity) is not bool:
        raise ValueError('Invalid constraint or integrity flag')
    failures = []
    if c.target - PARENT_TARGET < min_gain: failures.append('gain')
    if c.retention - PARENT_RETENTION < -max_drop: failures.append('retention')
    if c.cost > max_cost: failures.append('budget')
    if not c.integrity: failures.append('integrity')
    return not failures, failures

def paired_summary(parent, child):
    if len(parent) != len(child) or len(parent) < 2:
        raise ValueError('Use at least two paired outcomes')
    if any(x not in (0, 1) for x in parent + child):
        raise ValueError('Outcomes must be binary')
    differences = [b-a for a,b in zip(parent,child)]
    delta = mean(differences)
    se = stdev(differences) / sqrt(len(differences))
    return delta, se, (delta-1.96*se, delta+1.96*se)

if __name__ == '__main__':
    for c in CANDIDATES:
        accepted, reasons = gate(c)
        print(c.name, 'ACCEPT' if accepted else 'REJECT', ','.join(reasons) or '-')
    # 15 newly solved, 10 regressions, 50 shared successes, 25 shared failures.
    parent = [0]*15 + [1]*10 + [1]*50 + [0]*25
    child  = [1]*15 + [0]*10 + [1]*50 + [0]*25
    delta,se,interval=paired_summary(parent,child)
    print(f'paired gain={100*delta:.1f} pp; SE={100*se:.2f} pp')
    print(f'approximate 95% interval=[{100*interval[0]:.2f}, {100*interval[1]:.2f}] pp')
    assert [gate(c)[0] for c in CANDIDATES] == [False,True,False,False]
    assert gate(CANDIDATES[0],max_drop=8)[0]
    assert not gate(CANDIDATES[2],max_drop=100,max_cost=1000)[0]
    assert gate(Candidate('boundary',63,78,100,True))[0]
    assert not gate(Candidate('below',62,78,100,True))[0]
    assert interval[0] < 0 < interval[1]
    try: gate(Candidate('bad',65,79,float('nan'),True))
    except ValueError: pass
    else: raise AssertionError('NaN accepted')
    print('7 audit checks passed; this is not evidence of model improvement.')

Expected output

A REJECT retention
B ACCEPT -
C REJECT integrity
D REJECT budget
paired gain=5.0 pp; SE=5.00 pp
approximate 95% interval=[-4.80, 14.80] pp
7 audit checks passed; this is not evidence of model improvement.

A fair research protocol

Pre-register task families, retention floors and stopping rules. Compare (a) frozen agent with matched inference budget, (b) fixed improver, (c) recursive improver and (d) ablations removing memory, weight updates or code edits one at a time. Include every proposal and rejected candidate in the resource ledger. Use development data for generation, limited-access validation for selection and a fresh final audit for reporting. Once audit feedback changes a design decision, that split is no longer untouched. Repeat independent runs and report paired uncertainty, per-family regressions and all lineages. Inject missing evidence, timeout, corrupted artifact and permission-expansion cases: each must block promotion without destroying the previous active version. The toy checks threshold equality, invalid values and independent constraints; production needs real integrity evidence and isolation.

Before running the fixture, write down which constraint rejects each candidate. Then change one input at a time: set A’s retention loss to the boundary, lower B’s gain below 3, mark B’s integrity false, and raise D’s budget ceiling. Explain why relaxing the budget must not repair an integrity failure. For a research extension, keep the same aggregate success counts but vary how many individual tasks switch from pass to fail: the paired uncertainty changes even when the headline gain does not. Submit the candidate ledger, exact code revision, output and a short statement of what these observations cannot establish.

Original interview exercises

Not reported company questions. For each answer: 1 point names the mechanism; 2 defines it correctly; 3 applies it to the running example; 4 proposes a controlled comparison; 5 handles uncertainty, a counterexample and a safe failure response.

1. A prompt changes every round. What evidence makes this recursive improvement?

Hint 1

Identify what persists.

Hint 2

Identify who produces the next candidate.

Answer & analysis

Show that an accepted version participates in the next improvement, then compare descendants against a fixed improver under matched total resources. Prompt changes alone establish adaptation, not better general capability or acceleration.

2. Why does B pass the gate but fail to establish a reliable capability gain?

Hint 1

A policy threshold and uncertainty answer different questions.

Hint 2

Use 15 improvements and 10 regressions on 100 paired tasks.

Answer & analysis

The gain is 5 pp but SE is 5 pp, so the illustrative interval includes zero. The deterministic gate checks constraints, not statistical significance. Add fresh paired tasks, pre-specified uncertainty rules and independent runs; do not tune the threshold after seeing the result.

3. Can an unread private benchmark still contaminate selection?

Hint 1

Feedback is information.

Hint 2

Imagine thousands of accept/reject queries.

Answer & analysis

Yes: adaptive selection learns the evaluator through responses. Restrict validation queries, retain the full attempt log and use a fresh final audit. Once the audit influences another change it is no longer untouched. File access control and statistical independence solve different problems.

4. The candidate edits the evaluator and reports a 20-point gain. What should happen?

Hint 1

Locate the trust boundary.

Hint 2

A high score cannot replace provenance.

Answer & analysis

Block promotion because the evidence no longer comes from the protected evaluator. Re-run the immutable candidate under an authorized evaluator, preserve the rejected artifact and investigate access controls. Never trade integrity or permission violations for a larger utility score.

5. How would you test whether the improver improved, rather than merely getting more compute?

Hint 1

Freeze the parent and task distribution.

Hint 2

Compare descendants, not only the edited program.

Answer & analysis

Run old and new improvers from matched starting states with equal generation, training and verification budgets. Compare descendants on new task families with retention and uncertainty. Include failed runs and repeated seeds. A one-off code gain or a longer search is not evidence of a better improvement algorithm.

Sources & versions

Dates are first arXiv submission → the pinned version date. Citation labels are paper titles. New 2026 entries are treated as preprints; no conference acceptance is inferred. Official code is linked where verified, not presented as independently reproduced.

  1. Gödel Machines · 2003-09-25 → 2006-12-17 · cs/0309048v5
    https://arxiv.org/abs/cs/0309048v5 · PDFhttps://arxiv.org/pdf/cs/0309048v5
  2. STaR: Bootstrapping Reasoning With Reasoning · 2022-03-28 → 2022-05-20 · 2203.14465v2
    https://arxiv.org/abs/2203.14465v2 · PDFhttps://arxiv.org/pdf/2203.14465v2
  3. Self-Refine · 2023-03-30 → 2023-05-25 · 2303.17651v2
    https://arxiv.org/abs/2303.17651v2 · PDFhttps://arxiv.org/pdf/2303.17651v2
  4. Reflexion · 2023-03-20 → 2023-10-10 · 2303.11366v4
    https://arxiv.org/abs/2303.11366v4 · PDFhttps://arxiv.org/pdf/2303.11366v4
  5. Large Language Models Cannot Self-Correct Reasoning Yet · 2023-10-03 → 2024-03-14 · 2310.01798v2
    https://arxiv.org/abs/2310.01798v2 · PDFhttps://arxiv.org/pdf/2310.01798v2
  6. Self-Rewarding Language Models · 2024-01-18 → 2025-03-28 · 2401.10020v3
    https://arxiv.org/abs/2401.10020v3 · PDFhttps://arxiv.org/pdf/2401.10020v3
  7. Darwin Gödel Machine · 2025-05-29 → 2026-03-12 · 2505.22954v3
    https://arxiv.org/abs/2505.22954v3 · PDFhttps://arxiv.org/pdf/2505.22954v3
  8. AlphaEvolve · 2025-06-16 → 2025-06-16 · 2506.13131v1
    https://arxiv.org/abs/2506.13131v1 · PDFhttps://arxiv.org/pdf/2506.13131v1
  9. The Curse of Recursion: Training on Generated Data Makes Models Forget · 2023-05-27 → 2024-04-14 · 2305.17493v3
    https://arxiv.org/abs/2305.17493v3 · PDFhttps://arxiv.org/pdf/2305.17493v3
  10. PAST-Bench · 2026-08-04 → 2026-08-04 · 2608.04003v1
    https://arxiv.org/abs/2608.04003v1 · PDFhttps://arxiv.org/pdf/2608.04003v1
  11. AI4AI-Bench · 2026-08-20 → 2026-08-20 · 2608.20318v1
    https://arxiv.org/abs/2608.20318v1 · PDFhttps://arxiv.org/pdf/2608.20318v1
  12. Recursive self-improvement of AI research agents / AIDE² · 2026-09-22 → 2026-09-22 · 2609.26457v1
    https://arxiv.org/abs/2609.26457v1 · PDFhttps://arxiv.org/pdf/2609.26457v1
  13. Flex-RSI · 2026-11-06 → 2026-11-06 · 2611.08946v1
    https://arxiv.org/abs/2611.08946v1 · PDFhttps://arxiv.org/pdf/2611.08946v1
  14. RSI-Env · 2026-11-01 → 2026-11-01 · 2611.01736v1
    https://arxiv.org/abs/2611.01736v1 · PDFhttps://arxiv.org/pdf/2611.01736v1
  15. SelfImprove-Bench · 2026-11-02 → 2026-11-02 · 2611.02797v1
    https://arxiv.org/abs/2611.02797v1 · PDFhttps://arxiv.org/pdf/2611.02797v1
  16. RSI-Dojo · 2026-10-29 → 2026-10-29 · 2611.03698v1
    https://arxiv.org/abs/2611.03698v1 · PDFhttps://arxiv.org/pdf/2611.03698v1
  17. Direct Preference Optimization · 2023-05-29 → 2024-07-29 · 2305.18290v3
    https://arxiv.org/abs/2305.18290v3 · PDFhttps://arxiv.org/pdf/2305.18290v3

DGM · GitHubhttps://github.com/jennyzzt/dgm · PAST-Bench · GitHubhttps://github.com/Gen-Verse/PAST-Bench · Flex-RSI · projecthttps://flex-rsi.github.io/ · AlphaEvolve · Google DeepMind · 2025-05-14https://deepmind.google/blog/alphaevolve-a-gemini-powered-coding-agent-for-designing-advanced-algorithms/

Further learning

RL · Verify inheritance, a fair budget and independent evidence before interpreting a gain. · OpenAI Academyhttps://academy.openai.com/ · Anthropic Learnhttps://www.anthropic.com/learn · Microsoft Learnhttps://learn.microsoft.com/en-us/training/

Foundations explained

Review the shared reasoning behind this method, then use the worked checks to identify gaps in your understanding.

An experiment estimates a specific quantity under stated conditions. Define the unit of comparison before averaging: a request, problem, training seed or robot episode are not interchangeable. A paired comparison runs methods on the same cases so difficulty is controlled. An ablation changes one mechanism while keeping relevant data, budgets and evaluation fixed; removing a component and also giving the baseline fewer resources confounds the conclusion.

Work it out before reading the solution

On three identical cases, method A scores [0,1,1] and B scores [1,0,1]. What does the mean improvement tell you, and what does it hide?

Reasoning, step by step

Paired differences are [1,−1,0], so the average change is zero. One case improves and another regresses. An unchanged average is not equivalence, and three cases cannot establish a reliable population effect. Inspect subgroups and uncertainty; repeated correlated samples are not independent evidence.

Why this matters in practice

A frontier result needs a chain from claim to measurement: task, dataset split, model version, budget, metric and failure cases. Separate a paper’s reported result from a local teaching example. Reproducing arithmetic does not reproduce training, and adapting to a benchmark can invalidate it as a held-out test.

Evidence of understanding

Write the claim you would falsify, lock the evaluation before tuning and save configuration plus raw outcomes. Compare a credible baseline at equal budget and report negative results. For self-improvement, keep external held-out tasks and measure regressions as well as gains.

Run the complete Python example

Python 3.10+ · standard library only · deterministic, no random seed needed · no network. Save the file and run the command below. These are teaching checks, not model benchmarks.

Download Python · evidence.py
python3 evidence.py
# Python 3.10+; standard library; deterministic; no network.
a, b = [0, 1, 1], [1, 0, 1]
assert len(a) == len(b)
differences = [new - old for old, new in zip(a, b)]
mean_change = sum(differences) / len(differences)
assert mean_change == 0
assert sum(x > 0 for x in differences) == 1
assert sum(x < 0 for x in differences) == 1
print("mean change=0; improved=1; regressed=1; unchanged=1")

Expected output

mean change=0; improved=1; regressed=1; unchanged=1

Review the prerequisite →

Foundation revised:

Your next learning step

Read a versioned paper; reproduce a small mechanism, run a negative control and state what remains unproven.

Build / verify → · Continue your route →

Predict, test and keep evidence

Before revealing an answer, predict one result. After the exercise, record the discrepancy and a transfer test. Saved locally across language editions.

Open notebook / export / clear →

The mathematical review scope is recorded per lesson. It does not establish empirical paper reproduction; report suspected errors in your notes. Review scope