AG-2024.01-1910·quant-ph·cross-listed: cs.AI
GQHAN: A Grover-inspired Quantum Hard Attention Network
Authors
- Ren-Xin Zhao
- Jinjing Shi
- Xuelong Li
Abstract
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.
Submitted
25 January 20242 years ago
Version
v1
License
CC-BY-4.0
DOI
10.48550/arXiv.2401.14089
Summary
Researchers built a quantum machine learning model that uses Grover's algorithm to implement "hard attention"—letting the system focus on important quantum data—while solving the problem that hard attention mechanisms aren't normally trainable.
- The key innovation is a Flexible Oracle that masks irrelevant quantum data while remaining differentiable, using Grover's search algorithm as inspiration rather than treating attention as a continuous mathematical operation.
- On Fashion MNIST binary classification, GQHAN outperformed existing quantum soft-attention models in both accuracy and speed of learning, suggesting hard attention genuinely helps quantum models prioritize relevant information.
- The model proved more robust to realistic quantum noise than alternatives, which matters because near-term quantum computers are notoriously error-prone—a practical advantage for real devices.
curious · generated by claude-haiku-4-5
Chat with this PDF
Ask questions, probe assumptions, request a plain-English summary. Answers cite sections from the preprint itself.
Community
Questions and answers about this paper from other readers. No formal peer review — just a place to think out loud.