Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Log inSign up
Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Blog
Job Board
Q3AS

© 2026 Aqora Quantum S.A.S.

TermsPrivacyLegal Notice

arXiv:2506.07937 · IEEE International Conference on Quantum Computing and Engineering (QCE)

Quantum Graph Transformer for NLP Sentiment Classification

Shamminuj Aktar, Andreas Bärtschi, Abdel‐Hameed A. Badawy, Stephan Eidenben

Published Aug 30, 2025• 6 citations
arXivHTMLPDF

Abstract

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 demonstrate that QGT effectively learns sentiment representations, achieving accuracies of 93.0%, 90.5%, and 88.0% on the Yelp, IMDB, and Amazon datasets, and 100% and 95.12% on the synthetic MC and RP datasets, respectively. These results highlight the potential of graph-based quantum NLP techniques for advancing efficient and scalable language understanding.

DOI
10.1109/qce65121.2025.10441

Related papers

Hybrid Quantum–Classical Graph Transformers for Efficient Sentiment Analysis

Shamminuj Aktar, Andreas Bärtschi, Abdel‐Hameed A. Badawy +1 more

ABSTRACT Quantum Machine Learning (QML) offers a promising paradigm that leverages quantum computing principles to develop efficient and expressive models for learning from complex and structured data. Recent advances in natural language processing (NLP) and artificial intelligence (AI) have demonstrated capabilities in understanding, generating, and reasoning over linguistic and multimodal information. In this work, we present the Quantum Graph Transformer (QGT) , a hybrid quantum–classical architecture that extends graph transformer capabilities through quantum self‐attention. The QGT models variable‐length sentences as token graphs, where both the embedding encoding and the self‐attention mechanisms are implemented using parameterized quantum circuits (PQCs), enabling efficient contextual learning with significantly fewer trainable parameters. We train QGT using both fully connected and ‐nearest‐neighbor graph structures and evaluate it on five benchmark sentiment‐classification datasets. Experimental results show that QGT consistently achieves higher or comparable accuracy to existing quantum NLP models and outperforms a Classical Graph Transformer (CGT) baseline with identical architecture, achieving fewer parameters while requiring 3– fewer samples to reach comparable performance. These findings highlight the potential of graph‐based quantum models as scalable and data‐efficient architectures for natural language understanding.

Advanced Quantum Technologies•Mar 1, 2026•0 citations

Adaptive Quantum-Inspired Graph Transformer for NLP Sentiment Classification

Jiarong Pan, Mingxuan Kuang

Sentiment classification remains challenging due to subtle semantic cues and long-range contextual dependencies that are often difficult for existing models to capture. Although the Quantum Graph Transformer (QGT) offers a hybrid quantum–classical perspective, its reliance on fully connected graphs and less flexible attention mechanisms limits its effectiveness. To overcome these issues, we introduce the Adaptive Quantum-Inspired Graph Transformer (AQGT), which incorporates an adaptive semantic graph construction method that forms sparse yet informative graphs, along with a quantum-inspired message passing unit for more efficient feature aggregation. AQGT processes text through a multi-layer hybrid architecture that dynamically models semantic structure and enhances node interactions through principled message passing. Experiments on multiple sentiment classification benchmarks show that AQGT achieves consistently stronger performance than classical models and the original QGT. Ablation studies validate the importance of the adaptive graph and message passing components. AQGT further displays good sample efficiency, stable behavior across hyperparameters, and strong qualitative performance in handling nuanced sentiment phenomena such as sarcasm and implicit polarity. These findings demonstrate AQGT’s capability as a robust and expressive model for complex sentiment analysis.

•Nov 24, 2025•0 citations

Quantum-Enhanced Adaptive Graph Convolutional Networks for Sentiment Representation Learning

Mingrui Rao, Zihan Long

Sentiment classification struggles with complex semantic relationships using static text graphs. We introduce the Quantum-Enhanced Adaptive Graph Convolutional Network (QAGCN), a hybrid quantum-classical architecture for robust sentiment representation. QAGCN's core is a Quantum-Enhanced Graph Construction Module employing a Parameterized Quantum Circuit (PQC) to dynamically learn emotional association strengths between word pairs. This generates a task-adaptive adjacency matrix, which then feeds into classical GNN layers. Evaluations on benchmark datasets (Yelp, IMDB, Amazon, MC, RP) demonstrate QAGCN's superior or competitive accuracy against state-of-the-art classical graph models and the Quantum Graph Transformer. QAGCN notably improved performance on Amazon where prior quantum models struggled, underscoring its adaptive graph construction's efficacy. An ablation study confirms the critical contribution of PQC-driven adaptive graph learning. Our findings highlight the significant potential of quantum-enhanced adaptive graph learning for complex Natural Language Processing.

