Skip to main content
QUICK REVIEW

[论文解读] Quantum-Inspired Self-Attention in a Large Language Model

Nikita Kuznetsov, Niyaz Ismagilov|arXiv (Cornell University)|Feb 9, 2026
Quantum Computing Algorithms and ArchitectureComputer Science被引用 0
一句话总结

该论文提出了一种经典量子启发自注意力(QISA)及其可部署变体QISA-A,并将其整合到GPT-1中,在CER、WER和交叉熵方面相较标准自注意力有性能提升,同时推理时间开销适中。

ABSTRACT

Recent advances in Natural Language Processing have been predominantly driven by transformer-based architectures, which rely heavily on self-attention mechanisms to model relationships between tokens in a sequence. Similarly, the field of Quantum Natural Language Processing, which seeks to leverage quantum principles to address challenges in language understanding and generation tasks, has seen the recent development of quantum self-attention mechanisms. We propose a classical quantum-inspired self-attention (QISA) mechanism and integrate it into the full autoregressive language modeling pipeline of GPT-1. To the best of our knowledge, this is the first integration of this kind, as previous quantum self-attention mechanisms have been primarily tested on text classification. In our experiments, QISA achieves better performance when compared to standard self-attention on the metrics character error rate ($15.5 imes$ better), word error rate ($4.7 imes $) and cross-entropy loss ($13 imes$). This is achieved while only requiring a $ 2.6 imes$ longer inference time.

研究动机与目标

  • 由于计算成本上升,激发在变换器中寻找标准自注意力的高效替代方案的动机。
  • 提出一种经典量子启发自注意力机制(QISA)及其可部署变体(QISA-A),将其整合到自回归语言建模流水线中。
  • 在基于GPT-1 的莎士比亚文本配置上,对QISA/QISA-A与CSA和QSANN变体进行经验评估。
  • 证明QISA/QISA-A在保持合理推理速度的同时,表现优于或等同于QSAs。
  • 讨论参数效率及未来在更大嵌入维度与量子硬件上的潜在可扩展性。

提出的方法

  • 用基于Pauli观测量的期望值计算替代自注意力中的经典值层,形成量子启发的值计算。
  • 使用可训练线性映射和Pauli字符串来计算逐-token特征,类比量子测量(方程6-8)。
  • 保持Q和K为经典线性投影,同时引入对V的经典模拟(或QISA-A的量子解答)。
  • 将QISA、QISA-A及三种QSANN变体整合入GPT-1的完整自回归流水线,使用标准因果掩蔽。
  • 在莎士比亚文本的字符级分词配置下进行多配置训练与评估;比较CE、CER和WER指标。
  • 通过在海森堡图像中缓存演化的观测量,为模拟量子模型提供推理时的优化。
Figure 1 : Left: Standard transformer block structure used in language models. Right: Modified multi-head self-attention where the standard value layer is replaced with a quantum-inspired one.
Figure 1 : Left: Standard transformer block structure used in language models. Right: Modified multi-head self-attention where the standard value layer is replaced with a quantum-inspired one.

实验结果

研究问题

  • RQ1QISA 是否在语言模型任务上相对于CSA提升标准自注意力的性能?
  • RQ2在GPT-1 自回归设定中,QISA 相对于QSANN变体在交叉熵、CER 和 WER 上的表现如何?
  • RQ3将QISA与QISA-A集成到GPT-1时,相对于CSA和QSANN在参数量与延迟方面有何影响?
  • RQ4能否通过量子可部署变体(QISA-A)在参数更少的情况下达到类似性能,以适配未来量子硬件?
  • RQ5嵌入维度和头数如何影响QISA/QISA-A 相对于 CSA 的相对性能?

主要发现

  • 在嵌入维度为16时,QISA在CER(15.5×)和WER(4.7×)以及交叉熵下降方面显著优于CSA。
  • 在大多数配置中,QISA和QISA-A在CE、CER、WER方面均优于CSA,且嵌入维度增大时增益更明显。
  • QSANN变体表现具有竞争力,但在报道的指标中,QISA往往与之相当或超越。
  • QISA的推理时间比CSA长约2.6×,而模拟量子模型的训练时间显著更长。
  • QISA-A由于参数更高效,能够在保持类似性能的同时,在未来量子硬件上具备潜在优势。
  • QM启发模型在若干配置中每头使用的参数通常少于CSA(特别是QSANNv1/v2),显示出潜在的参数效率。
Figure 2 : One layer of the hardware efficient ansatz.
Figure 2 : One layer of the hardware efficient ansatz.

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。