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 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.
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 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.
This paper presents SentiQNN (Sentiment Quantum Neural Network), a novel quantum-inspired neural network architecture specifically designed for sentiment analysis tasks in natural language processing. SentiQNN leverages quantum computing principles including superposition, entanglement, and quantum measurement to enhance traditional neural network capabilities for text classification. The model incorporates complex-valued embeddings, quantum mixture operations, and multi-task learning with sentiment lexicon integration to achieve superior performance in sentiment classification tasks. Through extensive experimentation across multiple benchmark datasets, SentiQNN demonstrates state-of-the-art performance with 88.11% accuracy, outperforming traditional classical approaches by 3-7%. The architecture introduces innovative quantum state preparation layers, quantum circuit operations, and quantum measurement mechanisms specifically optimized for natural language understanding. Our comprehensive evaluation reveals that quantum-inspired approaches can significantly enhance sentiment analysis performance while maintaining computational efficiency. The findings contribute to the emerging field of quantum machine learning and provide a foundation for future research in quantum-enhanced natural language processing systems.
Recently, efforts have been made in the community to design new Graph Neural Networks (GNN), as limitations of Message Passing Neural Networks became more apparent. This led to the appearance of Graph Transformers using global graph features such as Laplacian Eigenmaps. In our paper, we introduce a GNN architecture where the aggregation weights are computed using the long-range correlations of a quantum system. These correlations are generated by translating the graph topology into the interactions of a set of qubits in a quantum computer. This work was inspired by the recent development of quantum processing units which enables the computation of a new family of global graph features that would be otherwise out of reach for classical hardware. We give some theoretical insights about the potential benefits of this approach, and benchmark our algorithm on standard datasets. Although not being adapted to all datasets, our model performs similarly to standard GNN architectures, and paves a promising future for quantum enhanced GNNs.