# Emergence of memory manifolds

Tankut Can  authors listed alphabetically;
correspondence: {tankut.can<EMAIL_ADDRESS>Initiative for Theoretical
Sciences, Graduate Center, CUNY, New York and School of Natural Sciences,
Institute for Advanced Study, Princeton NJ  Kamesh Krishnamurthy  authors
listed alphabetically;
correspondence: {tankut.can<EMAIL_ADDRESS>Joseph Henry Laboratories of
Physics and PNI, Princeton University, Princeton NJ

###### Abstract

The ability to store continuous variables in the state of a biological system
(e.g. a neural network) is critical for many behaviours. Most models for
implementing such a memory manifold require hand-crafted symmetries in the
interactions or precise fine-tuning of parameters. We present a general
principle that we refer to as frozen stabilisation, which allows a family of
neural networks to self-organise to a critical state exhibiting memory
manifolds without parameter fine-tuning or symmetries. These memory manifolds
exhibit a true continuum of memory states and can be used as general purpose
integrators for inputs aligned with the manifold. Moreover, frozen
stabilisation allows robust memory manifolds in small networks, and this is
relevant to debates of implementing continuous attractors with a small number
of neurons in light of recent experimental discoveries.

††preprint: APS/123-QED

##  I Introduction

Many biological systems are able to maintain a memory of relevant quantities
in their dynamical states for durations much longer than the characteristic
response time of the component parts. For instance, humans are able hold
information in working memory for durations much longer than the intrinsic
timescales of neuronal responses. This fundamental and critical memory
function is particularly relevant for neural systems, where the key challenges
of implementing memory in networks of neurons have been extensively studied
(c.f. Chaudhuri and Fiete (2016) and references therein). If we consider the
memory as being stored in the collective activity of the neurons, then the
problem becomes one of implementing fixed-points in the network dynamics.
Storing a discrete set of items can be achieved by having a discrete set of
stable fixed-points in the dynamics; the Hopfield model Hopfield (1982) being
a prominent example of such a memory.

Storing continuous variables in the dynamical state of a neural network is,
fundamentally, a more difficult challenge. It requires a continuum of fixed-
points forming a manifold, equipped with a structure that can preserve the
metric information of the continuous variables. Such a continuous manifold
attractor will be locally stable in directions normal to the manifold, and
marginally stable along the manifold, so that the state can move smoothly
along the manifold. Such a memory manifold can subserve critical functions
such as evidence accumulation, path integration and more generally
implementing flexible cognitive maps. Implementing such a manifold in a neural
network has often required fine-tuned parameters and/or hand-crafted
symmetries in the connectivity matrix Seung (1996, 1998); Chaudhuri and Fiete
(2016). Quoting Chaudhuri and Fiete (2016), “[h]ow the brain might solve this
problem is an open theoretical and experimental question.”

Closely related to the problem of constructing memories is the problem of
generating long timescales in the dynamics of neural networks (Chen and Bialek
(2020); Bialek (2012) pp. 329-250). This is motivated by the observation that
the behaviours/outputs generated by these neural networks often display a wide
spectrum of timescales much longer than the relevant timescales for individual
neurons. In this case too, models for generating long timescales require fine-
tuning of parameters.

The difficulty of constructing memory manifolds goes beyond neural networks
and applies to dynamical models of biological systems more generally. For a
dynamical system to function as a continuous memory, it needs to be poised
between instability and stability – i.e. be marginally stable. This is
typically achieved at bifurcation points, thus requiring parameters to be
fine-tuned. Marginal stability without parameter fine-tuning necessarily
requires the system to self-organise to a critical point, i.e. exhibit self-
organised criticality – a highly non-trivial phenomenon. Apart from specific
examples, more general principles to achieve this are lacking.

We present a principle that we refer to as frozen stabilisation, which allows
a family of neural networks to self-organise to a state exhibiting memory
manifolds and long timescales. The principle works by momentarily
freezing/slowing the dynamics of a subpopulation of neurons, thereby creating
a static background input which serves to stabilise the remaining population.
These memory manifolds can function as general purpose integrators, and the
emergence of the memory manifolds is robust to parameter choices and permits a
wide range of connectivity matrices, including ones without any
symmetries/structure.

##  II Memory manifolds in a simple recurrent network

We first illustrate the frozen stabilisation principle by means of a specific
neural network model, and then discuss the general principle which applies
more broadly. Let us consider a recurrent neural network (RNN) described by
the following dynamics:

$\displaystyle\partial_{t}\mathbf{h}=\sigma(J^{z}\mathbf{h})\odot\left[-\mathbf{h}+\frac{1}{2}J^{h}\phi(\mathbf{h})\right]$
(1)

Here, $\mathbf{h}$ is a $N-$dimensional vector representing the internal
states of the neurons, $J^{z,h}$ are $N\times N$ connectivity matrices,
$\sigma(x)=[1+e^{-\alpha x}]^{-1}$ is a sigmoidal non-linearity that acts
element-wise and $\phi(x)=\tanh(gx)$ is the neuronal output nonlinearity with
gain $g$. The entries of $J^{z,h}$ are sampled i.i.d from a centered Gaussian
distribution with variance $1/N$. This is a variant of the “gated” RNN (gRNN)
studied in Krishnamurthy  _et al._ (2020). We are interested in the limit of a
binary sigmoid $(\alpha\to\infty)$ and large $N$, where the network exhibits a
self-organised marginally-stable phase over a wide range of parameters. To
derive the conditions under which marginal stability is possible, we study the
eigenvalues of the state-to-state Jacobian which describes the linearised
dynamics. The system will be marginally stable when the spectral abscissa of
the Jacobian is equal to zero. The Jacobian in this case is given by
$\mathcal{D}=[\boldsymbol{\sigma}](-\mathbbm{1}+1/2J^{h}[\boldsymbol{\phi^{\prime}}])$,
where $[\mathbf{x}]$ denotes a diagonal matrix with the vector $\mathbf{x}$ on
the diagonal. For large $N$, we can use non-Hermitian random matrix techniques
along with mean-field theory, similar to Krishnamurthy  _et al._ (2020), to
calculate the spectral properties of the disorder-averaged Jacobian. The
bounding spectral curve and the density near 0, will inform us about the
stability and number of slow modes, respectively. It turns out that for
$\alpha\to\infty$, the system will be marginally stable, with the spectral
abscissa of $\mathcal{D}$ poised at $0$ and an extensive number of slow modes,
provided the following condition is met:

$\displaystyle\int\mathcal{D}x\left(\phi^{\prime}\left(\sqrt{\Delta_{h}}x\right)\right)^{2}<$
$\displaystyle\>8$ (2)

where $\mathcal{D}x$ is the standard Gaussian measure, and $\Delta_{h}$ is the
mean-field (fixed-point) variance obtained from the self-consistency condition
: $4\Delta_{h}=\int\mathcal{D}x\phi(\sqrt{\Delta_{h}}x)^{2}$. This corresponds
to a range $2<g\lessapprox 6.2$ over which the network will self-organise to a
marginally stable state with a large number of slow modes. Note that the
matrices $J^{z,h}$, are completely unstructured.

In order to understand frozen stabilisation, it is instructive to study the
dynamical mechanism which gives rise to the self-oranised critical state in
the gRNN. One might naïvely expect that in the limit $\alpha\to\infty$, the
$\\{\sigma\\}$ terms go to zero and the $h-$variable becomes frozen, leading
to fixed-points. However, with a little reflection it should be clear that at
any given time the $\\{[J^{z}h]_{i}\\}$ will take both positive and negative
values, and thus one should expect half the $\\{\sigma_{i}\\}$ to be zero and
the other half to be 1 – i.e. half the $\\{h_{i}\\}$ are momentariy frozen and
the other half free to evolve. Moreover, we know from prior work that a
“vanilla” RNN (vRNN) – where $\sigma_{i}=1$ for all $i$ in eq.1 – exhibits
chaotic activity for $g>2$ Sompolinsky  _et al._ (1988); Krishnamurthy  _et
al._ (2020). So, in the gRNN, if half the $\\{h_{i}\\}$ are free to evolve
what causes all  the $\\{h_{i}\\}$ to be frozen – i.e. be at a fixed-point?

This is where the stabilisation in frozen stabilisation enters. We first take
a detour to look at a simpler model: a vRNN with external random (fixed)
biases. The dynamics for the vRNN with biases are given by equation below:

$\displaystyle\dot{h}_{i}(t)=-h_{i}(t)+\frac{1}{2}\sum_{j=1}^{N/2}J_{ij}^{v}\phi_{j}(t)+\beta_{i}$
(3)

where $J^{v}_{ij}\sim\mathcal{N}(0,1/N)$ and
$\beta_{i}\sim\mathcal{N}(0,\sigma_{\beta}^{2})$; the super-script $v$ is
meant to denote the vanilla RNN. The factor of $1/2$ and the network size of
$N/2$ (instead of $N$) are required to make the comparison to the gRNN
meaningful. The coupling matrix $J^{v}$ is of size $N/2\times N/2$, but the
elements are sampled from a centered Gaussian with variance $1/N$.

The effect of the random biases in the vRNN is to stabilise the dynamics – for
a given $g$ if $\sigma_{\beta}$ exceeds a critical value, then the dynamics
will flow to a stable fixed-point. Moreover, for a given set of biases
$\\{\beta_{i}\\}$ there can only be one fixed-point. The critical value of
$\sigma_{\beta}$ can be obtained by analyzing the stability of the vRNN
Jacobian which is given by:

$\displaystyle\mathcal{D}_{v}=-\mathbbm{1}+\frac{1}{2}J^{v}[\phi^{\prime}(h)]$
(4)

For large $N$, we can again use random matrix techniques to show that the
leading edge of the spectrum will stable $(<0)$ provided:
$\int\mathcal{D}x\left(\phi^{\prime}\left(\sqrt{\Delta_{h}}x\right)\right)^{2}<\>8$.
It is important to note that although this condition looks the same as eq. 2,
the average here is taken with respect to variance obtained from the DMFT for
eq. 3, by solving the following equation:

$\displaystyle\Delta_{h}^{v}=\frac{1}{8}\Delta_{\phi}^{v}(\Delta_{h}^{v})+\sigma_{\beta}^{2}$
(5)

This will give us a critical value for the variance of the biases
$\sigma_{\beta}^{*}(g)$ ( Fig. 1c, red line), above which the dynamics will
flow to a (unique) stable fixed-point in the vRNN with biases.

Figure 1:  Illustrating frozen stabilisation in a RNN: a) Schematic of the
vanilla RNN (vRNN) with random biases (eq. 3). The dynamics will flow to a
fixed-point if the variance of the biases is larger than a critical value
$\sigma^{v*}_{\beta}(g)$. b) Schematic of the gated RNN (gRNN) where roughly
half the population is frozen ($\mathbf{h}^{F}$) and roughly half is free to
evolve ($\mathbf{h}^{E}$) at any given instant of time. The frozen half
provides random biases to the evolving half as in (a). c) DMFT calculation of
the variance of the frozen population in the gRNN (black line) and the
critical variance required to stabilise the dynamics in the matched vRNN
(dashed red line). For $2<g\lessapprox 6.2$ (till the orange line) the frozen
population provides biases that can stabilise the evolving part.

