Modern Methods in Associative Memory: Modern Methods in Associative Memory: AM and broader AI

Dmitry Krotov, Benjamin Hoover, Parikshit Ram

International Conference on Machine Learning 2025 · Tutorial

Overview

This talk, delivered by Parikshit Ram, delves into associative memory (AM) networks, reframing them not as abstract theoretical constructs from physics or neuroscience, but as tangible machine learning models applicable to a wide array of tasks. While the broader tutorial covered AM from various angles, Ram's specific focus is on interpreting AM within a standard machine learning framework, drawing parallels to familiar models like linear regression, support vector machines, and neural networks. This perspective allows for the exploration of how AM can be leveraged for conventional machine learning problems such as classification, regression, and clustering, as well as novel generative capabilities.

Watch on SlidesLive

Visual summary for Modern Methods in Associative Memory: Modern Methods in Associative Memory: AM and broader AI by Dmitry Krotov, Benjamin Hoover, Parikshit Ram
Visual summary for Modern Methods in Associative Memory: Modern Methods in Associative Memory: AM and broader AI by Dmitry Krotov, Benjamin Hoover, Parikshit Ram

Key moments

  1. 0:00 Associative Memory in a standard machine learning framework
  2. 1:25 Interpreting Associative Memory as a d-dimensional function
  3. 2:18 Energy function defines AM architecture and inference process
  4. 3:20 Inference as a T-layer recursive neural network
  5. 4:00 Stored patterns, local minima, and increasing model capacity
  6. 4:30 Capacity limits and model expressivity explained
  7. 5:45 Energy function interpreted as a kernel sum

Modern Methods in Associative Memory: AM and broader AI

Speakers: Dmitry Krotov, Benjamin Hoover, Parikshit Ram

Conference: ICML 2025

YouTube: https://slideslive.com/39043833

Overview

This talk, delivered by Parikshit Ram, delves into associative memory (AM) networks, reframing them not as abstract theoretical constructs from physics or neuroscience, but as tangible machine learning models applicable to a wide array of tasks. While the broader tutorial covered AM from various angles, Ram's specific focus is on interpreting AM within a standard machine learning framework, drawing parallels to familiar models like linear regression, support vector machines, and neural networks. This perspective allows for the exploration of how AM can be leveraged for conventional machine learning problems such as classification, regression, and clustering, as well as novel generative capabilities.

The core motivation behind this reinterpretation is to bridge the gap between the rich theoretical foundations of associative memory and their practical application in modern AI systems. Ram posits that by understanding AM through the lens of differentiable, iterative models, researchers and practitioners can unlock new avenues for model expressivity, capacity, and computational efficiency. The talk explores fundamental aspects of AM, including their energy landscapes, memory capacity, and inference mechanisms, ultimately introducing groundbreaking developments like the use of random features for scalable representations and a novel energy function that enables simultaneous memorization and generation of patterns. This work offers a compelling vision for integrating associative memory principles into the next generation of AI systems, particularly in areas like generative AI and neuromorphic computing.

Background

▶ Watch: Associative Memory in a standard machine learning framework (0:00)

Associative memory models have a long-standing history, primarily rooted in theoretical physics and neuroscience, where they are often used to model how neural systems store and retrieve patterns. Early models, like the Hopfield network, introduced the concept of an energy function whose local minima correspond to stored memories. The process of retrieving a memory involves an iterative descent through this energy landscape, starting from an initial input state. While powerful, these classical interpretations often presented challenges for direct integration into mainstream machine learning workflows, which typically rely on differentiable models and scalable architectures.

The problem, as framed by Ram, is to translate these foundational concepts into a language that resonates with machine learning practitioners. He reinterprets an associative memory network as a function that maps a D-dimensional input vector to another D-dimensional vector. The key insight is to view the inference process—the iterative update of a state by taking gradients of the energy function—as equivalent to a t-layer recursive neural network. Each step of energy descent is analogous to a layer in this recurrent architecture, where the model parameters are the "stored patterns" themselves. This re-framing immediately makes AM amenable to standard machine learning techniques, including backpropagation and end-to-end learning.

