Quantum Graph Transformer for NLP Sentiment Classification

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Aktar, Shamminuj, Bärtschi, Andreas, Badawy, Abdel-Hameed A., Eidenbenz, Stephan
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866909643885772800
author Aktar, Shamminuj
Bärtschi, Andreas
Badawy, Abdel-Hameed A.
Eidenbenz, Stephan
author_facet Aktar, Shamminuj
Bärtschi, Andreas
Badawy, Abdel-Hameed A.
Eidenbenz, Stephan
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2506_07937
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Quantum Graph Transformer for NLP Sentiment Classification
Aktar, Shamminuj
Bärtschi, Andreas
Badawy, Abdel-Hameed A.
Eidenbenz, Stephan
Computation and Language
Quantum Physics
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.
title Quantum Graph Transformer for NLP Sentiment Classification
topic Computation and Language
Quantum Physics
url https://arxiv.org/abs/2506.07937