In the case of the gRNN in the self-organised critical state, half the
$h-$population is frozen and half is free to evolve; therefore, we can think
of the frozen population as effectively providing random biases to the free-
to-evolve population. We thus expect that the system will be at a fixed-point
if the variance of the frozen population is larger than the critical variance
of biases $\sigma_{\beta}^{*}(g)$ required to stabilise the evolving
population, for the particular $g$. More specifically, we need to compare
$\sigma_{\beta}^{*}(g)$ to the variance from the frozen population
$\Delta_{\phi}^{g}/8$, where $\Delta_{\phi}^{g}=\langle\phi^{2}\rangle$ is
obtained by solving the fixed-point DMFT for the gated RNN:

$\displaystyle\Delta_{h}^{g}=\frac{1}{4}\int\>\mathcal{D}x\>\phi(\sqrt{\Delta_{h}^{g}}x)^{2}$
(6)

Indeed, when we compare the critical variance of biases required to stabilise
the matched vRNN $\sigma^{v*}_{\beta}(g)$, and the variance from the frozen-
half of the population in the gRNN, the latter is larger for all $g$ that
satify eq. 2 (compare red and black lines in Fig. 1c). Thus, whenever $g$
satisfies this condition and $\alpha=\infty$, the network self-organizes to a
state where the frozen population acts as random biases that stabilise the
free-to-evolve population, thus making the whole system marginally stable. It
is important to emphasize that simply having half the $\sigma_{i}$ frozen will
not give rise to the self-organised state – i.e. there is no marginal
stability for $g>6.2$ (orange line in Fig.1c) . As will be shown below the
self-organised state is characterised by a continuum of connected fixed-points
– i.e. a memory manifold.

##  III Frozen stabilisation as a general principle to produce memory
manifolds

Figure 2:  Frozen stabilisation through the lens of the Jacobian: a) Schematic
of a generic network exhibiting frozen stabilisation. A part of the system
$(\mathbf{h}^{F})$ gets frozen instantaneously as a function of the full
state, $F(\mathbf{h}(t))$. The frozen part in turn stabilises the evolving
part, $(\mathbf{h}^{E})$, by means of the interactions $S(\mathbf{h}^{F}(t))$.
b) The Jacobian spectrum of a generic system exhibiting frozen stabilisation.
Any freezing mechanism gives rise to an accumulation of eigenvalues at zero
(blue circle), and if the frozen part can sufficiently stabilise the evolving
part, then the remaining eigenvalues will be in left half-plane (green
circle).