A significant challenge in traditional AM models is their memory capacity. For instance, if the separation function (a component of the energy function that dictates how distinct memories are) is quadratic, the capacity is typically $O(D)$, meaning the number of patterns that can be reliably stored is linear with the dimensionality of the input vectors. While polynomial or exponential separation functions can increase capacity (e.g., exponential function allows exponentially many patterns), this comes at a steep computational cost: storing exponentially many patterns as explicit model parameters becomes intractable. This limitation highlights the need for more efficient, distributed representations of memories, akin to how modern neural networks handle vast amounts of information without explicit per-pattern storage. Furthermore, Ram draws a connection between the AM energy function and kernel sums, noting that the energy can often be expressed as a sum of kernel similarities. This links AM to the rich field of kernel machines, though with a critical distinction: AM inference requires multiple iterative kernel sums, unlike the single kernel sum typically used in kernel methods.

Key Findings

▶ Watch: Energy function defines AM architecture and inference process (2:18)

The talk highlights several pivotal findings that advance the utility and applicability of associative memory in modern machine learning:

  1. Associative Memory as a Differentiable Network: By reinterpreting the iterative energy descent process as a t-layer recursive neural network, AM models become fully differentiable. This enables their integration into end-to-end learning pipelines, allowing the "stored patterns" (or model parameters) to be learned directly from data, rather than being manually specified. This breakthrough allows AM to be used for tasks like deep clustering and representation learning.
  1. Scalable Distributed Representations via Random Features: To overcome the capacity and computational limitations of explicitly storing numerous patterns, the research introduces the use of random features. This technique, inspired by Rahimi and Recht's work on kernel approximation, allows the disentanglement of the model's size from the number of stored patterns. By approximating the kernel sums with random features, the computational complexity is significantly reduced, making it feasible to handle a much larger effective memory capacity without the prohibitive cost of storing all patterns explicitly.
  1. Collective Contraction Property for Clustering: Associative memory networks exhibit a unique "collective contraction" property. Even when operating on individual data points independently, the iterative energy descent process causes these points to contract towards the modes (local minima) of the underlying data distribution. This property forms the basis for a novel, differentiable approach to clustering problems, such as K-means, by effectively moving data points towards their cluster centers in a learnable manner.
  1. Novel Energy Function with Epanechnikov Kernel for Simultaneous Memorization and Generation: Perhaps the most striking finding is the discovery of a new energy function, derived from the Epanechnikov kernel (a shifted ReLU separation function), that simultaneously enables both memorization (creating local minima around stored patterns) and generation (creating entirely new, plausible local minima that were not explicitly stored). This stands in stark contrast to traditional AM models, which typically cannot generate new patterns beyond interpolations of stored ones. This capability opens up exciting possibilities for generative AI, allowing models to both recall specific information and invent novel, coherent patterns from a limited set of examples. The Epanechnikov kernel is shown to yield superior capacity and generative power compared to standard Gaussian (log-sum-exp) kernels.

Technical Deep Dive

▶ Watch: Inference as a T-layer recursive neural network (3:20)

The technical foundation of Ram's work rests on a re-conceptualization of associative memory. An AM model is defined as a function $f$ that maps a D-dimensional input vector to another D-dimensional vector. The core components are:

  • Stored Patterns ($x_i$): These are K D-dimensional vectors that act as the model's parameters.
  • Energy Function ($E(x)$): This function defines the model's architecture and, crucially, how inference occurs. It typically involves a similarity function (e.g., dot product) and a separation function (e.g., quadratic, polynomial, or exponential), often combined with a monotonic function $q$ to manage scale without altering optimization.

Inference as Iterative Energy Descent:

The forward pass (inference) in this AM model is explicitly defined as an iterative process:

  1. Start with an initial state $x_0$ (the input).
  2. Iteratively update the state by taking the gradient of the energy function: $x_{t+1} = x_t - \eta \nabla E(x_t)$, where $\eta$ is a step size.
  3. Repeat this for $T$ steps. The final state $x_T$ is the model's output.

