TL;DR
This paper demonstrates that fixed-weight neural networks can rapidly learn and generate new dynamics through imitation after pretraining, enabling quick adaptation to various complex tasks without ongoing feedback.
Contribution
It introduces a method where fixed-weight networks learn new dynamics through imitation, showing rapid adaptation after pretraining, which differs from traditional slow synaptic learning.
Findings
Networks can learn diverse dynamics like oscillations and chaos.
Pretrained fixed-weight networks adapt quickly to new tasks.
Networks maintain learned dynamics without further feedback.
Abstract
The ability of humans and animals to quickly adapt to novel tasks is difficult to reconcile with the standard paradigm of learning by slow synaptic weight modification. Here we show that fixed-weight neural networks can learn to generate required dynamics by imitation. After appropriate weight pretraining, the networks quickly and dynamically adapt to learn new tasks and thereafter continue to achieve them without further teacher feedback. We explain this ability and illustrate it with a variety of target dynamics, ranging from oscillatory trajectories to driven and chaotic dynamical systems.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Dynamical learning of dynamics
Christian Klos
Neural Network Dynamics and Computation, Institute of Genetics, University of Bonn, Bonn, Germany.
Yaroslav Felipe Kalle Kossio
Neural Network Dynamics and Computation, Institute of Genetics, University of Bonn, Bonn, Germany.
Sven Goedeke
Neural Network Dynamics and Computation, Institute of Genetics, University of Bonn, Bonn, Germany.
Aditya Gilra
Neural Network Dynamics and Computation, Institute of Genetics, University of Bonn, Bonn, Germany.
Department of Computer Science, and Neuroscience Institute, University of Sheffield, Sheffield, UK.
Raoul-Martin Memmesheimer
Neural Network Dynamics and Computation, Institute of Genetics, University of Bonn, Bonn, Germany.
Abstract
The ability of humans and animals to quickly adapt to novel tasks is difficult to reconcile with the standard paradigm of learning by slow synaptic weight modification. Here we show that fixed-weight neural networks can learn to generate required dynamics by imitation. After appropriate weight pretraining, the networks quickly and dynamically adapt to learn new tasks and thereafter continue to achieve them without further teacher feedback. We explain this ability and illustrate it with a variety of target dynamics, ranging from oscillatory trajectories to driven and chaotic dynamical systems.
Neural networks, dynamical learning, dynamical systems
Introduction. Humans and animals can learn wide varieties of tasks. The predominant paradigm assumes that their neural networks achieve this by slow adaptation of connection weights between neurons (Dayan and Abbott, 2001; Gerstner et al., 2014). Neurobiological experiments, however, also indicate fast learning with static weights (Perich et al., 2018). Our study addresses how neural networks may quickly learn to generate required output dynamics without weight-learning.
The goal of neural network learning is ultimately to appropriately change the activity of the output neurons of the network. In supervised learning, it should match a target and continue doing so during subsequent testing; in reinforcement learning, it should maximize a sparsely given reward. In our study, the networks adapt their weights during a pretraining phase (Thrun and Pratt, 1998; Vanschoren, 2018; Lansdell and Kording, 2018) such that thereafter with static weights they achieve supervised learning of desired outputs, by adapting only their dynamics (dynamical learning). Adapting the static network’s weights during pretraining is thus a kind of meta-learning or learning-to-learn. There is a recent spurt of interest in learning-to-learn (Vanschoren, 2018; Lansdell and Kording, 2018), focusing mainly on learning of reinforcement learning (Duan et al., 2016; Wang et al., 2018; Nagabandi et al., 2018). Studies on learning of supervised dynamical learning showed prediction of a time series at the current time step given the preceding step’s target (Feldkamp et al., 1996, 1997; Younger et al., 1999; Hochreiter et al., 2001; Younger et al., 2001; Feldkamp et al., 2003; Santiago, 2004; Lukosevicius, 2007; Santoro et al., 2016; Bellec et al., 2018) and control of a system along a time-varying target (Feldkamp and Puskorius, 1994a, b, 1997; Oubbati and Palm, 2010). The studies assume that a target is present during testing to avoid unlearning. This limits applicability and renders the dynamics necessarily non-autonomous; it is conceptually problematic for supervised settings and at odds with the common concept of teacher-free recall.
We therefore develop a scheme for fast supervised dynamical learning and subsequent teacher-free generation of long-term dynamics. We consider models for biological recurrent (reciprocally connected) neural networks, where leaky rate neurons interact in continuous time (Dayan and Abbott, 2001; Gerstner et al., 2014). Such models are amenable to learning, computation and phase space analysis (Dayan and Abbott, 2001; Gerstner et al., 2014; Jaeger et al., 2007; Sussillo and Abbott, 2009; Sussillo and Barak, 2013). After appropriate pretraining using the reservoir computing scheme (where only the weights to output neurons are trained (Sup, ; Jaeger and Haas, 2004; Maass et al., 2002; Sussillo and Abbott, 2009)), all weights are fixed. The networks can nevertheless learn to generate new, desired dynamics. Furthermore, they continue to generate them in self-contained manner during subsequent testing. We illustrate this with a variety of trajectories and dynamical systems and analyze the underlying mechanisms.
*Network model. *We use recurrent neural networks, where each neuron (or neuronal subpopulation) , with between 500 and 3000 depending on the task (Sup, ), is characterized by an activation variable and communicates with other neurons via its firing rate , a nonlinear function of (Dayan and Abbott, 2001; Gerstner et al., 2014). In isolation decays to zero with a time constant . This combines the decay times of membrane potential and synaptic currents. The network has two outputs, which can be interpreted as linear neurons:
signal , and context (Fig. 1). After learning, generates the desired dynamics while indexes it. They are continually fed back to the network, allowing their autonomous generation (Jaeger and Haas, 2004). The networks are temporarily also informed about their signal’s difference from its target by an error input . Taken together, for constant weights the network dynamics are given by
[TABLE]
with recurrent weights , the diagonal matrix of time constants , signal and context output weights , feedback weights , input weights and a drive absent for most tasks. We choose (Jaeger and Haas, 2004; Sussillo and Abbott, 2009; Lukosevicius et al., 2012); offsets are drawn from a uniform distribution between and and break the symmetry without input. Unless mentioned otherwise, we set fixing the overall time scale. Recurrent weights are set to zero with probability ( depending on the task). Nonzero weights are drawn from a Gaussian distribution with mean [math] and variance , where (Sussillo and Abbott, 2009). and are drawn from a uniform distribution between and ().
Pretraining. The aim of our pretraining (Fig. 1a) is twofold. First, it should enable the resulting static networks to learn signals of a specific class given only the error input . Second, after removing the error input the static networks should be able to continue to generate the desired dynamics. Therefore, the networks have to learn to minimize and, as explained in the Analysis section, to associate unique contexts with the different target dynamics.
To achieve this, we present different trajectories of the target class to the networks, together with associated, straightforwardly chosen constant indices . The output weights and learn online according to the FORCE rule (Sup, ; Sussillo and Abbott, 2009) to minimize the output errors and . In short, they are modified using the supervised recursive least-squares algorithm with high learning rate. This provides a least-squares optimal regularized solution for the output weights given the past network states and targets (Ismail and Principe, 1996). Signals and indices are presented for a time (30000 or 50000) as a continuous, randomly repeating sequence of training periods of duration (between 200 and 1000). During each training period’s first part, a network receives as input. Because of the various last states of the previous learning periods, it thus learns to approach from a broad range of initial conditions given this input. In most of our tasks, after a time , when is close to , is switched off and is fixed to its constant target, matching the testing paradigm. This often helps the network to learn generation of without error input.
Dynamical learning and testing. The weights now remain static and the error input teaches the network new tasks of the pretrained target class (Fig. 1b), i.e. the networks dynamically learn to generate for previously unseen . The learning time (between 50 and 200) is short, a few characteristic timescales of the target dynamics (Sup, ). is moderately fluctuating.
Thereafter the test phase begins, where no more teacher is present (). In weight-learning paradigms, during such phases the weights are fixed (Maass et al., 2002; Jaeger and Haas, 2004; Sussillo and Abbott, 2009; Mante et al., 2013; Hennequin et al., 2014). We likewise fix to a temporally constant value, an average of previously assumed ones, . This may be interpreted as indicating that the context is unchanged and the same signal is still desired. We find in our applications, that the network dynamics continue to generate a close-to-desired signal , establishing the successful dynamical learning of the task.
Applications. We illustrate our approach by learning a variety of trajectories (tasks (i-iv)) and dynamical systems (tasks (v,vi)). First, we consider a family of target trajectories, parameterized by . The networks are pretrained on a few of them, where the context target is a linear function of . Thereafter the networks dynamically learn to generate a previously unseen trajectory as output and perpetuate it during testing. We start with the simple, instructive target family of oscillations with different periods (task (i)): . We use three different teacher trajectories for pretraining, with . After pretraining, our networks can precisely dynamically learn oscillations with unseen periods within and slightly beyond the pretrained ones (Fig. 2a,b, see (Sup, ) for further detail and analysis of learning performance of all tasks). Next, in (ii), we generalize (i) to higher order Fourier series. Specifically, we consider the target family of superpositions of two random Fourier series with weighting factor : . Here, are Fourier series of order and period . and the Fourier coefficients are drawn randomly. We use seven different teacher trajectories for pretraining, with weighting factors distributed equidistantly between 0 and 1. After pretraining, we test the dynamical learning for thirteen weighting factors also distributed equidistantly between 0 and 1. To quantify the learning performance, we determine the fraction of these targets that can be successfully learned (RMSE below given threshold (0.4) and below RMSE between signal and (other) pretrained targets). We find that networks of increasing size can learn Fourier series with increasing order (Fig. 2c,d). Networks with 3000 neurons learn Fourier series of order 10 with a median fraction of successes of close to . Hence, very general periodic functions can be learned. The highest producible frequency is limited by the available neuronal time scales . We thus expect that larger networks containing smaller can learn even higher order targets.
To check if our approach also works for a target family with more than one parameter and multidimensional trajectories, we consider in (iii) a superposition of sines with different amplitude and period (consequently are two-dimensional vectors) and in (iv) a set of fixed points along a curve in three-dimensional space. We find that, after pretraining, our networks are able to dynamically learn unseen members of these target families with multidimensional context or signal, as shown in Fig. 3a,b for example trajectories.
Second, we consider a family of target dynamical systems. The networks are pretrained on a few representative systems. Thereafter, an unseen one is dynamically learned. Learning is in both phases based on imitation of trajectories. However, in contrast to tasks (i-iv) the networks now need to generate unseen output trajectories during testing. To demonstrate dynamical learning of a driven system, we consider task (v) of approximating the trajectory of an overdamped pendulum with drive and different masses : . During pretraining and dynamical learning, we use low-pass filtered white noise as drive (Fig. 3c, left of dashed vertical). During testing, we use a triangular wave (Fig. 3c, right of dashed vertical). As our networks nevertheless generate the correct qualitatively different signal (Fig. 3c,d), they must have learned the underlying vector field . (v) also shows that learning goes beyond interpolation of trajectories (compare blue and gray traces in Fig. 3d). Finally, in task (vi) we show dynamical learning of chaotic dynamics, considering autonomous Lorenz systems with different dissipation parameter of the -variable. For chaotic dynamics, even trajectories of similar systems quickly diverge. The aim in this task is thus only to generate during testing signals of the same type as the trajectories of the target system. We test this by comparing the limit sets of the dynamics and the tent-map relation between subsequent maxima of the -coordinate (Fig. 3e,f). The reproduction of the tent-map relation further shows that our approach can generate not explicitly trained quantitative dynamical features. We note that the networks also dynamically learn the fixed point convergence of some of the targets in the considered parameter space, even though they were pretrained on chaotic dynamics only (Sup, ).
*Analysis. *In the following we analyze the different parts of our network learning and its applicability. One interpretation of the pretraining phase is that the network learns a negative feedback loop, which reduces the error . For another interpretation, we split and regroup the -dependent part of Eq. (1) as : feeding back is equivalent to adding a teacher drive , except for a specific change in the feedback weights . For the -output alone the network thus weight-learns an autoencoder . This is usually an easy task for reservoir networks (Abbott et al., 2016). To simultaneously learn the constant output , the network has to choose an appropriate orthogonal to the subspaces in which the different -driving -dynamics take place. Orthogonal directions are available in sufficiently large networks, since the subspaces are low-dimensional (Abbott et al., 2010).
After the correct -dynamics are assumed, we have . Since remaining fluctuations in could stabilize the dynamics, we usually include ensuing learning phases with and . These teach the network to generate the correct dynamics in stable manner under conditions similar to testing.
To analyze the principles underlying dynamical learning and testing, we consider task (i). The similarity of the network and learning setups suggests that the same principles underlie all our tasks. We additionally confirm this for (vi) (Sup, ). Viewing the network dynamics in the space of firing rates , we choose new coordinates with first axis along and the principal components of the dynamics orthogonal to . The dynamics are then given by (Fig. 4). We focus on the first three coordinates, which describe large parts of the dynamics and output generation.
We find that during dynamical learning, the error feedback drives the dynamics towards an orbit that is shifted in but similar to pretrained ones. The network therewith generalizes the pretrained reaching and generation of orbits together with corresponding, near-constant , while is fed in. We note that the combination of current state and error input is important (see Fig. 4a for and a mismatched ).
During testing, the network generalizes the pretrained characteristics that feeding back leads to . Clamping thus results in an approximate restriction of to an -dimensional hyperplane with (Fig. 4b). The resulting trajectory is for task (i) a stable periodic orbit that generates the desired signal, because the vector field projected to the -hyperplane is similar to the vector field projected to the -hyperplanes embedding nearby pretrained periodic orbits (Fig. 4c).
*Discussion and conclusion. *We have introduced a scheme how neural networks can quickly learn dynamics without changing their weights and without requiring a teacher during testing. It relies on a weight-learned mutual association, quasi an entanglement, between contexts and targets. This enables the latter to fix the former during dynamical learning and vice versa during testing.
Previous approaches to supervised dynamical learning with continuous signal space required a form of the teaching signal also during testing. They further differ in network architecture, learning algorithm, task and/or assumption of discrete time from ours (Sup, ; Feldkamp and Puskorius, 1994a, b; Feldkamp et al., 1996; Feldkamp and Puskorius, 1997; Feldkamp et al., 1997; Younger et al., 1999; Hochreiter et al., 2001; Younger et al., 2001; Feldkamp et al., 2003; Santiago, 2004; Lukosevicius, 2007; Oubbati and Palm, 2010; Santoro et al., 2016; Bellec et al., 2018; Oubbati et al., 2005; Jaeger and Eck, 2008; wyffels et al., 2014). In networks with external input unseen, interpolating input can lead to interpolating dynamics (Sup, ; Boström et al., 2013). In contrast, our networks learn new dynamics, by imitation.
Our scheme is conceptually independent of the network and weight-learning model. The pretraining implements a form of structure learning, i.e. learning of the structure underlying a task family (Lansdell and Kording, 2018; Braun et al., 2010). Animals and humans employ it frequently, but little is known about its neurobiology. We thus realize it by a simple reservoir computing scheme with FORCE learning (Sup, ; Sussillo and Abbott, 2009). We checked that we can use biologically more plausible weight perturbation learning for a simple fixed point learning task (Sup, ).
Dynamical learning is biologically plausible: it is naturally local, causal and does not require fast synaptic weight updates. Continuous supervision could be generated by an inverse model (Jordan and Rumelhart, 1992) and might be replaceable by a sparse, partial signal. Our dynamical learning is fast (Sup, ) (cf. also (Wang et al., 2018; Jaeger and Eck, 2008; Feldkamp et al., 1996, 1997; Hochreiter et al., 2001; Younger et al., 2001)). Even for more complicated tasks convergence requires only a few multiples of a characteristic time scale of the dynamics. Further, we find robustness against changes in network and task parameters (Sup, ). The above points suggest a high potential of our scheme for applications in biology, physics and engineering such as neuromorphic computing and the prediction of chaotic systems (Sup, ).
Acknowledgements.
We thank Paul Züge for fruitful discussions, the German Federal Ministry of Education and Research (BMBF) for support via the Bernstein Network (Bernstein Award 2014, 01GQ1710) and the European Union’s Horizon 2020 research and innovation programme for support via the Marie Sklodowska-Curie Grant No 754411.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1Dayan and Abbott (2001) P. Dayan and L. F. Abbott, Theoretical Neuroscience: Computational and Mathematical Modeling of Neural Systems (MIT Press, Cambridge, 2001).
- 2Gerstner et al. (2014) W. Gerstner, W. M. Kistler, R. Naud, and L. Paninski, Neuronal Dynamics - From Single Neurons to Networks and Models of Cognition (Cambridge University Press, Cambridge, 2014).
- 3Perich et al. (2018) M. G. Perich, J. A. Gallego, and L. E. Miller, “A neural population mechanism for rapid learning,” Neuron 100 , 964–976.e 7 (2018) . · doi ↗
- 4Thrun and Pratt (1998) S. Thrun and L. Pratt, eds., Learning to Learn (Springer US, 1998).
- 5Vanschoren (2018) Joaquin Vanschoren, “Meta-Learning: A Survey,” ar Xiv:1810.03548 (2018).
- 6Lansdell and Kording (2018) B. J. Lansdell and K. P. Kording, “Towards learning-to-learn,” ar Xiv:1811.00231 (2018).
- 7Duan et al. (2016) Y. Duan, J. Schulman, X. Chen, P. L. Bartlett, I. Sutskever, and P. Abbeel, “RL 2 : Fast Reinforcement Learning via Slow Reinforcement Learning,” ar Xiv:1611.02779 (2016).
- 8Wang et al. (2018) J. X. Wang, Z. Kurth-Nelson, D. Kumaran, D. Tirumala, H. Soyer, J. Z. Leibo, D. Hassabis, and M. Botvinick, “Prefrontal cortex as a meta-reinforcement learning system,” Nat. Neurosci. 21 , 860–868 (2018) . · doi ↗