•Jan 6, 2026•0 citations

QTrans: A Quantum Transformer for Sentiment Classification

Ren-Xin Zhao, Xinjie Huang, Yahong Liu +4 more

In small-scale binary sentiment classification scenarios, factors such as negation, contrastive shifts, and cross-word dependencies lead to the non-linear coupling of sentiment cues, making it difficult for conventional lightweight models to fully capture the contextual relationships between tokens. To address this issue, we propose a model named QTrans, which uses parameterized quantum circuits to construct query, key, and value features and derives attention coefficients from Gaussian distances between quantum measurements. By further integrating a quantum feed-forward neural network, residual connections, and layer normalization, the model establishes an end-to-end trainable quantum-classical hybrid framework for sentiment classification. Experimental results on the MR, CR, and MPQA datasets show that QTrans achieves test accuracies of 72.13\%, 69.51\%, and 63.45\%, respectively, representing improvements of 2.88, 3.17, and 3.79 percentage points over the best-performing classical baselines for each dataset. Overall, QTrans expands the application of parameterized quantum circuits in lightweight sentiment analysis and lays an experimental foundation for further research into quantum multi-head self-attention for modeling textual relationships.

arXiv:2609.12011•Sep 10, 2026•0 citations

CTQWformer: A CTQW-based Transformer for Graph Classification

Zhan Li, Wuqing Yu, Yusen Wu +1 more

Graph Neural Networks (GNN) and Transformer-based architectures have achieved remarkable progress in graph learning, yet they still struggle to capture both global structural dependencies and model the dynamic information propagation. In this paper, we propose CTQWformer, a hybrid graph learning framework that integrates continuous-time quantum walks (CTQW) with GNN. CTQWformer employs a trainable Hamiltonian that fuses graph topology and node features, enabling physically grounded modeling of quantum walk dynamics that captures rich and intricate graph structure information. The extracted CTQW-based representations are incorporated into two complementary modules:(i) a Graph Transformer module that embeds final-time propagation probabilities as structural biases in the self-attention mechanism, and (ii) a Graph Recurrent Module that captures temporal evolution patterns with bidirectional recurrent networks. Extensive experiments on benchmark graph classification datasets demonstrate that CTQWformer outperforms graph kernel and GNN-based methods, demonstrating the potential of integrating quantum dynamics into trainable deep learning frameworks for graph representation learning. To the best of our knowledge, CTQWformer is the first hybrid CTQW-based Transformer, integrating CTQW-derived structural bias with temporal evolution modeling to advance graph learning.

cs.LGCross-listedarXiv:2605.09486•May 12, 2026•0 citations

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

S. M. Yousuf Iqbal Tomal, Abdullah Al Shafin, Bhattacharjee, Debojit +2 more

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.

