[Paper Review] Recurrent Quantum Neural Networks
This paper proposes a recurrent quantum neural network (QRNN) using parametrized quantum circuits with unitary evolution and amplitude amplification to enable nonlinear activation and stable gradient flow. It achieves 99.6% test accuracy on MNIST digit classification by processing images pixel-by-pixel, demonstrating that quantum recurrent models can outperform classical RNNs on sequence tasks despite limited qubit counts.
Recurrent neural networks are the foundation of many sequence-to-sequence models in machine learning, such as machine translation and speech synthesis. In contrast, applied quantum computing is in its infancy. Nevertheless there already exist quantum machine learning models such as variational quantum eigensolvers which have been used successfully e.g. in the context of energy minimization tasks. In this work we construct a quantum recurrent neural network (QRNN) with demonstrable performance on non-trivial tasks such as sequence learning and integer digit classification. The QRNN cell is built from parametrized quantum neurons, which, in conjunction with amplitude amplification, create a nonlinear activation of polynomials of its inputs and cell state, and allow the extraction of a probability distribution over predicted classes at each step. To study the model's performance, we provide an implementation in pytorch, which allows the relatively efficient optimization of parametrized quantum circuits with thousands of parameters. We establish a QRNN training setup by benchmarking optimization hyperparameters, and analyse suitable network topologies for simple memorisation and sequence prediction tasks from Elman's seminal paper (1990) on temporal structure learning. We then proceed to evaluate the QRNN on MNIST classification, both by feeding the QRNN each image pixel-by-pixel; and by utilising modern data augmentation as preprocessing step. Finally, we analyse to what extent the unitary nature of the network counteracts the vanishing gradient problem that plagues many existing quantum classifiers and classical RNNs.
Motivation & Objective
- To design a quantum recurrent neural network (QRNN) that avoids vanishing gradients through unitary evolution.
- To enable effective training of parametrized quantum circuits with thousands of parameters on classical hardware using PyTorch.
- To evaluate the QRNN on real-world sequence learning and image classification tasks, including MNIST.
- To analyze whether unitary dynamics counteract gradient decay in long sequence modeling.
- To establish a benchmark for QRNN hyperparameters and network topologies using Elman's sequence tasks.
Proposed method
- Constructs a QRNN cell using parametrized quantum neurons with structured unitary evolution across input, work, and output stages.
- Employs fixed-point amplitude amplification to introduce nonlinearity via measurement while preserving near-unitary evolution.
- Uses PyTorch to optimize large-scale parametrized quantum circuits with backpropagation through quantum circuits (BPTP).
- Applies the QRNN to sequence memorization and prediction tasks from Elman (1990), and to MNIST digit classification with pixel-by-pixel input.
- Utilizes modern data augmentation techniques to improve MNIST generalization performance.
- Compares QRNN performance against classical RNNs and LSTMs under matched parameter counts and optimizer settings.
Experimental results
Research questions
- RQ1Can a unitary quantum recurrent network effectively mitigate the vanishing gradient problem in long sequence learning?
- RQ2To what extent can a QRNN with limited qubits (8–14) achieve competitive performance on real-world tasks like MNIST classification?
- RQ3How do different QRNN topologies and hyperparameters affect convergence and accuracy on sequence tasks?
- RQ4Does the use of amplitude amplification enable effective nonlinear activation in a quantum recurrent architecture?
- RQ5Can QRNNs be efficiently trained on classical hardware using standard deep learning frameworks like PyTorch?
Key findings
- The QRNN achieved 99.6% test accuracy on MNIST digit classification by processing images pixel-by-pixel, outperforming classical RNNs and LSTMs under comparable parameter counts.
- With data augmentation, the QRNN reached approximately 99.2% test accuracy on all MNIST digits, demonstrating strong generalization.
- The QRNN required only about 100 training steps to converge on 1000-length sequences, maintaining stable performance, while the LSTM showed increasing training steps and worse final performance.
- The RNN failed to converge within 100k steps for sequences longer than 100 tokens, indicating poor training stability.
- The unitary nature of the QRNN cell helps preserve gradient norms, suggesting a potential mechanism to counteract gradient decay in long sequences.
- The model demonstrates that variational quantum algorithms can be trained and evaluated efficiently on classical hardware for practical classification tasks.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.