Hard Attention Mechanisms (HAMs) effectively filter essential information discretely and significantly boost the performance of machine learning models on large datasets. Nevertheless, they confront the challenge of non-differentiability, which raises the risk of convergence to a local optimum. Quantum Annealing (QA) is expected to solve the above dilemma. We propose a Quantum Annealing Hard Attention Mechanism (QAHAM) for faster convergence to the global optimum without the need to compute gradients by exploiting the quantum tunneling effect. Based on the above theory, we construct a Quantum Annealing Hard Attention Network (QAHAN) on D-Wave and Pytorch platforms for MNIST and CIFAR-10 multi-classification. Experimental results indicate that the QAHAN converges faster, exhibits smoother accuracy and loss curves, and demonstrates superior noise robustness compared to two traditional HAMs. Predictably, our scheme accelerates the convergence between the fields of quantum algorithms and machine learning, while advancing the field of quantum machine vision.
Hard Attention Mechanisms (HAMs) effectively filter essential information discretely and significantly boost the performance of machine learning models on large datasets. Nevertheless, they confront the challenge of non-differentiability, which raises the risk of convergence to a local optimum. Quantum Annealing (QA) is expected to solve the above dilemma. We propose a Quantum Annealing Hard Attention Mechanism (QAHAM) for faster convergence to the global optimum without the need to compute gradients by exploiting the quantum tunneling effect. Based on the above theory, we construct a Quantum Annealing Hard Attention Network (QAHAN) on D-Wave and Pytorch platforms for MNIST and CIFAR-10 multi-classification. Experimental results indicate that the QAHAN converges faster, exhibits smoother accuracy and loss curves, and demonstrates superior noise robustness compared to two traditional HAMs. Predictably, our scheme accelerates the convergence between the fields of quantum algorithms and machine learning, while advancing the field of quantum machine vision.
Numerous current Quantum Machine Learning (QML) models exhibit an inadequacy in discerning the significance of quantum data, resulting in diminished efficacy when handling extensive quantum datasets. Hard Attention Mechanism (HAM), anticipated to efficiently tackle the above QML bottlenecks, encounters the substantial challenge of non-differentiability, consequently constraining its extensive applicability. In response to the dilemma of HAM and QML, a Grover-inspired Quantum Hard Attention Mechanism (GQHAM) consisting of a Flexible Oracle (FO) and an Adaptive Diffusion Operator (ADO) is proposed. Notably, the FO is designed to surmount the non-differentiable issue by executing the activation or masking of Discrete Primitives (DPs) with Flexible Control (FC) to weave various discrete destinies. Based on this, such discrete choice can be visualized with a specially defined Quantum Hard Attention Score (QHAS). Furthermore, a trainable ADO is devised to boost the generality and flexibility of GQHAM. At last, a Grover-inspired Quantum Hard Attention Network (GQHAN) based on QGHAM is constructed on PennyLane platform for Fashion MNIST binary classification. Experimental findings demonstrate that GQHAN adeptly surmounts the non-differentiability hurdle, surpassing the efficacy of extant quantum soft self-attention mechanisms in accuracies and learning ability. In noise experiments, GQHAN is robuster to bit-flip noise in accuracy and amplitude damping noise in learning performance. Predictably, the proposal of GQHAN enriches the Quantum Attention Mechanism (QAM), lays the foundation for future quantum computers to process large-scale data, and promotes the development of quantum computer vision.
Self-attention mechanism (SAM) is good at capturing the intrinsic connection between features to dramatically boost the performance of machine learning models. Nevertheless, the capability of SAM is not equipped with many current quantum machine learning (QML) models, thus confining their expansion on massive high-dimensional quantum data. To address the above problems, a quantum SAM (QSAM) consisting of a quantum logic similarity (QLS)-based quantum bit self-attention score matrix (QBSASM) is introduced to augment the data representation of SAM exponentially. According to QSAM, the framework and quantum circuits of a one-step achievable quantum self-attention network (QSAN) are designed to consider measurement times compression fully. Moreover, a prototype of quantum coordinates is presented during the design process to describe the mathematical relationship between the output bits and the control bits to facilitate the programming. Ultimately, MNIST binary classification experiments on the PennyLane platform and comparisons with cutting-edge QML models demonstrate QSAN converges about $1.7\times $ and $2.3\times $ faster than hardware-efficient ansatz and quantum approximate optimization algorithm (QAOA) ansatz, respectively, with similar parameter configurations and 100% prediction accuracy, which indicates that it has a better learning capability. In the CIFAR-10 classification experiments, QSAN achieves high prediction accuracy at a small scale relative to classical machine learning models. Predictably, QSAN elevates the efficiency of QML models and lays the foundation for future quantum computers to perform machine learning on massive amounts of data while promoting the advancement of quantum computer vision and other fields.
Accurate power load forecasting is vital for reliable grid operation and energy management. We propose QRNN-QA-MSSA, which builds a Quantum Recurrent Neural Network (QRNN) via Automatic Differentiation Quantum Circuits (ADQC), applies quantum annealing (QA) for global optimization, and integrates multi-scale self-attention (MSSA) to capture short-and long-term dependencies. Evaluated on four seasonal datasets against RNN, LSTM, QRNN, QRNN-QA, and QRNN-QA-SA, the proposed model achieves average RMSE = 0.017 and MAPE = 3.28%, improving over QRNN-QA by about 20.8% and 18.0%, and reducing errors by >40% compared with classical RNN and LSTM. It also converges faster with smoother error curves. The average R2reaches 99.49%, and the model maintains high accuracy under pronounced peak–valley load intervals. These results indicate that coupling quantum annealing with multi-scale attention is an effective route to optimizing quantum neural networks for complex seasonal time-series forecasting.
The Self-Attention Mechanism (SAM) excels at distilling important information from the interior of data to improve the computational efficiency of models. Nevertheless, many Quantum Machine Learning (QML) models lack the ability to distinguish the intrinsic connections of information like SAM, which limits their effectiveness on massive high-dimensional quantum data. To tackle the above issue, a Quantum Kernel Self-Attention Mechanism (QKSAM) is introduced to combine the data representation merit of Quantum Kernel Methods (QKM) with the efficient information extraction capability of SAM. Further, a Quantum Kernel Self-Attention Network (QKSAN) framework is proposed based on QKSAM, which ingeniously incorporates the Deferred Measurement Principle (DMP) and conditional measurement techniques to release half of quantum resources by mid-circuit measurement, thereby bolstering both feasibility and adaptability. Simultaneously, the Quantum Kernel Self-Attention Score (QKSAS) with an exponentially large characterization space is spawned to accommodate more information and determine the measurement conditions. Eventually, four QKSAN sub-models are deployed on PennyLane and IBM Qiskit platforms to perform binary classification on MNIST and Fashion MNIST, where the QKSAS tests and correlation assessments between noise immunity and learning ability are executed on the best-performing sub-model. The paramount experimental finding is that the QKSAN subclasses possess the potential learning advantage of acquiring impressive accuracies exceeding 98.05% with far fewer parameters than classical machine learning models. Predictably, QKSAN lays the foundation for future quantum computers to perform machine learning on massive amounts of data while driving advances in areas such as quantum computer vision.
Quantum computing (QC) has become a fascinating and popular topic due to its broad range of applications, particularly in machine learning (ML). The intersection of QC and ML is known as Quantum Machine Learning (QML). QML is a field that investigates how QC can enhance ML, making it one of the most exciting areas of research due to the potential of QC in solving complex problems. In this paper, we demonstrate the Quantum Annealing (QA) approach to improving ML in binary classification tasks. We implemented the QBoost algorithm on a few datasets using D-Wave’s quantum computers, specifically the Advantage 1 and Advantage 2 prototypes, incorporating the new feature Fast Anneal.
Large-scale machine learning (ML) models, particularly deep neural networks, often present significant challenges for traditional optimization algorithms. These algorithms, rooted in classical mechanics, frequently encounter issues such as getting trapped in local optima, high computational cost, and difficulty in handling complex, non-convex landscapes. This paper investigates the application of quantum-inspired optimization techniques to address these challenges. We explore how concepts derived from quantum phenomena – such as quantum annealing and quantum walks – can be adapted to efficiently navigate and optimize large-scale ML models. The core idea is to leverage the probabilistic and superposition properties inherent in quantum mechanics to escape local optima and accelerate the convergence process. We present a framework for designing and implementing quantum-inspired optimization strategies, focusing on the theoretical foundations and potential benefits. The proposed approach aims to provide a novel and effective solution for optimizing complex ML models, ultimately improving model performance and reducing training time. This work contributes to the growing field of quantum machine learning and offers a promising avenue for tackling the optimization problems inherent in large-scale ML.