Multi-head attention mechanism excels at capturing the contextual information, while quantum neural networks offer exponential representational capacity. In this work, we unify these advantages by introducing a novel hybrid model, Gaussian Projected Quantum Multi-Head Attention (GPMHA), which integrates multi-head attention mechanism into a quantum-based neural network. GPMHA employs an asymmetric latent projection that maps quantum states to scalar query and key representations while preserving a high-dimensional quantum value vector. Attention scores are computed using a Gaussian kernel to enable efficient quantum-compatible similarity estimation. GPMHA is evaluated on sentiment analysis tasks using the Yelp, IMDb, and Amazon datasets. Results show that GPMHA consistently outperforms baseline quantum models, achieving 87.17% ± 0.82 accuracy on the Amazon dataset, compared to 84.25% ± 1.75 from the Quantum Self-Attention Neural Network (QSANN). These findings highlight the potential of GPMHA as a scalable attention mechanism for near-term quantum natural language processing applications.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

GPMHA: Gaussian Projected Quantum Multi-head Attention for Sentiment Analysis

  • Lenh Phan Cong Pham,
  • Huan Phong Thai,
  • Phuong Thao Dang Nguyen,
  • Luan Trong Nguyen,
  • Anh The Le

摘要

Multi-head attention mechanism excels at capturing the contextual information, while quantum neural networks offer exponential representational capacity. In this work, we unify these advantages by introducing a novel hybrid model, Gaussian Projected Quantum Multi-Head Attention (GPMHA), which integrates multi-head attention mechanism into a quantum-based neural network. GPMHA employs an asymmetric latent projection that maps quantum states to scalar query and key representations while preserving a high-dimensional quantum value vector. Attention scores are computed using a Gaussian kernel to enable efficient quantum-compatible similarity estimation. GPMHA is evaluated on sentiment analysis tasks using the Yelp, IMDb, and Amazon datasets. Results show that GPMHA consistently outperforms baseline quantum models, achieving 87.17% ± 0.82 accuracy on the Amazon dataset, compared to 84.25% ± 1.75 from the Quantum Self-Attention Neural Network (QSANN). These findings highlight the potential of GPMHA as a scalable attention mechanism for near-term quantum natural language processing applications.