Layerwise learning for quantum neural networks

Andrea Skolik, Jarrod R. McClean, Masoud Mohseni, Patrick van der Smagt, Martin Leib · DOI

Abstract

Parametrized Quantum Circuits (PQCs) are a cornerstone of Near-term Intermediate-Scale Quantum (NISQ) computing. However, training deep PQCs is hampered by the "barren plateau" phenomenon, where gradients vanish exponentially. This paper explores a Layerwise Learning (LL) strategy that incrementally grows the circuit during training. By optimizing subsets of parameters in shallower circuits, LL maintains detectable gradient signals, effectively bypassing barren plateaus and improving performance on noisy hardware.

Introduction

Training Parametrized Quantum Circuits (PQCs) is a central challenge in the Noisy Intermediate-Scale Quantum (NISQ) era. These circuits, often referred to as Quantum Neural Networks (QNNs), are typically trained using hybrid quantum-classical algorithms where classical optimizers tune gate parameters to minimize a cost function. However, as circuit depth and qubit counts increase, researchers frequently encounter "barren plateaus"—regions of the cost landscape where the gradient vanishes exponentially, leaving the optimizer unable to find a path toward a minimum.

The Challenge: Barren Plateaus and Shot Noise

In deep, random circuits, the cost function landscape becomes increasingly flat. As a circuit approaches what is known as a "2-design" (a state of sufficient randomness), the variance of the gradient decreases exponentially with the number of qubits and the depth of the circuit. This makes it nearly impossible for classical optimizers to find a direction for improvement from a random initialization.

Furthermore, on real quantum hardware, this tiny gradient signal is often drowned out by statistical "shot noise." Because quantum computers are probabilistic, expectation values must be estimated through repeated measurements (shots). If the true gradient is smaller than the statistical fluctuations of these measurements, the optimizer essentially performs a random walk.

The variance of gradients decreases exponentially as the number of layers and qubits increases, illustrating the barren plateau problem.

Methodology: The Layerwise Learning Strategy

To address these hurdles, researchers from Volkswagen, Google, and several academic institutions proposed a Layerwise Learning (LL) strategy. Instead of training a full-depth circuit from the start—a method referred to as Complete-Depth Learning (CDL)—the LL approach grows the circuit incrementally through two distinct phases.

Phase One: Incremental Growth

The algorithm begins with a very shallow circuit (e.g., 2 layers) and trains it for a set number of epochs. Once this initial training is complete, a new set of layers is added. To keep the optimization problem manageable and the circuit depth low during critical early stages, the algorithm "freezes" the parameters of older layers, updating only the most recently added gates (and potentially a small window of preceding layers). This keeps the active parameter space small and ensures that the circuit remains in a regime where gradients are still detectable.

Phase Two: Refinement

Once the circuit reaches its target depth, the algorithm enters a refinement phase. During this stage, the optimizer performs "sweeps" across the entire circuit, unfreezing larger partitions or all parameters simultaneously to fine-tune the model toward its final state.

Experimental Results: MNIST Classification

The researchers evaluated the LL strategy using the MNIST dataset of handwritten digits, specifically focusing on the binary classification of the digits '6' and '9'. Given the limitations of current 8-qubit simulators, Principal Component Analysis (PCA) was employed to reduce the 28x28 pixel images into 10-dimensional vectors, which were then encoded into the quantum state.

The experiments, conducted with realistic simulations of shot noise (10 measurements per expectation value), yielded several key findings:

  • Improved Accuracy: Layerwise learning achieved an average of 8% lower generalization error compared to standard CDL.
  • Increased Reliability: The success rate of training runs—defined by the ability to reach low test error thresholds—was up to 40% higher with LL. In contrast, CDL runs frequently stalled on plateaus.
  • Enhanced Efficiency: In noisy environments, LL converged significantly faster, often requiring only half the time of the best-performing CDL configurations.

Discussion: Why Layerwise Learning Works

The success of LL stems from its ability to concentrate gradient magnitude. By starting with shallow circuits, the algorithm operates in a landscape that is still "curved" enough to provide clear directional signals. This effectively increases the signal-to-noise ratio, allowing the optimizer to distinguish meaningful updates from statistical shot noise. By the time the circuit reaches a depth where it might otherwise encounter a barren plateau, the parameters have already been guided into a favorable region of the landscape, bypassing the "random walk" associated with starting deep circuits from scratch.

Conclusion and Future Directions

Layerwise Learning provides a robust framework for training QNNs on NISQ devices. While the current study relied on heuristic parameters for layer addition and freezing, future work may involve developing automated criteria for circuit growth based on convergence metrics. Additionally, exploring the performance of LL on different circuit architectures and hardware topologies will be essential for scaling these methods to larger, more complex quantum systems.

Summary updated

BibTeX
@article{skolik2021layerwise,
  author = {Andrea Skolik and Jarrod R. McClean and Masoud Mohseni and Patrick van der Smagt and Martin Leib},
  title = {{Layerwise learning for quantum neural networks}},
  journal = {Quantum Mach. Intell.},
  year = {2021},
  doi = {10.1007/s42484-020-00036-4},
}
Figure