The rapid advancement of quantum computing has increasingly highlighted its potential in the realm of machine learning, particularly in the context of natural language processing (NLP) tasks. Quantum machine learning (QML) leverages the unique capabilities of quantum computing to offer novel perspectives and methodologies for complex data processing and pattern recognition challenges. This paper introduces a novel Quantum Mixed-State Attention Network (QMSAN), which integrates the principles of quantum computing with classical machine learning algorithms, especially self-attention networks, to enhance the efficiency and effectiveness in handling NLP tasks. QMSAN model employs a quantum attention mechanism based on mixed states, enabling efficient direct estimation of similarity between queries and keys within the quantum domain, leading to more effective attention weight acquisition. Additionally, we propose an innovative quantum positional encoding scheme, implemented through fixed quantum gates within the quantum circuit, to enhance the model's accuracy. Experimental validation on various datasets demonstrates that QMSAN model outperforms existing quantum and classical models in text classification, achieving significant performance improvements. QMSAN model not only significantly reduces the number of parameters but also exceeds classical self-attention networks in performance, showcasing its strong capability in data representation and information extraction. Furthermore, our study investigates the model's robustness in different quantum noise environments, showing that QMSAN possesses commendable robustness to low noise.
翻译:量子计算的快速发展日益凸显其在机器学习领域的潜力,特别是在自然语言处理(NLP)任务中的机遇。量子机器学习(QML)利用量子计算的独特能力,为复杂数据处理与模式识别挑战提供了新颖视角与方法。本文提出一种新型量子混合态注意力网络(QMSAN),该网络将量子计算原理与经典机器学习算法(尤其是自注意力网络)相结合,以提升处理NLP任务的效率与效果。QMSAN模型采用基于混合态的量子注意力机制,能够在量子域内高效直接估计查询与键之间的相似度,从而实现更有效的注意力权重获取。此外,我们提出了一种创新的量子位置编码方案,通过量子电路中固定的量子门实现,以增强模型精度。基于多个数据集的实验验证表明,QMSAN模型在文本分类任务中优于现有量子与经典模型,取得了显著的性能提升。QMSAN模型不仅大幅减少了参数量,其性能更超越经典自注意力网络,展现了其在数据表征与信息提取方面的强大能力。进一步地,本研究探讨了模型在不同量子噪声环境下的鲁棒性,结果显示QMSAN对低噪声具有可观的稳健性。