A unified theory of feature learning in RNNs and DNNs
Jan Bauer ⋅ Kirsten Fischer ⋅ Moritz Helias ⋅ Agostina Palmigiano
Abstract
Recurrent and deep neural networks (RNNs/DNNs) are cornerstone architectures in machine learning. Remarkably, RNNs differ from DNNs only by weight sharing, as can be shown through unrolling in time. How does this structural similarity fit with the distinct functional properties these networks exhibit? To address this question, we here develop a unified mean-field theory for RNNs and DNNs in terms of representational kernels, describing fully trained networks in the feature learning ($\mu$P) regime. This theory casts training as Bayesian inference over sequences and patterns, directly revealing the functional implications induced by the RNNs' weight sharing. In DNN-typical tasks, we identify a phase transition when the learning signal overcomes the noise due to randomness in the weights: below this threshold, RNNs and DNNs behave identically; above it, only RNNs develop correlated representations across timesteps. For sequential tasks, the RNNs' weight sharing furthermore induces an inductive bias that aids generalization by interpolating unobserved time steps. Overall, our theory offers a way to connect architectural structure to functional biases.
Lay Summary
Neurons in the brain are often connected back to themselves, but this is absent in classical models of artificial intelligence. We wanted to know whether there is an advantage to having these self-connections. We therefore took a mathematical approach that reveals that self-connections give rise to a more persistent representation, a kind of memory, and helps learning when the object of learning itself persist in time, like many natural signals do. Conversely, the absence of recurrence might be helpful in absence of such persistence in the signal being learnt. We think our work helps to better understand how the structure of biological or artificial intelligence impacts its learning.
Successful Page Load