Precision-Aware Hopfield Retrieval: Unifying Population Codes and Memory Retrieval with Information Optimization

Yi-Chun Hung, Dennis Wu, Hong-Yu Chen, Han Liu, Emma AlexanderNeurIPS 2026

TL;DR

How we remember things depends heavily on how sharply our brains encoded them in the first place, yet classic memory models treat encoding and retrieval like strangers. By wiring an encoder's precision directly into a Hopfield memory network, the authors uncover a universal mathematical law linking memory storage to sensory resolution. Better yet, this unified model naturally explains quirky human memory glitches—like why our memories drift toward averages when we are mentally exhausted.

What Problem Does This Paper Address?

Both machine learning and neuroscience love the encoder-decoder paradigm. On the encoding side, efficient coding theory explains how populations of sensory neurons allocate their limited firing resources: they dedicate higher precision to stimuli that show up frequently in the world. On the decoding side, Hopfield networks are the gold standard for modeling discrete associative memory—how a noisy cue rolls down an energy landscape to snap onto a clean, stored memory pattern.

The catch? Historically, these two halves have been studied in isolation. Hopfield analyses usually ignore the encoder, assuming stored memories are uniformly distributed and perturbed by simple, uniform noise. Meanwhile, efficient coding models usually assume the decoder is doing continuous estimation rather than snapping to discrete memories. Nobody had cleanly bridged a realistic, resource-constrained neural encoder with a discrete associative memory decoder—leaving open the question of how sensory geometry shapes memory recall and its well-documented psychological biases.

Methods

The authors introduce precision-aware Hopfield retrieval, a two-stage mathematical framework that lets the decoder know how confident the encoder is.

Figure 1: Overview of the precision-aware Hopfield framework. A stimulus s is encoded with Fisher information FIenc(s) and decoded by a Hopfield network (HN). Our framework (bottom) replaces an inverse temperature β and {sµ} in traditional HNs (top) with stimulus-dependent (β(s), ρ(s)) in the dense memory regime (bottom). It produces an encoder-decoder precision γ(s). Jointly optimizing under Lp satisfies the general coupling: γ∗(s) ∝ρ∗(s)2 (Thm. 1).
  1. The Encoder: A scalar stimulus drives a noisy population of $N$ neurons. Its local encoding sharpness is captured by Fisher information ($\text{FI}_{\text{enc}}(s)$)—essentially a measure of how much information the neural firing carries about a specific stimulus $s$.
  2. The Precision-Aware Decoder: Instead of a standard continuous Hopfield network that uses a fixed "inverse temperature" $\beta$ (which controls how sharply the network snaps to a single memory—and is mathematically equivalent to the inverse scaling in Transformer softmax attention), the authors allow $\beta$ to adapt dynamically based on the neural response.
  3. Asymptotic Unification: Assuming a large neural population and a dense regime of $M$ stored memories (described by a continuous memory density $\rho(s)$), the authors derive a closed-form local Gaussian approximation for memory retrieval. They then jointly optimize both where memories are placed ($\rho(s)$) and the overall retrieval precision ($\gamma(s)$) under strict resource budgets across general $L^p$ error losses.

Datasets

Not discussed in the paper. Because this is a theoretical and normative modeling study, the authors validate their mathematical derivations using synthetic Monte Carlo simulations (e.g., Gaussian and Poisson neural populations) and compare their qualitative predictions against established empirical findings from cognitive psychology literature (covering spatial angle, time, and length recall).

