Hybrid Quantum-Classical Attention Mechanisms for Parameter-Efficient Transformers in Natural Language Processing

Transformer architectures have become the foundation of modern natural language processing systems. Despite their empirical success, the standard self-attention mechanism suffers from quadratic computational complexity with respect to sequence length and accounts for a substantial fraction of trainable parameters. Quantum computing, through superposition, entanglement, and interference, offers a different computational paradigm that may supply novel inductive biases for representation learning and sequence modeling. We introduce the Hybrid Quantum-Classical Transformer (HQCT), which integrates variational quantum circuits into the multi-head attention mechanism of a classical Transformer. We investigate two designs: Quantum Projection (HQCT-P), which replaces the classical linear maps that produce queries and keys with parameterized quantum circuits, and Quantum Kernel Attention (HQCT-K), which retains classical projections but substitutes the scaled dot-product similarity with a quantum kernel defined by the squared fidelity of quantum states. In both cases the value projection, feed-forward sub-layers, and residual connections remain classical. Experiments on AG News, IMDB, SST-2, and MultiNLI show that HQCT-K matches or slightly exceeds the accuracy of a matched classical Transformer while using approximately fourteen percent fewer classical parameters. In a few-shot regime with only sixteen labeled examples per class, the quantum-kernel model exhibits a clear advantage. Ablation studies isolate the effects of qubit number, variational ansatz depth, and simulated depolarizing noise. The results indicate that hybrid quantum-classical attention is a realistic direction for bringing quantum resources into practical NLP systems in the NISQ era.

Authors

Institutions

Publication Details

Journal
Research Square
Published
2026-12-01
DOI
https://doi.org/10.21203/rs.3.rs-11371769/v1
Primary Topic
Quantum Computing Algorithms and Architecture
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

Hybrid Quantum-Classical Attention Mechanisms for Parameter-Efficient Transformers in Natural Language Processing

Amisha Singh
Research Square
Quantum Computing Algorithms and Architecture
preprint

Hybrid Quantum-Classical Attention Mechanisms for Parameter-Efficient Transformers in Natural Language Processing

Amisha Singh
preprint en

Abstract

Transformer architectures have become the foundation of modern natural language processing systems. Despite their empirical success, the standard self-attention mechanism suffers from quadratic computational complexity with respect to sequence length and accounts for a substantial fraction of trainable parameters. Quantum computing, through superposition, entanglement, and interference, offers a different computational paradigm that may supply novel inductive biases for representation learning and sequence modeling. We introduce the Hybrid Quantum-Classical Transformer (HQCT), which integrates variational quantum circuits into the multi-head attention mechanism of a classical Transformer. We investigate two designs: Quantum Projection (HQCT-P), which replaces the classical linear maps that produce queries and keys with parameterized quantum circuits, and Quantum Kernel Attention (HQCT-K), which retains classical projections but substitutes the scaled dot-product similarity with a quantum kernel defined by the squared fidelity of quantum states. In both cases the value projection, feed-forward sub-layers, and residual connections remain classical. Experiments on AG News, IMDB, SST-2, and MultiNLI show that HQCT-K matches or slightly exceeds the accuracy of a matched classical Transformer while using approximately fourteen percent fewer classical parameters. In a few-shot regime with only sixteen labeled examples per class, the quantum-kernel model exhibits a clear advantage. Ablation studies isolate the effects of qubit number, variational ansatz depth, and simulated depolarizing noise. The results indicate that hybrid quantum-classical attention is a realistic direction for bringing quantum resources into practical NLP systems in the NISQ era.

Research Square
The NorthCap University (IN)
Quantum Computing Algorithms and Architecture
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon
Hybrid Quantum-Classical Attention Mechanisms for Parameter-Efficient Transformers in Natural Language Processing — Amisha Singh · Research Square (2026) | TGRS Research Map | TGRS