Grokking, the delayed transition from memorization to generalization, is a fundamental phenomenon in gradient-based learning, yet its dynamics within variational quantum machine learning (QML) remain largely unexamined. In this work, we report the empirical observation of both the grokking transition and epoch-wise double descent in a two-qubit quantum neural network (QNN) under a complete parameterization of the SU(4) manifold. We demonstrate that overparameterization via increased circuit depth improves the probability of successful generalization. Notably, these architectures frequently exhibit an epoch-wise double descent in test error, degrading at a critical epoch before recovering into a generalizing state. Crucially, we identify a generalization decay in late-stage training, where the test error increases significantly despite a stagnant training loss. Bridging this behavior with algorithmic stability theory, our analysis reveals that this decay correlates with an unconstrained increase of the weight-norm, drifting away from sparse, phase-aligned harmonic solutions toward overfitted solutions in the Hilbert space. We analyze the underlying temporal dynamics of this transition, demonstrating how the onset of generalization is linked to optimization hyperparameters such as learning rate and weight decay. Finally, to mitigate late-stage decay, we introduce a weak explicit weight-norm regularization into the loss function. We demonstrate that this structural anchor stabilizes the post-grokking phase and permanently preserves generalization gains, providing a robust framework for training overparameterized quantum circuits.
Grokking, the delayed transition from memorization to generalization, is a fundamental phenomenon in gradient-based learning, yet its dynamics within variational quantum machine learning (QML) remain largely unexamined. In this work, we report the empirical observation of both the grokking transition and epoch-wise double descent in a two-qubit quantum neural network (QNN) under a complete parameterization of the SU(4) manifold. We demonstrate that overparameterization via increased circuit depth improves the probability of successful generalization. Notably, these architectures frequently exhibit an epoch-wise double descent in test error, degrading at a critical epoch before recovering into a generalizing state. Crucially, we identify a generalization decay in late-stage training, where the test error increases significantly despite a stagnant training loss. Bridging this behavior with algorithmic stability theory, our analysis reveals that this decay correlates with an unconstrained increase of the weight-norm, drifting away from sparse, phase-aligned harmonic solutions toward overfitted solutions in the Hilbert space. We analyze the underlying temporal dynamics of this transition, demonstrating how the onset of generalization is linked to optimization hyperparameters such as learning rate and weight decay. Finally, to mitigate late-stage decay, we introduce a weak explicit weight-norm regularization into the loss function. We demonstrate that this structural anchor stabilizes the post-grokking phase and permanently preserves generalization gains, providing a robust framework for training overparameterized quantum circuits.
The remarkable generalization capabilities of overparameterized neural networks remain one of the most profound mysteries in modern machine learning. Despite having sufficient capacity to simply memorize training data, these networks consistently achieve superior performance on unseen test examples. Traditional analyses focusing on weight distributions, loss landscapes, and optimization dynamics have provided partial insights but fail to capture the complex correlational structure that emerges between neurons during learning. This paper introduces a comprehensive quantum information framework for analyzing neural network representations, treating hidden layer activations as quantum states and characterizing them through density matrices, von Neumann entropy, purity, and related quantum information metrics. Through systematic experiments on synthetic classification tasks and algorithmic reasoning problems spanning over 3000 cumulative training epochs and 5000 Wang-Landau sampling iterations, we demonstrate that these quantum metrics reveal structure completely invisible to classical analysis. Our results show that stochastic gradient descent systematically reduces von Neumann entropy while increasing purity as networks learn, transitioning from highly mixed quantum states with entropy approximately 1.42 and purity approximately 0.29 to purer configurations with entropy approximately 1.19 and purity approximately 0.37 that achieve superior test accuracy of 99.5%. Using Wang-Landau sampling to explore the equilibrium entropy landscape, we discover that neural networks naturally favor high-entropy states with entropy approximately 1.42 and moderate accuracy of 62.0%, and that optimization actively purifies the quantum state to achieve task performance. On modular arithmetic tasks exhibiting the grokking phenomenon, we observe that von Neumann entropy increases dramatically from 1.55 to 3.29, representing a 112% increase, during an extended 2000-epoch memorization phase before any improvement in generalization, while purity decreases correspondingly from 0.444 to 0.042, a 90.5% decrease, approaching the maximally mixed limit of 0.01. This entropy accumulation phase appears necessary for eventual generalization, with the network building quantum correlations at a rate of approximately 0.00097 nats per epoch during the plateau. Weight entropy, in contrast, shows minimal change of only 11% increase over the same period. Correlation analysis reveals that von Neumann entropy and purity are almost perfectly anticorrelated with a correlation coefficient of 1 -0.99, while weight entropy shows weak correlation with quantum metrics with absolute correlation coefficients less than 0.3. The effective rank of the density matrix stabilizes near 2.7 to 3.0 for the 6-neuron classifier, indicating that the network effectively uses approximately three independent activation modes. These findings establish quantum information metrics as powerful tools for understanding neural network learning dynamics, provide the first quantitative evidence for the entropy accumulation interpretation of grokking, and suggest that neural networks undergo a quantum-inspired phase transition during learning. We discuss implications for generalization theory, optimization algorithm design, and the statistical physics of deep learning, and outline a comprehensive research agenda for extending these methods to larger architectures and more complex tasks.
The remarkable generalization capabilities of overparameterized neural networks remain one of the most profound mysteries in modern machine learning. Despite having sufficient capacity to simply memorize training data, these networks consistently achieve superior performance on unseen test examples. Traditional analyses focusing on weight distributions, loss landscapes, and optimization dynamics have provided partial insights but fail to capture the complex correlational structure that emerges between neurons during learning. This paper introduces a comprehensive quantum information framework for analyzing neural network representations, treating hidden layer activations as quantum states and characterizing them through density matrices, von Neumann entropy, purity, and related quantum information metrics. Through systematic experiments on synthetic classification tasks and algorithmic reasoning problems spanning over 3000 cumulative training epochs and 5000 Wang-Landau sampling iterations, we demonstrate that these quantum metrics reveal structure completely invisible to classical analysis. Our results show that stochastic gradient descent systematically reduces von Neumann entropy while increasing purity as networks learn, transitioning from highly mixed quantum states with entropy approximately 1.42 and purity approximately 0.29 to purer configurations with entropy approximately 1.19 and purity approximately 0.37 that achieve superior test accuracy of 99.5%. Using Wang-Landau sampling to explore the equilibrium entropy landscape, we discover that neural networks naturally favor high-entropy states with entropy approximately 1.42 and moderate accuracy of 62.0%, and that optimization actively purifies the quantum state to achieve task performance. On modular arithmetic tasks exhibiting the grokking phenomenon, we observe that von Neumann entropy increases dramatically from 1.55 to 3.29, representing a 112% increase, during an extended 2000-epoch memorization phase before any improvement in generalization, while purity decreases correspondingly from 0.444 to 0.042, a 90.5% decrease, approaching the maximally mixed limit of 0.01. This entropy accumulation phase appears necessary for eventual generalization, with the network building quantum correlations at a rate of approximately 0.00097 nats per epoch during the plateau. Weight entropy, in contrast, shows minimal change of only 11% increase over the same period. Correlation analysis reveals that von Neumann entropy and purity are almost perfectly anticorrelated with a correlation coefficient of 1-0.99, while weight entropy shows weak correlation with quantum metrics with absolute correlation coefficients less than 0.3. The effective rank of the density matrix stabilizes near 2.7 to 3.0 for the 6-neuron classifier, indicating that the network effectively uses approximately three independent activation modes. These findings establish quantum information metrics as powerful tools for understanding neural network learning dynamics, provide the first quantitative evidence for the entropy accumulation interpretation of grokking, and suggest that neural networks undergo a quantum-inspired phase transition during learning. We discuss implications for generalization theory, optimization algorithm design, and the statistical physics of deep learning, and outline a comprehensive research agenda for extending these methods to larger architectures and more complex tasks.
Recent advancements in machine learning have revolutionised research across various fields. Despite their success, conventional learning techniques are hindered by their significant computational resources and energy requirements. Prompted by recent experimental breakthroughs in quantum computing, variational quantum machine learning (QML) – machine learning integrated with variational quantum circuits (VQCs) – has emerged as a promising alternative. Nonetheless, the theoretical framework underpinning the advantages of variational QML is still rudimentary. Specifically, the training of VQCs faces several challenges, such as the barren plateau problem, where the gradient diminishes exponentially with an increasing qubits. A related issue arises in variational QML training, where the convergence rate is exponentially small. In this thesis, we present theoretically guaranteed solutions to these challenges. First, we construct innovative circuit architectures to address the vanishing gradient problem in deep VQCs. We propose quantum controlled-layer and quantum ResNet structures, demonstrating that the expected gradient norm's lower bound is unaffected by the increase in qubits and circuit depth. Next, we introduce an initialization strategy to mitigate the vanishing gradient issue in general deep quantum circuits. We prove that Gaussian-initialized parameters ensure the gradient norm's decay rate remains inversely polynomial despite the increase in qubit numbers and circuit depth. Finally, we propose a novel and effective theory for analysing the training of quantum neural networks with moderate depths. We prove that, under certain randomness conditions in the circuits and datasets, training converges linearly with a rate inversely proportional to the dataset size. Our approach surpasses previous results, achieving exponentially larger convergence rates with modest depth, or conversely, requiring exponentially less depth for equivalent rates.
Parametrized quantum circuits can be used as quantum neural networks and have the potential to outperform their classical counterparts when trained for addressing learning problems. To date, much of the results on their performance on practical problems are heuristic in nature. In particular, the convergence rate for the training of quantum neural networks is not fully understood. Here, we analyze the dynamics of gradient descent for the training error of a class of variational quantum machine learning models. We define wide quantum neural networks as parametrized quantum circuits in the limit of a large number of qubits and variational parameters. Then, we find a simple analytic formula that captures the average behavior of their loss function and discuss the consequences of our findings. For example, for random quantum circuits, we predict and characterize an exponential decay of the residual training error as a function of the parameters of the system. Finally, we validate our analytic results with numerical experiments.
Neural quantum states (NQS) provide flexible and compact wave-function parametrizations for numerical studies of quantum many-body physics. In particular, NQS aim to circumvent the exponential scaling of the Hilbert space by compressing quantum many-body wave functions with a tractable amount of parameters. While inspired by deep learning, it remains unclear to what extent NQS share characteristics with neural networks used for standard machine learning tasks. We demonstrate that, in a simplified supervised setting, NQS exhibit the double descent phenomenon, a key feature of modern deep learning, where generalization worsens as network size increases before improving again in an overparameterized regime. Notably, we find the second descent to occur only for network sizes much larger than the Hilbert space dimension, i.e., network sizes that are out of reach for problems of practical interest. Within our setting, this observation places typical NQS in the underparameterized regime. We also observe that the optimal network size in the underparameterized regime depends on the number of unique training samples. While the double descent phenomenon does indeed translate to the NQS setting, potential practical consequences of our findings point more toward the need for symmetry-aware, physics-informed architecture design, rather than directly adopting machine learning heuristics.
A central challenge in quantum machine learning is understanding the scaling behavior of parameterized quantum circuits (PQCs). In particular, it remains unclear how their performance on unseen data changes as the number of trainable parameters increases. Prior works have derived formal generalization guarantees for quantum models, but it is well-known that many such results do not fully characterize generalization behavior in practice. In this work, we show that gradient-based PQCs can exhibit improved performance on unseen data as model size increases, displaying the phenomenon of double descent. This contrasts with the traditional view that larger models lead to degraded generalization. We provide analytical results rigorously underpinning this behavior by leveraging add-one-in perturbation techniques and spectral properties of random matrices. We support these results with numerical experiments on re-uploading PQCs across several data sets and training set sizes, consistently observing the predicted double descent behavior. While other obstacles on the path toward practical quantum machine learning remain, our finding that deeper parameterized quantum circuits do not necessarily exhibit degraded performance provides reasons for cautious optimism.