Skip to main content
QUICK REVIEW

[论文解读] QSAN: A Near-term Achievable Quantum Self-Attention Network

Jinjing Shi, Ren-Xin Zhao|arXiv (Cornell University)|Jul 14, 2022
Quantum Computing Algorithms and Architecture被引用 9
一句话总结

本文提出QSAN,一种面向近期量子设备的近场量子自注意力网络,通过量子逻辑相似性(QLS)和量子比特自注意力得分矩阵(QBSASM),实现自注意力在NISQ设备上的全一步量子化实现。其在MNIST二分类任务中达到100%准确率,相较于硬件高效ansatz和QAOA ansatz分别实现1.7倍和2.3倍的更快收敛速度,且测量开销更低。

ABSTRACT

Self-Attention Mechanism (SAM) is good at capturing the internal connections of features and greatly improves the performance of machine learning models, espeacially requiring efficient characterization and feature extraction of high-dimensional data. A novel Quantum Self-Attention Network (QSAN) is proposed for image classification tasks on near-term quantum devices. First, a Quantum Self-Attention Mechanism (QSAM) including Quantum Logic Similarity (QLS) and Quantum Bit Self-Attention Score Matrix (QBSASM) is explored as the theoretical basis of QSAN to enhance the data representation of SAM. QLS is employed to prevent measurements from obtaining inner products to allow QSAN to be fully implemented on quantum computers, and QBSASM as a result of the evolution of QSAN to produce a density matrix that effectively reflects the attention distribution of the output. Then, the framework for one-step realization and quantum circuits of QSAN are designed for fully considering the compression of the measurement times to acquire QBSASM in the intermediate process, in which a quantum coordinate prototype is introduced as well in the quantum circuit for describing the mathematical relation between the output and control bits to facilitate programming. Ultimately, the method comparision and binary classification experiments on MNIST with the pennylane platform demonstrate that QSAN converges about 1.7x and 2.3x faster than hardware-efficient ansatz and QAOA ansatz respevtively with similar parameter configurations and 100% prediction accuracy, which indicates it has a better learning capability. QSAN is quite suitable for fast and in-depth analysis of the primary and secondary relationships of image and other data, which has great potential for applications of quantum computer vision from the perspective of enhancing the information extraction ability of models.

研究动机与目标

  • 开发一种适用于含噪声中等规模量子(NISQ)设备的完全量子可部署自注意力机制。
  • 通过在单步内实现注意力得分与输出的全量子计算,克服混合量子-经典注意力模型的局限性。
  • 通过最小化电路执行期间的经典数据提取,减少量子注意力中的测量开销。
  • 利用量子在状态空间和相似性计算方面的优势,增强高维数据的表示与特征提取能力。
  • 设计一种可扩展、规则的量子电路架构,具备可编程结构,以支持未来量子神经网络。

提出的方法

  • 引入量子逻辑相似性(QLS)以替代经典内积计算,避免大规模纠缠态制备,实现基于测量的直接相似性评估。
  • 提出量子比特自注意力得分矩阵(QBSASM)作为密度矩阵表示,用于在量子演化过程中编码完整的注意力分布。
  • 设计完整的QSAN量子电路框架,包含九个步骤和五个功能模块,优化以最小化测量次数。
  • 引入量子坐标原型以数学描述控制-输出比特之间的关系,支持系统化编程并具备潜在优化空间。
  • 采用振幅编码与角度编码表示输入数据,使用单层ansatz以保持近期可行性。
  • 利用PennyLane平台实现并基准测试QSAN在MNIST二分类任务上的表现。

实验结果

研究问题

  • RQ1是否可以在不依赖经典后处理的前提下,在近期量子硬件上实现完全量子化的自注意力机制?
  • RQ2如何利用量子在状态表示与相似性计算方面的优势,提升注意力机制的效率?
  • RQ3通过电路级优化,量子注意力模型中的测量开销能在多大程度上被减少?
  • RQ4量子自注意力网络是否能在图像分类任务中实现比现有变分量子模型更快的收敛速度与更高的准确率?
  • RQ5QBSASM密度矩阵的结构如何反映量子注意力分布,并支持可扩展的信息提取?

主要发现

  • QSAN在MNIST二分类任务中,使用与基线模型相似的参数配置,实现了100%的训练与测试准确率。
  • 在相同实验设置下,QSAN的收敛速度比硬件高效ansatz快约1.7倍,比QAOA ansatz快2.3倍。
  • QSAN的损失函数值在整个训练过程中保持更低,表明其具备更强的学习能力与更优的优化效果。
  • QBSASM密度矩阵在希尔伯特空间中展现出高维结构,证明其具备经典不可模拟的指数级信息表示能力。
  • QSAN的收敛速度对批量大小敏感,当批量大小从15增加到20时性能下降,表明批量大小与训练动态之间存在权衡。
  • QSAN框架具备可扩展性,可嵌入经典或量子机器学习架构中,为量子增强型Transformer的发展铺平道路。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。