Technical Summary: RAPT – Model-Predictive Out-of-Distribution Detection and Failure Diagnosis for Sim-to-Real Humanoid Deployment
Problem Statement
Deploying learned control policies for humanoid robots from simulation to reality (Sim-to-Real) carries significant risk. Policies that appear robust in simulation may confidently enter out-of-distribution (OOD) states upon deployment due to unmodeled dynamics, sensor noise, latency, payload changes, terrain variations, or implementation errors. These OOD events can lead to "silent failures," falls, self-collisions, or hardware damage.
Existing anomaly detection methods often fail to meet the specific constraints of high-rate humanoid control (50 Hz):
- Computational Cost: Uncertainty and ensemble methods are often too expensive for real-time control loops.
- Calibration Issues: Generative models (e.g., LSTM-VAEs) can suffer from likelihood miscalibration and input-complexity bias.
- Lack of Interpretability: Many approaches provide only a binary stop signal, offering no insight into when, where, or why the execution deviated from nominal behavior.
- State Coupling: Generic time-series methods often treat proprioceptive channels as independent signals rather than coupled robot states.
Methodology
The paper introduces RAPT (Recurrent Anomaly Probabilistic Trajectory Model), a lightweight, self-supervised monitoring system designed to run alongside a pre-trained control policy. RAPT operates in four stages:
1. Nominal Data Collection
RAPT collects nominal proprioceptive trajectories from expert policies executed in large-scale simulation (NVIDIA Isaac Lab). These trajectories define the "nominal behavior manifold" that the system must preserve during deployment. Observations are normalized prior to training.
2. Probabilistic Recurrent Trajectory Model
RAPT is trained as a self-supervised recurrent reconstruction model. The architecture includes:
- Residual State Encoder: Processes observation history.
- GRU-based Temporal Bridge: Captures temporal dependencies.
- Latent Bottleneck: Compresses the state representation.
- Probabilistic Decoder: Outputs a diagonal Gaussian reconstruction distribution [μt,logσt2].
The model minimizes the Negative Log-Likelihood (NLL) of nominal observations. This formulation captures heteroscedastic aleatoric uncertainty, allowing dimensions with naturally higher variability to have larger predictive variance, while penalizing deviations in consistent dimensions more heavily. For velocity tracking tasks, a forward-dynamics variant (conditioning on ot−1,at−1 to predict ot) is used; otherwise, pure reconstruction is preferred.
3. Simulation-Trained, Deployment-Calibrated OOD Detection
At deployment, RAPT evaluates per-dimension predictive deviations. To handle the Sim-to-Real gap, RAPT supports two calibration modes:
- Simulation Calibration: Measures deviations from the simulation-trained distribution, making residual Sim-to-Real mismatches visible.
- Real-World Calibration: Uses a brief verified nominal run to adapt to static offsets (sensor noise, latency, hardware dynamics), enabling detection of new OOD events relative to the specific hardware.
Detection utilizes a hierarchical gating mechanism:
- Local Gate: Detects unusually large per-dimension deviations (ℓt,i>τmax+5σi).
- Global Gate: Detects broad shifts in mean predictive deviation (ℓˉt>τglobal+3σglobal).
- Hybrid Safety Envelope: Optionally paired with a deterministic range detector. The final anomaly decision is the logical OR of local, global, and range gates.
4. Failure Localization and Diagnosis
- Temporal Saliency: Upon anomaly detection, RAPT computes gradients of the final NLL with respect to a history window using integrated gradients through the recurrent model. This produces a spatio-temporal attribution map, highlighting when and which proprioceptive channels first departed from nominal behavior.
- Semantic Diagnosis: A multi-modal Large Language Model (LLM) receives structured evidence (temporal saliency summaries, joint-kinematic trajectories, task context, and visual keyframes) to perform zero-shot classification of failure causes (e.g., collisions, sensor faults, terrain shifts) without requiring labeled failure data during detector training.
Key Contributions
- Simulation-Trained, Deployment-Calibrated Monitoring: RAPT learns from large-scale simulation and calibrates thresholds using either simulation or brief real-world data, supporting both debugging and hardware-time OOD detection.
- Low-FPR OOD Detection for High-DOF Humanoids: By using probabilistic predictive-deviation modeling with calibrated per-dimension and global gates, RAPT outperforms high-frequency-compatible baselines under strict false-positive constraints.
- Localized Evidence for Failure Diagnosis: The system generates per-dimension NLL signals and temporal saliency, enabling post-hoc semantic diagnosis of failure modes without labeled failure data.
Experimental Results
The authors validated RAPT on a Unitree G1 humanoid in both NVIDIA Isaac Lab and on physical hardware.
- Simulation Performance: Across four tasks (velocity tracking, motion mimicry, ballistic throwing) and 15 OOD categories, RAPT improved the True Positive Rate (TPR) by 37% over the strongest baseline at a 0.5% episode-level False Positive Rate (FPR).
- Hardware Performance: On a physical Unitree G1 across 78 trials, RAPT achieved an 89% TPR with fewer false positives than high-frequency-compatible baselines.
- Diagnosis Accuracy: On a challenging OOD subset, RAPT achieved 75% semantic failure diagnosis accuracy across 21 failure categories using the zero-shot LLM approach.
- Latency: The monitoring pipeline operates at approximately 1.6ms, compatible with 50 Hz control loops.
Significance and Claims
The paper positions RAPT not as a replacement for domain randomization or system identification, but as a complementary layer that monitors the residual mismatch and unforeseen OOD events that persist after transfer.
- Safety & Debugging: RAPT provides an observable deployment-time signal for safety monitoring and debugging without modifying the underlying controller. It triggers predefined safety responses (e.g., safe stop, controlled fall, recovery) upon OOD detection.
- Interpretability: By moving beyond binary stop signals to localized, per-dimension evidence and semantic reasoning, RAPT addresses the "black box" nature of failure in learned policies, allowing operators to distinguish between external disturbances, actuator degradation, and sensor faults.
- Reproducibility: The authors commit to releasing the training pipeline, labeled real-world datasets, and C++ deployment code to support future benchmarking.
The work demonstrates that a lightweight, self-supervised probabilistic model can effectively bridge the gap between simulation and reality, offering both immediate safety interventions and post-hoc diagnostic insights for complex humanoid systems.