QKSAN: A Quantum Kernel Self-Attention Network

Ren-Xin Zhao,Jinjing Shi,Xuelong Li
2023-10-12
Abstract: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 a potential learning advantage is revealed in partial QKSAN subclasses that acquire an impressive more than 98.05% high accuracy with very few parameters that are much less in aggregate 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 Physics,Artificial Intelligence
What problem does this paper attempt to address?
### Problems the paper attempts to solve This paper aims to solve the effectiveness problem of quantum machine - learning (QML) models when dealing with large - scale and high - dimensional quantum data. Specifically, many existing QML models lack the ability to distinguish internal relationships within data like the self - attention mechanism (SAM), which limits their effectiveness in processing large - scale quantum data. To overcome this problem, the paper introduces a quantum - kernel self - attention mechanism (QKSAM), combining the data - representation advantages of the quantum - kernel method (QKM) and the efficient information - extraction ability of SAM. In addition, based on QKSAM, a quantum - kernel self - attention network (QKSAN) framework is proposed. By introducing the principle of deferred measurement (DMP) and conditional - measurement techniques, half of the quantum resources are released, thereby enhancing the feasibility and adaptability of the model. Finally, QKSAN conducts experiments on binary - classification tasks on the MNIST and Fashion MNIST datasets and shows that it can still achieve a high accuracy of over 98.05% with a small number of parameters, indicating its potential in future large - scale quantum - data processing.