The mechanism discussed in the context of the gRNN, where one part of the
system that is dynamically/momentarily slowed, stabilises the freely evolving
part, forms the core of the principle of frozen stabilisation for achieving
the memory manifolds. Although, we illustrated the principle with a specific
model, we will see that it is more general and does not depend on the specific
parameter and connectivity choices of the gRNN. To see this, it is instructive
to look at the marginally-stable state through the lens of the state-to-state
Jacobian. Fig. 2a, shows a schematic of a system displaying frozen
stabilisation and the accompanying Jacobian spectrum. The main requirement for
the principle is that one part of the system $(\mathbf{h}^{F})$ gets
instantaneously slowed/frozen depending on the state of the whole system
(depicted by $F(\mathbf{h}(t))$ in Fig. 2a). The freezing function $F$ we
consider in the case of the gRNN are the switch-like binary gates with
tuneable biases, $F(\mathbf{h})=\sigma(J^{z}\mathbf{h})$ but in principle,
this could be more general. The frozen population in turn stabilises the
evolving population by means of the interactions $S(\mathbf{h}^{F}(t))$. In
the case of the gRNN above, the stabilisation function
$S(\mathbf{h}^{F})\equiv+J^{h,F}\phi(\mathbf{h}^{F})/2$ corresponds to
additive interactions – i.e. biases; however, this too can, in principle, be
more general. Fig. 2b shows the generic Jacobian spectrum for a system
displaying frozen stabilisation: any freezing mechanism will lead to an
accumulation of slow modes near zero (blue circle in Fig. 2b) and if the
frozen population can stabilise the evolving population then all the remaining
Jacobian eigenvalues will have real parts less than $0$ (green circle in Fig.
2b). As long as the Jacobian spectrum has this general form, we will have a
system that generates a memory manifold. Since the only requirement for stable
eigenvalues is that they have real parts less than $0$, the principle is not
slave to precise connectivity matrices with special symmetries or fine-tuned
parameters. Indeed, the principle will work even with diagonal $J^{z}$,
correlations between the elements of $J^{h}$ and other activation functions
$\phi$, such as the rectified-linear function (ReLU). We will study this
robustness in more detail below.

###  III.1 A self-stabilised RNN using frozen stabilisation

Armed with the key features of frozen stabilisation, we can now embark on
constructing a variety of RNNs which produce a memory manifold. Here we give
one example of a network than can generate a memory manifold even with $\sim
20$ neurons: the self-stabilised RNN (ssRNN). In the case of the ssRNN, we
make use of the fact that larger bias variances of the frozen population will
lead to more robust stabilisation. We incorporate a dynamical variable that
modulates the variance of the frozen population, thereby ensuring robust
frozen stabilisation over a much wider range of parameters compared to the
gRNN. The dynamics of the ssRNN are given by the following equations:

$\displaystyle\partial_{t}\mathbf{h}=$
$\displaystyle\bm{\sigma}_{1}\odot\left[-\mathbf{h}+J^{h}(\bm{\phi}\odot\bm{\sigma_{2}})\right],$
(7) $\displaystyle\bm{\sigma}_{1}=$
$\displaystyle\>\Theta(J^{z}\bm{\phi}+\beta_{1}),$
$\displaystyle\bm{\sigma}_{2}=$
$\displaystyle\>\gamma\left[\mu_{\sigma}(t)(1-\bm{\sigma}_{1})+G(1-\mu_{\sigma}(t))\bm{\sigma}_{1}\right]$

where $\Theta(\cdot)$ denotes the Heaviside function,
$\mu_{\sigma}(t)=\langle\boldsymbol{\sigma}_{1}(t)\rangle$ is the mean
(instantaneous) fraction of freely evolving neurons and $G$ is a gain control
parameter chosen to be $\leq 1$. The bias $\beta_{1}$ controls $\mu_{\sigma}$
and thus the dimensionality of the memory manifold.

The self-stabilising nature of the network is evident from
$\boldsymbol{\sigma}_{2}$ : when the size of the evolving population is larger
than the frozen population then $\boldsymbol{\sigma}_{2}$ dynamically boosts
the output of the frozen population and suppresses the outputs of the evolving
part thereby ensuring that the frozen part can stabilise the evolving part.
This ensures that the network exhibits a memory manifold over a very wide
range of $g$.

Another way to see the stabilisation in the ssRNN is to focus on the spectrum
of the state-to-state Jacobian and examine what values of $g$ destabilise the
system. In the gRNN, larger values of $g$ destabilise the network and lead to
chaotic activity. Specifically, for a gRNN of size $N$ where the weights have
variance $1/N$, the $g$ that destabilises the system is found by solving
$\langle(\phi^{\prime})^{2}\rangle=8$. A similar condition for the instability
of the Jacobian (see Appending A for details) in the ssRNN leads to the
realisation that the self-stabilisation mechanism effectively rescales the
neuronal gain, yielding a lower effective $g$ given by

$\displaystyle g_{eff}^{2}=G^{2}g^{2}\mu_{\sigma}(1-\mu_{\sigma})^{2}$ (8)

The self-stabilisation also allows the ssRNN to implement the memory manifold
with just a few neurons. Indeed, in Fig. 7 we see that a ssRNN with $N=50$ has
a Jacobian that shows robust frozen stabilisation.

We would like emphasise that the ssRNN is just one example of a family of RNNs
that can exploit frozen stabilisation to generate a memory manifold. The key
requirement is that the frozen population is able to stabilise the freely
evolving population thus pushing the non-zero eigenvalues of the Jacobian to
the left of the imaginary line, as in Fig. 2b. As long as the Jacobian has
this form, the system will generate a memory manifold. Indeed, this principle
can be implemented even in a network with $N=3$, which allows us to visualise
the manifold as we see below. We now proceed to study the properties of the
memory manifold produced by frozen stabilisation.

##  IV Properties of the memory manifold

###  IV.1 Robustness of Frozen Stabilisation

As we indicated above, frozen stabilisation and the emergence of the
associated memory manifold are not slave to the details of the precise
connectivity matrices, and do not require fine-tuned gain parameters. Here, we
consider the effects of perturbations to parameters, and connectivity matrices
that might be more biologically relevant. In networks of real neurons, a
salient deviation for the completely unstructured connectivity is the over-
representation of bidirectional connections suggesting a partially symmetric
structure (e.g. Markram  _et al._ (1997); Wang  _et al._ (2006)). We can study
the effects of such structure on the manifold by considering matrices $J^{h}$
that can vary between fully symmetric to fully anti-symmetric. Specifically,
we consider $J^{h}$ from the elliptic ensemble (Sommers  _et al._ (1988))
where $\langle(J_{ij}^{h})^{2}\rangle=N^{-1}$ and $\langle
J_{ij}^{h}J_{ji}^{h}\rangle=\eta N^{-1}$, with $\eta\in[-1,1]$. The symmetric,
asymmetric and anti-symmetric cases correspond to $\eta$ being $1$, $0$ and
$-1$, respectively. In Fig.3 a-c, we see representative examples with the
ssRNN wherein, other parameters being the same, introducing strong symmetry or
anti-symmetry in $J^{h}$ does not affect the emergence of the memory manifold
since the non-zero eigenvalues of the Jacobian are still stable 111 As an
aside, the non-zero bulk of the Jacobian spectrum strongly resembles the
spectrum of $J^{h}$ from the elliptic ensemble, this is because the relevant
block of the Jacobian has the form $\tilde{J}P$ where $P$ is a positive
diagonal matrix and $\tilde{J}$ is from the elliptic ensemble..

