Abstract
Agents should avoid unsafe behaviour during both training and deployment. This typically requires a simulator and a procedural specification of unsafe behaviour. Unfortunately, a simulator is not always available, and procedurally specifying constraints can be difficult or impossible for many real-world tasks. A recently introduced technique, ReQueST, aims to solve this problem by learning a neural simulator of the environment from safe human trajectories, then using the learned simulator to efficiently learn a reward model from human feedback. However, it is yet unknown whether this approach is feasible in complex 3D environments with feedback obtained from real humans - whether sufficient pixel-based neural simulator quality can be achieved, and whether the human data requirements are viable in terms of both quantity and quality. In this paper we answer this question in the affirmative, using ReQueST to train an agent to perform a 3D first-person object collection task using data entirely from human contractors. We show that the resulting agent exhibits an order of magnitude reduction in unsafe behaviour compared to standard reinforcement learning.
Introduction
In traditional Reinforcement Learning (RL), agents typically learn through a process of trial and error. While effective in digital games, this approach is often unacceptably dangerous in real-world applications like robotics or autonomous driving, where a single "error" can lead to catastrophic hardware failure or safety hazards.
To address this, researchers have explored ReQueST (Reward Query Synthesis via Trajectory optimization). This framework aims to achieve safe exploration by training agents within a "learned simulator" rather than the real environment. This paper demonstrates the first successful scaling of ReQueST to complex 3D environments using feedback provided entirely by human contractors, achieving high performance with significantly fewer safety violations.
Methodology
The ReQueST framework utilizes a multi-stage pipeline to bridge the gap between safe human demonstration and autonomous agent deployment:
- Safe Data Collection: Human contractors provide "safe" exploratory trajectories in the target environment. They are instructed to explore the space and interact with objects while strictly avoiding hazards.
- Dynamics Model Learning: This data trains a neural network to act as a learned simulator, predicting future pixel observations based on current states and actions.
- Trajectory Synthesis: The agent uses the learned simulator to "imagine" potential trajectories. It specifically synthesizes scenarios that are likely to be informative—such as those the current reward model finds ambiguous or dangerous.
- Human Reward Sketching: Humans watch videos of these imagined trajectories and provide continuous "reward sketches," indicating the desirability of the agent's behavior at every moment.
- Deployment via MPC: The final agent is deployed using Model Predictive Control (MPC), where it samples possible paths in its internal simulator and executes the one with the highest predicted reward.
Experimental Setup
The study utilized a custom 3D first-person environment built in Unity. The primary task involved navigating an arena to collect three apples, one of which required triggering a switch to open a gate. Safety was evaluated across two distinct variants:
- Cliff Edge: A platform environment where falling off the edge constitutes an unsafe event.
- Dangerous Blocks: An environment containing red blocks that, if touched, "tamper" with the agent's internal reward mechanism, representing a subtle safety constraint.
Training relied on approximately 160 person-hours of exploratory trajectories and 10 person-hours of reward sketches provided by human contractors.
Key Results and Insights
- Significant Safety Improvements: In the 3D object collection task, ReQueST enabled training with 3 to 20 times fewer unsafe behaviors compared to standard RL algorithms like R2D2. Most remaining unsafe events during training were attributed to human errors during initial data collection rather than agent failure.
- Feasibility of Pixel-Based Simulators: A critical finding was that pixel-based neural simulators, despite occasional "hallucinations" or blurriness, provide sufficient visual information for humans to provide accurate reward feedback.
- Data Efficiency: While the dynamics model requires a large dataset (~100k trajectories), the reward model's performance plateaus quickly, requiring only about 250 human sketches to become effective.
- Zero-Shot Safety: Because the agent learns to identify and avoid danger entirely in its "imagination," it can be deployed in the real environment with near-zero safety violations from the very first step of deployment.
Discussion and Limitations
While successful, the authors identified several areas for future improvement. The dynamics model occasionally produced "mirage-like" effects where objects would shimmer or disappear, suggesting that newer generative techniques like diffusion models could improve simulator fidelity. Additionally, the agent occasionally exhibited "reward hacking," such as moving back and forth near an apple to repeatedly trigger a programmatic bonus.
Future work will focus on scaling these methods to physical robotic systems, where the learned simulator must account for the complexities and noise of real-world physics.
Summary updated