arXiv:2501.15630cs.CLquant-ph2025-01被引 17

用量子机制增强注意力,让NLP模型更高效地捕捉语义关系。

Quantum-Enhanced Attention Mechanism in NLP: A Hybrid Classical-Quantum Approach

  • 将词向量嵌入量子态空间,通过可变电路和纠缠核相似性计算注意力。
  • 在多个NLP任务中提升表现,且参数量少于传统模型。
  • 适合对效率与表达能力有要求的NLP研究者,尤其关注量子计算融合。

量子计算的进展为增强深度学习架构开辟了新路径,特别是在高维、上下文丰富的自然语言处理(NLP)领域。本文提出一种混合经典-量子Transformer模型,将量子增强注意力机制集成到标准经典架构中。通过参数化变分电路将词元表示嵌入量子希尔伯特空间,并利用感知纠缠的核相似性,模型捕捉了传统点积注意力无法企及的复杂语义关系。我们在多个NLP基准上验证该方法的有效性,结果显示量子注意力层生成全局一致的注意力图,且潜在特征更具可分性,同时所需参数远少于经典对应模型。这些发现表明,量子-经典混合模型有望成为NLP中高效且资源节约的注意力机制替代方案。

原文摘要 · Abstract (English)

Recent advances in quantum computing have opened new pathways for enhancing deep learning architectures, particularly in domains characterized by high-dimensional and context-rich data such as natural language processing (NLP). In this work, we present a hybrid classical-quantum Transformer model that integrates a quantum-enhanced attention mechanism into the standard classical architecture. By embedding token representations into a quantum Hilbert space via parameterized variational circuits and exploiting entanglement-aware kernel similarities, the model captures complex semantic relationships beyond the reach of conventional dot-product attention. We demonstrate the effectiveness of this approach across diverse NLP benchmarks, showing improvements in both efficiency and representational capacity. The results section reveal that the quantum attention layer yields globally coherent attention maps and more separable latent features, while requiring comparatively fewer parameters than classical counterparts. These findings highlight the potential of quantum-classical hybrid models to serve as a powerful and resource-efficient alternative to existing attention mechanisms in NLP.

量子计算注意力机制NLP混合模型

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。