用量子注意力机制提升文本情感分类效率与性能
Quantum Graph Transformer for NLP Sentiment Classification
- 将参数化量子电路嵌入图结构,实现高效上下文建模
- 比经典图变压器平均高5.42%准确率,合成数据上高4.76%
- 仅需一半标注样本即可达到相近效果,适合小样本场景
量子机器学习是构建更高效、更表达力强模型的有前途方向,尤其在需要理解复杂结构化数据的领域。我们提出量子图变换器(QGT),一种融合量子自注意力机制的混合图架构,用于结构化语言建模。该注意力机制通过参数化量子电路(PQC)实现,能在显著减少可训练参数的同时捕捉丰富上下文关系。我们在五个情感分类基准上评估QGT,结果表明其性能持续优于或相当现有量子自然语言处理(QNLP)模型,包括基于注意力和非注意力的方法。与等效经典图变换器相比,QGT在真实世界数据集上平均准确率提升5.42%,在合成数据集上提升4.76%。此外,QGT展现出更优样本效率,在Yelp数据集上仅需约50%的标注样本即可达到相当性能。这些结果凸显了基于图的量子自然语言处理技术在实现高效可扩展语言理解方面的潜力。
原文摘要 · Abstract (English)
Quantum machine learning is a promising direction for building more efficient and expressive models, particularly in domains where understanding complex, structured data is critical. We present the Quantum Graph Transformer (QGT), a hybrid graph-based architecture that integrates a quantum self-attention mechanism into the message-passing framework for structured language modeling. The attention mechanism is implemented using parameterized quantum circuits (PQCs), which enable the model to capture rich contextual relationships while significantly reducing the number of trainable parameters compared to classical attention mechanisms. We evaluate QGT on five sentiment classification benchmarks. Experimental results show that QGT consistently achieves higher or comparable accuracy than existing quantum natural language processing (QNLP) models, including both attention-based and non-attention-based approaches. When compared with an equivalent classical graph transformer, QGT yields an average accuracy improvement of 5.42% on real-world datasets and 4.76% on synthetic datasets. Additionally, QGT demonstrates improved sample efficiency, requiring nearly 50% fewer labeled samples to reach comparable performance on the Yelp dataset. These results highlight the potential of graph-based QNLP techniques for advancing efficient and scalable language understanding.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。