{'fraction_non_alphanumeric': 0.03793621013133208, 'fraction_numerical': 0.011069418386491557, 'mean_word_length': 4.439987752602572, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Hebbian learning of recurrent connections: a geometrical perspective

We show how a Hopfield network with modifiable recurrent connections undergoing slow Hebbian learning can extract the underlying geometry of an input space. First, we use a slow/fast analysis to derive an averaged system whose dynamics derives from an energy function and therefore always converges to equilibrium points. The equilibria reflect the correlation structure of the inputs, a global object extracted through local recurrent interactions only. Second, we use numerical methods to illustrate how learning extracts the hidden geometrical structure of the inputs. Indeed, multidimensional scaling methods make it possible to project the final connectivity matrix on to a distance matrix in a high-dimensional space, with the neurons labelled by spatial position within this space. The resulting network structure turns out to be roughly convolutional. The residual of the projection defines the non-convolutional part of the connectivity which is minimized in the process. Finally, we show how restricting the dimension of the space where the neurons live gives rise to patterns similar to cortical maps. We motivate this using an energy efficiency argument based on wire length minimization. Finally, we show how this approach leads to the emergence of ocular dominance or orientation columns in primary visual cortex. In addition, we establish that the non-convolutional (or long-range) connectivity is patchy, and is co-aligned in the case of orientation learning.


Introduction
Activity-dependent synaptic plasticity is generally thought to be the basic cellular substrate underlying learning and memory in the brain. Donald Hebb [Hebb, 1949] postulated that learning is based on the correlated activity of synaptically connected neurons: if both neurons A and B are active at the same time, then the synapses from A to B and B to A should be strengthened proportionally to the product of the activity of A and B. However, as it stands, Hebb's learning rule diverges. Therefore, various modification of Hebb's rule have been developed, which basically take one of three forms (see [Gerstner and Kistler, 2002] and [Dayan and Abbott, 2001]): first, a decay term can be added to the learning rule so that each synaptic weight is able to "forget" what it previously learned. Second, each synaptic modification can be normalized or projected on different subspaces. These constraint-based rules may be interpreted as implementing some form of competition for energy between dendrites and axons, see [Miller, 1996, Miller andMacKay, 1996] and [Ooyen, 2001] for details. Third, a sliding threshold mechanism can be added to Hebbian learning. For instance, a post-synaptic threshold rule consists in multiplying the presynaptic activity and the subtraction of the average postsynaptic activity from its current value, which is referred as covariance learning ( [Sejnowski and Tesauro, 1989]). Probably the best known of these rules is the BCM rule [Bienenstock et al., 1982]. It should be noted that history-based rules can also be defined without changing the qualitative dynamics of the system: instead of considering the instantaneous value of the neurons' activity, these rules consider its weighted mean over a time window (see [Földiák, 1991, Wallis andBaddeley, 1997]). Recent experimental evidence suggests that learning may also depend upon the precise timing of action potentials [Bi and Poo, 2001]. Contrary to most Hebbian rules that only detect correlations, these rules can also encode causal relationships in the patterns of neural activation. However, the mathematical treatment of these spike timing dependent rules is much more difficult than rate based ones.
Hebbian-like learning rules have often been studied within the framework of unsupervised feedfoward neural networks [Oja, 1982, Bienenstock et al., 1982, Miller and MacKay, 1996, Dayan and Abbott, 2001. They also form the basis of most weight-based models of cortical development, assuming fixed lateral connectivity (e.g. mexican hat) and modifiable vertical connections (see the review of [Swindale, 1996]) 1 . In these developmental models, the statistical structure of input correlations provides a mechanism for spontaneously breaking some underlying symmetry of the neuronal receptive fields leading to the emergence of feature selectivity. When such correlations are combined with fixed intracortical interactions, there is a simultaneous breaking of translation symmetry across cortex leading to the formation of a spatially periodic cortical feature map. A related mathematical formulation of cortical map formation has been developed in [Takeuchi andAmari, 1979, Bressloff, 2005] using the theory of self-organizing neural fields. Although very irregular, the two-dimensional cortical maps observed at a given stage of development, can be unfolded in higher dimensions to get smoother geometrical structures. Indeed, [Bressloff et al., 2001] suggested that the network of orientation pinwheels in V1 is a direct product between a circle for orientation preference and a plane for position, based on a modification of the icecube model of Hubel and Wiesel [Hubel and Wiesel, 1977]. From a more abstract geometrical perspective, Petitot [Petitot, 2003] has associated such a structure to a 1-jet space and used this to develop some applications to computer vision. More recently, [Bressloff and Cowan, 2003] and [Chossat and Faugeras, 2009] have considered more complex geometrical structures such as spheres and hyperbolic surfaces that incorporate additional stimulus features such as spatial frequency and textures, respectively.
In this paper, we show how geometrical structures related to the distribution of inputs can emerge through unsupervised Hebbian learning applied to recurrent connections in a rate-based Hopfield network. Throughout this paper, the inputs are presented as an external non-autonomous forcing to the system and not an initial condition as is often the case in Hopfield networks. It has previously been shown that, in the case of a single fixed input, there exists an energy function that describes the joint gradient dynamics of the activity and weight variables [Dong and Hopfield, 1992]. This implies that the system converges to an equilibrium during learning. We use averaging theory to generalize the above result to the case of multiple inputs, under the adiabatic assumption that Hebbian learning occurs on a much slower time scale than both the activity dynamics and the sampling of the input distribution. We then show that the equilibrium distribution of weights, when embedded into R k for sufficiently large integer k, encodes the geometrical structure of the inputs. Finally, we numerically show that the embedding of the weights in two dimensions (k = 2) gives rise to patterns that are qualitatively similar to experimentally observed cortical maps, with the emergence of features columns and patchy connectivity. Although the mathematical formalism we introduce here could be extended to most of the rate-based Hebbian rules in the literature, we present the theory for Hebbian learning with decay because of the simplicity of the resulting dynamics.
Note that the use of geometrical objects to describe the emergence of connectivity patterns has previously been put forward by Amari in a different context. Based on the theory of information geometry, Amari considers the geometry of the set of all the networks and defines learning as a trajectory on this manifold for perceptron networks in the framework of supervised learning [Amari, 1998] or for unsupervised Boltzmann Machines [Amari et al., 1992]. He uses differential and Riemannian geometry to describe an object which is at a larger scale than the cortical maps this paper is focusing on.
Moreover, Zucker and colleagues are currently developing a non-linear dimensionality reduction approach to caracterize the statistics of natural visual stimuli (see [Lawlor andZucker, 2010, Coifman et al., 2005]). Although they do not use learning neural networks and stay closer to the field of computer vision than this paper, it turns out their approach is similar to the geometrical embedding approach we are using.
The structure of the paper is as follows. In section 2, we formally introduce the model. We derive the averaged system in section 3, which then allows us to study the stability of the learning dynamics in the presence of multiple inputs by constructing an appropriate energy function. We adress stability in section 4. In section 5 we determine the geometrical structure of the equilibrium weight distribution and show how it reflects the structure of the inputs. We also relate this approach to the emergence of cortical maps. Finally, the results are discussed in section 6.

Neural network evolution
A neural mass corresponds to a mesoscopic coherent group of neurons. It is convenient to consider them as building blocks, first for computational simplicity, second for their direct relationship to macroscopic measurements of the brain (EEG, MEG and Optical imaging) which average over numerous neurons, and third because one can functionally define coherent groups of neurons within cortical columns. For each neural mass i ∈ {1..N}, define the mean membrane potential V i (t) at time t. The instantaneous population firing rate ν i (t) is linked to the membrane potential through the relation ν i (t) = s V i (t) , where s is a smooth sigmoid function. In the following, we choose where S m , S ′ m and φ are respectively the maximal firing rate, the maximal slope and the offset of the sigmoid.
Consider a Hopfield network of neural masses described by the equation The first term roughly corresponds to the intrinsic dynamics of the neural mass: it decays exponentially to zero at a rate α if it receives neither external inputs nor spikes from the other neural masses. We will fix the units of time by setting α = 1. The second term corresponds to the rest of the network sending information through spikes to the given neural mass i, with W ij (t) the effective synaptic weight from neural mass j. The synaptic weights are time-dependent because they evolve according to a continuous time Hebbian learning rule (see below). The third term I i (t) corresponds to an external input to neural mass i, e.g. information extracted by the retina or thalamo-cortical connections. We take the inputs to be piecewise constant in time, that is, at regular time intervals a new input is presented to the network. In this paper, we will assume that the inputs are chosen by peridodically cycling through a given set of M inputs. An alternative approach would be to randomly select each input from a given probability distribution [Geman, 1979]. It is convenient to introduce vector notation by representing the time-dependent membrane potentials by V ∈ C 1 (R + , R N ), the time-dependent external inputs by I ∈ C 0 (R + , R N ), and the time-dependent network weight matrix by W ∈ C 1 (R + , R N ×N ). We can then rewrite the above system of ordinary differential equations as a single vector-valued equation where S : R N → R N corrresponds to the term by term application of the sigmoid S, i.e. S(V ) i = s(V i ).

Correlation-based Hebbian learning
The synaptic weights are assumed to evolve according to a correlation-based Hebbian learning rule of the form where ǫ is the learning rate, and we have included a decay term in order to stop the weights from diverging. In order to rewrite the above equation in a more compact vector form, we introduce the tensor (or Kronecker) product S(V ) ⊗ S(V ) so that in component form where S is treated as a mapping from R N to R N . The tensor product implements Hebb's rule that synaptic modifications involve the product of postynaptic and presynaptic firing rates. We can then rewrite the combined voltage and weight dynamics as the following non-autonomous (due to time-dependent inputs) dynamical system: Let us make few remarks about the existence and uniqueness of solutions. First, boundedness of S implies boundedness of the system Σ. More precisely, if I is bounded, then the solutions are bounded. To prove this, note that the right hand side of the equation for W is the sum of a bounded term and a linear decay term in W . Therefore, W is bounded and hence the term W ·S(V ) is also bounded. The same reasoning applies to V . S being Lipschitz continuous implies that the right hand side of the system is Lipschitz. This is sufficient to prove existence and uniqueness of the solution by applying the Cauchy-Lipschitz theorem. In the following, we will derive an averaged autonomous dynamical system Σ ′ , which will be well-defined for the same reasons.

Averaging the system
We will show that system Σ can be approximated by an autonomous Cauchy problem which will be much more convenient to handle. This averaging method makes the most of multiple time-scales in the system. First, it is natural to consider that learning occurs on a much slower time-scale than the evolution of the membrane potentials (as determined by α), i.e. ǫ ≪ 1.
Second, an additional time-scale arises from the rate at which the inputs are sampled by the network. That is, the network cycles periodically through M fixed inputs, with the period of cycling given by T . It follows that I is T -periodic, piecewise constant. We assume that the sampling rate is also much slower than the evolution of the membrane potentials, Finally, we assume that the period T is small compared to the time-scale of the learning dynamics, We can now simplify the system Σ by applying Tikhonov's theorem for slow/fast systems, and then classical averaging methods for periodic systems.

Tikhonov's theorem
Tikhonov's theorem ( [Tikhonov, 1952] and [Verhulst, 2007] for a clear introduction) deals with slow/fast systems. It says the following: Theorem 3.1. Consider the initial value probleṁ Assume that: 1. A unique solution of the initial value problem exists and we suppose, this holds also for the reduced probleṁ with solutionsx(t),ȳ(t).

The equation
is a continuous function and an isolated root. Also suppose thatȳ(t) = φ(x, t) is an asymptotically stable solution of the equation dy dτ = g(x, y, τ ) that is uniform in the parameters x ∈ R n and t ∈ R + .

y(0) is contained in an interior subset of the domain of attraction ofȳ.
Then we have with d and L constants independent of ǫ.
In order to apply Tikhonov's theorem directly to the system Σ, we first need to rescale time according to t → ǫt. This gives Tikhonov's theorem then implies that solutions of Σ are close to solutions of the reduced system (in the unscaled time variable) provided that the dynamical systems Σ in equation (6), and equation (10) are well defined. It is easy to show that both systems are Lipschitz because of the properties of S. Following [Faugeras et al., 2008], we know that if then there exists an isolated rootV : R + → R N of the equation V = W · S(V ) + I andV is asymptotically stable. Equation (11) corresponds to the weakly connected case. Moreover, the initial condition belongs to the basin of attraction of this single fixed point. Note that we require M T ≪ 1 so that the membrane potentials have sufficient time to approach the equilibrium associated with a given input before the next input is presented to the network. In fact, this assumption make it reasonable to neglect the transient activity dynamics due to the switching between inputs.

Periodic averaging
The system given by equation (10) corresponds to a differential equation for W with T -periodic forcing due to the presence of V on the right-hand side. Since T ≪ ǫ −1 , we can use classical averaging methods to show that solutions of (10) are close to solutions of the following autonomous system on the time-interval [0, 1 ǫ ] (which we suppose large because ǫ << 1) It follows that solutions of Σ are also close to solutions of Σ 0 . Finding the explicit solution V (t) for each input I(t) is difficult and requires fixed points methods, e.g. a Picard algorithm. Therefore, we will consider yet another system Σ ′ whose solutions are also close to Σ 0 and hence Σ. In order to construct Σ ′ we need to introduce some additional notation. Let us label the M inputs by I (a) , a = 1, . . . , M and denote by V (a) the fixed point solution of the equation V (a) = W · S(V (a) ) + I (a) . Given the periodic sampling of the inputs, we can rewrite (12) as If we now introduce the N × M matrices V and I with components i , then we can eliminate the tensor product and simply write (13) in the matrix form where i ). A second application of Tikhonov's theorem (in the reverse direction) then establishes that solutions of the system Σ 0 (written in the matrix form (14)) are close to solutions of the matrix system In the remainder of the paper we will focus on the system Σ ′ whose solutions are close to those of the original system Σ provided condition (11) is satisfied, i.e. the network is weakly connected. Clearly, the fixed points (V * , W * ) of system Σ satisfy W * ≤ S 2 m µ . Therefore, equation (11) says that if S 2 m S ′ m µ < 1 then Tikhonov's theorem can be applied and systems Σ and Σ ′ can be reasonably considered as good approximations of each other. The advantage of the averaged system Σ ′ is that is given by autonomous ordinary differential equations. Moreover, since it is Lipschitz continuous, it leads to a well-posed Cauchy problem. Finally, note that it is straighforward to extend our approach to time-functional rules (e.g. sliding threshold or BCM rules as described in [Bienenstock et al., 1982]) which, in this new framework, would be approximated by simple ordinary differential equations (as opposed to time-functional differential equations) provided S is redefined appropriately.

Simulations
To illustrate the above approximation, we simulate a simple network with both exact, i.e. Σ, and averaged ,i.e. Σ ′ , evolution equations. For these simulations, the network consists of N = 10 fully-connected neurons and is presented with M = 10 different random inputs taken uniformly in the intervals [0, 1] N . For this simulation we use s(x) = 1 1+e −4(x−1) , and µ = 10. Figure 1. shows the percentage of error between final connectivities for different values of ǫ and T /M. Figure 2 shows the temporal evolution of the norm of the connectivity for both the exact and averaged system for T = 10 3 and ǫ = 10 −3 .

Liapunov function
In the case of a single fixed input (M = 1), the systems Σ and Σ ′ are equivalent and reduce to the neural network with adapting synapses previously analyzed by [Dong and Hopfield, 1992]. Under the additional constraint that the weights are symmetric (W ij = W ji ), these authors showed that the simultaneous evolution of the neuronal activity variables and the synaptic weights can be re-expressed as a gradient dynamical system that minimizes a Liapunov or energy function of state. We can generalize their analysis to the case of multiple inputs (M > 1) and nonsymmetric weights using the averaged system Σ ′ . That is, following along similar lines to [Dong and Hopfield, 1992], we introduce the energy function and In contrast to [Dong and Hopfield, 1992], we do not require a priori that the weight matrix is symmetric. However, it can be shown that the system always converges to a symmetric connectivity pattern. More precisely, is an attractor of the system Σ ′ . A proof can be found in appendix 8.1. It can then be shown that on A (symmetric weights), E is a Liapunov function of the dynamical system Σ ′ , that is, The boundedness of E and the Krasovskii-LaSalle invariance principle then implies that the system converges to an equilibrium [Khalil and Grizzle, 1996]. We thus have Theorem 4.1. The initial value problem for the system Σ ′ with Y(0) ∈ H, converges to an equilibrium state.
Proof. See appendix 8.2 It follows that neither oscillatory nor chaotic attractor dynamics can occur.

Linear stability
Although we have shown that there are stable fixed points, not all of the fixed points are stable. However, we can apply a linear stability analysis on the system Σ ′ to derive a simple sufficient condition for a fixed point to be stable. The method we use in the proof could be extended to more complex rules. The proof reveals the significant role played by the Kronecker product in Hebbian learning.
Theorem 4.2. The equilibria of system Σ ′ satisfy: and a sufficient condition for stability is provided 1 > ǫµ which is most probably the case since ǫ << 1.

Proof. See appendix 8.3
This condition is strikingly similar to that derived in [Faugeras et al., 2008]. In fact, condition (20) is stronger than the contracting condition (11). It says the network may converge to a weakly connected situation. It justifies the averaging method by saying that we remain in the domain of validity of the averaging method. It also says that the dynamics of V is likely (because the condition is only sufficient) to be contracting and therefore subject to no bifurcations: a fully recurrent learning neural network is likely to have a "simple" dynamics.

Learning the correlation matrix of the inputs
It follows from equation (19) that the equilibrium weight matrix W * is given by the correlation matrix of the firing rates. Moreover, in the case of sufficiently large inputs, the matrix of equilibrium membrane potentials satisfies V * ≈ I.
i | for all a = 1, . . . , M and i = 1, . . . , N, then we can generate an iterative solution for V * of the form On the other hand, if the inputs are comparable in size to the synaptic weights, then there is no explicit solution for V * . Roughly speaking, we observe that the connection term has the role of "smoothing" the solution. Therefore, if a Gaussian is presented to the network (as the only input), the membrane potential is likely to be another Gaussian with a larger variance. If no input is presented to the network (I = 0), then S(0) = 0 implies that the activity is non-zero, that is, there is spontaneous activity. Combining these observations, we see that the network roughly extracts and stores the correlation matrix of the strongest inputs within the weights of the network.

From a symmetric connectivity matrix to a convolutional network
So far neurons have been identified by a label i ∈ {1..N}; there is no notion of geometry or space in the preceding results. However, as we show below, the inputs may contain a spatial structure that can be encoded by the connectivity. In this section, we propose a mechanism to unveil the hidden geometrical structure within the connectivity. More specifically, we want to find an integer k ∈ N and N points in R k , denoted by x i , i ∈ {1, . . . , N}, so that the connectivity can roughly be written as . In other words, we interpret the final connectivity as a matrix describing the distance between the neurons living in a k-dimensional space. However, W * is not always a distance matrix, therefore, it is natural to project it on the set of distance matrices. Finding the best fit of W * to a distance matrix is usually called multidimensional scaling. This set of methods is reviewed in [Borg and Groenen, 2005].
Given that W is non-negative, we define the matrix D = K −1 ( W ) corresponding to the application of the inverse of K to each component of W . As said before, we want to find k ∈ N and In general, this is not possible.
However, we can compute the projection of the symmetric matrix W onto the set of distance matrices by applying multidimensional scaling methods as described in [Borg and Groenen, 2005]. We use the stress majorization or SMACOF algorithm for the stress1 cost function throughout the article. In other words, we can find the distance matrix D ⊥ such that D = D − D ⊥ is minimal. Therefore, Gaussian with a standard deviation equal to σ. In spatial coordinates Multidimensional scaling methods consist in minimizing the contribution of M in the preceding equation. Hence, we refer to M as the non-convolutional connectivity.
A position x i ∈ R k is associated to each neuron i ∈ {1, . . . , N} such that In particular, we can assume that k is large enough for D to be very small. Moreover, if the neurons are equally excited on average (i.e. the diagonal of W * is already equal to W * max I d ), then it is reasonable to consider that M(x i , x j ) = 1 leading to the following convolutional product Therefore, in the space defined by the x i ∈ R k the connectivity is close to being convolutional.

Unveiling the geometrical structure of the inputs
We hypothesize that the space defined by the x i reflects the underlying geometrical structure of the inputs. We have not found a way to prove this so we only provide numerical examples that illustrate this claim. In the following examples, we relate the geometry of the manifold suggested by the x i to the network inputs. Thus we feed the network with inputs having a defined geometrical structure and then show how this structure can be extracted from the connectivity by the method above. However, it is by extracting the structure from unknown inputs that these networks might reveal themselves useful. Therefore, the following is only a (numerical) proof of concept.
We assume the inputs to be uniformly distributed over a manifold Ω with fixed geometry. This strong assumption amounts to considering that the feedforward connectivity (which we do not consider here) has already properly filtered the information coming from the sensory organs. More precisely, define the set of inputs by the matrix I ∈ R N ×M such that I where the z a are uniformly distributed points over Ω, the y i are the positions on Ω that "label" the ith neuron, and f is a decreasing function on R + . The norm . Ω is the natural norm defined over the manifold Ω. For simplicity, assume f ( so that the inputs are localized bell-shaped bumps on the shape Ω. We consider a set of Gaussian inputs uniformly distributed over a two-dimensional plane, e.g. Ω = [0, 1] × [0, 1]. For simplicity, we take N = M = K 2 and set z a = y i for i = a, a ∈ {1, . . . , M}. (The numerical results show an identical structure for the final connectivity when the y j correspond to random points, but the analysis is harder). In the simpler case of one-dimensional Gaussians with N = M = K, the input matrix takes the form I = T fσ , where T f is a symmetric Toeplitz matrix: In the two-dimensional case, we set y = (u, v) ∈ Ω and introduce the labeling where ⊗ is the Kronecker product; the Kronecker product is responsible for the K ×K sub-structure we can observe in figure 3 with K = 10. Note that if we were interested in a n-dimensional retinotopy, then the input matrix could be written as a Kronecker product between n Toeplitz matrices. As previously mentioned, the final connectivity matrix roughly corresponds to the correlation matrix of the input matrix. It turns out that the correlation matrix of I is also a Kronecker product of two Toeplitz matrix generated by a single Gaussian (with a different standard deviation). Thus, the connectivity matrix has the same basic form as the input matrix when z a = y i for i = a. The inputs and stable equilibrium points of the simulated system are shown in figure 3. The positions x i of the neurons after multidimensional scaling are shown in figure 4.

Toroïdal retinotopy
We now assume that the inputs are uniformly distributed over a two-dimensional torus, i.e. Ω = T 2 . That is, the input labels z a are randomly distributed on the torus. The neuron labels y i are regularly and uniformly distributed on the torus. The inputs and final stable weight matrix of the simulated system are shown in figure 5. The positions x i of the neurons after multidimensional scaling for k = 3 are shown in figure 6, and appear to form a cloud of points distributed on a torus. In order to confirm this, we have used a numerical method from computational cohomology [Zomorodian and Carlsson, 2005] to construct the so-called persistent Figure 4: Positions x i of the neurons after having applied classical multidimensional scaling to the final connectivity matrix shown in figure 3 for k = 2 (left) and k = 3 (right). The regular spacing of the neurons for k = 2 shows that the planar structure of the inputs has been recovered, although the corner of the square appear less regular due to boundary effects. In the case k = 3, there is an embedding of the plane into three dimensions; the saddle-like shape accounts for the corner irregularity observed when k = 2.  (See section 8.4 for a short introduction to persistent cohomology). The triplet of betti numbers (1,2,1) appear stable confirming that the points lie on a 2 dimensional torus. cohomology barcodes of the neurons' positions. These determine certain topological invariants of the underlying space. (See section 8.4 for a short introduction to persistent cohomology and barcodes). The results are also shown in figure 6, and establish that the network has learnt the underlying toroidal geometry of the inputs.

Links with neuroanatomy
The brain is subject to energy constraints which are completely neglected in the above formulation. These constraints most likely have a significant impact on the positions of real neurons in the brain. Indeed, it seems reasonable to assume that the positions and connections of neurons reflect a trade-off between the energy costs of biological tissue and their need to process information effectively. For instance, it has been suggested that a principle of wire length minimization may occur in the brain [Swindale, 1996, Chklovskii et al., 2002. In our neural mass framework, one may consider that the stronger two neural masses are connected, the larger the number of real axons linking the neurons together. Therefore, minimizing axonal length can be read as: the stronger the connection the closer, which is consistent with the convolutional part of the weight matrix. However, the underlying geometry of natural inputs is likely to be very high-dimensional, whereas the brain lies in a three-dimensional world. In fact, the cortex is so flat that it is effectively two-dimensional. Hence, the positions of real neurons are different from the positions x i ∈ R k in a high dimensional vector space; since the cortex is roughly two-dimensional, the positions could only be realized physically if k = 2. Therefore, the three-dimensional toric geometry or any higher dimensional structure could not be perfectly implemented in the cortex without the help of nonconvolutional long-range connections. Indeed, we suggest that the cortical connectivity is made of two parts: i) a local convolutional connectivity corresponding to the convolutional term G σ in (21), which is consistent with the requirements of energy efficiency, and ii) a non-convolutional connectivity corresponding to the factor M in equation (21), which is required in order to represent various stimulus features. If the cortex were higher-dimensional (k ≫ 2) then M ≡ 1.
We illustrate the above claim by considering two examples based on the functional anatomy of the primary visual cortex: the emergence of ocular dominance columns and orientation columns, respectively. We proceed by returning to the case of planar retinotopy (section 5.3.1) but now with additional input structure. In the first case, the inputs are taken to be binocular and isotropic, whereas in the second case they are taken to be monocular and anisotropic. The details are presented below. Given a set of prescribed inputs, the network evolves according to equation (15) and the lateral connections converge to a stable equilibrium. The resulting weight matrix is then projected onto the set of distance matrices for k = 2 (as described in section 5.2) using the stress majorization or SMACOF algorithm for the stress1 cost function as described in [Borg and Groenen, 2005]. We thus assign a position x i ∈ R 2 to the ith neuron, i = 1, . . . , N. (Note that the position x i extracted from the weights using multidimensional scaling is distinct from the "physical" position y i of the neuron in the retinocortical plane; the latter determines the center of its receptive field). The convolutional connectivity (G σ in equation 21) is therefore completely defined: on the planar map of points x i , neurons are isotropically connected to their neighbors; the closer the neurons are the stronger is their convolutional connection. Moreover, since the stimulus feature preferences (orientation, ocular dominance) of each neuron i, i = 1, . . . , N, are prescribed, we can superimpose these feature preferences on to the planar map of points x i . In both examples, we find that neurons with the same ocular or orientation selectivity tend to cluster together (see figures 7 and 8): interpolating these clusters then generates corresponding feature columns. It is important to emphasize that the retinocortical positions y i do not have any columnar structure, that is, they do not form clusters with similar feature preferences. Thus, in contrast to standard developmental models of vertical connections, the columnar structure emerges from the recurrent weights following Hebbian learning and an application of multidimensional scaling. It follows that neurons coding for the same feature tend to be strongly connected; indeed, the multidimensional scaling algorithm has the property that it positions strongly connected neurons close together . Equation (21) also suggests that the connectivity has a non-convolutional part, M, which is a consequence of the low-dimensionality (k = 2). In order to illustrate the structure of the non-convolutional connectivity, we select a neuron i in the plane and draw a link from it at position x i to the neurons at position x j for which M(x i , x j ) is maximal. We find that M tends to be patchy, i.e. it connects neurons having the same feature preferences. In the case of orientation, M also tends to be co-aligned, i.e. connecting neurons with similar orientation preference along a vector in the plane of the same orientation.

Ocular dominance columns and patchy connectivity
In order to construct binocular inputs, we partition the N neurons into two sets i ∈ {1, . . . , N/2} and i ∈ {N/2 + 1, . . . , N} that code for the left and right eyes, respectively. The ith neuron is then given a retinocortical position y i ∈ [0, 1] × [0, 1], with the y i uniformly distributed across the plane. We do not assume a priori that there exist any ocular dominance columns, that is, neurons with similar retinocortical positions y i do not form clusters of cells coding for the same eye. We then take the ath input to the network to be of the form where s ∈ R 2 represents some form of binocular disparity, z a and γ(a) are randomly generated from [0, 1] 2 and [−1, 1], respectively, see [Bressloff, 2005]. Thus, if γ(a) > 0 (γ(a) < 0) then the corresponding input is predominantly from the left (right) eye. In our simulations we take σ = σ ′ = 0.1 and s = 0.005. The results of our simulations are shown in figure 7. In particular, we plot the points x i obtained by performing multidimensional scaling on the final connectivity matrix for k = 2, and superimposing upon this the ocular dominance map obtained by interpolating between clusters of neurons with the same eye preference. We also illustrate the non-convolutional connectivity by linking one selected neuron to the five neurons labeled j it is most strongly connected to (with M(x i , x j ) > 1), with i the label of the central neuron. This clearly shows that long-range connections tend to link cells with the same ocular dominance.

Orientation columns and colinear connectivity
In order to construct oriented inputs, we partition the N neurons into four groups Σ θ corresponding to different orientation preferences θ = {0, π 4 , π 2 , 3π 4 }. Thus, if neuron i ∈ Σ θ then its orientation preference is θ i = θ. For each group, the neurons are randomly assigned a retinocortical position y i ∈ [0, 1] × [0, 1]. Again, we do not assume a priori that there exist any orientation columns, that is, neurons with similar retinocortical positions y i do not form clusters of cells coding for the same orientation preference. Each cortical input I (a) i is generated by convolving a thalamic input consisting of an oriented Gaussian with a Gabor-like receptive field [Miikkulainen et al., 2005]. Let R θ denote a 2-dimensional rigid body rotation in the plane with θ ∈ [0, 2π). Then where Figure 7: Plot of the positions x i of neurons for k = 2 in red (right eye) and green (left eye). We have used an interpolation method to highlight the areas dominated by the right eye in black. These ocular dominance columns have fractal borders which are less regular than those observed in optical imaging experiments. The convolutional connectivity (G σ in equation (21)) is implicitly described by the position of the neurons: the closer the neurons, the stronger their connections. The strongest components of the non-convolutional connectivity (M in equation (21)) from a central red neuron are also shown by drawing links from this neuron to the target neurons. The color of the link refers to the color of the target neuron. Therefore, we see that it is mainly connected to neurons of its same ocular dominance resulting in a patchy distribution. The parameters used for this simulation are s(x) = and G 0 (ξ) is the Gabor-like function with e 0 = (0, 1) and The amplitudes A + , A − are chosen so that G 0 (ξ)dξ = 0. Similarly, the thalamic input I a (ξ) = I(R θ ′ a ξ) with I(ξ) the anisotropic Gaussian The input parameters θ ′ a and z a are randomly generated from [0, π) and [0, 1] 2 respectively. In our simulations we take σ large = 0.133..., σ ′ large = 0.266... and σ small = σ ′ small = 0.0333.... The results of our simulations are shown in figure 8. In particular, we plot the points x i obtained by performing multidimensional scaling on the final connectivity matrix for k = 2, and superimposing upon this the orientation preference map obtained by interpolating between clusters of neurons with the same orientation preference. To avoid border problems we have zoomed on the center on the map. We also illustrate the non-convolutional connectivity by linking one selected neuron to all other neurons for which M is maximal. The patchy, anisotropic nature of the long-range connections is clearly seen. The anisotropic nature of the connections is further quantified in the histogram of figure 9.

Discussion
In this paper, we have shown how a neural network can learn the underlying geometry of a set of inputs. We have considered a fully recurrent neural network whose dynamics is described by a simple non-linear rate equation, together with unsupervised Hebbian learning with decay that occurs on a much slower time scale. Although several inputs are periodically presented to the network, so that the resulting dynamical system is non-autonomous, we have shown that such a system has a fairly simple dynamics: the network connectivity matrix always converges to an equilibrium point. We have then demonstrated how this connectivity matrix can be expressed as a distance matrix in R k for sufficiently large k, which can be  (21)) from a particular neuron in a yellow area are illustrated by drawing black links from this neuron to the target neurons. Since the yellow color corresponds to an orientation of 3π 4 , the non-convolutional connectivity shows the existence of a co-linear connectivity as exposed in [Bosking et al., 1997]. The parameters used for this simulation are s(x) =  Figure 9: Histogram of the 5 largest components of the non-convolutional connectivity for 80 neurons randomly chosen among those shown in Fig. 8. The abcissa corresponds to the difference in radian between the direction preference of the neuron and the direction of the links between the neuron and the target neurons. This histogram is weighted by the strength of the non-convolutional connectivity. It shows a preference for co-aligned neurons but also a slight preference for perpendicularly-aligned neurons (e.g. neurons of the same orientation but parallel to each other). related to the underlying geometrical structure of the inputs. If the connectivity matrix is embedded in a lower two-dimensional space (k = 2), then the emerging patterns are similar to experimentally observed cortical feature maps. That is, neurons with the same feature preferences tend to cluster together forming cortical columns within the embedding space. Moreover, the recurrent weights decompose into a local isotropic convolutional part, which is consistent with the requirements of energy efficiency, and a longer-range non-convolutional part that is patchy. This suggest a new interpretation of the cortical maps: they correspond to two-dimensional embeddings of the underlying geometry of the inputs.
One of the limitations of applying simple Hebbian learning to recurrent cortical connections is that it only takes into account excitatory connections, whereas 20% of cortical neurons are inhibitory. Indeed, in most developmental models of feedforward connections, it is assumed that the local and convolutional connections in cortex have a Mexican hat shape with negative (inhibitory) lobes for neurons that are sufficiently far from each other. From a computational perspective, it is possible to obtain such a weight distribution by replacing Hebbian learning with some form of covariance learning ( [Sejnowski and Tesauro, 1989]). However, it is difficult to prove convergence to a fixed point in the case of the covariance learning rule, and multidimensional scaling method cannot be applied directly unless the Mexican hat function is truncated so that it is invertible. Another limitation of rate-based Hebbian learning is that it does not take into account causality, in contrast to more biologically detailed mechanisms such as spike timing dependent plasticity.
The approach taken here is very different from standard treatments of cortical development [Miller et al., 1989, Swindale, 1996, in which the recurrent connections are assumed to be fixed and of convolutional Mexican hat form whilst the feedforward vertical connections undergo some form of correlation-based Hebbian learning. In the latter case, cortical feature maps form in the physical space of retinocortoical coordinates y i , rather than in the more abstract planar space of points x i obtained by applying multidimensional scaling to recurrent weights undergoing Hebbian learning in the presence of fixed vertical connections. A particular feature of cortical maps formed by modifiable feedforward connections is that the mean size of a column is determined by a Turing-like pattern forming instability, and depends on the length scales of the Mexican hat weight function and the two-point input correlations [Miller et al., 1989, Swindale, 1996. No such Turing mechanism exists in our approach so that the resulting cortical maps tend to be more fractal-like (many length scales) compared to real cortical maps. Nevertheless, we have established that the geometrical structure of cortical feature maps can also be encoded by modifiable recurrent connections. This should have interesting consequences for models that consider the joint development of feedforward and recurrent cortical connections. One possibility is that the embedding space of points x i arising from multidimensional scaling of the weights becomes identified with the physical space of retinocortical positions y i . The emergence of local convolutional structures together with sparser long-range connections would then be consistent with energy efficiency constraints in physical space.
Our paper also draws a direct link between the recurrent connectivity of the network and the positions of neurons in some vector space such as R 2 . In other words, learning corresponds to moving neurons or nodes so that their final position will match the inputs' geometrical structure. Similarly, the Kohonen algorithm [Kohonen, 1990] describes a way to move nodes according to the inputs presented to the network. It also converges toward the underlying geometry of the set of inputs. Although not formally equivalent, it seems that both of these approaches have the same qualitative behaviour. However, our method is more general in the sense that no neighborhood structure is assumed a priori; such a structure emerges via the embedding into R k .
Finally, note that we have used a discrete formalism based on a finite number of neurons. However, the resulting convolutional structure obtained by expressing the weight matrix as a distance matrix in R k , equation (21), allows us to take an appropriate continuum limit. This then generates a continuous neural field model in the form of an integro-differential equation whose integral kernel is given by the underlying weight distribution. Neural fields have been used increasingly to study large-scale cortical dynamics (see [Coombes, 2005] for a review). Our geometrical learning theory provides a developmental mechanism for the formation of these neural fields. One of the useful features of neural fields from a mathematical perspective is that many of the methods of partial differential equations can be carried over. Indeed, for a general class of connectivity functions defined over continuous neural fields, a reaction-diffusion equation can be derived whose solution approximates the firing rate of the associated neural field [Degond and Mas-Gallic, 1989, Cottet, 1995, Edwards, 1996]. It appears that the necessary connectivity functions are precisely those that can be written in the form (21). This suggests that a network that has been trained on a set inputs with an appropriate geometrical structure behaves as a diffusion equation in a highdimensional space together with a reaction term corresponding to the inputs.

Acknowldegments
MNG and ODF were partially funded by the ERC advanced grant NerVi nb 227747. MG was partially funded by the région PACA, France. This publication was based on work supported in part by the National Science Foundation (DMS-0813677) and by Award No KUK-C1-013-4 made by King Abdullah University of Science and Technology (KAUST). PCB was also partially supported by the Royal Society Wolfson Foundation.

Proof of the convergence to the symmetric attractor A
We need to prove the 2 points: (i) A is an invariant set, and (ii) for all Y(0) ∈ R N ×M × R N ×N , Y(t) converges to A as t → +∞. Since R N ×N is the direct sum of the set of symmetric connectivities and the set of anti-symmetric connectivies, we write W (t) = W S (t) + W A (t), ∀t ∈ R + , where W S is symetric and W A is anti-symetric.
(i) In (15), the right hand side of the equation forẆ is symmetric. Therefore, if ∃t 1 ∈ R + such that W A (t 1 ) = 0, then W remains in A for t ≥ t 1 .
(ii) Projecting the expression forẆ in equation (15) on to the anti-symmetric component leads to whose solution is W A (t) = W A (0) exp(−ǫµt), ∀t ∈ R + . Therefore, lim t→+∞ W A (t) = 0. The system converges exponentially to A.

Proof of theorem 4.1
Consider the following Lyapunov function (see equation (16)) Therefore, writing the system Σ ′ , equation (15), as where γ(V, W ) T = (V, ǫW/M) T , σ(V, W ) = (S(V), W ) and Γ : R + → H such that Γ → t→+∞ 0 exponentially (because the system converges to A). It follows that the time derivative ofẼ = E • σ along trajectories is given by: Substituting equation (29) then yields We have used the chain-rule of differentiation, whereby and S ′ (V)∇ U E (without dots) denotes the Hadamard (term by term) product, that is, Note that |Γ| → t→+∞ 0 exponentially because ∇Ẽ is bounded, and S ′ (V) > 0 because the trajectories are bounded. Thus, there exists t 1 ∈ R + such that ∀t > t 1 , As in [Cohen and Grossberg, 1983] and [Dong and Hopfield, 1992], we apply the Krasovskii-LaSalle invariance principle [Khalil and Grizzle, 1996]. We check that: Observe that setting ǫ = 0 in the previous equation leads to an eigenvalue equation for the membrane potential only: Since W * = 1 µM S · S T , this equation implies that λ + 1 is an eigenvalue of the operator X → W * .(S ′ X). The magnitudes of the eigenvalues are always smaller than the norm of the operator. Therefore, we can say that if 1 > W * S ′ m then all the possible eigenvalues λ must have a negative real part. This sufficient condition for stability is the same as in [Faugeras et al., 2008]. It says that fixed points sufficiently close to the origin are always stable.
Let us now consider the case ǫ = 0. Recall that Z is a matrix. We now "flatten" Z by storing its rows in a vector called Z row . We use the following result in [Brewer, 1978]: the matrix notation of operator X → A·X ·B is A⊗B T , where ⊗ is the Kronecker product. In this formalism the previous equation becomes where we assume that the Kronecker product has the priority over the dot product. We focus on the linear operator O defined by the right hand side and bound its norm. Note that we use the following norm W ∞ = sup X W.X X which is equal to the largest magnitude of the eigenvalues of W .
Define, ν m to be the magnitude of the largest eigenvalue of W * = 1 µM (S · S T ). First, note that S · S T and S T · S have the same eigenvalues (µM)ν i but different eigenvectors denoted by u i for S · S T and v i for S T · S. In the basis set spanned by the u i ⊗ v j , we find that S · S T ⊗ I d and I d ⊗ S T · S are diagonal with (µM)ν i as eigenvalues. Therefore, S·S T ⊗I d ∞ = (µM)ν m and I d ⊗S T ·S ∞ = (µM)ν m . Moreover, observe that (S T ⊗S) T ·(S T ⊗S)·(u i ⊗v j ) = (S·S T ·u i )⊗(S T ·S·v j ) = (µM) 2 ν i ν j u i ⊗v j (36) Therefore, (S T ⊗ S) T · (S T ⊗ S) = (µM) 2 diag(ν i ν j ). In other words, S T ⊗ S is the composition of an orthogonal operator (i.e. an isometry) and a diagonal matrix. Immediately, it follows that S T ⊗ S ≤ (µM)ν m .
Define f ǫ : C → R such that f ǫ (λ) = |(λ + ǫµ)||(λ + 1)| − (|λ| + 3ǫµ)S ′ m ν m . We want to find a condition such that f ǫ (C + ) > 0, where C + is the right half complex plane. This condition on ǫ, µ, ν m , and S ′ m will be a sufficient condition for linear stability. Indeed, under this condition we can show that only eigenvalues with a negative real part can meet the necessary condition (37). Complex number of the right half plane cannot be eigenvalues and thus the system is stable. The case ǫ = 0 tells us that f 0 ( If 1 ≥ ǫµ, which is most probably true given that ǫ << 1, then |(λ+1)| |(λ+ǫµ)| ≥ 1. Assuming λ ∈ C + leads to: Therefore, the condition 3S ′ m ν m < 1, which implies S ′ m ν m < 1, and leads to f ǫ (C + ) > 0.

A very short introduction to computational cohomology
In algebraic topology, topological spaces (which are continuous objects) can be classified by roughly counting their number of holes. This coordinate-invariant description of a topological space is called its homology (or cohomology, the difference between them is beyond the scope of this paper). In fact the homology can be summarized by giving the betti numbers of the topological state. The sequence of betti number is made of positive integers. The first three betti numbers have the following definition: the first is the number of connected components, the second is the number of two-dimensional or "circular" holes and the third is the number of 3-dimensional holes or "voids". See [Hatcher, 2002] for a more rigorous approach. However, in the example of toroidal retinotopy (see section 5.3.2 and figure 6). we are dealing with a discrete cloud of points. Therefore, one needs to extend the definition of the betti numbers to discrete objects in order to find the underlying topology of the space within which the points are distributed. This is called computational or persistent cohomology. One reconstructs the topological space by considering balls of a given radius centered on each point in the cloud. For each radius (the abscissa of the right picture of figure 6), one can compute the betti numbers of the resulting topological space. A barcode graph, e.g. the right picture of figure 6, is constructed by drawing a horizontal bar for each connected component, 2-dimensional hole or 3-dimenional void etc. This is done for a range of radii. Finding the persistent cohomology of a cloud of points consists in observing the set of betti numbers that are stable through a significantly large range of radii. One then assumes that the points most likely lie on a topological space of a given homology if the corresponding betti numbers are stable enough. See [Zomorodian and Carlsson, 2005] for details.
In section 5.3.2, we used the Jplex software package of [Sexton and Vejdemo-Johansson, ] to compute the barcodes of the points corresponding to learning from inputs uniformly distributed over a 2-dimensional torus. We used 200 landmarks spread according to the maxminlandmark method to build simplices in Jplex, which returned the maximum radius (beyond which all the betti numbers except the first vanish) we used in the simulation. In figure 6, we see that for a wide range of radii the triplet (1, 2, 1) is stable. This corresponds to a 2 dimensional torus.