Figure 3:  The emergence of the memory manifold is robust to choices of the
connectivity matrices $J^{h,z}$ (a-c) Jacobian spectrum of a ssRNN with
$J^{h}$ from an elliptic ensemble to model asymmetric (a,$\eta=0$), symmetric
(b,$\eta=0.8$) or anti-symmetric (c,$\eta=-0.8$) interactions. d) Same ssRNN
as (a), but with a diagonal $J^{z}$ with random $\pm 1$ on the diagonal.
Parameters of the ssRNN: $N=500,g=2.0,G=1.0$.

Another salient difference in the connectivity is the choice of $J^{z}$ which
governs how the freezing variable $\boldsymbol{\sigma}_{1}$ depends on
$\mathbf{h}$. In particular, when $J^{z}$ is diagonal, this would imply that
the freezing variable is local – i.e. $\sigma_{1,i}$ only depends on $h_{i}$.
This choice too does not hamper the formation of the memory manifold, as is
shown in an illustrative example in Fig. 3d.

Thus far, we looked at choices for the connectivity matrices, let us now
briefly consider whether the memory manifold will fall apart if the connection
matrices or the gain parameters are perturbed. For random connectivity
matrices $J^{z,h}$ and large $N$, if each $J^{h}_{ij}$ is independently
perturbed by an amount $N^{-1}\delta\cdot\xi_{ij}$, then the effect of this
perturbation is similar to increasing $g$, and as long as the spectral edge of
the non-zero eigenvalues of the Jacobian does not cross zero, the memory
manifold will still exist; this will be the case when $g$ is not close to the
boundaries of its permissible range. In contrast, low-rank perturbations of
the form $J^{h}\to J^{h}+uu^{T}$ can potentially push some of the zero
eigenvalues to positive values, thus destabilising the slow manifold; the
particular detrimental perturbations will depend on the model details.

###  IV.2 True continuum of fixed-points

A salient feature of the memory manifold generated by frozen stabilisation is
that it is a continuum of marginally stable fixed-points. This is in contrast
to previous models to generate continuous attractors Ben-Yishai  _et al._
(1995); Burak and Fiete (2009); Chaudhuri and Fiete (2016), where a continuous
manifold is approximated by a discrete set of $O(N)$ fixed-points, where $N$
is the system size (no. of neurons). The distinction matters for the
resolution with which the continuous variable can be stored or “quantised”;
specifically, a manifold of dimension $D$ that is approximated with $N$ fixed-
points will have a resolution that scales as $N^{-1/D}$, and this can
deteriorate rapidly with $D$, even for small $D$.

To see that a network exhibiting frozen stabilisation does indeed give us a
continuum of fixed-points and not a discrete set, let us consider the gRNN
from before – the argument will work with any other network exhibiting frozen
stabilisation. It is sufficient to study how the network responds to
infinitesimal perturbations away from a particular fixed-point. In the gRNN,
denoting the frozen population by $h^{F}$, and the active population by
$h^{E}$, we find that for a neuron in the evolving population, at a fixed
point the following equation must hold,

$\displaystyle 0=-h_{i}^{E}+\frac{1}{2}\sum_{i\in
E}J^{h}_{ij}\phi(h^{E}_{i})+\frac{1}{2}\sum_{\mu\in
F}J^{h}_{i\mu}\phi(h^{F}_{\mu})$ (9)

If we now apply an infinitesimal perturbation $h^{F}\to h^{F}+\delta h^{F}$,
then as long as the evolving population can still accommodate a fixed-point by
adjusting infinitesimally as $h^{E}\to h^{E}+\delta h^{E}$, the manifold will
be continuous. This is possible as long as the following equation has a
solution:

$\displaystyle\left(\mathbbm{I}-\frac{1}{2}\tilde{J}^{E}\phi^{\prime}(h^{E})\right)\delta
h^{E}=\frac{1}{2}\tilde{J}^{F}\phi^{\prime}(h^{F})\delta h^{F}.$ (10)

There is a solution to eq. 10 if the matrix in parentheses on the LHS is
invertible. Since the leading edge of this matrix is at
$1-\frac{1}{8}\langle\phi^{\prime 2}\rangle$ – for large $N$ – invertibility
is guaranteed when eq. 2 is true, i.e., in the marginally stable region. Thus,
so long as the network exhibits frozen stabilisation, there will exist a
continuous manifold of fixed-points. The same argument, can be easily extended
to link the stability of the Jacobian to the continuity of the manifold for
other networks, like the ssRNN in Fig. 7, exhibiting frozen stabilisation. The
fact that frozen stabilisation allows networks with a small number of neurons
to exhibit continuous manifolds is potentially relevant to questions about
achieving continuous attractors with a few neurons in the nervous systems of
insects Turner-Evans  _et al._ (2020); Kim  _et al._ (2017).

###  IV.3 Geometry of the memory manifold

Having demonstrated the continuity of the memory manifold, we now study some
of its geometric properties. From the arguments about the continuity of the
manifold above, it should be evident that the frozen population
$(\mathbf{h}^{F})$ forms a natural set of coordinates for the memory manifold.
This can also be understood by considering the structure of the left- and
right-eigenvectors of the Jacobian. For the sake of illustration, let us
consider the gRNN. Then the left-eigenvectors $L_{\mu}$ for the zero
eigenvalues satisfy:

$\displaystyle L_{\mu}^{T}\mathcal{D}=0\quad\textrm{where
}\mathcal{D}=[\boldsymbol{\sigma}](-\mathbbm{1}+1/2J^{h}[\boldsymbol{\phi^{\prime}}]).$
(11)

For every frozen neuron with $\sigma_{\mu}=0$, there exists a left-
eigenvectors of the form $L_{\mu}^{T}=(0,\ldots,1,\ldots,0)$, with a single
zero at location $\mu$, that satisfies eq. 11. The dimensionality of the slow
manifold is the number of linearly independent zero modes, which is precisely
the size of the frozen population. We also note that biorthogonality implies
that the right-eigenvectors $R_{\mu}$ corresponding to the zero eigenvalues
are supported on exactly one frozen dimension, and the rest of the support is
spread over the evolving population.

