Offline Quantum Reinforcement Learning in a Conservative Manner

Zhihao Cheng, Kaining Zhang, Li Shen, Dacheng Tao

Abstract

This paper introduces CQ2L (Conservative Quantum Q-learning), the first algorithm specifically designed for offline quantum reinforcement learning. By integrating variational quantum circuits (VQCs) with a double Q-learning framework and a conservative penalty term, CQ2L enables quantum agents to learn effectively from static datasets. This approach mitigates the risks and costs associated with real-time environment interaction, such as those found in robotics or medical trials, while addressing the critical issue of extrapolation error inherent in offline learning.

Introduction

Reinforcement Learning (RL) has seen significant development in quantum variants (QRL) aimed at leveraging computational advantages like superposition and entanglement. However, existing QRL research is predominantly online, requiring continuous interaction with a live environment. In many real-world applications, online exploration is prohibitively expensive, dangerous, or technically unfeasible due to hardware communication overhead.

Offline RL offers a solution by learning from pre-collected, static datasets. The primary challenge in this setting is "over-optimism," where agents hallucinate high rewards for actions not represented in the training data. The authors demonstrate that naive adaptations of online QRL methods to offline datasets result in significant performance degradation, necessitating a specialized conservative framework.

Methodology: Conservative Quantum Q-learning (CQ2L)

To address the limitations of offline QRL, the authors propose CQ2L, which incorporates three key architectural innovations:

  1. Enhanced Variational Quantum Circuits (VQCs): The Q-value function is represented by VQCs that utilize data re-uploading to enhance expressivity. Additionally, trainable scaling parameters are applied at the input and output stages to map quantum measurements to the required range of Q-values.
  2. Double Q-learning: To reduce maximization bias—the tendency to overestimate values—the algorithm maintains two independent sets of quantum parameters ($\theta^A$ and $ heta^B$) to cross-validate target values.
  3. Conservative Penalty Term: This is the core mechanism of CQ2L. The loss function includes a penalty that suppresses Q-values for out-of-distribution actions while encouraging higher values for actions known to be successful in the dataset. This ensures the learned quantum Q-function serves as a reliable lower bound to the true value function.

Experimental Evaluation

CQ2L was benchmarked against three classic control tasks from the OpenAI Gym: CartPole-v0, Acrobot-v1, and MountainCar-v0. Offline datasets were generated using a classical DQN agent with a constant exploration rate ($\epsilon=0.3$), providing a diverse but non-optimal set of experiences for the quantum agent.

Performance comparison of CQ2L against offline and online VQ-DQN baselines across three control tasks.

Key Results

As illustrated in Figure 2, CQ2L significantly outperforms the naive "Offline VQ-DQN" baseline across all tasks. In CartPole-v0, CQ2L achieved a return of approximately 184 (near the maximum of 200), while the non-conservative offline version stalled at 40. Notably, in more complex tasks like Acrobot and MountainCar, the offline CQ2L agent actually outperformed the online quantum agent, suggesting that learning from a large, diverse static dataset can be more effective than limited online exploration.

Comparison of CQ2L with classical MLP-based CQL and a single-qubit ablation on the CartPole-v0 task.

Furthermore, CQ2L demonstrates parity with classical Conservative Q-Learning (CQL) using a similar parameter count (~60), as shown in Figure 6. Ablation studies confirmed that both the double Q-learning mechanism and the conservative penalty are essential; removing either component led to a significant drop in performance, particularly in the challenging Acrobot task.

Discussion and Conclusion

While CQ2L successfully establishes a framework for offline quantum RL, the authors note that a clear "quantum advantage" in terms of sample efficiency or speedup was not observed in these specific benchmarks. Current limitations include the reliance on simulation due to the noise and decoherence of NISQ hardware. Future research will focus on theoretical analyses of potential quantum speedups in offline settings and the exploration of more complex circuit architectures (ansatz) to further enhance performance and scalability.

Summary updated

BibTeX
@inproceedings{cheng2023offline,
  author = {Zhihao Cheng and Kaining Zhang and Li Shen and Dacheng Tao},
  title = {{Offline Quantum Reinforcement Learning in a Conservative Manner}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2023},
  doi = {10.1609/aaai.v37i6.25872},
}
Figure