Phase transitions in the mini-batch size for sparse and dense two-layer neural networks
Raffaele Marino, Federico Ricci-Tersenghi
TL;DR
The paper addresses how the mini-batch size $m$ governs learning dynamics and generalization in two-layer neural networks under a teacher–student framework with sparse teachers. It introduces four models and two training algorithms (greedy Metropolis updates for discrete weights and SGD for continuous weights) to reveal a phase-transition-like dependence on $m$, characterized by a critical value $m_c$ beyond which learning or perfect generalization becomes possible. The key finding is that $m_c$ scales roughly linearly with the per-layer connectivity $d$ (and with $N$ in some setups), with the transition being first-order or second-order depending on topology and output structure. This work suggests that the mini-batch size acts as a thermodynamic-like control parameter linking information-per-parameter to algorithmic feasibility, offering practical guidance for batch-size selection and insights into learning dynamics in sparse vs dense architectures.
Abstract
The use of mini-batches of data in training artificial neural networks is nowadays very common. Despite its broad usage, theories explaining quantitatively how large or small the optimal mini-batch size should be are missing. This work presents a systematic attempt at understanding the role of the mini-batch size in training two-layer neural networks. Working in the teacher-student scenario, with a sparse teacher, and focusing on tasks of different complexity, we quantify the effects of changing the mini-batch size $m$. We find that often the generalization performances of the student strongly depend on $m$ and may undergo sharp phase transitions at a critical value $m_c$, such that for $m<m_c$ the training process fails, while for $m>m_c$ the student learns perfectly or generalizes very well the teacher. Phase transitions are induced by collective phenomena firstly discovered in statistical mechanics and later observed in many fields of science. Observing a phase transition by varying the mini-batch size across different architectures raises several questions about the role of this hyperparameter in the neural network learning process.
