EndoRSI: Recursive Self-Improvement of Endoscopic Robot Policies Driven by Physical Experiment EvidenceEndoRSI: Physical-Evidence-Driven Recursive Improvement of Endoscopic Robot Policies
EndoForge revises endoscopic insertion strategies with real-device evidence; bench Gen4 succeeds 17/21, and ex vivo replication is 16/21.
- In robot policy development, failure explanation, revision, and physical retesting are still mostly done by humans. Contact and closed-loop state changes in a maneuverable endoscope can cause offline composable skills to fail on the physical system.
- EndoRSI separates the EndoForge coding agent from a human-authorized safe runtime. The agent uses validation error to revise action representations, uses physical trials to falsify zero-shot insertion compositions, and turns failed states into training targets that stop advancement.
- Bench insertion went from 2/21 for Gen1 to 17/21 for Gen4, with Success-only ending at 3/21. Frozen Gen4 was 13/21, 13/21, 15/21 under three deployment shifts; on six ex vivo specimens the authors report its highest autonomous success rate, with a replication cohort of 16/21 and teleoperation at 21/21.
- The authors state the system is not a fully autonomous scientist; the evidence is limited to one insertion task, six specimens, and a single-operator teleoperation reference, and it cannot causally estimate failure supervision. The algebra is a continuous development batch, not a randomized parallel treatment group.
- Evaluated models
- Gen1Gen2Gen3Gen4ZS-ASuccess-onlyv1v2v2+TE
- Benchmarks
- ex-vivo pig stomach trackingcolon phantom navigationsilicone phantom insertionex-vivo porcine tracheae
- Metrics
- insertion success (S/F/E)MAE (motor units)emergency-stop count
EndoRSI is a self-improving robotic research system embedding the EndoForge coding agent, which iteratively improves endoscopic robot policies using physical experiment evidence, with physical execution isolated in a human-authorized safety-constrained runtime. Physical experiments first led it to reject the initial action representation and falsify the offline-supported insertion policy; after failed rollouts were incorporated, the revised insertion success rate rose from 2/21 in the first generation to 17/21 in the fourth.
Paper analysis
What problem does this paper attempt to solve?
The authors aim to have coding agents revise endoscope policies using real-machine evidence, with execution authority remaining in a human-authorized runtime.
Failure explanation, revision, and physical retesting of endoscopic robot policies are still largely done by humans.
- Scenario: The authors state that coding agents, AI scientists, and self-driving labs have extended automation from single predictions to experimental loops, and program search has also achieved autonomous discovery in mathematics. In robot policy development, end-to-end automation of using evidence to explain failures, revise policies, and physically test again remains uncommon.
- Current gaps: Language models can generate robot programs, deployment plans, rewards, and sim-to-real configurations; general VLAs with imitation, temporal action generation, and experience reuse provide controllers and learning mechanisms. The authors state that whether a poor result should change the representation, supervision, or policy class is still usually decided by scientists and engineers. Physical evidence is sequential, safety-constrained, and produced by the policy's own actions.
- Authors' observation: The constrained geometry, contact, and closed-loop state drift of flexible endoscopy make offline-plausible policies prone to failure on the real robot. Source skills can appear composable offline, but contact and policy-induced state visitation can invalidate the composition within seconds.
- Proposed system: EndoRSI is a human-governed self-improving research system. The embedded EndoForge coding agent analyzes results, modifies implementations, constructs training supervision, and proposes the next-generation policy on a research timescale; physical execution is handled by an independent safety-constrained runtime and requires human authorization.
- Authority boundaries: Candidates are frozen after arming. The coding agent has no real-time camera, serial port, motor, or emergency-stop interfaces. Humans define research objectives and experimental constraints, propose the initial align-then-advance decomposition, decide whether deployment is allowed, reset, label success (S), ordinary failure (F), or emergency stop (E), and retain the emergency stop.
What related research exists?
The authors place EndoForge on top of the policy optimization loop, using experimental evidence to decide whether to change the representation and supervision.
The authors place related work alongside experimental automation, language-model robot programming, and generalist policy learning, and place this paper above a pre-specified optimization loop.
Experimental automation
- SWE-agent (Yang et al., 2024) inspects repositories, modifies code, and executes software tasks.
- Lu et al. (2026) discuss end-to-end automation of AI research; self-driving labs and robot scientists (MacLeod et al., 2022; Burger et al., 2020; King et al., 2004, 2009) test machine-generated hypotheses with physical measurements in materials, chemistry, or biology.
- Romera-Paredes et al. (2024) use program search to obtain discoveries in mathematics. The introduction frames the common change in such systems as: the unit of automation shifts from a single prediction to observing evidence, generating hypotheses, implementing tests, interpreting results, and deciding the next step.
Language models and robot learning
- Code as Policies (Liang et al., 2023) and SayCan (Ahn et al., 2023) generate robot programs or grounded plans; Eureka and DrEureka (Ma et al., 2024) design rewards or sim-to-real configurations.
- RT-2, PaLM-E, OpenVLA, Open X-Embodiment, and π0 are cited as generalist VLAs that broaden skills and embodiments; Diffusion Policy, ACT, imitation learning, and offline reinforcement learning provide action generation and experience reuse. The Discussion summarizes traditional imitation learning, reinforcement learning, and online adaptation as: optimizing a policy within pre-specified representations, objectives, and update rules.
- The paper cites Brunke et al. (2022) to argue that physical evidence is sequential, safety-constrained, and produced by the policy's own actions.
Endoscopy, surgical data, and program synthesis
- Work by Yang et al. (2017), Saeidi et al. (2022), Zhang et al. (2024), and Martin et al. (2020) concerns robotic autonomy in endoscopic or minimally invasive surgery.
- Ali (2022), Endomapper, Maier-Hein et al. (2017), and Open-H-Embodiment concern endoscopic image analysis, surgical data, or medical robot data.
- The Discussion also lists RoboCat, Octo, GR00T, and others as transferable controller foundations, and program synthesis and multi-agent systems as mechanisms for grounded planning, software generation, and coordination.
Baselines and data
- Offline references are CNN behaviour cloning (ResNet-18), Action Chunking with Transformers, Diffusion Policy, and image-conditioned VLA; copy-previous is used only to expose temporal autocorrelation, not as an autonomous visual controller. Physical references include IBVS, the Success-only lineage, and experienced and novice teleoperation.
- Source data are ER1 ex vivo porcine stomach tracking and ER2 colon phantom navigation, 100 episodes each. Insertion evaluation is on a silicone phantom and ex vivo porcine trachea.
The authors state that EndoForge operates one level above the aforementioned optimization loop, using experimental evidence to decide whether representations, policy combinations, and subsequent supervision should be revised. The authors argue that the additional difficulty for physical robots is that the policy changes the states it subsequently observes, and hypotheses supported by source data can still fail due to contact, latency, or closed-loop state transitions.
How does the paper address this problem?
EndoForge revises policies offline; at physical runtime, it only executes candidates that are human-authorized and frozen.
EndoForge turns policy development into a loop of evidence analysis, candidate implementation, authorized physical evaluation, and revision; the physical side only runs a human-authorized frozen checklist.
Research loop and permissions
The coding agent is Qwen3.7-Max. The workspace contains source image–action data, policy and analysis code, validation outputs, and trial records linking observations and executed actions to S/F/E.
- Between-trial and within-trial: the agent audits, implements, and revises between trials; once the robot is armed, it has no real-time camera, serial port, motor, or emergency-stop interface.
- One candidate at a time: each physical evaluation uses one fixed checkpoint, checklist, task instruction, and execution configuration. A human resets, authorizes motion, and labels the terminal state.
- Text feedback: optional free text does not change any training sample. The human provides the initial task decomposition but not insertion motor targets or physical insertion demonstrations.
Source data and offline revision
Tracking comes from ER1 (Olympus GIF-Q260J, 9.9 mm) and discarded ex vivo porcine stomachs; navigation comes from ER2 (Ailishi S50, 6.0 mm) and a colon phantom. 100 episodes each, fixed 80/10/10, with frames from the same episode not split across partitions. Actions are written as semantic coordinates [m1, m3, m4], with per-task action normalization. ER3 (3.9 mm) is reserved for later instrument-change testing.
- v1 rejected: three-frame stacking, with future actions as discrete bins plus continuous residuals. Relative to CNN behaviour cloning, validation MAE rose from 2.619 to 2.654 for tracking and from 19.463 to 19.811 for navigation (Supplementary Table 6). The agent attributed this to a mismatch between argmax bin decoding and the continuous error objective, and rejected v1 before the held-out comparison.
- v2+TE: current image plus temporal difference image, directly regressing 8-step continuous action chunks; causal temporal integration merges overlapping predictions. Validation MAE is 2.426 for tracking and 18.791 for navigation.
- Autocorrelation diagnosis: teacher-forced copy-previous receives the previous true action each step and ignores the image, yielding lower offline error but cannot be deployed autonomously. The authors therefore conclude that demonstrations have strong temporal autocorrelation: offline validation can reject worse representations but cannot establish physical closed-loop capability.
Composition hypothesis and reactive policy
The human describes insertion as navigation after tracking alignment. The agent tests this on source data: over 10,284 frames, R² for bending versus target-center error is 0.340 and 0.370; over 13,810 frames, the mean advance in the lowest bending quartile is 16.746 motor units, while the remaining quartiles do not exceed 0.560. Bending relationships pointing to the dark cavity centroid have R² of −0.034 and 0.004 and are rejected (Supplementary Table 9).
- Three pre-fixed directions: ZS-A uses the tracking policy to steer, issuing a 16.7-unit advance command after four consecutive low-bending predictions; Supplementary Note 4 specifies a normalized bending threshold of 0.35. ZS-B is a two-policy router, and ZS-C is an instructed VLA. All three are fixed before seeing any insertion trajectory or result.
- Turn after falsification: ZS-A physical testing is 0/16 with all emergency stops. ZS-B is not deployed because it shares the staged composition and has no independently learned stopping response. The human requires end-to-end operation with stopping; the agent turns the existing VLA direction into Gen1.
- Gen1: pretrained Qwen3-VL-4B features with a flow-matching head predicting eight-step semantic actions. Supervision comes from source skills, not target-task insertion demonstrations: 70% skill retention, 20% composed insertion, 10% stop proxy. Initial training uses 224×224, batch 4, gradient accumulation 4, 12,000 steps; action head learning rate 10−4, last two VLM layers learning rate 2×10−6.
Failure supervision and execution adjudication
Gen1 to Gen2 clones only successful trajectories. Gen2 to Gen3 and Gen3 to Gen4 additionally turn failed trajectories into avoidance targets: for the failure terminal segment, and for states with simultaneous advance and strong bending, the advance target is set to 0, the recorded bending target is retained, and no new steering is specified. Triggers include step count reaching 0.65 times the effective step count, positive advance with normalized bending greater than 0.35, or absolute bending exceeding 30 motor counts. Evolution updates freeze the VLM and action normalization, training only the action head for 300 steps at learning rate 10−4.
- Control lineage: Success-only learns only from its own previous batch of successes and discards failures, sharing neither the trajectory pool nor successor checkpoints with the generational lineage.
- Instruction and execution configuration: Gen1 uses the original configuration; Gen2–Gen4 share a revised configuration with advance gain 1.3, bending gains 1.5 and 2.5, bending biases −0.048 and 0.111, and smoothing time constant 10 s. Development instructions go from guarded advancement to continuous visual servoing, then to recovery-oriented insertion. In ex vivo replication, each learned policy shares the same align-then-advance instruction; the two Success-only conditions differ only in execution configuration. IBVS uses no language instruction.
- Runtime and success: 400×400 RGB at 20 Hz. Inference is asynchronous; zero actions are issued if there is no valid plan or a 150 ms watchdog timeout. Limits are |m1|≤42 and |m3|, |m4|≤120; positive advance changes do not exceed 2.0 units per 50 ms tick. Bench success requires the tip to cross the hole plane before termination with no emergency stop; ex vivo success requires reaching the predetermined target cavity at the opposite end from a specimen-specific start. Both F and E count as failures. The default 180 s motor-zeroing timeout only stops motion; it does not automatically close the case or assign a label.
What experiments did the paper conduct?
Bench insertion improved from 2/21 in Gen1 to 17/21 in Gen4; the ex vivo replication cohort for Gen4 was 16/21.
On the bench, insertion success went from 2/21 for Gen1 to 17/21 for Gen4; the authors state that this sequence does not isolate the causal effect of failure supervision.
Experimental Setup
- Policies and models: Physical arms include ZS-A, CNN behavior cloning, Action-chunking transformer, Diffusion Policy, IBVS, Success-only four iterations, and Gen1–Gen4. Reactive policies use Qwen3-VL-4B; coding agent is Qwen3.7-Max.
- Source data and bench: Tracking and navigation each 100 episodes (80/10/10). Bench uses ER2 and white silicone 10 mm round hole, tip 5 cm from hole, lateral offset random, but opening visible and not centered in image. Operator gives no steering during autonomous runs, can only terminate or emergency stop.
- Shift and ex vivo: Frozen Gen4, no adaptation. Reduced lighting turns off endoscope distal light, ambient light unchanged; phantom changed to 7 mm hole with protruding distractor; instrument changed to ER3 (3.9 mm). Ex vivo consists of six discarded pig tracheas, initial cohort design and interleaved replication cohort each three specimens, 7 trials per condition per specimen. Tissues are discarded post-slaughter tissue, no live animals.
- Adjudication: S/F/E annotated by on-site operator. Video review of 315 bench trials (16 ZS-A without video scoring) plus 231 ex vivo, total 546; binary agreement rate 100% (Cohen's κ=1.00, Fleiss' κ=1.00, Supplementary Table 17). Emergency stops only from on-site records.
- Statistics and scale: Success rates use two-sided Wilson 95% CI; specified two-arm comparisons use two-sided Fisher exact test. Bench 331 trials, ex vivo 231. Generations are sequential development batches, not randomized parallel treatment groups. No prior power calculation. Offline uncertainty is 20,000 paired bootstraps of 10 held-out episodes per task, episodes equally weighted.
Main Results
Per Table 1. Parentheses are Wilson 95% CI. Ordinary failures and emergency stops remain in the denominator.
Swipe horizontally to read the table
Policy arm Success/n Success rate % (95% CI) Emergency stops ZS-A 0/16 0.0 (0.0–19.4) 16 CNN behavior cloning 0/21 0.0 (0.0–15.5) 0 IBVS 3/21 14.3 (5.0–34.6) 0 Success-only, final iteration 3/21 14.3 (5.0–34.6) 0 Gen1 2/21 9.5 (2.7–28.9) 5 Gen2 8/21 38.1 (20.8–59.1) 0 Gen3 14/21 66.7 (45.4–82.8) 0 Gen4 17/21 81.0 (60.0–92.3) 0 Action-chunking transformer (1/21, 4.8%, emergency stop 1) and Diffusion Policy (2/21, 9.5%, emergency stop 0) not listed in the table.
- In Supplementary Table 12, two-sided Fisher exact test P for Gen4 vs Gen1, IBVS, final Success-only are 5.75×10−6, 3.21×10−5, 3.21×10−5; adjacent generation P are 0.0670, 0.121, 0.484.
- The authors state that improvements continued after failure trajectories entered the research loop, while repeated learning from success alone did not show the same progression; they also state that the two lineages have different positive evidence pools, checkpoints, instructions, and execution configurations, so comparisons do not isolate the causal effect of failure supervision.
- ZS-A stopped after 16 consecutive emergency stops. Each trial had at least 10 motor units of single-shot forward increment, median maximum increment 16.7, median first lurch 0.15 s. The authors state that the source data support alignment, conditional forward, and offline gating, but do not show that this discontinuous combination would lurch, nor stop responses under contact conditions.
Deployment Shift and Ex Vivo Transfer
- Frozen Gen4: reduced lighting and phantom configuration shifts both 13/21 (61.9%, 40.9–79.2), instrument change 15/21 (71.4%, 50.0–86.2) (Supplementary Table 11). Descriptive Fisher P vs development condition 0.306, 0.306, 0.719. The authors state there is a decline relative to development conditions but no collapse.
- Initial cohort Gen4 was 7/7 on each of three specimens, aggregate 21/21 (Wilson 95% CI 84.5–100.0); IBVS and Gen1 each 9/21, original-configuration Success-only 11/21 (Figure 6, Supplementary Tables 15 and 19). Two pre-experiment motion checks ended in emergency stop and are not in the denominator. In the initial cohort's 34 unsuccessful trials, on-site records show 3 emergency stops, all counted as failures in analysis.
- Interleaved replication cohort Gen4 aggregate 16/21 (76.2%, 54.9–89.4; specimens 6/7, 5/7, 5/7). The authors state it remains the highest among autonomous policies on three new specimens; autonomous controls 2/21 to 7/21. Expert and novice teleoperation each 21/21. After Gen4 execution configuration used the same Success-only checkpoint, success went from 4/21 to 7/21. Fisher comparisons in Supplementary Table 15 are exploratory trial-level analyses, not providing specimen-level inference.
How Failure Supervision Enters Updates
- Gen1→Gen2 used only 2 successful trajectories, 175 cloned samples, 19 unsuccessful trials not in training, also changed instructions and execution configuration. Failure supervision starts from Gen2→Gen3: 12 recorded trials contributed samples, 9 did not; 68 clones plus 144 mirror avoidance samples. Gen3→Gen4 uses all 21 trajectories, 240 clones plus 160 avoidance samples (Supplementary Table 10).
- Action losses sequentially 0.4662 to 0.2851, 0.2243 to 0.0918, 0.0914 to 0.0643. Success-only on-site sequence 1/21, 3/21, 3/21, 3/21 (Supplementary Table 11).
- The authors state that success specifies actions to repeat, failure specifies states not to continue; and that generation comparisons cannot separate instructions, execution configuration, action head updates, and failure supervision.
Other Ablations and Analyses
- Held-out set v2+TE vs CNN: tracking MAE 2.316 to 2.112, paired difference −0.204 (95% CI −0.387 to −0.0004); navigation 23.580 to 21.683, difference −1.916 (−3.377 to −0.322). Three training run means 2.061±0.060 and 21.518±0.229, both lower than CNN (Supplementary Table 8).
- v1 rejected due to validation MAE higher than CNN. Post-hoc held-out tracking MAE 2.065, but RMSE 3.884, sign accuracy 0.741, CNN 3.697 and 0.817; navigation MAE 23.608, CNN 23.580 (Supplementary Tables 6, 7). Validation set used for selection and held-out set are not the same episodes.
- Dark cavity centroid assumption rejected. Increasing stop proxy sampling ratio did not improve stop recall and increased predicted lurches; the paper does not report recall for this ablation (Supplementary Note 5). copy-previous has lower offline error but is not deployable; the paper does not report its MAE.
- Successful navigation time conditioned on success: initial cohort ICC(A,1)=0.994 (n=48), replication cohort 0.956 (n=76) (Supplementary Table 18).
- Gen4 bench failure video median duration 40.7 s (IQR 21.6–76.2, n=4), success 49.4 s (27.4–67.0, n=17). The authors state duration is affected by operator termination, not a time-to-success analysis (Supplementary Table 16).
- Two text-labeled recordings did not contribute training samples. In Figure 6c, the authors state that selected alignment frames can still be off-center, and terminal failure frames cannot establish lumen centering.
What are some points that can be further explored?
The authors state this is not a fully autonomous scientist and cannot estimate the causal effect of failure supervision.
The limitations the authors write are: humans still control the objective, deployment, and terminal states, and the current comparisons cannot estimate the causal effect of failure supervision.
Limitations and future directions noted by the authors
- Not a fully autonomous scientist (Discussion): Humans define the research objective, provide the initial align-then-advance, control deployment and safety, and give terminal states. What the framework automates is analyzing evidence, implementing candidates, explaining failures, and constructing subsequent updates.
- Evidence scope (Discussion): Current evidence is limited to one endoscopic insertion task, six biological specimens, and a single-operator teleoperation reference; it does not establish an overall effect of operator experience, nor does it provide a causal estimate of failure supervision.
- Factors cannot be disentangled (Discussion): Instruction changes and execution configuration changes from Gen1 to Gen2 co-occurred with development, and the algebraic sequence cannot separate them from action-head updates or failure supervision.
- Gap relative to human control (Discussion): The replication result is 16/21, and the teleoperation reference is 21/21. The tissue lumen narrows gradually toward the opening, unlike the planar bench holes; the authors state that contact-assisted centering remains a geometry-specific assumption, not a demonstrated general mechanism.
- Future directions (Discussion): The authors believe the framework should be tested in prospective randomized policy evaluations, with multiple operators, multiple robot systems, and multiple tasks, and that research-time agency should be separated from control-time authority.
Experimental coverage
- The study includes 331 bench and 231 ex vivo runs. Bench arms each had 21 runs; ZS-A stopped after 16 consecutive emergency stops, and all 16 were included in the analysis (Methods, Table 1).
- Platforms were ER1 (tracking source data), ER2 (navigation, development, reduced lighting, phantom offset, and both ex vivo cohorts), and ER3 (swapped instrument arm) (Supplementary Table 3).
- Ex vivo biological units were six independent porcine tracheas. The initial cohort had 84 runs, the replication cohort 147 runs, with 7 runs per condition per specimen. Each teleoperation reference had one operator. Specimen 4's interleaved order had one four-position permutation, but each condition still had 7 runs per specimen (Supplementary Note 8).
- The generations are sequential development batches, not randomized parallel treatment arms. The ex vivo pooled Fisher comparisons are written as exploratory trial-level analyses and do not provide specimen-level inference; no a priori power calculation was performed (Methods, Supplementary Note 9).
- ZS-B was not physically deployed after ZS-A was falsified. The 16 ZS-A runs were not video-scored; the binary agreement rate for the 546 scored runs was 100%. The paper does not report the number of coding-agent queries or the research-loop time.
Summarize the main content of the paper
The authors state that real-robot evidence changed the representation, supervision, and composition, with bench Gen4 at 17/21.
EndoRSI is a human-governed research loop: the EndoForge coding agent uses real-robot results to revise endoscopic insertion policies, while execution remains on a human-authorized safety runtime.
The problem addressed is that whether a poor robot experiment result should change the representation, supervision, or policy class is still largely decided by humans; tracking and navigation can appear composable offline, but contact and closed-loop state transitions can invalidate the composition within seconds.
The coding agent first rejected the discrete-bin-plus-residual action representation based on validation error, switching to continuous eight-step action chunks with temporal integration. The human-proposed align-then-advance was implemented as ZS-A and fixed before seeing insertion results, alongside two other candidates. After ZS-A caused all 16 real-robot runs to emergency-stop, the direction shifted to a Qwen3-VL-4B with stop capability plus a flow-matching policy. Subsequently, successful trajectories provided cloning targets, and failure states set the advance target to 0 while retaining steering.
In bench Table 1, Gen1 was 2/21 and Gen4 was 17/21; final Success-only and IBVS were each 3/21, and ZS-A was 0/16. The frozen Gen4 under reduced lighting, phantom configuration, and swapped instrument was 13/21, 13/21, and 15/21, respectively. The authors state that Gen4 achieved the highest success rate among autonomous policies on each of the six ex vivo porcine tracheas: 21/21 in the initial cohort and 16/21 in the interleaved replication; both teleoperation references were 21/21. Applying Gen4's runtime configuration to the Success-only checkpoint only improved from 4/21 to 7/21.
The authors state that the central result is not just the final success rate, but that physical evidence changed what the agent subsequently rejected, constructed, and supervised. The authors believe that evaluating such research agents should also consider whether candidates were fixed before experiments, whether physical results could reject them, whether evidence changed the next implementation, whether failed trials provided information that successes did not, and whether the policy can leave the development conditions. The authors also state that the system is not a fully autonomous scientist, and the current algebraic sequence cannot causally estimate failure supervision.