Quantum circuit improves paraphrase detection with fewer parameters

Parameter-Efficient Quantum NLP for Paraphrase Detection: Performance, Robustness, and Entanglement

Computation and Language

Summary

Detecting when two sentences mean the same thing is an important task in language understanding. The authors show that a special kind of quantum-inspired computer model can do this task well using fewer adjustable parts than common classical methods. Their model is also more resistant to tricky examples designed to fool it, even without extra training. This work uses simulated quantum circuits to compare performance, with future work planned on real quantum hardware.

What this means in practice

  • For natural language engineers: Integrate quantum-inspired models into systems for identifying sentence paraphrases with fewer parameters and improved robustness to adversarial inputs.
  • For quantum computing developers: Use variational quantum circuits as compact NLP models that can potentially run on near-term quantum hardware once physically realized.

Authors

Farha Nausheen, Khandakar Ahmed, Farina Riaz

Abstract

Rigorous empirical validation of quantum machine learning on natural language tasks remains scarce. We evaluate a 10-qubit hybrid quantum-classical variational circuit (2,148 parameters) for paraphrase detection across three benchmarks: MRPC, Quora Question Pairs (QQP), and adversarial PAWS. On QQP (n = 10 seeds), the circuit achieves 75.53% +/- 0.75%. accuracy, statistically outperforming parameter-matched classical baselines (DeepMLP: p = 0.015, Cohen's d = 1.20; F1: p < 0.001, d = 2.32) and surpassing DistilBERT-4bit with 31,191 fewer parameters. On MRPC the optimal 2-layer variant reaches 92% of BERT-base accuracy at 54,000 lower parameter cost. Circuit depth analysis reveals a dataset-depth scaling effect; entanglement analysis via the Meyer-Wallach measure identifies multi-qubit entanglement as the primary performance driver (r = 0.85 across four variants). Adversarial evaluation on PAWS reveals emergent robustness: 98.2% recall versus 81.6% classical (+16.6 pp, d = 1.24, p < 0.001), without adversarial training. These results constitute the first systematic parameter-matched multi-benchmark empirical validation of hybrid variational circuits for NLP. All results are from classical simulation; hardware validation is future work.