Abstract
Neural population geometry shapes downstream computation. Recent empirical findings in neurobiology suggest that a hyperbolic structure underlies population activity in the hippocampus. Here we provide a theoretical framework for this phenomenon. First, we propose a plausible construction of hippocampal tuning curves that statistically induces hyperbolic geometry. Next, we establish a connection between neural decoding and associative memory by demonstrating that the Modern Hopfield Network update rule computes the minimum mean-squared-error (MMSE) estimator. Finally, we introduce a novel associative memory model defined in hyperbolic space that yields significantly larger capacity than leading models. Our results suggest that animals encode spatial information as a latent hyperbolic cognitive map, improving both memory capacity and decoding accuracy.
1. Introduction
A central goal in understanding the brain is to see how neural activity patterns relate to animal behavior (Kriegeskorte & Wei, 2021). In recent years, advances in large-scale neural recordings have shifted the focus from individual neurons to the collective representations formed by large neural populations. Consequently, there is growing interest in characterizing the neural population geometry induced by these activities (De Kamps et al., 2019; Kriegeskorte & Wei, 2021). This geometric perspective may reveal how animals store and process information (Gallego et al., 2017; Kriegeskorte & Diedrichsen, 2019; Chung & Abbott, 2021; Mathis et al., 2024).
Similarly, in machine learning (ML), by understanding the latent representation of artificial neural networks (ANNs), we gain insight into how these models learn and store information (Bengio et al., 2013). Recent studies demonstrate how one can borrow insights from population geometry in neural systems to improve ML models (Chung & Abbott, 2021; Chou et al., 2025). A growing number of recent studies suggest that hyperbolic geometry emerges in a range of biological systems (Zhang et al., 2022; Zhou et al., 2018; Lee et al., 2024; Ghaninia et al., 2022). However, these studies remain largely empirical. There has yet to be a theoretical framework that: (i) explains how hyperbolic geometry is induced by neural populations, (ii) characterizes its impact on downstream decoding, and (iii) provides design principles for machine learning models.
For (i), we develop a plausible population coding model of the hippocampus that induces hyperbolic geometry. Specifically, we show that when the widths of Gaussian place fields follow an exponential distribution, the induced semi-metric space is tree-like and statistically hyperbolic in Gromov’s sense (Gromov, 1987). Interestingly, this exponential distribution of place field widths matches the experimental observations in Zhang et al. (2023); Rich et al. (2014).
For (ii), we establish a formal link between neural decoding and associative memory. We show that the recall dynamics of modern Hopfield networks (MHNs) approximate the optimal Minimum Mean Square Error (MMSE) estimator. Building on this insight, together with the hyperbolic geometry induced by the neural encoder, we propose a new associative memory model that operates directly in hyperbolic space. Theoretically, we show that this model achieves substantial capacity improvements over previous models (Ramsauer et al., 2020; Krotov & Hopfield, 2021).
Regarding (iii), we demonstrate the utility of this framework for both pattern completion and general machine learning tasks. We show that our hyperbolic associative memory model outperforms existing memory models with superior accuracy on pattern completion. Inspired by the connection between MHNs (Ramsauer et al., 2020) and the attention mechanism (Vaswani et al., 2017), we introduce a hyperbolic memory module that integrates seamlessly into ML architectures. Our simulations demonstrate that this model provides substantial performance gains in ML tasks. Notably, these improvements are most pronounced when the hidden dimensionality is constrained, suggesting that hyperbolic geometry offers a more efficient representation space for information storage in low dimensions.
Organization.
The remainder of this paper is organized as follows. Section 2 introduces the encoding model and derives the Bayes-optimal decoder, which motivates our later connection between neural decoding and associative memory. Section 3 collects the geometric tools we need. The heart of the paper is Section 4, where we show that exponentially-distributed place-field widths induce a statistically hyperbolic semi-metric (Theorem 4.2). Then we build a hyperbolic associative memory model with double-exponential capacity (Theorem 4.8). Section 5 validates these theoretical results through simulations on pattern completion and downstream ML tasks. Section 6 summarizes our findings and implications for computational neuroscience and machine learning. Our limitations can be found in Section A. The overall logic is visualized in Figure 1. The table of notations is in Table 2.
Figure 1.
(a) Illustration of the stimulus space and place cell firing patterns. (b) Illustration of how neurons encode stimulus through tuning curves and output . (c) Our constructed tuning curve model that induces hyperbolic geometry. (d) Illustration of how the MMSE estimator (decoder) is realized by the memory retrieval dynamics in latent hyperbolic space.
2. Neural Computing
This section introduces a neural encoding model based on tuning curves and Poisson spiking, and derives the corresponding Bayes-optimal decoder. We model spatial coding in the hippocampus and denote the space of possible locations by . A single location is denoted by . Neural population activity is represented by a vector . The index refers to neurons. We use to index latent states or discretized stimulus locations.
2.1. Tuning Curve
Neural population codes are commonly modeled using tuning curves (Dayan & Abbott, 2005). Tuning curves are functions describing the firing rate for each neuron when given a stimulus . Each neuron responds preferentially to a subset of the stimulus space. Let denote the physical location of the animal. We model the firing rate of a neuron in the hippocampus by a tuning curve
| (2.1) |
where denotes the location of the -th place field of neuron is its width, and is its scale. Neural spiking is modeled as a Poisson process. Given a time window of duration , the spike count for neuron is modeled as:
| (2.2) |
The population response is denoted by .
We will henceforth assume that and , in which case Equation (2.1) corresponds to the case of uniform spatial tiling through single place fields, as is typical when animals explore a simple environment (Fenton et al., 2008). Future work is needed to explore the multi-field case typical of large environments (Rich et al., 2014). Statistically, one can consider this model as an encoder (generative model) that encodes the input stimulus into a high-dimensional noisy vector , or into without noise. In the next subsection, we review standard statistical approaches to decoding under the Poisson tuning-curve model above, including MLE, MAP, and Bayes-optimal estimators such as the MMSE rule. We then relate these estimators to the update rule of modern Hopfield networks.
2.2. From Bayes-Optimal Decoding to Recall
We first explain the standard decoding method for neural tuning curves. Next, we establish an equivalence between the recall dynamics of associative memory models and decoding. Specifically, the intractability of Bayes-optimal decoding naturally motivates a tractable approximation in the form of memory recall. This connection allows us to interpret memory retrieval as a decoding process.
Statistical Decoders.
From a statistical point of view, neurons encode the stimulus into a noisy high-dimensional code . Decoding can be formulated as inferring a latent stimulus from neuronal population activity under a prescribed loss function. In computational neuroscience (Dayan & Abbott, 2005; Pillow et al., 2005), this process is typically formulated as maximum likelihood estimation (MLE) or maximum a posteriori (MAP) estimation,
| (2.3) |
| (2.4) |
Another common choice is to minimize the expected squared loss, . Under this loss, the Bayes-optimal estimator is given by the posterior mean (Hastie, 2009),
| (2.5) |
commonly referred to as the Minimum Mean Squared Error (MMSE) estimator.
Although and are not equal in general, the Bernstein‒von Mises theorem (Ghosh & Ramamoorthi, 2003) shows that, as the population size becomes large, the MAP estimate concentrates around the MLE, which is asymptotically normally distributed. Consequently, under regularity conditions, the posterior mean converges to . This asymptotic behavior motivates us to link the update rule in an associative memory model to the posterior mean.
To compute , we discretize the stimulus space into grid points and assume a uniform prior, i.e., . Assuming conditional independence of spike counts across neurons given , the posterior takes the form
where are log-likelihood scores for each stimulus. The Bayes-optimal decoder (fully derived in Section E.9.2) is therefore
| (2.6) |
Modern Hopfield Networks.
Modern Hopfield networks (Ramsauer et al., 2020; Krotov & Hopfield, 2021) (MHNs) are associative memory models defined over continuous state spaces. Let be an embedding map. We define the network state as and stored memory patterns . Given a state , the MHN update is
| (MHN) |
where . The shared form of (2.6) and (MHN) implies that MHN is a probabilistic inference machine. As this relation plays a central role in our paper, we formalize it in Section 4.
Remark 2.1.
Here we introduce a novel notation . It denotes the non-linear map connecting the tuning curve encoder to MHN, which takes as input. This decoupling avoids imposing a strict biological constraint between encoder and decoder, while ensuring compatibility with the Boltzmann form assumed in Proposition 2.2. This mapping is not seen in the typical MHN literature, where existing works do not consider the case where inputs are generated by some encoder (tuning curves).
One can now see that (MHN) and (2.6) are structurally similar. To understand the condition of having MHN to compute the Bayes-optimal estimator, we present the following proposition.
Proposition 2.2.
If the posterior takes the Boltzmann form
| (2.7) |
then the MHN update computes the Bayes-optimal estimator of the following problem
| (2.8) |
The proof is in Section E.1. Proposition 2.2 establishes a connection between Bayes-optimal decoding and MHN dynamics. Specifically, it demonstrates that under the assumption in (2.7) and the MMSE loss, a single MHN update effectively computes the posterior mean estimator. Proposition 2.2 has a second consequence: associative memory can be viewed as an MMSE estimator whose loss respects the underlying geometry of . This view allows us to derive, in Section 4, a non-Euclidean associative memory model.
3. Preliminary on Hyperbolic Geometry
Theorem 4.2 and Theorem 4.8, our main geometric results, require three notions from hyperbolic geometry: -hyperbolic metric spaces, the hyperboloid model, and the Fréchet mean. Readers familiar with these can skim to Section 4; we collect them here for self-containedness. For a deeper treatment we refer readers to Jost (2005); Bridson & Haefliger (2013).
-hyperbolic Metric Space.
The following notion measures the extent to which a given metric space resembles a hyperbolic space in terms of thin triangles. See visualization in the appendix Figure 3.
Definition 3.1 (-thin triangles (Gromov, 1987)).
Let be a geodesic metric space.1 A geodesic triangle is a triangle with sides
where is the geodesic between and . We say is -thin if
and cyclic permutations.
Definition 3.2 (-hyperbolic (Gromov, 1987)).
A geodesic metric space () is -hyperbolic if every geodesic triangle in is -thin. Equivalently for all ,
| (3.1) |
which is called the 4-point condition.
In general, low means the geodesic metric space is more tree-like, as tree triangles (Chiswell, 2001) are 0-hyperbolic. For a geodesic metric space to behave like a negatively curved space in Gromov's sense (Gromov, 1987), it requires to be uniform, meaning every geodesic triangle is -thin for the same , independent of the size of the triangle. Note that any geodesic metric space with finite domain is -hyperbolic for some constant . Thus, only an infinite domain metric space can fail to be -hyperbolic. An indicator that the geodesic metric space is tree-like is that remains as the diameter of the domain . Next, we introduce a relaxed condition to Definition 3.2.
Hyperboloid Model.
A -dimensional hyperboloid (Lorentz) model is a Riemannian manifold () equipped with the Riemannian metric tensor and defined by constant negative curvature , denoted as .2 We will drop the superscript indices on whenever is clear from the context or irrelevant.
Each point has the parameterized form , where and is equipped with the Lorentz (Minkowski) inner product. For points , their inner product is given by
with being the Lorentzian norm. Formally, is the set
The origin is the point .
We denote the distance of any two points as . Notably, in the hyperboloid model, hyperbolic distance can be expressed in terms of the Lorentz inner product as .
Tangent Space.
The tangent space at a point is the set of points orthogonal to , defined as
| (3.2) |
where the tangent space is isometric to the Euclidean space (Lee, 2018). If a manifold is smooth, it admits a tangent space at every point. For any and , the exponential map , and the inverse exponential map are given by
For a smooth manifold and a point , the tangent space is the vector space that represents the first-order approximation of at , which then describes the neighborhood of to first order. consists of all possible velocities of smooth curves through . To relate this linear structure back to the manifold, the exponential map sends each tangent vector v to the endpoint of the geodesic starting at with initial velocity , evaluated at unit time. This map allows operations defined linearly on to be transported to itself.
Fréchet mean.
Next, we define the Fréchet mean, which computes the geometric mean under general metrics.
Definition 3.3 (Fréchet mean).
Given a set of points on a Riemannian manifold (). The Fréchet mean of them, denoted as , is defined as the solution and optimal values of the following optimization problem (Bačák, 2014)
Furthermore, given a set of weights , the weighted Fréchet mean over is the solution to the following optimization problem
4. Hyperbolic Neural Population Geometry
In this section, we introduce a plausible tuning curve model that approximates hyperbolic geometry via neural population codes. Our setup is inspired by the representational similarity analysis (RSA) (Kriegeskorte et al., 2008). We look at the pair-wise distance of neural activity patterns between different stimuli, and then study the semi-metric space3 that underlies it. Next, we discuss the corresponding decoder in hyperbolic geometry and propose a plausible hyperbolic associative memory model with large capacity.
4.1. Geometry of Neural Population Activities
Recent findings in neurobiology (Zhang et al., 2023) show that in the CA1 region of the hippocampus, the place field sizes of the tuning curves are well approximated by an exponential distribution. Zhang et al. (2023) discover that this distribution is in turn well approximated by uniform sampling in a hyperbolic ball,
| (4.1) |
where equals the distance from the origin , and , with and as the curvature and dimensionality of the space.
Biologically, this corresponds to: (a) most hippocampal place cells have small, localized place fields; and (b) a smaller number of neurons have progressively larger fields. This implies that population activity is sparse and localized, as most neurons respond only in a small region around their preferred location. In our next analysis, we will show that not only is the representation sparse, but the induced stimulus distance is also tree-like.
Stimulus Distance in Population Codes.
Here we study the geometry induced by the exponential place-field size distribution under (2.1). Define the population response vector given stimulus (assume noiseless),
Let the stimulus space be , equipped with the Euclidean metric. Assuming a single place field with fixed amplitude, the Gaussian tuning curve of neuron is
where centers are distributed according to a Poisson point process with density (Rich et al., 2014), and is the mean of the exponentially distributed place field sizes. We measure distances between population responses . Assuming , we define a semi-metric between stimuli as
where is any increasing and continuous scalar function, and is an universal constant depending only on and the Lipschitz constant of . We define stimulus distances, , to be functions of firing-rate inner products to match the standard RSA assumption (Kriegeskorte et al., 2008). This makes our definition consistent with many other neuroscience studies. We mainly study the case where . This is for the simplicity of the proof; one can obtain a similar result using the Lipschitz constant of .
Because the widths are random variables, is a semi-metric rather than a metric. Concretely, for any three stimuli , there exist realizations of under which , violating the triangle inequality. In order to gain insight from the hyperbolic structure of the neural population code, we introduce a definition that allows us to study the hyperbolicity of .
Definition 4.1 (Statistically -hyperbolic).
Let be a space equipped with a distance function . We say is statistically -hyperbolic at confidence if there exists a constant such that
where are sampled independently and uniformly from , and denotes the empirical Gromov four-point excess in (3.1).
Unlike Definition 3.2, we relax the universal 4-point condition to a probabilistic one. Rather than requiring the 4-point condition to hold for every choice of the quadruples, we only require it to hold for a -fraction of quadruples drawn uniformly at random. This relaxation is motivated by the case where one needs to study neural population geometry under some observed overall statistics of the neurons.
For any quadruple () uniformly i.i.d. sampled from , let be the sorted values of the pair-sum set . For convenience, we'll write for the -th largest member of :
Following Definition 4.1, we define as the difference between the two largest sums of opposite distances . Recall that from Definition 4.1, a semi-metric space is said to be statistically -hyperbolic if under uniform sampling in with high probability. Now we are ready to present our result on the induced inter-stimulus geometry.
Theorem 4.2.
Let be any quadruple each independently sampled uniformly from . For any and , there exists a constant such that
Furthermore, is non-trivial since .
Proof Sketch.
We compute the 4-point excess in Definition 3.2 to show that is statistically hyperbolic. The proof is given in Section E.2, and the discussion is provided in Section E.2.1. Note that one can also obtain a similar bound by replacing ln in with any other increasing and continuous function that is Lipschitz. We choose the specific function ln for simplicity of the proof. □
Remark 4.3.
This theorem implies with a sufficient number of neurons , the distance induced by neural population activity is tree-like. This structure arises from incorporating an exponential place-field size distribution into Gaussian tuning. This corresponds to the hippocampus encoding stimulus distances using a hyperbolic semi-metric. This is analogous to neurons representing spatial information as latent hyperbolic embedding. Not only is this result inspired by experimental findings, but it also provides a realizable construction of tree-like geometry induced by neural populations. Numerical simulations validating Theorem 4.2 can be found in Section G.2 and its Figure 5.
4.2. Hyperbolic Decoder
Theorem 4.2 establishes that population activity induces a hyperbolic semi-metric on the stimuli. To mirror the construction in Section 2.2, where we moved from the MMSE estimator to an associative memory model, we commit to a Riemannian manifold that is intrinsically -hyperbolic: the hyperboloid (Lorentz) model . This model has two properties we rely on. First, it is intrinsically -hyperbolic. Second, its Lorentz inner product encodes geodesic distance through a single linear operation, a property we exploit heavily in Section 4.3. Together, these properties let us define the memory model as the MMSE estimator under geodesic rather than Euclidean loss.
Given a set of preferred stimuli , assume there exists a function such that 4. Under this latent model, information about may be inferred by estimating its latent representation . The observed input query is generated from the firing-rate vector. Decoding is formulated as a squared-loss estimation problem in . The expected squared geodesic loss and the optimal estimator under it are defined as following (Pennec, 2006):
| (4.2) |
| (4.3) |
where (4.3) is considered as the posterior Fréchet mean.
Similar to Section 2.2, If we again discretize the domain into points , the optimal decoder under the same loss has the form:
| (4.4) |
where the posterior over memory indices, , is discussed and defined in hyperbolic space in Section 4.3.
From Fréchet mean to Karcher flow.
The above optimal estimator is generally not available in closed form. A common way to compute (4.4) is to apply the Karcher flow algorithm (Karcher, 1977). Given some iterate at iteration , it approximates (4.4) by iterating
| (4.5) |
Here the weights are the posterior, and the average is performed in the tangent space . Karcher flow not only makes the decoder tractable, but it also approximates via iterative updates and converges to the weighted frechet mean (Karcher, 1977). As we show in the next subsection, this corresponds to the recurrent update in associative memory.
4.3. Associative Memory in Hyperbolic Geometry
Inspired by the connection between MHN and neural tuning curves, we now define the following update rule for the hyperbolic memory model.
Definition 4.4 (Karcher-flow model).
Given memory patterns , and some input query . The Karcher-flow model update is defined by
| (KFM) |
where .
Definition 4.4 has two major distinctions from the MHN. First, (KFM) is defined in . Second, we use the Lorentz inner product instead of Euclidean inner product. This provides an advantage to KFM: the Lorentz inner product naturally encodes hyperbolic distance. In contrast, the Euclidean inner product in general does not represent Euclidean distance well. This allows our model to better distinguish patterns with similar angular directions but different norms with minimal cost, as has the same complexity as . Furthermore, the form of computationally has the same structure as the used in Theorem 4.2.
Next, we introduce a similar setup to that of Proposition 2.2. Let the latent index be distributed, , and denote the random query in hyperbolic space as . Now we are ready to present the hyperbolic correspondence to Proposition 2.2.
Proposition 4.5.
If we model the posterior over indices by the Boltzmann distribution
| (4.6) |
and
| (4.7) |
Then (KFM) approximates the following estimator via the Karcher flow
| (4.8) |
Remark 4.6.
One can consider the above proposition as the non-Euclidean version of Proposition 2.2. However, different from Proposition 2.2, our tractable update rule (KFM) is not the exact optimal estimator. Instead, to converge to the optimal Fréchet mean estimator, one should consider fixed weights throughout the iterative updates. Given some initial state , we set . This reduces the computational cost for . However, in our later analysis, both update rules have the same order of stable fixed points under pattern separation (Theorem 4.8). In the context of modern Hopfield networks, one can think of (4.8) as approximate minimization of the loss of the system, , via memory retrieval dynamics given by (KFM).
4.4. Pattern Completion
Here we study the problem of pattern completion under . Informally, we show that the Karcher-flow model has capacity that scales exponentially in , the dimensionality of the hyperbolic embedding, and doubly exponential in , the largest norm among the memory patterns. This capacity improves the capacity of the MHN by a rate of double exponential in . We identify the Euclidean space with the tangent space at the origin, .
Let be the stored patterns. We assume that the pattern embeddings satisfy , for . A query is generated by first sampling . Conditioned on , we sample the query via
Given a decoder and a target tolerance , we aim to control the recall success probability
where the probability is taken over and the query noise. Note that the above condition matches the calculations used to define the memory capacity in classic work (Hopfield, 1982; 1984).
Assumption 4.7 (Chernoff condition).
Fix distinct . Under the conditional law , define
Assume there exist constants , and such that for all :
(A1) .
(A2) Conditioned on is sub-Gaussian with proxy variance at most .
Note that both assumptions are naturally satisified when the memory patterns are uniformly distributed and noise is added as above.
Theorem 4.8.
Let and . Under Assumption 4.7, if both
and
hold. Then as ,
The proof can be found in Section E.3. Intuitively, this says that memory retrieval is successful with high probability within a nonzero radius basin of attraction as long as the memory patterns have sufficient separation in their amplitudes. The capacity for different regimes of is summarized in Table 3.
Remark 4.9.
A notable difference between our assumptions and prior work (Ramsauer et al., 2020; Santos et al., 2024) is that we do not require memory patterns to be normalized. This relaxation is possible because the Lorentz inner product encodes in , rather than angular similarity. This provides significant benefits for storing memories in hyperbolic space: the Lorentz inner product has the same computational complexity as Euclidean inner products, yet captures the nonlinear quantity . Furthermore, distinguishing patterns via the Lorentz inner product rather than the Euclidean inner product allows models to separate patterns with similar directions but different magnitudes.
5. Simulations
We conduct simulations on pattern completion, image classification, and multiple instance learning. We compare our model with Dense Associative Memory (DAM) (Krotov & Hopfield, 2021) and Modern Hopfield Networks (MHN) (Ramsauer et al., 2020), two well-studied memory models for the continuous domain. For ML tasks, we compare against the Hopfield-based layers proposed in (Ramsauer et al., 2020). Source code is available on GitHub.
5.1. Pattern Completion
The task involves recalling a memory pattern from a stored memory set. We aim to reconstruct memories based on a query that is a corrupted/noisy version of the target memory. We assume that all memory patterns lie in . We also conduct analysis where we fix , where the state pattern is represented by only 3 neurons. We observe how different values of affect memory capacity.
Setup and Evaluation Metrics.
For memory patterns, we utilize: (1) synthetic points uniformly sampled within a tangent ball, (2) MNIST (LeCun et al., 2002), and (3) CIFAR10 (Krizhevsky et al., 2009). For the Karcher-flow model, we follow the query generation process described in Section 4 to generate the corresponding queries in . For each trial, we sweep through different values of (the memory set size) and perform pattern completion, treating each pattern in the set as a target in turn. A successful recall means the retrieval error is less than a tolerance 0.01 under either hyperbolic or Euclidean metric. The recall success rate is then calculated for each value of .
Results.
The simulation results are presented in Figure 2. In Figure 2(a), we report results when keeping PCA dimensions with . We repeated the task across 10 different random seeds and report the mean and standard deviation. For Figure 2(b), we vary from 1 to 6. We observe that our Karcher-flow model demonstrates a high recall success rate, whereas the other two baselines fail to store even a small number of patterns in low-dimensional settings. As shown in the left panel of Figure 2(b), our model exhibits significant capacity improvement as increases. In contrast, the results in the right panel of Figure 2(b) show that MHN do not benefit much from this rescaling operation. Additional results are provided in Section G.1.
Figure 2.
(a) Left to right columns: pattern dimension . (a) Top to bottom rows: Recall success rate of three models on synthetic, MNIST, CIFAR10 datasets. We observe that the Karcher-flow model outperforms other models on the synthetic, MNIST, and CIFAR10 datasets with superior scaling. (b): Left to right: The recall rate of the Karcher-flow model and the MHN under different values of , when , respectively. The stored patterns are sampled from a ball of radius . MHN shows marginal improvement on recall rate while our model benefits from larger .
5.2. Classification
Inspired by Ramsauer et al. (2020), who parameterized MHNs and proposed various machine learning layers, we describe our proposed layers in Section F.3. Interestingly, we can construct these layers without any hyperbolic parameters. This allows our model to benefit from superior capacity scaling while still utilizing Euclidean optimizers. We also include two existing hyperbolic attention modules: (1) hyperbolic attention networks (Gulcehre et al., 2019), and (2) hyperbolic neural networks ++ (Shimizu et al., 2021). A major difference between (Shimizu et al., 2021) and other models is that it requires a Riemannian-based optimizer as the parameters are defined in the hyperbolic space.
Setup and Evaluation Metrics.
We evaluate the layers across both image classification and multiple instance learning (MIL) benchmarks. For image classification, we use MNIST (LeCun et al., 2002). For MIL we use the Elephant, Fox, and Tiger datasets. We construct our network with one embedding layer, followed by the layer of interest, and a readout layer. The pooling layers have a single learnable static query. We use the AdamW optimizer (Loshchilov & Hutter, 2019) for training, and hyperparameters are provided in Table 6. We report mean accuracy with standard deviation over 5 trials for classification, and mean ROC AUC across trials under 10-fold cross-validation for MIL.
Results.
On MNIST, Karcher flow–based models achieve performance comparable to Hopfield models under high hidden dimensions. However, Karcher flow models consistently yield higher accuracy in low-dimensional representation spaces, as shown in Table 1. Similar trends have been reported in other implementations of hyperbolic attention networks when compared against their Euclidean counterparts (Gulcehre et al., 2019; Zhang et al., 2022). On the Elephant, Fox, and Tiger MIL benchmarks, KFPooling or previous hyperbolic attention networks consistently outperformed Euclidean HopfieldPooling models in terms of ROC AUC, but other hyperbolic networks sometimes outperformed KFPooling. See MIL results in Table 1.
Table 1.
Performance comparison across MNIST and MIL benchmarks. MNIST results use KFAttention and Hopfield attention mechanisms evaluated across hidden dimensions , while MIL results use the corresponding pooling variants (KFPooling and HopfieldPooling) on three animal datasets. Values are reported as mean ± standard deviation.
| MNIST (% accuracy) | MIL (AUC) | |||||
|---|---|---|---|---|---|---|
|
|
|
|||||
| Model | Tiger | Fox | Elephant | |||
|
| ||||||
| KarcherFlow | 85.52 ± 2.50 | 92.42 ± 0.64 | 96.89 ± 0.13 | 87.34 ± 1.40 | 66.00 ± 2.32 | 91.20 ± 0.82 |
| Hopfield | 83.70 ± 2.12 | 92.29 ± 0.63 | 96.71 ± 0.21 | 83.52 ± 1.50 | 60.54 ± 2.58 | 91.65 ± 0.42 |
| (Gulcehre et al., 2019) | 84.85 ± 1.85 | 91.71 ± 1.07 | 96.80 ± 0.18 | 89.20 ± 0.94 | 62.92 ± 2.41 | 93.04 ± 0.42 |
| (Shimizu et al., 2021) | 67.35 ± 5.76 | 84.17 ± 7.21 | 84.17 ± 6.12 | 80.32 ± 5.11 | 57.76 ± 4.84 | 85.32 ± 3.43 |
6. Discussion
Here we discuss three questions: (i) how hyperbolic geometry arises from neural population activity, (ii) what this geometry implies for downstream decoding, and (iii) how to transfer this insight to machine learning. Our theoretical results and the simulations of the previous sections answer these in turn, and we now discuss what each one says.
Hyperbolic Structure in Neural Population Codes.
First, our definition of follows the standard RSA convention in computational neuroscience (Kriegeskorte et al., 2008). We theoretically show that the semi-metric between stimuli is statistically hyperbolic. In other words, with the number of active neurons scales linearly with the size of the environment, the semi-metric is 0-hyperbolic, which corresponds to a tree metric. This result is informative for two reasons. (1) By Kriegeskorte & Wei (2021), tuning curves define the geometry, which informs how the downstream decoding process can exploit hierarchical relationships. (2) Furthermore, this result provides a theoretical foundation for the findings in (Zhang et al., 2022), suggesting that the cognitive map may have a tree-like organization.
A Hyperbolic Associative Memory Model.
In Proposition 2.2, we link memory recall and decoding by showing that the Modern Hopfield Network (MHN) computes the optimal Minimum Mean Square Error (MMSE) estimator for decoding. Combining this connection with Theorem 4.2 allows us to study the corresponding decoder, viewed as an associative memory model under hyperbolic geometry. Theoretically, Theorem 4.8 shows that our Karcher-flow model exhibits an extra double-exponential scaling term in (the maximum norm among memory patterns). This scaling behavior is not present in existing Euclidean-based models (Ramsauer et al., 2020; Krotov & Hopfield, 2021; Krotov, 2023). Specifically, the double-exponential term arises for two reasons: (1) hyperbolic geometry exhibits exponential volume growth with respect to its radius, and (2) the Lorentz inner product naturally encodes a term approximately proportional to . Interestingly, the Lorentz inner product is a linear operation and requires the same computational complexity as the Euclidean inner product.
Simulation Results.
We validate Theorem 4.8 via pattern completion in Figure 2. For our case study in Figure 2(b), rescaling the memory patterns corresponds to rescaling the synaptic connection strength between neurons. Figure 2(b) shows that both DAM and MHN, do not benefit much from this modification. The traditional approach in AM to increase model capacity is to increase network width or depth. Notably, our model offers an additional architectural perspective, obtaining performance gains without any modification to width or depth. Furthermore, our model offers an additional perspective on how systems with a small number of neurons can store many states.
Future Directions.
This work suggests several avenues for future research. In computational neuroscience, an interesting direction is to understand how synaptic plasticity rules in the hippocampus either promote or constrain the emergence of this geometry. Additionally, our theory could be generalized to the multi-field case to determine how complex tuning curves induce hyperbolic structure. From a machine learning perspective, our proof-of-concept simulations demonstrate that these bio-inspired layers outperform their Euclidean counterparts in classification and Multiple Instance Learning (MIL) tasks, particularly in low-dimensional regimes. A promising future direction involves scaling these hyperbolic architectures to larger scales, and discovering suitable application scenarios.
Supplementary Material
Impact Statement.
From the perspective of (Bender & Hanna, 2025), the reliance on massive computational resources concentrates power within a few large companies (e.g., Google). Our method introduces an additional dimension—hyperbolic geometry—while keeping the overall model size unchanged. Despite this added complexity, the required computational resources remain comparable, yet the model demonstrates superior memory capacity. This improvement in efficiency could lower the barrier to entry, enabling smaller companies and research labs to develop competitive models, thereby helping to reduce power concentration in AI research.
From the perspective of (Crawford & Calo, 2016), current LLMs largely depend on scaling laws to increase intelligence, which leads to significant carbon emissions. While our model does not fully resolve this issue, it provides a promising, under-explored approach for energy-efficient AI. As shown in Theorem 4.8, our model achieves double-exponential scaling in memory capacity, allowing efficient performance even in strictly low-dimensional settings. This offers a theoretical foundation for designing more energy-conscious architectures. However, we acknowledge potential negative consequences. Efficiency gains in memory and representation may enable deployment of ML models in resource-constrained devices, which could facilitate surveillance or autonomous weapons systems. Furthermore, consistent with Jevons Paradox, improvements in computational efficiency may paradoxically increase overall energy consumption by lowering the barrier to large-scale deployment.
Acknowledgements
Dennis Wu is supported by the Northwestern Cognitive Science Graduate Fellowships for Interdisciplinary Research Projects. Yi-Chun Hung is supported by the Taiwan-Northwestern Doctoral Scholarship. James Fitzgerald is supported by the National Institute for Theory and Mathematics in Biology through the National Science Foundation (grant number DMS-2235451) and the Simons Foundation (grant number MPTMPS-00005320). Han Liu is partially supported by NIH R01LM1372201, NSF AST-2421845, Simons Foundation MPS-AI-00010513, AbbVie, Dolby and Chan Zuckerberg Biohub Chicago Spoke Award. This research was supported in part through the computational resources and staff contributions provided for the Quest high performance computing facility at Northwestern University which is jointly supported by the Office of the Provost, the Office for Research, and Northwestern University Information Technology.
Footnotes
A metric space is geodesic if there exists a geodesic between any two points .
This work considers simply connected Hadamard manifolds.
The space is semi-metric because the triangle inequality is not satisfied.
Here, we again assume the existence of a mapping between the neural encoder and decoder, as in Section 2.
Proceedings of the 43rd International Conference on Machine Learning, Seoul, South Korea. PMLR 306, 2026.
References
- Allard A. and Serrano M. ÁA. Navigable maps of structural brain networks across species. PLoS computational biology, 16(2):e1007584, 2020. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Amari S.-I. Learning patterns and pattern sequences by self-organizing nets of threshold elements. IEEE Transactions on computers, 100(11):1197–1206, 1972. [Google Scholar]
- Amari S.-I. and Maginu K. Statistical neurodynamics of associative memory. Neural Networks, 1(1):63–73, 1988. [Google Scholar]
- Baddeley A., Bárány I., and Schneider R. Spatial point processes and their applications. LECTURE NOTES IN MATHEMATICS-SPRINGER-VERLAG-, 1892:1, 2007. [Google Scholar]
- Bačák M. Computing medians and means in hadamard spaces. SIAM Journal on Optimization, 24(3):1542–1566, 2014. [Google Scholar]
- Bender E. M. and Hanna A. The AI con: How to fight big tech’s hype and create the future we want. Random House, 2025. [Google Scholar]
- Bengio Y., Courville A., and Vincent P. Representation learning: A review and new perspectives. IEEE transactions on pattern analysis and machine intelligence, 35(8):1798–1828, 2013. [DOI] [PubMed] [Google Scholar]
- Bridson M. R. and Haefliger A. Metric spaces of non-positive curvature, volume 319. Springer Science & Business Media, 2013. [Google Scholar]
- Burns T. F. and Fukai T. Simplicial hopfield networks. In International Conference on Learning Representations, 2023. [Google Scholar]
- Chapman A. F. and Störmer V. S. Representational structures as a unifying framework for attention. Trends in cognitive sciences, 28(5):416–427, 2024. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Chiswell I. Introduction to [lambda]-trees. World Scientific, 2001. [Google Scholar]
- Chou C.-N., Le H., Wang Y., and Chung S. Feature learning beyond the lazy-rich dichotomy: Insights from representational geometry. In Forty-second International Conference on Machine Learning, 2025. [Google Scholar]
- Chung S. and Abbott L. F. Neural population geometry: An approach for understanding biological and artificial neural networks. Current opinion in neurobiology, 70:137–144, 2021. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Crawford K. and Calo R. There is a blind spot in ai research. Nature, 538(7625):311–313, 2016. [DOI] [PubMed] [Google Scholar]
- Dayan P. and Abbott L. F. Theoretical neuroscience: computational and mathematical modeling of neural systems. MIT press, 2005. [Google Scholar]
- De Kamps M., Lepperød M., and Lai Y. M. Computational geometry for modeling neural populations: From visualization to simulation. PLoS computational biology, 15(3):e1006729, 2019. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Fenton A. A., Kao H.-Y., Neymotin S. A., Olypher A., Vayntrub Y., Lytton W. W., and Ludvig N. Unmasking the ca1 ensemble place code by exposures to small and large environments: more place cells and multiple, irregularly arranged, and expanded place fields in the larger space. Journal of Neuroscience, 28(44):11250–11262, 2008. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Gallego J. A., Perich M. G., Miller L. E., and Solla S. A. Neural manifolds for the control of movement. Neuron, 94(5):978–984, 2017. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Ghaninia M., Zhou Y., Knauer A. C., Schiestl F. P., Sharpee T. O., and Smith B. H. Hyperbolic odorant mixtures as a basis for more efficient signaling between flowering plants and bees. PloS one, 17(7):e0270358, 2022. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Ghosh J. K. and Ramamoorthi R. Bayesian nonparametrics. Springer, 2003. [Google Scholar]
- Gromov M. Hyperbolic groups. In Essays in group theory, pp. 75–263. Springer, 1987. [Google Scholar]
- Gulcehre C., Denil M., Malinowski M., Razavi A., Pascanu R., Hermann K. M., Battaglia P., Bapst V., Raposo D., Santoro A., and de Freitas N. Hyperbolic attention networks. In International Conference on Learning Representations, 2019. [Google Scholar]
- Harland B., Contreras M., Souder M., and Fellous J.-M. Dorsal ca1 hippocampal place cells form a multi-scale representation of megaspace. Current Biology, 31(10):2178–2190.e6, 2021. ISSN 0960–9822. [DOI] [PubMed] [Google Scholar]
- Hastie T. The elements of statistical learning: data mining, inference, and prediction, 2009. [Google Scholar]
- Hopfield J. J. Neural networks and physical systems with emergent collective computational abilities. Proceedings of the national academy of sciences, 79(8):2554–2558, 1982. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Hopfield J. J. Neurons with graded response have collective computational properties like those of two-state neurons. Proceedings of the national academy of sciences, 81(10):3088–3092, 1984. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Hu J. Y.-C., Yang D., Wu D., Xu C., Chen B.-Y., and Liu H. On sparse modern hopfield model. Advances in neural information processing systems, 36:27594–27608, 2023. [Google Scholar]
- Jost J. Riemannian geometry and geometric analysis. Springer, 2005. [Google Scholar]
- Kagel A. and Sharpee T. O. Revealing hierarchical structure in hippocampal spatial representation. In SMT 2025. APS, 2025. [Google Scholar]
- Karcher H. Riemannian center of mass and mollifier smoothing. Communications on pure and applied mathematics, 30(5):509–541, 1977. [Google Scholar]
- Kriegeskorte N. and Diedrichsen J. Peeling the onion of brain representations. Annual review of neuroscience, 42 (1):407–432, 2019. [DOI] [PubMed] [Google Scholar]
- Kriegeskorte N. and Wei X.-X. Neural tuning and representational geometry. Nature Reviews Neuroscience, 22 (11):703–718, 2021. [DOI] [PubMed] [Google Scholar]
- Kriegeskorte N., Mur M., and Bandettini P. A. Representational similarity analysis-connecting the branches of systems neuroscience. Frontiers in systems neuroscience, 2:249, 2008. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Krizhevsky A., Hinton G., et al. Learning multiple layers of features from tiny images. 2009. [Google Scholar]
- Krotov D. A new frontier for hopfield networks. Nature Reviews Physics, 5(7):366–367, 2023. [Google Scholar]
- Krotov D. and Hopfield J. J. Large associative memory problem in neurobiology and machine learning. In International Conference on Learning Representations, 2021. [Google Scholar]
- Lecca P., Re A., Lombardi G., Latorre R. V., and Sorio C. Graph embedding of chronic myeloid leukaemia k562 cells gene network reveals a hyperbolic latent geometry. In International Congress on Information and Communication Technology, pp. 979–991. Springer, 2023. [Google Scholar]
- LeCun Y., Bottou L., Bengio Y., and Haffner P. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 2002. [Google Scholar]
- Lee F. M., Berman M. G., Stier A. J., and Bainbridge W. A. Navigating memorability landscapes: Hyperbolic geometry reveals hierarchical structures in object concept memory. bioRxiv, pp. 2024–09, 2024. [Google Scholar]
- Lee J. M. Introduction to Riemannian manifolds, volume 2. Springer, 2018. [Google Scholar]
- Loshchilov I. and Hutter F. Decoupled weight decay regularization. In International Conference on Learning Representations, 2019. [Google Scholar]
- Mathis M. W., Rotondo A. P., Chang E. F., Tolias A. S., and Mathis A. Decoding the brain: From neural representations to mechanistic models. Cell, 187(21):5814–5832, 2024. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Nakano K. Associatron-a model of associative memory. IEEE Transactions on Systems, Man, and Cybernetics, (3):380–388, 2007. [Google Scholar]
- Panzeri S., Moroni M., Safaai H., and Harvey C. D. The structures and functions of correlations in neural population codes. Nature Reviews Neuroscience, 23(9):551–567, 2022. [DOI] [PubMed] [Google Scholar]
- Pennec X. Intrinsic statistics on riemannian manifolds: Basic tools for geometric measurements. Journal of Mathematical Imaging and Vision, 25(1):127–154, 2006. [Google Scholar]
- Pillow J. W., Paninski L., Uzzell V. J., Simoncelli E. P., and Chichilnisky E. Prediction and decoding of retinal ganglion cell responses with a probabilistic spiking model. Journal of Neuroscience, 25(47):11003–11013, 2005. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Ramsauer H., Schäfl B., Lehner J., Seidl P., Widrich M., Adler T., Gruber L., Holzleitner M., Pavlović M., Sandve G. K., et al. Hopfield networks is all you need. arXiv preprint arXiv:2008.02217, 2020. [Google Scholar]
- Rauch H. E. A contribution to differential geometry in the large. Annals of Mathematics, 54(1):38–55, 1951. [Google Scholar]
- Rich P. D., Liaw H.-P., and Lee A. K. Large environments reveal the statistical structure governing hippocampal representations. Science, 345(6198):814–817, 2014. [DOI] [PubMed] [Google Scholar]
- Santos S., Niculae V., McNamee D., and Martins A. F. Hopfield-fenchel-young networks: A unified framework for associative memory retrieval. Journal of Machine Learning Research, 26(265):1–51, 2025. [Google Scholar]
- Santos S. J. R. D., Niculae V., Mcnamee D. C., and Martins A. Sparse and structured hopfield networks. In Salakhutdinov R., Kolter Z., Heller K., Weller A., Oliver N., Scarlett J., and Berkenkamp F. (eds.), Proceedings of the 41st International Conference on Machine Learning, volume 235 of Proceedings of Machine Learning Research, pp. 43368–43388. PMLR, 21–27 Jul 2024. [Google Scholar]
- Sharpee T. O. An argument for hyperbolic geometry in neural circuits. Current opinion in neurobiology, 58:101–104, 2019. [DOI] [PubMed] [Google Scholar]
- Shimizu R., Mukuta Y., and Harada T. Hyperbolic neural networks++. In International Conference on Learning Representations, 2021. [Google Scholar]
- Vaswani A., Shazeer N., Parmar N., Uszkoreit J., Jones L., Gomez A. N., Kaiser Ł., and Polosukhin I. Attention is all you need. Advances in neural information processing systems, 30, 2017. [Google Scholar]
- Wainwright M. J. High-dimensional statistics: A non-asymptotic viewpoint, volume 48. Cambridge university press, 2019. [Google Scholar]
- Wu D., Hu J. Y.-C., Hsiao T.-Y., and Liu H. Uniform memory retrieval with larger capacity for modern hopfield models. In Forty-first International Conference on Machine Learning (ICML), 2024. [Google Scholar]
- Zhang H., Rich P. D., Lee A. K., and Sharpee T. O. Hippocampal spatial representations exhibit a hyperbolic geometry that expands with experience. Nature Neuroscience, 26(1):131–139, 2023. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Zhang Y., Wang X., Shi C., Jiang X., and Ye Y. Hyperbolic graph attention network. IEEE Transactions on Big Data, 8(6):1690–1701, 2022. [Google Scholar]
- Zhou Y., Smith B. H., and Sharpee T. O. Hyperbolic geometry of the olfactory space. Science advances, 4(8):eaaq1458, 2018. [DOI] [PMC free article] [PubMed] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.