This process is explicitly framed as a t-layer recursive neural network, where each step is a layer. This interpretation is key because it makes the entire inference process differentiable, enabling end-to-end training. The energy minimization is also analogous to maximizing the likelihood of an input given the distribution defined by the stored patterns.

Memory Capacity and Expressivity:

The capacity of an AM model, i.e., the number of patterns it can reliably store, is heavily influenced by the choice of separation function.

  • Quadratic Separation Function: Leads to an $O(D)$ capacity (linear in dimensionality).
  • Polynomial or Exponential Separation Functions: Can drastically increase capacity, e.g., an exponential function can yield exponentially many stored patterns. While this increases model expressivity, it also leads to a proportional increase in the number of parameters and, consequently, computational complexity for naive storage.

Kernel Machine Connection:

The energy function can often be expressed as a kernel sum, particularly if the combination of the separation and similarity functions is treated as a kernel. For example, if the separation function is the negative logarithm of a Gaussian, the energy function becomes a log-likelihood of a Gaussian kernel density estimate. This provides a bridge to kernel methods. However, a crucial distinction is that AM inference involves multiple iterative kernel sums, not just a single one, making the computational demands higher than typical kernel machines.

Distributed Representations with Random Features:

To address the scalability issue of storing many $x_i$ patterns, the talk proposes using random features to approximate the kernel sums within the energy function. This technique, popularized by Rahimi and Recht, transforms high-dimensional kernel computations into linear operations in a lower-dimensional random feature space.

  • Mechanism: For a shift-invariant kernel like the Radial Basis Function (RBF) kernel, its Fourier transform (or positive measure) is a Gaussian distribution. Random features are generated by multiplying the input vector with a random vector (sampled from this Gaussian distribution) and applying trigonometric functions (cosine and sine).
  • Benefit: This allows the model to approximate the kernel value without explicitly computing all pairwise similarities, effectively disentangling the size of the model from the number of stored patterns. This significantly reduces the memory footprint and computational cost, making it feasible to approximate models with very high effective capacities.
  • Trade-offs: The approximation quality of random features is bounded but depends on factors like the initial energy of the input (how far it is from the data distribution) and the step size of energy descent. Performance can degrade for inputs far from the training data distribution.

Novel Energy Function with Epanechnikov Kernel:

Inspired by the density estimation literature, which suggests kernels like the Epanechnikov kernel offer optimal bias-variance trade-offs compared to Gaussian kernels, the research explores its application in AM.

  • Epanechnikov Kernel: This kernel translates to a shifted ReLU separation function, characterized by a linear decay of similarity that truncates at zero.
  • Key Discovery: This specific energy function exhibits a remarkable property: it can simultaneously create local minima around the original stored patterns (memorization) and generate entirely new local minima with potentially lower energy (generation). This is achieved by tuning a parameter (beta term).
  • Contrast with Log-Sum-Exp: Traditional log-sum-exp energy functions (derived from Gaussian kernels) are known to have a maximum number of local minima that is always less than or equal to the number of stored patterns. They cannot generate novel patterns beyond what's explicitly provided. The Epanechnikov kernel breaks this limitation, offering a new paradigm for AM.
  • Mechanism: As a "beta" parameter is increased, the energy landscape evolves. At a critical beta value, new local minima spontaneously emerge between or near the stored patterns, often having lower energy than the original memory sites. This implies that the network can not only recall what it has learned but also creatively combine or extrapolate to produce novel, coherent outputs.

Experimental Setup & Results

▶ Watch: Capacity limits and model expressivity explained (4:30)

The talk provides several demonstrations and results to validate the proposed concepts and the efficacy of the novel Epanechnikov kernel.

1. Differentiable K-means Clustering:

  • Problem: Traditional K-means is a discrete optimization problem, making it non-differentiable.
  • Approach: Leveraging the AM's collective contraction property. Instead of discrete assignments, the AM iteratively moves data points towards their closest cluster centers. This "movement" itself becomes a differentiable objective.
  • Outcome: This enables a fully differentiable clustering algorithm, solving the same K-means objective but through a continuous, gradient-based process. This approach can be seamlessly integrated with representation learning or deep clustering, allowing the learning of latent space representations that are inherently clustered by the AM.