In the gRNN, the size of the frozen population is $N/2$, and thus the manifold
is high-dimensional. In the ssRNN we can have a lower-dimensional manifold,
not only because the network can support manifolds for smaller $N$, but also
due to the ability to achieve stable manifolds with a smaller fraction of
frozen neurons by tuning $\beta_{1}$ in eq. 7. Thus, the ssRNN offers a way to
tune the dimensionality for a fixed $N$.

We now proceed to calculate the metric tensor $g_{\mu\nu}$ for the memory
manifold, which informs us about the local geometry of the manifold. The
manifold is embedded in $R^{N}$, parametrised by the coordinates
$\mathbf{h}^{F}$, and the metric prescribes infinitesimal distances as
$ds^{2}=g_{\mu\nu}dh^{F,\mu}dh^{F,\nu}=|\mathbf{dh}^{F}|^{2}+|\mathbf{dh}^{E}|^{2}$,
where summation over repeated indices is implied, and
$\mathbf{dh}^{E}_{i}=(dh^{E}_{i}/dh^{F}_{\mu})dh^{F}_{\mu}$. This give us

$\displaystyle g_{\mu\nu}=$ $\displaystyle\>\delta_{\mu\nu}+\sum_{i\in
E}\frac{dh^{E}_{i}}{dh^{F}_{\mu}}\frac{dh^{E}_{i}}{dh^{F}_{\nu}}$ (12)

Before we calculate eq. 12 for a specific model, we make a general note: for
the models we have so far discussed, the metric takes the form

$\displaystyle
g_{\mu\nu}=\delta_{\mu\nu}+\phi^{\prime}(h^{F}_{\mu})\phi^{\prime}(h^{F}_{\nu})\Gamma_{\mu\nu}$
(13)

where $\Gamma$ is a matrix that will depend on the model. We immediately note
the explicit dependence of the metric on the non-linearity $\phi(\cdot)$. In
particular, if $\phi(\cdot)$ is a piece-wise linear function, such as
$\phi(x)=\max(0,x)$, then the metric is locally flat, i.e.
$g_{\mu\nu}\propto\delta_{\mu\nu}$.

For the gRNN, we can appeal to random-matrix techniques to give an explicit
form for the average metric (c.f. Appendix B for details), 222 This formula
shows that the metric can change signature when the stability condition is
violated. However, such a transition is not meaningful for a Riemannian
metric, and likely indicates the collapse of the memory manifold. :

$\displaystyle\mathbb{E}[g_{\mu\nu}]=\delta_{\mu\nu}\left[1+\frac{(\phi^{\prime}(h^{F}_{\mu}))^{2}}{8-\langle(\phi^{\prime})^{2}\rangle}\right]+O(N^{-1})$
(14)

####  IV.3.1 Global geometry of the manifold

Having considered the local geometry above, we now make a few remarks on the
global geometry of the manifold. In general, the global geometry of the
manifold (embedded in $R^{N}$) can be quite complicated and even the
dimensionality can change from one part of the phase space to the other. In
Fig. 4, we see an example of the ($2-$D) manifold embedded in $R^{3}$, for a
gRNN with $N=3$. The manifold was generated by sampling initial conditions
from a grid in $R^{3}$, and running the forward dynamics till convergence to a
fixed-point (see Appendix B.1 for details of the numerics). We see that the
global structure consists of two “sheets” (red & green in Fig. 4) that are
connected – each sheet corresponds to a different subset of (2) frozen units.
Note that the sheets themselves are continuous, and the discreteness is an
artefact of the sampling. This picture of the global structure consisting of
continuous sheets that are stitched together also holds in higher dimensions,
and each sheet corresponds to a particular subset of units being frozen. Which
particular subset of units contribute to any particular sheet is controlled by
the $J^{z}$ matrix, and the $J^{h}$ matrix controls the stability.

Figure 4:  Global geometry of the memory manifold

Two views of an example $2-$D manifold generated by a gRNN with 3 units. The
global structure consists of two “sheets” (red & green) that are connected.
Each sheet consists of a distinct subset of $2$ frozen units. The manifold was
generated by sampling a grid of initial conditions in $[-1,1]^{3}$ and running
the dynamics till a fixed-point was reached (futher details about numerics in
Appendix B.1).

##  V A general purpose integrator

One of the crucial functions a memory manifold can implement is that of a
general purpose integrator: external input along the manifold directions will
move the state on the manifold, and once the input ceases, the final state
will store the integrated value of the input; however, traces of inputs that
are not aligned to the manifold will decay away rapidly. Integrator function
of this type forms the basis of several biologically important computations
such as evidence accumulation Gold and Shadlen (2007); Brunton  _et al._
(2013), path integration Burak and Fiete (2009), and more generally
implementing cognitive maps Tolman (1948); Nieh  _et al._ (2021). It is well
known that implementing an integrator in biologically realistic models
requires fine-tuning and special symmetries Seung (1996); Chaudhuri and Fiete
(2016); Bialek (2012). Frozen stabilisation might offer a possible way for
biological systems to implement the integrator function over a wide range of
parameters and interaction patterns. In Fig. 5 we see an example of this
integrator function: inputs lasting a short duration ($5$ time units) are
applied along different directions of the memory manifold produced by a ssRNN,
at times indicated by the vertical dashed lines. The projection of the network
state $\mathbf{h}(t)$ on the input directions shows that the state integrates
the input and maintains it in memory for a long time; moreover, the traces of
inputs along the different directions do not interfere with each other.
Another salient feature of frozen stabilisation is that it allows a truly
continuous integrator to be robustly implemented in systems with low
dimensionality (e.g. ssRNN with $N\sim 20$). This is in contrast with the
classical models for continuous attractors in neural systems (e.g. Ben-Yishai
_et al._ (1995); Burak and Fiete (2009)) where the number of fixed-points, and
thus the integrator resolution, scale with the system size, $N$. Recent
experimental work in the nervous system of insects has provided evidence for
integrators with continuous attractor dynamics for representing angular
orientation with a small no. ($\sim 20$) of neurons Kim  _et al._ (2017). If
we use the classical models in their original form, it raises the problematic
question of the resolution of the angular representation. Memory manifolds
generated by frozen stabilisation, thus, might be relevant to debates about
achieving continuous attractors with a small number of neurons.

Figure 5:  Memory manifold can be used as an integrator: Input pulses lasting
5 time units, with random amplitudes, are applied along randomly selected
manifold directions starting at the times indicated by the vertical dashed
lines. The (excess) projection of the state on the input directions shows that
the input trace is integrated and retained in the network state
$\mathbf{h}(t)$ for a long time. Moreover, the inputs along different
directions do not interfere with each other. The network used is a ssRNN with
$g=1.0,N=100,G=1.0$.

##  VI Long timescales without fine-tuning

Now we consider a problem that is closely related to the problem of memory:
generating long timescales. How can a system generate timescales in its
collective dynamics, which are much longer than the intrinsic timescale of its
units? Typical examples of achieving this require a system to be close to a
bifurcation point in the parameter space – i.e. fine-tuning of parameters is
needed. In general, achieving long timescales without fine-tuning is
challenging Chen and Bialek (2020); Bialek (2012); Seung (1996).