arXiv:2501.15630•Jan 26, 2025•3 citations
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 demonstrate that QGT effectively learns sentiment representations, achieving accuracies of 93.0%, 90.5%, and 88.0% on the Yelp, IMDB, and Amazon datasets, and 100% and 95.12% on the synthetic MC and RP datasets, respectively. These results highlight the potential of graph-based quantum NLP techniques for advancing efficient and scalable language understanding.
ABSTRACT Quantum Machine Learning (QML) offers a promising paradigm that leverages quantum computing principles to develop efficient and expressive models for learning from complex and structured data. Recent advances in natural language processing (NLP) and artificial intelligence (AI) have demonstrated capabilities in understanding, generating, and reasoning over linguistic and multimodal information. In this work, we present the Quantum Graph Transformer (QGT) , a hybrid quantum–classical architecture that extends graph transformer capabilities through quantum self‐attention. The QGT models variable‐length sentences as token graphs, where both the embedding encoding and the self‐attention mechanisms are implemented using parameterized quantum circuits (PQCs), enabling efficient contextual learning with significantly fewer trainable parameters. We train QGT using both fully connected and ‐nearest‐neighbor graph structures and evaluate it on five benchmark sentiment‐classification datasets. Experimental results show that QGT consistently achieves higher or comparable accuracy to existing quantum NLP models and outperforms a Classical Graph Transformer (CGT) baseline with identical architecture, achieving fewer parameters while requiring 3– fewer samples to reach comparable performance. These findings highlight the potential of graph‐based quantum models as scalable and data‐efficient architectures for natural language understanding.
Sentiment classification remains challenging due to subtle semantic cues and long-range contextual dependencies that are often difficult for existing models to capture. Although the Quantum Graph Transformer (QGT) offers a hybrid quantum–classical perspective, its reliance on fully connected graphs and less flexible attention mechanisms limits its effectiveness. To overcome these issues, we introduce the Adaptive Quantum-Inspired Graph Transformer (AQGT), which incorporates an adaptive semantic graph construction method that forms sparse yet informative graphs, along with a quantum-inspired message passing unit for more efficient feature aggregation. AQGT processes text through a multi-layer hybrid architecture that dynamically models semantic structure and enhances node interactions through principled message passing. Experiments on multiple sentiment classification benchmarks show that AQGT achieves consistently stronger performance than classical models and the original QGT. Ablation studies validate the importance of the adaptive graph and message passing components. AQGT further displays good sample efficiency, stable behavior across hyperparameters, and strong qualitative performance in handling nuanced sentiment phenomena such as sarcasm and implicit polarity. These findings demonstrate AQGT’s capability as a robust and expressive model for complex sentiment analysis.
Sentiment classification struggles with complex semantic relationships using static text graphs. We introduce the Quantum-Enhanced Adaptive Graph Convolutional Network (QAGCN), a hybrid quantum-classical architecture for robust sentiment representation. QAGCN's core is a Quantum-Enhanced Graph Construction Module employing a Parameterized Quantum Circuit (PQC) to dynamically learn emotional association strengths between word pairs. This generates a task-adaptive adjacency matrix, which then feeds into classical GNN layers. Evaluations on benchmark datasets (Yelp, IMDB, Amazon, MC, RP) demonstrate QAGCN's superior or competitive accuracy against state-of-the-art classical graph models and the Quantum Graph Transformer. QAGCN notably improved performance on Amazon where prior quantum models struggled, underscoring its adaptive graph construction's efficacy. An ablation study confirms the critical contribution of PQC-driven adaptive graph learning. Our findings highlight the significant potential of quantum-enhanced adaptive graph learning for complex Natural Language Processing.
In small-scale binary sentiment classification scenarios, factors such as negation, contrastive shifts, and cross-word dependencies lead to the non-linear coupling of sentiment cues, making it difficult for conventional lightweight models to fully capture the contextual relationships between tokens. To address this issue, we propose a model named QTrans, which uses parameterized quantum circuits to construct query, key, and value features and derives attention coefficients from Gaussian distances between quantum measurements. By further integrating a quantum feed-forward neural network, residual connections, and layer normalization, the model establishes an end-to-end trainable quantum-classical hybrid framework for sentiment classification. Experimental results on the MR, CR, and MPQA datasets show that QTrans achieves test accuracies of 72.13\%, 69.51\%, and 63.45\%, respectively, representing improvements of 2.88, 3.17, and 3.79 percentage points over the best-performing classical baselines for each dataset. Overall, QTrans expands the application of parameterized quantum circuits in lightweight sentiment analysis and lays an experimental foundation for further research into quantum multi-head self-attention for modeling textual relationships.
Graph Neural Networks (GNN) and Transformer-based architectures have achieved remarkable progress in graph learning, yet they still struggle to capture both global structural dependencies and model the dynamic information propagation. In this paper, we propose CTQWformer, a hybrid graph learning framework that integrates continuous-time quantum walks (CTQW) with GNN. CTQWformer employs a trainable Hamiltonian that fuses graph topology and node features, enabling physically grounded modeling of quantum walk dynamics that captures rich and intricate graph structure information. The extracted CTQW-based representations are incorporated into two complementary modules:(i) a Graph Transformer module that embeds final-time propagation probabilities as structural biases in the self-attention mechanism, and (ii) a Graph Recurrent Module that captures temporal evolution patterns with bidirectional recurrent networks. Extensive experiments on benchmark graph classification datasets demonstrate that CTQWformer outperforms graph kernel and GNN-based methods, demonstrating the potential of integrating quantum dynamics into trainable deep learning frameworks for graph representation learning. To the best of our knowledge, CTQWformer is the first hybrid CTQW-based Transformer, integrating CTQW-derived structural bias with temporal evolution modeling to advance graph learning.
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.