Safe Guaranteed Dynamics Exploration with Probabilistic Models

Manish Prajapat, Johannes Köhler, Melanie N. Zeilinger, Andreas Krause · OpenReview

Abstract

Ensuring both optimality and safety is critical for the real-world deployment of agents, but becomes particularly challenging when the system dynamics are unknown. To address this problem, we introduce a notion of maximum safe dynamics learning via sufficient exploration in the space of safe policies. We propose a pessimistically safe framework that optimistically explores informative states and, despite not reaching them due to model uncertainty, ensures continuous online learning of dynamics. The framework achieves first-of-its-kind results: learning the dynamics model sufficiently — up to an arbitrary small tolerance (subject to noise) — in a finite time, while ensuring provably safe operation throughout with high probability and without requiring resets. Building on this, we propose an algorithm to maximize rewards while learning the dynamics only to the extent needed to achieve close-to-optimal performance. Unlike typical reinforcement learning (RL) methods, our approach operates online in a non-episodic setting and ensures safety throughout the learning process. We demonstrate the effectiveness of our approach in challenging domains such as autonomous car racing and drone navigation under aerodynamic effects — scenarios where safety is critical and accurate modeling is difficult.

The Challenge of Unknown Dynamics

Deploying autonomous agents like drones or self-driving cars in real-world environments presents a fundamental conflict. To act optimally and safely, an agent requires an accurate model of its physical dynamics—how it responds to control inputs and environmental forces like wind. However, these dynamics are often unknown a priori in complex settings.

Traditional approaches typically fall into two extremes:

  1. Safe but Conservative: Agents remain within a restricted "safe zone," failing to explore enough to perform complex tasks.
  2. Optimal but Risky: Agents explore aggressively to learn the model but risk catastrophic failures or constraint violations during the learning phase.
Figure 1: Safe exploration and navigation in a drone task with unknown aerodynamic effects. The grey regions represent uncertainty in the dynamics model, while the green line represents a safe trajectory.

Furthermore, most existing algorithms rely on "resets"—the ability to teleport the agent back to a safe starting point after a failure. In real-world applications, a single crash can be terminal. This research introduces SageDynX, a framework designed for safe, non-episodic, online learning where the agent must explore to learn without ever violating safety constraints.

The SageDynX Framework: Pessimism Meets Optimism

The core of SageDynX lies in balancing two competing philosophies: Pessimism for Safety and Optimism for Exploration.

Probabilistic Modeling

The system utilizes Gaussian Processes (GPs) to maintain a set of plausible dynamics models ($F_n$). This set encapsulates all potential behaviors of the robot consistent with the data collected so far.

Pessimistic Safety and Optimistic Exploration

When planning, the algorithm ensures that the chosen policy is safe for every model in the plausible set. If any potential model predicts a collision, the action is rejected. Conversely, within these safety bounds, the robot selects actions that at least one model predicts will be highly informative.

Figure 4: Visualization of safe ($f^s$) and optimal/exploratory ($f^*$) trajectories within a safe region. The framework ensures that even as the agent explores, it remains within a provably safe region defined by current model uncertainty.

This creates a "no-win" situation for ignorance: if the robot executes a plan and the true system follows it, the robot reaches an informative state. If the true system deviates, the discrepancy provides a high-quality data point to refine the model. In both cases, the robot learns.

Task-Oriented Learning and Safety

SageDynX is "task-oriented," meaning it only reduces uncertainty in regions necessary to maximize rewards. It does not attempt to learn a perfect global model of the world, but rather a model sufficient for the task at hand. By using Model Predictive Control (MPC) to replan at every step, the agent ensures a "safe return path" to a known safe zone always exists, eliminating the need for external resets.

Experimental Evaluation

The researchers evaluated SageDynX across three challenging simulated environments:

  • Inverted Pendulum: Reaching a target while avoiding a wall constraint.
  • Drone Navigation: Tracking a complex path under unknown aerodynamic disturbances.
  • Car Racing: Navigating a track at high speeds without crossing boundaries.

Key Results

  • Zero Safety Violations: SageDynX maintained perfect safety throughout the learning process in all experiments.
  • High Efficiency: The approach achieved an order of magnitude lower cumulative regret compared to standard baselines.
  • Real-time Performance: Control sequences were calculated in approximately 32ms, demonstrating feasibility for real-world deployment.

Conclusion

SageDynX represents a significant step toward deploying autonomous systems that can safely learn and adapt in the real world. By combining pessimistic safety guarantees with optimistic exploration, it enables agents to achieve near-optimal performance in finite time without the need for risky resets or prior knowledge of complex dynamics.

Summary updated

BibTeX
@inproceedings{prajapat2025safe,
  author = {Manish Prajapat and Johannes Köhler and Melanie N. Zeilinger and Andreas Krause},
  title = {{Safe Guaranteed Dynamics Exploration with Probabilistic Models}},
  booktitle = {ARLET @ NeurIPS},
  year = {2025},
  url = {https://openreview.net/forum?id=SZvOrGVdCK},
}
Figure