From the discussion of frozen stabilisation above, we know that for a wide
range of parameters (e.g. $2<g\lessapprox 6.2$ for the gRNN), and binary
$\boldsymbol{\sigma}$ the dynamics will flow to marginally-stable fixed-points
– i.e. have infinitely long timescales. Moreover, these timescales are
generated, not by fine-tuning parameters, but by the network self-organising
to a critical state. Indeed, requiring the system to be marginally stable over
a range of parameters necessitates self-organising to a critical point.

Here, we would like to extend the discussion of self-organised generation of
long timescales to the case when $\boldsymbol{\sigma}$ is sensitive but not
binary. We can parametrise the sensitivity with a gain $\alpha$ such that
$\sigma(x)=[1+\exp(-\alpha x)]^{-1}$; $\alpha\to\infty$ would give the binary
case. For concreteness, let us consider the case of the gRNN with large-but-
finite $\alpha$. In Fig. 6a, we see that for large $\alpha$ the dynamics for
the network still exhibit timescales that are many orders of magnitude larger
than the intrinsic timescale of a neuron ($\tau_{h}$). Like the strictly
marginally-stable state these long timescales are a self-organized phenomenon
and not simply the result of having a sensitive $\boldsymbol{\sigma}$; indeed
for $g$ outside the range supporting marginal stability, the exact same
network exhibits overall fast chaotic dynamics (Fig. 6a, inset), with only
intermittent short-lived freezing of activity.

It is instructive to study features of this self-organised behaviour using the
“velocities” $|\partial_{t}h_{i}(t)|$. In Fig. 6b,c we see that the
characteristic feature of this dynamical state is that after short transients
the velocities $\partial_{t}h_{i}(t)$ are quickly suppressed to very low
values for every neuron (see red lines in Fig. 6b,c), even though the
population averaged values of other quantities such as $\langle
h_{i}(t)\rangle$ may be biased away from zero (the expected value). 333 The
positive bias in this case is a consequence of initial conditions. The
persistence of a finite fraction of the initial bias in the mean of $h$ is an
indication of the emerging slow manifold. We also see that roughly half the
$\boldsymbol{\sigma}_{i}$ are open and roughly half are closed – compare the
mean and standard-deviation of $\\{\sigma_{i}(t)\\}$ (orange lines in 6b,c).
This means that half the $h-$population is free to evolve. Thus, the
collective dynamics gives us access to long timescales over a wide range of
values for $g$ and $\alpha$. As a final point, how long are the long
timescales in this regime of large-but-finite $\alpha$? Simple diffusion
arguments suggest that these timescales should be closely related to the
timescale for the $\sigma_{i}$ switching which will scale as
$\tau_{switch}\sim\alpha^{2}\langle\phi(h)^{2}\rangle$.

Figure 6:  Emergent long timescales: a) Sample traces of a gRNN exhibiting
long timescales in the collective dynamics : $N=1000,\alpha=50,g=4.0$; (inset)
same network but with $g=8.0$ shows fast, chaotic dynamics. b,c) Mean(b) and
standard deviation(c) of population averaged quantities, showing that the
velocity ($\partial_{t}h_{i}(t)$) for all neurons are rapidly suppressed after
short transients. Note that half of the $\sigma_{i}$ are open are open at any
given instant.

##  VII Discussion

In this work we address two long-standing challenges that arise in the context
of neural networks, and dynamical models of biological systems more broadly:
i) how to implement a memory for continuously varying quantities without using
special symmetries of fine-tuning parameters; and ii) how to generate long
timescales in the collective dynamics without fine-tuning parameters. The
ability to implement memory and generate long timescales underlies several
functions critical for survival such as evidence accumulation from a noisy
signal Gold and Shadlen (2007); Brunton  _et al._ (2013), path integration
based on velocity cues Burak and Fiete (2009), implementing cognitive maps
Tolman (1948); Nieh  _et al._ (2021), just to name a few. Implementing
memory/long timescales requires the system to be poised at the edge of
stability-instability, and prior approaches to this problem have typically
relied on systems close to a bifurcation point, thus requiring tuning
parameters to a special value. Marginal stability without symmetries or
parameter fine-tuning requires the system to dynamically self-organize into a
critical state. This is a highly non-trivial phenomenon, and apart from
specific models , more general principles are hard to come by.

Here we present a principle that we refer to as frozen stabilization, which
allows a family of models to self-organise to a critical state to generate a
continuous memory manifold and long timescales. The principle is robustly
implemented over a range of parameter and doesn’t require any symmetries in
the interactions of the system. Moreover, systems exhibiting frozen
stabilisation yield a true continuum of fixed-points, unlike prior models
where the manifold is approximated by a discrete set of fixed points that
scale with the system size. This is relevant to debates about achieving
continuous attractors in neural systems with a small number of neurons, which
have become important in light of the experimental results on the fly
navigation system Kim  _et al._ (2017). To our knowledge, frozen stabilisation
is the first example of a principle that allows robust implementation of
continuous attractors in small systems.

We discussed the principle of frozen stabilisation using examples of specific
neural network models, and a salient feature of these models was the binary
$\boldsymbol{\sigma}$ variable that momentarily slowed down a part of the
system depending on the instantaneous system state. One natural question that
arises is whether frozen stabilisation can be implemented without the binary
$\boldsymbol{\sigma}$? If we consider a more general class of dynamical
systems specified by $\partial_{t}\mathbf{h}(t)=F[G(\mathbf{h})]$, where $F$
is a function acts element-wise, and has some regions of its domain where
$F(x)=0$ (e.g. $F=\max(0,x)$) then units for which $G(h_{i})$ fall in those
regions will be momentarily frozen and one can in principle achieve frozen
stabilisation depending on the form of $G(\cdot)$. More generally, the
discussion of frozen stabilisation through the lens of the Jacobian spectrum
suggests a larger family of dynamical systems could yield the form of the
spectrum required to exhibit frozen stabilisation. We leave characterising
fully, the classes of systems in which this principle can be implemented for
future work. Another aspect that needs further investigation is the geometric
properties of the memory manifold. The global geometry of the manifold is
strongly shaped by the interactions in $J^{z}$, and in the current examples we
have discussed random/unstructured matrices and the manifolds that result. One
could potentially imagine learning rules that might shape $J^{z}$ to yield
certain target geometries.

In summary, we have presented a principle that allows for robust
implementation of continuous memories and long timescales in neural networks,
without fine-tuning parameters or using special symmetries. Such memory
networks could be useful to model biological implementations of integrators or
cognitive maps. These networks could also serve as “memory reservoir” modules
for use larger machine learning architectures requiring information processing
over long timescales.

###### Acknowledgements.

KK is supported by a C.V. Starr Fellowship and a CPBF Fellowship (through NSF
PHY-1734030).

##  Appendix A Details of the ssRNN