2. Epanechnikov Kernel for Memorization and Generation:

  • Synthetic Data (1D and 2D):
  • 1D Example: With two stored memories, the Epanechnikov kernel demonstrates the emergence of new local minima as a "beta" parameter is increased. At low beta, there might be one minimum. At a critical beta, new minima appear around stored patterns and also between them, often with lower energy, confirming simultaneous memorization and generation.
  • 2D Example: Using 25 black dots as stored patterns, the model shows similar behavior. At low beta, a single novel memory might appear. As beta increases, multiple new novel memories emerge, preserving the original 25 while generating many more. For instance, with 25 memories in 8 dimensions, the model can recover all 25 but simultaneously generate over 100 new local minima. Scaling this to 32 dimensions with 25 memories, the model can generate over 10,000 new local minima.
  • Image Data:
  • MNIST-like Digits: When 24 images (digits) were stored, the Epanechnikov kernel, at a critical beta value, not only retrieved most of the original memories but also generated 46 new digits that looked plausible but were not part of the stored patterns. In contrast, the log-sum-exp energy function at the same beta value yielded only six local minima in total, failing to recover many original memories and generating no plausible new ones.
  • Tiny ImageNet: Storing 40 images from Tiny ImageNet, the Epanechnikov kernel successfully recovered the 40 original memories and simultaneously created 38 new local minima (new images). The log-sum-exp, again, performed poorly, yielding only two local minima, one of which was merely noise.

These results strongly support the claim that the Epanechnikov kernel fundamentally alters the behavior of associative memory networks, endowing them with powerful generative capabilities alongside their traditional memorization function.

Practical Implications

▶ Watch: Energy function interpreted as a kernel sum (5:45)

The advancements in associative memory presented in this talk hold significant practical implications for various domains within AI and machine learning:

  1. Enhanced Generative Models: The ability of the Epanechnikov kernel to simultaneously memorize existing patterns and generate novel, plausible ones offers a new paradigm for generative AI. Unlike large language models (LLMs) or diffusion models, which operate on vast datasets and complex architectures, this AM approach could potentially offer more controlled generation from smaller, specific memory sets. This could be valuable for tasks requiring both precise recall and creative synthesis, such as generating variations of design elements, musical compositions, or even medical images based on specific archetypes. The controlled emergence of new minima could lead to more interpretable generative processes.
  1. Scalable and Differentiable Learning: The reinterpretation of AM as a differentiable recursive neural network, coupled with the use of random features, makes AM networks much more practical for modern machine learning.
  • End-to-End Training: Practitioners can integrate AM modules into larger deep learning architectures, allowing the stored patterns and other AM parameters to be learned directly through backpropagation. This opens doors for AM in tasks like deep clustering, where representations and cluster assignments are learned jointly.
  • Overcoming Capacity Limits: Random features provide a scalable way to increase the effective memory capacity without the prohibitive computational cost of explicitly storing every pattern. This allows AM to handle larger datasets and more complex memory requirements, bridging the gap between theoretical capacity and practical implementation.
  1. Robustness for Neuromorphic Hardware: A critical implication, highlighted by Dmitry Krotov in the concluding remarks, is AM's inherent error correction by design. Neuromorphic chips, designed to mimic biological brains, are often susceptible to noise and imperfections. Traditional feed-forward networks like transformers, when deployed on such noisy hardware, can suffer catastrophic performance degradation. Associative memories, by their very definition, are error-correcting devices. Their ability to converge to stable memory states even from noisy or incomplete inputs makes them uniquely suited for robust deployment on neuromorphic hardware, offering a lifeline for this emerging computing paradigm.
  1. Bridging Disciplines: This work serves as a crucial bridge between theoretical physics, neuroscience, and practical machine learning. For physicists, it offers new tools for characterizing complex energy landscapes. For neuroscientists, it provides models for understanding memory storage and retrieval in biological brains, potentially linking AM to non-neuronal cells like astrocytes. For ML engineers, it introduces powerful, interpretable, and scalable memory mechanisms.

