Hamiltonian Mechanics of Feature Learning: Bottleneck Structure in Leaky ResNets

We study Leaky ResNets, which interpolate between ResNets and Fully-Connected nets depending on an éffective depth' hyper-parameter . In the infinite depth limit, we study 'representation geodesics' : continuous paths in representation space (similar to NeuralODEs) from input to output that minimize the parameter norm of the network. We give a Lagrangian and Hamiltonian reformulation, which highlight the importance of two terms: a kinetic energy which favors small layer derivatives and a potential energy that favors low-dimensional representations, as measured by the 'Cost of Identity'. The balance between these two forces offers an intuitive understanding of feature learning in ResNets. We leverage this intuition to explain the emergence of a bottleneck structure, as observed in previous work: for large the potential energy dominates and leads to a separation of timescales, where the representation jumps rapidly from the high dimensional inputs to a low-dimensional representation, move slowly inside the space of low-dimensional representations, before jumping back to the potentially high-dimensional outputs. Inspired by this phenomenon, we train with an adaptive layer step-size to adapt to the separation of timescales.
View on arXiv@article{jacot2025_2405.17573, title={ Hamiltonian Mechanics of Feature Learning: Bottleneck Structure in Leaky ResNets }, author={ Arthur Jacot and Alexandre Kaiser }, journal={arXiv preprint arXiv:2405.17573}, year={ 2025 } }