Abstract: Training Deep Reinforcement Learning (DRL) agents is often a time-consuming process requiring extensive environment interactions. This challenge is amplified in Batch RL (Offline RL), where agents must learn solely from pre-collected datasets without further exploration. We propose BCQQ (Batch-Constraint Quantum Q-Learning), a hybrid quantum-classical algorithm that leverages Variational Quantum Circuits (VQCs) as function approximators. Central to our approach is a novel Cyclic Data Re-uploading scheme that enhances model expressivity. We demonstrate that BCQQ significantly outperforms classical neural network-based Batch-Constraint Q-Learning (BCQ) in low-data regimes within the OpenAI CartPole environment.
Introduction
Reinforcement Learning typically relies on millions of trial-and-error interactions, which is often impractical or hazardous in real-world applications like robotics or healthcare. Offline RL addresses this by learning from fixed datasets. However, it is prone to extrapolation error, where the agent inaccurately estimates rewards for state-action pairs not present in the training data. While classical algorithms like BCQ mitigate this by constraining the agent's policy to the data distribution, they still require substantial datasets to generalize effectively. This research investigates whether quantum models, theoretically more data-efficient, can overcome these limitations.
Methodology
The BCQQ Framework
BCQQ integrates two primary components:
- Discrete BCQ: A classical framework that uses a generative model to identify likely actions from the training data, preventing the Q-learning agent from selecting out-of-distribution actions.
- Variational Quantum Circuits (VQCs): These serve as the function approximators. Environment states are encoded into qubits, processed through trainable quantum gates, and measured to derive Q-values.
Cyclic Data Re-uploading
To increase the expressivity of VQCs, we introduce Cyclic Data Re-uploading. While standard re-uploading repeats input data across layers, our cyclic scheme shifts the order of input variables across qubits in a round-robin fashion (e.g., Layer 1 processes $[x_0, x_1, x_2, x_3]$, while Layer 2 processes $[x_1, x_2, x_3, x_0]$).
This architecture ensures that every qubit eventually interacts with every feature of the input state, effectively increasing the model's capacity without increasing the parameter count.
Experimental Setup
We evaluated BCQQ on the OpenAI CartPole-v1 environment using two types of offline data:
- Random Buffers: Trajectories generated by a random policy, representing a "worst-case" learning scenario, with sizes ranging from $10^2$ to $10^6$ samples.
- Noisy-Expert Buffers: Small datasets (25, 50, or 100 samples) generated by a high-performing agent with added noise to test the agent's ability to learn stable policies from limited, imperfect demonstrations.
Results and Discussion
Quantum Data Efficiency
In the low-data regime (100 random samples), the BCQQ agent (42 parameters) achieved a perfect score of 500. In contrast, a classical neural network with 67 parameters failed to learn a viable policy, scoring only ~12.88. This suggests that quantum models can extract more meaningful patterns from sparse data than their classical counterparts.
Effective Dimension and Expressivity
Using the Fisher Information Matrix (FIM), we analyzed the "effective dimension" of the models. The cyclic data re-uploading scheme significantly increases the range of functions the quantum model can represent.
As shown in the analysis, quantum models maintain a high normalized effective dimension even as the number of data points increases, indicating a superior ability to utilize available information compared to classical models.
Hardware Validation
The trained BCQQ agent was validated on real quantum hardware (IBMQ). By employing Zero Noise Extrapolation (ZNE) to mitigate hardware errors, the agent achieved a near-perfect reward of 495, demonstrating the practical viability of the approach on Noisy Intermediate-Scale Quantum (NISQ) devices.
Conclusion
BCQQ demonstrates a clear advantage in sample efficiency for offline reinforcement learning tasks. By utilizing cyclic data re-uploading, the model achieves high expressivity and stability even when trained on extremely small datasets. Future work will focus on scaling these circuits to more complex environments and exploring alternative quantum architectures for the generative components of the BCQ framework.
Summary updated