NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Understanding Generalization in Quantum Machine Learning with Margins

Tak Hur, Daniel K. Park

In both classical and quantum machine learning (QML), the ultimate goal is generalization: the ability of a model to make accurate predictions on data it has never seen before. Historically, researchers have used "uniform bounds" to estimate generalization, often relying heavily on the number of trainable parameters.

However, these bounds have become increasingly "vacuous" in modern machine learning. Just as classical deep networks can perfectly memorize a dataset of completely random labels—proving that parameter count doesn't tell the whole story—recent studies have shown that Quantum Neural Networks (QNNs) can also easily overfit randomized data. This paper addresses the critical lack of a reliable theoretical framework for evaluating generalization in QML by adapting margin-based theory from classical deep learning.

The Margin-Based Framework

To move beyond simple parameter counting, the authors propose a margin-based generalization bound specifically tailored for QNNs.

  1. The Margin Operator: The "margin" is defined as the difference between the probability assigned to the correct label and the highest probability assigned to any incorrect label. A larger margin indicates higher confidence and better class separation.
  2. Theoretical Derivation: By treating quantum measurements as Lipschitz continuous activations and applying matrix covering techniques to complex-valued spaces, the researchers derived a new bound using Rademacher complexity.
  3. Projective Simplification: For models using standard projective measurements, this bound becomes independent of the specific measurement operators, simplifying the evaluation to just the margin distribution itself.
  4. Information-Theoretic Link: Crucially, the authors establish a mathematical connection between the "margin mean" and trace distance, a fundamental quantum information metric measuring how distinguishable two quantum states are. The trace distance between class ensembles serves as an upper bound for the margin mean.

Key Findings and Experimental Evidence

The researchers evaluated their framework across several domains, including Quantum Phase Recognition (QPR) tasks, classical image benchmarks (MNIST, Fashion-MNIST), and supplementary physics models like the Transverse Field Ising Model (TFIM).

Margins > Parameters

The most significant insight from the study is that margin-based metrics are vastly superior predictors of the generalization gap compared to the number of "effective parameters."

Comparison of margin-based metrics versus effective parameter counts under varying levels of randomized labels.

In experiments with randomized labels, parameter counts completely failed to signal overfitting. Conversely, margin-based metrics showed significantly higher Mutual Information and Kendall rank correlation with the generalization gap across all tested scenarios.

Predictive Power of Margin Distributions

The framework's predictive power becomes visually apparent when examining how models behave under label noise. In QPR tasks, as the percentage of randomized labels increased, the margin distribution exhibited a pronounced "left-skew" (indicating smaller, less confident margins).

Margin distributions across different QNN depths (1L, 5L, 9L) under 0%, 50%, and 100% label noise. Notice the pronounced left-skew as noise increases.

This shift correctly predicted the drop in test accuracy where traditional uniform bounds remained silent. Furthermore, the study demonstrated that deeper Quantum Convolutional Neural Networks (QCNNs) often achieve better generalization not simply because they have more parameters, but because their increased expressibility allows them to find hypotheses with larger margins.

The Importance of Data Embedding

The connection to trace distance provides a systematic pathway for improving QML models: to generalize better, you must optimize the data embedding to maximize the distinguishability of the classes in the quantum Hilbert space. This explains why techniques like Neural Quantum Embedding (NQE) are so effective—they actively learn a better representation in the quantum feature space, thereby maximizing the margins.

Limitations and Future Work

While this margin-based framework offers a massive leap forward for QML theory, it currently assumes ideal quantum operations. In the real-world Noisy Intermediate-Scale Quantum (NISQ) era, hardware noise and decoherence (modeled by CPTP maps) will likely shrink margins and hurt generalization. Integrating hardware noise into this theoretical framework is a primary goal for future research.

Additionally, the authors suggest exploring "algorithmic stability"—how sensitive a learned model is to small changes in the training set—as a complementary lens to the margin-based view, alongside investigating how generalization relates to optimization speed in the quantum landscape.

Summary updated

BibTeX
@inproceedings{hur2025understanding,
  author = {Tak Hur and Daniel K. Park},
  title = {{Understanding Generalization in Quantum Machine Learning with Margins}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=iQQ2zuWhFM},
}
Figure