Trade-offs and Limitations:

While promising, the use of random features comes with a trade-off: their approximation quality can degrade significantly for inputs that are very far from the data distribution, especially when the initial energy is high. Furthermore, the computational benefits of random features need to be carefully balanced against the overhead of generating and managing these features, as well as the iterative nature of AM inference, which still requires multiple forward passes. The full understanding of the Epanechnikov kernel's generative properties, particularly the exact mechanisms controlling the quantity and quality of new local minima, is an ongoing area of research.

Key Takeaways

  • Associative memory networks can be effectively reinterpreted as differentiable, t-layer recursive neural networks whose inference process involves iterative energy descent steps.
  • The use of random features allows for scalable, distributed representations, decoupling the model's size from its memory capacity and making AM applicable to large-scale problems.
  • Associative memories exhibit a collective contraction property, where data points iteratively move towards modes of the distribution, enabling novel differentiable approaches to tasks like K-means clustering.
  • A novel energy function based on the Epanechnikov kernel (shifted ReLU) enables simultaneous memorization and generation of patterns, a capability not found in traditional AM models, leading to the creation of thousands of new, plausible patterns from a small set of memories.
  • These advancements position associative memories as a powerful tool for generative AI, offering a potentially more controlled and interpretable generation mechanism, and as a robust computational primitive for neuromorphic hardware due to their inherent error-correction properties.
  • The research highlights the potential of associative memory to bridge theoretical insights from physics and neuroscience with practical applications in modern machine learning.

About the Speaker(s)

Parikshit Ram is the primary speaker for this section of the tutorial. He identifies himself as a machine learning practitioner, stating he is "not a theoretical physicist, not a neuroscientist." His background as a "grad student when machine learning was the thing and kernels were the thing" heavily influences his approach to associative memory, which he aims to frame as a standard machine learning model. His work focuses on making these models accessible and applicable to common ML tasks like classification, regression, and clustering. He is an author on the lecture notes (specifically chapter five) mentioned in the tutorial.

Dmitry Krotov is acknowledged at the beginning and end of the talk, having introduced the overall tutorial and providing concluding remarks on the broader frontiers of associative memory research. He is implicitly positioned as an expert with a strong physics perspective on energy landscapes and their properties, and he co-authored the lecture notes.

Benjamin Hoover is mentioned as a co-author on the paper detailing the novel Epanechnikov kernel and its generative capabilities. He contributed to the research discussed in the latter part of the talk.

Reviews

Maya Iyer (Theoretical ML Researcher) — SOLID

A technically competent tutorial segment that reframes classical associative memory within modern ML vocabulary and introduces a genuinely interesting result — the Epanechnikov kernel's simultaneous memorization and generation behavior. The random features connection to Rahimi and Recht is clean and well-motivated, and the differentiable reinterpretation of energy descent as a recurrent network is a useful pedagogical move. The Epanechnikov finding is the most novel contribution and deserves follow-up, but the talk as described stops short of providing the theoretical machinery needed to make 'simultaneous memorization and generation' a precise claim rather than an observed phenomenon…

Chen Zhao (Applied ML Researcher & Empiricist) — SOLID

A well-structured tutorial talk that reframes associative memory as a differentiable ML primitive and introduces an Epanechnikov-kernel-based energy function with a genuinely interesting simultaneous memorization-and-generation property. The conceptual contributions are real and the framing is useful, but the article describing the talk provides almost no information about the experimental rigor underpinning the core empirical claims. Results appear to rest on small synthetic experiments and a handful of image examples, with no discussion of baselines, seeds, compute, or ablation structure. The Epanechnikov kernel's generative behavior is the most exciting piece here, but the mechanistic…

→ Top-rated talks at International Conference on Machine Learning 2025

All talks from International Conference on Machine Learning 2025