Abstract
Restricted Boltzmann Machines (RBMs) are powerful generative models, but their training is computationally intensive due to the need for Markov Chain Monte Carlo (MCMC) sampling. This paper explores a quantum-classical hybrid approach, utilizing the D-Wave 2000Q quantum annealer to perform the sampling step. By embedding a 64x64 RBM onto the Chimera graph architecture and optimizing temperature scaling, the researchers achieved classification accuracy on the Bars and Stripes dataset comparable to classical Contrastive Divergence methods. The results demonstrate the potential of quantum hardware to accelerate machine learning tasks by bypassing traditional MCMC bottlenecks.
Introduction
Restricted Boltzmann Machines (RBMs) are a class of energy-based generative models used for feature learning, dimensionality reduction, and collaborative filtering. A primary challenge in training RBMs is the calculation of the log-likelihood gradient, which requires estimating a model-dependent expectation term. Traditionally, this is done using Contrastive Divergence (CD), which relies on MCMC methods like Gibbs sampling. However, MCMC can be slow to converge and may fail to accurately sample from complex energy landscapes.
This paper proposes a hybrid approach where the "model-dependent" part of the gradient is estimated by drawing samples from a D-Wave 2000Q quantum annealer. By leveraging quantum tunneling and annealing, the hardware can potentially explore the energy landscape more efficiently than classical chains, offering a path toward faster training of deep generative models.
Methods
Quantum-Classical Hybrid Training
The training process follows a hybrid loop. The "data-dependent" part of the gradient is calculated classically using the training data. For the "model-dependent" part, the current weights and biases of the RBM are mapped onto the quantum processor. The D-Wave 2000Q then generates samples representing the model's distribution at its physical temperature. These samples are used to update the weights classically, and the cycle repeats.
The Embedding Challenge
The D-Wave 2000Q's "Chimera" architecture presents a significant constraint: qubits are arranged in cells with limited connectivity (degree 6). In contrast, an RBM requires a bipartite graph with all-to-all connectivity between the visible and hidden layers. To overcome this, the researchers employed ferromagnetic coupling, chaining 16 physical qubits together to represent a single "logical" unit. This technique allowed for the embedding of an RBM with 64 visible and 64 hidden units.
Temperature Scaling
Quantum annealers do not sample from a distribution at a fixed, user-defined mathematical temperature. To align the hardware's physical temperature with the model's requirements, the authors introduced an empirical scaling parameter, $S$. This parameter scales the weights and biases before they are programmed onto the D-Wave. Finding the optimal $S$ (determined to be 4 for this study) is crucial for achieving high classification accuracy.
Datasets and Model Architecture
The study utilized the Bars and Stripes (BAS) dataset, consisting of 8x8 binary images. These images contain either horizontal stripes or vertical bars. For classification, the last two bits of the 64-bit image string were designated as labels (e.g., 01 for bars, 10 for stripes). The training set included 300 records, with 200 reserved for testing.
Results and Discussion
Classification Performance
The quantum-trained RBM achieved a maximum classification accuracy of approximately 85-90%, which is on par with the classical CD-1 algorithm. Notably, the quantum approach exhibited greater stability during training compared to the higher fluctuations observed in classical CD-1 once the optimal scaling parameter $S$ was identified.
Generative Quality and Reconstruction
While classification was successful, the classical CD-1 algorithm outperformed the quantum RBM in image reconstruction and log-likelihood metrics. For instance, when 16 bits were corrupted, CD-1 achieved perfect reconstruction, whereas the D-Wave RBM missed two bits. This suggests that while the quantum annealer provides useful samples for classification, it may not yet capture the full complexity of the data distribution as effectively as classical methods for generative tasks.
Hardware Impact
A comparison between the standard D-Wave 2000Q and a newer "lower-noise" version revealed that hardware improvements directly translate to better model performance, specifically in terms of higher log-likelihood values.
Limitations and Future Outlook
Despite the promising results, several hurdles remain for scaling this approach to larger datasets:
- Connectivity Overhead: Chaining 16 qubits for a single logical unit is resource-intensive. Future hardware with higher native connectivity will be essential for scaling beyond toy datasets.
- Automated Temperature Estimation: The current reliance on empirical tuning for the scaling parameter $S$ is a bottleneck. Developing methods for automatic, instance-dependent temperature estimation is a key area for future research.
- Generative Fidelity: Improving the quality of quantum samples to match or exceed classical MCMC in generative tasks remains a primary goal.
Summary updated