Skip to main content

Published at CoRL 2026

MAGMA-GEN: Validated Recovery Supervision from Ambiguous Failures via Counterfactual Re-Execution

Loan Bernat · Matthieu Grard · Ariane Herbulot · Florent Lamiraux

Turning ambiguous failures into recovery supervision through diagnosis, correction, and counterfactual re-execution.

The paper uses software version v0.1. The current documentation covers the v2 beta.

Overview Video

Abstract

Hierarchical robotic systems executing long-horizon manipulation tasks must make high-level semantic decisions that orchestrate stochastic low-level skills. In this setting, failed rollouts are ambiguous: a poor downstream state may reflect an invalid high-level decision, partial observation, or a valid decision whose physical execution failed. Traditional supervised learning lacks data for such recovery states, while reinforcement learning struggles with sparse rewards and non-local credit assignment. We propose MAGMA-GEN, an on-policy data-generation pipeline that converts ambiguous failed rollouts into validated recovery supervision. MAGMA-GEN first uses a privileged coach to hypothesize an early decision-level error and propose localized correction or recovery actions. Because this diagnosis is fallible, candidates are retained only if re-execution from the same state under matched conditions improves downstream progress. This produces supervised examples from the agent's own failure distribution without per-step human demonstrations. Evaluated on interactive long-horizon manipulation tasks, MAGMA-GEN improves task success and recovery capabilities, against distillation and trajectory-repair baselines under evolving task constraints in both simulation and real-robot execution.

Method

A failed action does not always reveal which decision caused the problem. MAGMA-GEN tests alternative continuations before retaining a proposed correction as recovery supervision.

  1. Diagnose. Use the task objective and execution feedback to identify a possible cause of the failure and a decision worth revisiting.
  2. Propose. Use a privileged coach to propose a localized correction or recovery action at the selected decision point.
  3. Validate. Re-execute the revised continuation from the same state under matched conditions and check whether it improves downstream task progress. The coach’s suggestion alone is not evidence that the repair works.

Ordinary trajectories are collected from the agent’s current policy. Validated continuations provide examples for subsequent supervised training, without updating the agent’s weights during collection.

MAGMA-Gen pipeline overview
Overview of MAGMA-GEN in a simple sorting task.

Citation

@misc{bernat:hal-05514580,
  TITLE = {{MAGMA-GEN: Validated Recovery Supervision from Ambiguous Failures via Counterfactual Re-Execution}},
  AUTHOR = {Bernat, Loan and Grard, Matthieu and Herbulot, Ariane and Lamiraux, Florent},
  URL = {https://hal.science/hal-05514580},
  NOTE = {working paper or preprint},   
  YEAR = {2026},
  MONTH = Feb,
  KEYWORDS = {Robot Learning ; Found Models ; Planning ; Human-Robot Interaction},
  PDF = {https://hal.science/hal-05514580v2/file/main.pdf},
  HAL_ID = {hal-05514580},
  HAL_VERSION = {v2},
}