mlsanityData to 14 Oct 2026

QFFN-BERT: An Empirical Study of Depth, Performance, and Data Efficiency in Hybrid Quantum-Classical Transformers

arXiv 2507.02364 ↗First posted 3 Jul 2025cs.CL quant-phcited by 0

Not on the map. Why?

Abstract (arXiv)

Parameterized quantum circuits (PQCs) have recently emerged as promising components for enhancing the expressibility of neural architectures. In this work, we introduce QFFN-BERT, a hybrid quantum-classical transformer where the feedforward network (FFN) modules of a compact BERT variant are replaced by PQC-based layers. This design is motivated by the dominant parameter contribution of FFNs, which account for approximately two-thirds of the parameters within standard Transformer encoder blocks. While prior studies have primarily integrated PQCs into self-attention modules, our work focuses on the FFN and systematically investigates the trade-offs between PQC depth, expressibility, and trainability. Our final PQC architecture incorporates a residual connection, both RY and RZ rotations, and an alternating entanglement strategy to ensure stable training and high expressibility. Our experiments, conducted on a classical simulator, on the SST-2 and DBpedia benchmarks demonstrate two key findings. First, a carefully configured QFFN-BERT achieves up to 102.0% of the baseline accuracy, surpassing its classical counterpart in a full-data setting while reducing FFN-specific parameters by over 99%. Second, our model exhibits a consistent and competitive edge in few-shot learning scenarios, confirming its potential for superior data efficiency. These results, supported by an ablation study on a non-optimized PQC that failed to learn, confirm that PQCs can serve as powerful and parameter-efficient alternatives to classical FFNs when co-designed with foundational deep learning principles.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 25 of its 41 references that are in the map. First posted on arXiv 3 Jul 2025.

Builds on

25 of 41 references.

References · 25

  1. 2017Attention Is All You Needcited by 60,361
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
  3. 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,305
  4. 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,380
  5. 2019DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lightercited by 4,307
  6. 2019Parameter-Efficient Transfer Learning for NLPcited by 4,236
  7. 2019ALBERT: A Lite BERT for Self-supervised Learning of Language Representationscited by 2,790
  8. 2020MiniLM: Deep Self-Attention Distillation for Task-Agnostic Compression of Pre-Trained Transformerscited by 1,463
  9. 2019TinyBERT: Distilling BERT for Natural Language Understandingcited by 1,167
  10. 2018Supervised learning with quantum enhanced feature spacescited by 665
  11. 2022MTEB: Massive Text Embedding Benchmarkcited by 640
  12. 2018Barren plateaus in quantum neural network training landscapescited by 630
13 more
  1. 2019Patient Knowledge Distillation for BERT Model Compressioncited by 508
  2. 2020MobileBERT: a Compact Task-Agnostic BERT for Resource-Limited Devicescited by 482
  3. 2019Q-BERT: Hessian Based Ultra Low Precision Quantization of BERTcited by 359
  4. 2020Absence of Barren Plateaus in Quantum Convolutional Neural Networkscited by 125
  5. 2019Well-Read Students Learn Better: On the Importance of Pre-training Compact Modelscited by 120
  6. 2020Quantum Long Short-Term Memorycited by 120
  7. 2021Generalization in NLI: Ways (Not) To Go Beyond Simple Heuristicscited by 67
  8. 2021The Dawn of Quantum Natural Language Processingcited by 61
  9. 2020Foundations for Near-Term Quantum Natural Language Processingcited by 51
  10. 2022Quantum Vision Transformerscited by 48
  11. 2022Quantum Self-Attention Neural Networks for Text Classificationcited by 43
  12. 2023cuQuantum SDK: A High-Performance Library for Accelerating Quantum Sciencecited by 19
  13. 2024Quantum Transformer: Accelerating model inference via quantum linear algebracited by 9

Built on by

Not cited yet.