Key Insights and Ideas

  • Neural Impedance Matching: Total retrieval noise decomposes cleanly into the sum of encoder noise and decoder noise. Because of this, standard "encoder-blind" Bayesian decoding (setting a constant $\beta = 1$) actually wastes half of the encoder's precision! Letting $\beta(s)$ adapt to the stimulus allows the system to prioritize high-probability stimuli and save coding resources.
  • The General Coupling Law: When you jointly optimize memory placement and retrieval precision under any $L^p$ loss, a universal rule emerges: optimal retrieval precision scales with the square of optimal memory density ($\gamma^*(s) \propto [\rho^*(s)]^2$). Regardless of how harshly you penalize big errors, the ratio of resolution to memory density remains spatially uniform.
  • A Mathematical Root for Human Memory Biases: The math yields a clean formula for recall bias: memories are pulled toward denser regions of memory space, divided by retrieval precision. This single equation reproduces two famous psychological phenomena: central tendency (recalled values drift toward familiar averages) and cognitive-load effects (when mental load drops your precision, that drift gets stronger without changing its spatial shape).
  • A Bridge to Diffusion Models: The authors point out that the memory bias divided by recall variance approximates the gradient of the log-memory density, $(\log \rho)'(s)$. This acts just like a score function in score-based diffusion models—hinting at a deep mathematical link between recalling old memories and generating new imaginations.

Key Results

  • Approximation Accuracy: In finite-size Monte Carlo simulations ($N = 50$ neurons, $M = 500$ stored patterns, 40,000 samples), the theoretical Gaussian formula matches exact numerical integration with a Wasserstein distance error below 1%, only degrading slightly where memory density jumps abruptly.
Figure 2: Monte Carlo per-pattern retrieval density (N = 50 neurons, M = 500 patterns, Gaussian likelihood) versus the local Gaussian approximation Eq. (3), under (a) step and (b) cardinal memory density ρ(s). Wasserstein distance W below 1%; the approximation degrades slightly where ρ varies rapidly (red in (a) and green in (b)). See Figs. 4 to 10 and Tabs. 3 and 4 for additional variations of this experiment.
  • Beating Constant-$\beta$ Baselines: Under a Gaussian prior and $L_2$ loss, the adaptive $\beta^*(s)$ decoder achieves lower global retrieval loss than the standard Bayesian baseline ($\beta = 1$), and requires strictly less coding resource $C$ than constant-$\beta$ models tuned to match its performance.
  • Cross-Modal Psychological Alignment: The closed-form bias equation recovers the famous Wei–Stocker perceptual law ($b^*(s) = -\frac{1}{2}\frac{d}{ds}D^2(s)$) in a discrete memory setting and qualitatively matches human behavioral data across location, time, and length estimation tasks.

Limitations and Future Work

  • Asymptotic Assumptions: The clean analytical formulas rely on assuming a large number of neurons ($N$) and densely packed memories ($M$). While simulations show the math holds up surprisingly well at $N=50$ and $M=500$, extreme finite-regime edge cases can deviate where memory density changes too fast.
  • 1D Stimuli: The current derivations only handle scalar (1D) stimuli like angle, length, or duration. Extending the math to high-dimensional spaces—like natural images—is an important next step.
  • Biological Plausibility of Learning: This is a normative framework—it tells us what an optimal system should look like, not the exact synaptic plasticity rules the brain uses to learn $\rho(s)$ and $\beta(s)$ on the fly. Discovering those biological learning mechanisms, and exploring connections to Transformer attention temperatures, is left for future work.

Summary updated

Abstract

Bayesian estimation has long been used to study both continuous estimation and discrete associative memory, but how encoding precision and memory retrieval should be jointly optimized remains unclear. We introduce \emph{precision-aware Hopfield retrieval}, a framework that uses the encoder's Fisher information to quantify encoding precision and incorporates it directly into the decoder of memory retrieval. Four results follow. First, optimal encoder-decoder information is shaped only by the prior, across $L^p$ loss functions. Second, the optimal information follows a general coupling law across $L^p$ loss functions. Third, optimal precision-aware Hopfield retrieval uses a stimulus-dependent inverse temperature. It outperforms the encoder-blind Bayesian decoder on both retrieval loss and required coding resource. Last, the framework yields a closed-form expression for memory recall bias. It reproduces central-tendency and cognitive-load effects observed in cognitive psychology. These effects emerge only when the encoder and decoder are modeled jointly.
BibTeX
@inproceedings{hung2026precision,
  author = {Yi-Chun Hung and Dennis Wu and Hong-Yu Chen and Han Liu and Emma Alexander},
  title = {{Precision-Aware Hopfield Retrieval: Unifying Population Codes and Memory Retrieval with Information Optimization}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=qYhHysIvHY},
}
Figure