Associative Memories (AMs) are fundamental to intelligence, allowing systems to store patterns and retrieve them when presented with noisy or partial versions of the original data. While classical models like Hopfield networks laid the groundwork for artificial AMs, they often struggle with high-dimensional, complex data such as natural images. Modern deep learning approaches, like overparameterized autoencoders, can act as AMs but require massive parameter counts and rely on biologically implausible backpropagation.
This paper introduces a novel neural model for associative memories based on Predictive Coding (PC), a biologically inspired learning framework. By treating memories as "attractors" in a hierarchical generative network, this model significantly outperforms standard autoencoders and modern Hopfield networks in retrieving complex, high-resolution images from corrupted or highly incomplete data.
Generative Predictive Coding Networks
The authors propose Generative Predictive Coding Networks (PCNs). Unlike standard neural networks that only minimize error at the output layer, PCNs define and minimize an error at every layer of the hierarchy.
The architecture consists of a hierarchical network where the bottom "Sensory Layer" receives external stimuli, and the top "Memory Layer" holds a learned memory vector. During training, the network employs Inference Learning (IL), a two-stage process. First, with weights fixed, it updates internal "value nodes" to minimize a global energy function—the sum of squared errors between layers. Second, it updates the synaptic weights and the memory vector based on these optimized values.
Retrieval as Energy Minimization
To retrieve a memory, a corrupted or partial image is fixed at the sensory layer. The network then runs its inference process until it converges to a local minimum in the energy landscape.
If the original image was stored correctly, this minimum acts as an "attractor," and the network's internal state reconstructs the clean, original image. For incomplete images, the model fixes the known pixels and allows the "missing" pixels at the sensory layer to be updated dynamically during the inference phase, effectively "dreaming" the missing parts based on stored patterns.
Key Insights and Performance
The energy-based nature of predictive coding naturally creates stable attractors for training data, making PCNs inherently suited for associative memory tasks without the strict architectural constraints of Hopfield nets. The model provides a computational framework for the theory that the hippocampus acts as a "memory index," where the top-level memory vector serves as the index and the hierarchical layers act as the generative model of the neocortex. Furthermore, adding layers to a generative PCN significantly increases its storage capacity and noise robustness.
Evaluated on standard benchmarks (MNIST, CIFAR10, Tiny ImageNet, and ImageNet), the PCN demonstrated superior robustness:
- Efficiency over Autoencoders: A 2-layer PCN could store and retrieve images that 3-layer autoencoders (with more parameters) completely failed to recover. On Tiny ImageNet, a 10-layer PCN achieved over 98% retrieval accuracy when presented with only 50% of the pixels, compared to 72% for an equivalent autoencoder.
- Extreme Reconstruction: The model achieved remarkable results on full-scale ImageNet pictures, perfectly reconstructing images even when only 12.5% (1/8th) of the original pixels were provided.
- Outperforming Modern Hopfield Networks (MHNs): While MHNs are powerful one-shot learners, they struggled with the complexity of natural images. The PC-based model significantly outperformed MHNs in both retrieval accuracy and handling corrupted data on CIFAR10 and Tiny ImageNet.
Limitations and Future Directions
Currently, the implementation uses fully connected layers. Incorporating convolutional layers could further improve performance and efficiency for image-based tasks. While more biologically plausible than backpropagation, the model requires refinement to match specific anatomical details of the brain's memory systems (e.g., hippocampal subfields like CA1 and CA3). Finally, future work will need to explore how these networks scale to storing millions of distinct memories simultaneously.
Summary updated