Abstract
Combining Reinforcement Learning (RL) with a prior controller can yield the best out of two worlds: RL can solve complex nonlinear problems, while the control prior ensures safer exploration and speeds up training. Prior work largely blends both components with a fixed weight, neglecting that the RL agent's performance varies with the training progress and across regions in the state space. Therefore, we advocate for an adaptive strategy that dynamically adjusts the weighting based on the RL agent's current capabilities. We propose a new adaptive hybrid RL algorithm, Contextualized Hybrid Ensemble Q-learning (CHEQ). CHEQ combines three key ingredients: (i) a time-invariant formulation of the adaptive hybrid RL problem treating the adaptive weight as a context variable, (ii) a weight adaption mechanism based on the parametric uncertainty of a critic ensemble, and (iii) ensemble-based acceleration for data-efficient RL. Evaluating CHEQ on a car racing task reveals substantially stronger data efficiency, exploration safety, and transferability to unknown scenarios than state-of-the-art adaptive hybrid RL methods.
Introduction
Deep Reinforcement Learning (RL) has achieved remarkable feats in simulation, but its real-world application is hampered by three major issues: data inefficiency, unsafe exploration, and poor generalization. Control theory offers a potential solution through "priors"—hand-engineered controllers that are safe and reliable but often suboptimal. Hybrid RL attempts to combine these two worlds. However, most existing hybrid methods use a fixed weighting between the prior and the RL agent. This is problematic because an RL agent’s capability changes over time and across different parts of the state space. Previous attempts at adaptive weighting often introduced time-varying dynamics that broke the fundamental mathematical assumptions of RL (the Markov Decision Process), leading to training instability.
Methodology
We introduce Contextualized Hybrid Ensemble Q-learning (CHEQ), which relies on three primary innovations:
- Contextualized MDP: To solve the instability caused by changing weights, we treat the adaptive weight ($\lambda$) as a context variable. By feeding $\lambda$ directly into the RL agent and critic as an input, the environment appears time-invariant to the agent, even as the blending strategy evolves.
- Uncertainty-Based Adaptation: CHEQ uses an ensemble of critics (multiple Q-networks) to estimate epistemic uncertainty via their disagreement (standard deviation). If the critics disagree, the agent is uncertain, and CHEQ automatically dials down the RL agent's influence, letting the safe control prior take the lead.
- Ensemble-Based Acceleration: Building on the Randomized Ensembled Double Q-learning (REDQ) architecture, CHEQ uses its critic ensemble to mitigate overestimation bias. This allows for a high Update-To-Data (UTD) ratio, meaning the agent can perform many gradient steps per environment interaction, drastically improving data efficiency.
Experimental Setup
The researchers evaluated CHEQ using two main environments:
- Illustrative Cart Pole: A modified version used to demonstrate how a biased control prior can destabilize standard hybrid formulations, whereas the contextualized approach remains stable.
- Car Racing Task: A high-fidelity simulation where a vehicle must be driven at its stability limits. The control prior is a standard Stanley controller for steering and a P-controller for speed.
- Transfer Tracks: To test generalization, 10 unseen race tracks with varying geometries were used to evaluate zero-shot transfer performance.
Results and Discussion
Stability and the Context Breakthrough
The most significant insight is that treating the blending weight as an input (context) rather than just an external parameter prevents the distributional shift that usually causes adaptive RL to diverge. In the Cart Pole task, this approach maintained stability where standard hybrid formulations failed.
Performance and Safety
In the car racing benchmark, CHEQ demonstrated clear superiority over state-of-the-art methods:
- Exploration Safety: CHEQ-UTD20 reduced cumulative training failures to less than 20, compared to ~700 for standard SAC and ~150 for other hybrid methods.
- Data Efficiency: Thanks to the high UTD ratio enabled by the ensemble, CHEQ reached peak performance significantly faster than competitors.
- Zero-Shot Transfer: On unseen tracks, CHEQ achieved a 95-97% success rate. While the pure control prior had 100% success, it was much slower; CHEQ managed to drive significantly faster while maintaining near-perfect safety.
Conclusion
CHEQ breaks the trade-off between safety and performance in hybrid RL. By using uncertainty as a handover signal and contextualizing the mixing weight, it achieves safe exploration and high data efficiency. Future work will explore real-world robotic hardware applications where safety is paramount.
Summary updated