In this section, we outline the calculation for the Jacobian spectrum of the
ssRNN, and the effective gain $g_{eff}$. The dyanimcs of the ssRNN are given
by eq. 7, however, we consider here a slightly more general formulation
allowing for non-binary sigmoids. Consider the ssRNN with the following
dynamics

$\displaystyle\dot{h}_{i}$
$\displaystyle=\sigma_{1}(z_{i})\left(-h_{i}+J_{ij}^{h}\phi(h_{j})\sigma_{2}(z_{j}))\right)$
(15) $\displaystyle\sigma_{2}(z_{j})$
$\displaystyle=\mu_{f}\left(1-\sigma_{1}(z_{j})\right)+\mu_{a}\sigma_{1}(z_{j})$
(16) $\displaystyle\tau\dot{z}_{i}$
$\displaystyle=-z_{i}+J_{ij}^{z}\phi(h_{j})$ (17)

where $\sigma_{1,2}(x)=[1+\exp(-(\alpha_{1,2}(x+\beta_{1,2})]^{-1}$. We get
back eq.7 in the limit $\alpha_{1,2}\to\infty$ and $\tau,\beta_{2}\to 0$. The
Jacobian at a fixed-point is then given by

$\displaystyle\mathcal{D}$
$\displaystyle=\left(\begin{array}[]{cc}[\boldsymbol{\sigma_{1}}]\left(-\mathbbm{1}+J^{h}[\boldsymbol{\phi^{\prime}}\odot\boldsymbol{\sigma_{2}}]\right)&[\boldsymbol{\sigma_{1}}]J^{h}[\boldsymbol{\phi}\odot\boldsymbol{\sigma_{2}^{\prime}}]\\\
J^{z}[\boldsymbol{\phi^{\prime}}]/\tau&-\mathbbm{1}/\tau\\\
\end{array}\right)$ (20)

The Jacobian depends on the random matrices $J^{z,h}$, but for large $N$, we
can leverage tools from non-Hermitian random matrix theory, to calculate the
bounding spectral curve of the disorder-averaged Jacobian. The details can be
found in Krishnamurthy  _et al._ (2020); Can  _et al._ (2020). Here we only
provide the final expression. The bounding spectral curve is given by all
points $\lambda\in\mathbb{C}$ such that

$\displaystyle
1=\left\langle\frac{[\phi^{\prime}(h)\sigma_{2}(z)\sigma_{1}(z)]^{2}}{|\lambda+\sigma_{1}(z)|^{2}}\right\rangle+\frac{\langle[\phi(h)\sigma_{2}^{\prime}(z)]^{2}\rangle}{|\tau\lambda+1|^{2}}\left\langle\frac{[\phi^{\prime}(h)\sigma_{1}(z)]^{2}}{|\lambda+\sigma_{1}(z)|^{2}}\right\rangle$
(21)

The angular brackets denote averages w.r.t independent Gaussian variables
$h,z$ whose variances satisfy the fixed-point mean-field equations. Having
derived the more general spectral curve, we now consider the limit $\tau\to 0$
and $\alpha_{1,2}\to\infty$ and $\mu_{a}=G(1-\mu_{\sigma_{1}})$. In this limit
we get

$\displaystyle|\lambda+1|^{2}=G^{2}\langle\phi^{\prime
2}\rangle\mu_{\sigma}(1-\mu_{\sigma})^{2}$ (22)

where the variance of the Gaussian field $h$, $\Delta_{h}$ is determined from
the condition

$\displaystyle\Delta_{h}=$
$\displaystyle\>G^{2}\mu_{\sigma_{1}}(1-\mu_{\sigma_{1}})^{2}\int\mathcal{D}x\>\phi(\sqrt{\Delta_{h}}x)^{2}$
(23) $\displaystyle\mu_{\sigma_{1}}=$
$\displaystyle\>\int\mathcal{D}x\>\Theta(x+\beta_{1})$ (24)

From eqs. 22, 23, we get the equation for the effective $g$. We note that even
though we have used the MFT for large random RNNs in this section, an ssRNN
with 50 neurons also shows robust frozen stabilisation (see Fig. 7)

Figure 7:  ssRNN with 50 neurons

##  Appendix B Details of the manifold geometry

In this section, we provide the details of calculating the metric tensor
$g_{\mu\nu}$ and the local curvature for the gRNN. As before, we split the
population into a frozen part $\mathbf{h}^{F}$ and an evolving part
$\mathbf{h}^{E}$. At a fixed-point, we have

$\displaystyle 0=$ $\displaystyle\>-h_{i}^{E}+\frac{1}{2}\sum_{j\in
E}J^{h}_{ij}\phi(h^{E}_{i})+\frac{1}{2}\sum_{\mu\in
F}J^{h}_{i\mu}\phi(h^{F}_{\mu})$ (25)

and thus, we can express $dh^{E}_{i}/dh^{F}_{\mu}$ as

$\displaystyle\frac{dh^{E}_{i}}{dh^{F}_{\mu}}=\frac{1}{2}\sum_{j\in
E}J^{h}_{ij}\phi^{\prime}(h^{E}_{i})\frac{dh^{E}_{i}}{dh^{F}_{\mu}}+\frac{1}{2}J^{h}_{i\mu}\phi^{\prime}(h^{F}_{\mu})$
(26)

We can express all this compactly in matrix form. Denoting by
$\tilde{J}^{E}\in R^{N_{E}\times N_{E}}$, the connectivity matrix between the
evolving population, and by $\tilde{J}^{F}\in R^{N_{E}\times N_{F}}$ the
connectivity matrix between the frozen and excitatory populations, we get

$\displaystyle\underbrace{\left(\mathbbm{1}-\frac{1}{2}\tilde{J}^{E}[\phi^{\prime}(\mathbf{h}^{E})]\right)}_{\mathcal{D}_{E}}\frac{\mathbf{dh}^{E}}{\mathbf{dh}^{F}}=\frac{1}{2}\tilde{J}^{F}[\phi^{\prime}(\mathbf{h}^{F})]$
(27)

From eq. 12, we get

$\displaystyle g_{\mu\nu}$ $\displaystyle=\>\delta_{\mu\nu}+$
$\displaystyle\frac{1}{4}\left[\left(\tilde{J}^{F}[\phi^{\prime}(\mathbf{h}^{F})]\right)^{T}(D_{E}D_{E}^{T})^{-1}\left(\tilde{J}^{F}[\phi^{\prime}(\mathbf{h}^{F})]\right)\right]_{\mu\nu}$
(28)

For large $N$, we can calculate the average metric $\mathbb{E}[g_{\mu\nu}]$ by
averaging over the connectivity matrix. To proceed, we denote the fraction of
frozen neurons as $f\equiv N_{F}/N$, and note that for a general matrix $A$ to
leading order in $N$,

$\displaystyle\langle(\tilde{J}^{F})^{T}A\tilde{J}^{F}\rangle=(1-f)\frac{1}{N_{E}}\operatorname{Tr}[A]\equiv(1-f)\operatorname{tr}[A]$
(29)

Thus, we can simplify eq. B by first averaging over $\tilde{J}^{F}$:

$\displaystyle g_{\mu\nu}$
$\displaystyle=\>\delta_{\mu\nu}\left[1+(1-f)(\phi^{\prime}(h^{F}_{\mu}))^{2}\operatorname{tr}[(D_{E}D_{E}^{T})^{-1}]\right]$
(30)

Interestingly, after averaging over $\tilde{J}^{F}$, the metric is diagonal.
Now, we are left to evaluate the average ofthe trace term, which involves
$\tilde{J}^{E}$. From, eq. using the series expansion for
$\mathcal{D}_{E}^{-1}$, we get

$\displaystyle(D_{E}D_{E}^{T})^{-1}=\sum_{m,n}\left(\frac{1}{2}[\phi^{\prime}](\tilde{J}^{E})^{T}\right)^{m}\left(\frac{1}{2}\tilde{J}^{E}[\phi^{\prime}]\right)^{n}$
(31)

when we average over $\tilde{J}^{E}$, only the “non-crossing” diagrams
contribute to leading order in $N$. These diagrams come from terms for which
$m=n$. We thus get

$\displaystyle\operatorname{tr}[(D_{E}D_{E}^{T})^{-1}]=\left(1-(1-f)\langle(\phi^{\prime})^{2}\rangle\right)^{-1}$
(32)

Putting it all together, we can express the average metric as

$\displaystyle\mathbb{E}[g_{\mu\nu}]=\delta_{\mu\nu}\left[1+\frac{(1-f)(\phi^{\prime}(h^{F}_{\mu}))^{2}}{4-(1-f)\langle(\phi^{\prime})^{2}\rangle}\right]$
(33)

In the case, when the populations are symmetric $f=1/2$, and this simplifies
to

$\displaystyle\mathbb{E}[g_{\mu\nu}]=\delta_{\mu\nu}\left[1+\frac{(\phi^{\prime}(h^{F}_{\mu}))^{2}}{8-\langle(\phi^{\prime})^{2}\rangle}\right]$
(34)

###  B.1 Details of the numerics for global geometry

Here we provide the details for generating Fig. 4. We use a gRNN with the
following parameters: $N=3,g=2.0$ and the following connectivity matrices:

$\displaystyle J^{h}=$
$\displaystyle\left(\begin{array}[]{ccc}-0.14&0.13&-0.62\\\
-0.45&-0.19&-1.50\\\ 0.27&-0.28&-1.16\end{array}\right)$ (38) $\displaystyle
J^{z}=$ $\displaystyle\left(\begin{array}[]{ccc}0.57&-0.26&0.95\\\
0.02&0.27&-0.46\\\ 1.0&-0.04&-0.04\end{array}\right)$ (42)

The initial conditions are sampled from a grid in the cube $[-1,1]^{3}$, and
the dynamics are run till a fixed-point is reached. The final state is
plotted, with a color indicating which subset of the 3 neurons are part of the
frozen population.

## References

  * Chaudhuri and Fiete (2016) R. Chaudhuri and I. Fiete, Nature neuroscience 19, 394 (2016).
  * Hopfield (1982) J. J. Hopfield, Proceedings of the national academy of sciences 79, 2554 (1982).
  * Seung (1996) H. S. Seung, Proceedings of the National Academy of Sciences 93, 13339 (1996).
  * Seung (1998) H. S. Seung, Neural Networks 11, 1253 (1998).
  * Chen and Bialek (2020) X. Chen and W. Bialek, arXiv preprint arXiv:2008.11674 (2020).
  * Bialek (2012) W. Bialek,  _Biophysics: searching for principles_ (Princeton University Press, 2012).
  * Krishnamurthy  _et al._ (2020) K. Krishnamurthy, T. Can, and D. J. Schwab, arXiv preprint arXiv:2007.14823 (2020).
  * Sompolinsky  _et al._ (1988) H. Sompolinsky, A. Crisanti, and H.-J. Sommers, Physical review letters 61, 259 (1988).
  * Markram  _et al._ (1997) H. Markram, J. Lübke, M. Frotscher, A. Roth, and B. Sakmann, The Journal of physiology 500, 409 (1997).
  * Wang  _et al._ (2006) Y. Wang, H. Markram, P. H. Goodman, T. K. Berger, J. Ma, and P. S. Goldman-Rakic, Nature neuroscience 9, 534 (2006).
  * Sommers  _et al._ (1988) H. J. Sommers, A. Crisanti, H. Sompolinsky, and Y. Stein, Physical review letters 60, 1895 (1988).
  * Note (1) As an aside, the non-zero bulk of the Jacobian spectrum strongly resembles the spectrum of $J^{h}$ from the elliptic ensemble, this is because the relevant block of the Jacobian has the form $\tilde{J}P$ where $P$ is a positive diagonal matrix and $\tilde{J}$ is from the elliptic ensemble.
  * Ben-Yishai  _et al._ (1995) R. Ben-Yishai, R. L. Bar-Or, and H. Sompolinsky, Proceedings of the National Academy of Sciences 92, 3844 (1995).
  * Burak and Fiete (2009) Y. Burak and I. R. Fiete, PLoS computational biology 5, e1000291 (2009).
  * Turner-Evans  _et al._ (2020) D. B. Turner-Evans, K. T. Jensen, S. Ali, T. Paterson, A. Sheridan, R. P. Ray, T. Wolff, J. S. Lauritzen, G. M. Rubin, D. D. Bock, _et al._ , Neuron 108, 145 (2020).
  * Kim  _et al._ (2017) S. S. Kim, H. Rouault, S. Druckmann, and V. Jayaraman, Science 356, 849 (2017).
  * Note (2) This formula shows that the metric can change signature when the stability condition is violated. However, such a transition is not meaningful for a Riemannian metric, and likely indicates the collapse of the memory manifold.
  * Gold and Shadlen (2007) J. I. Gold and M. N. Shadlen, Annu. Rev. Neurosci. 30, 535 (2007).
  * Brunton  _et al._ (2013) B. W. Brunton, M. M. Botvinick, and C. D. Brody, Science 340, 95 (2013).
  * Tolman (1948) E. C. Tolman, Psychological review 55, 189 (1948).
  * Nieh  _et al._ (2021) E. H. Nieh, M. Schottdorf, N. W. Freeman, R. J. Low, S. Lewallen, S. A. Koay, L. Pinto, J. L. Gauthier, C. D. Brody, and D. W. Tank, Nature , 1 (2021).
  * Note (3) The positive bias in this case is a consequence of initial conditions. The persistence of a finite fraction of the initial bias in the mean of $h$ is an indication of the emerging slow manifold.
  * Can  _et al._ (2020) T. Can, K. Krishnamurthy, and D. J. Schwab, arXiv preprint arXiv:2002.00025 (2020).