Sparse and Structured Hopfield Networks

Saul Santos,Vlad Niculae,Daniel McNamee,Andre F. T. Martins
2024-06-05
Abstract:Modern Hopfield networks have enjoyed recent interest due to their connection to attention in transformers. Our paper provides a unified framework for sparse Hopfield networks by establishing a link with Fenchel-Young losses. The result is a new family of Hopfield-Fenchel-Young energies whose update rules are end-to-end differentiable sparse transformations. We reveal a connection between loss margins, sparsity, and exact memory retrieval. We further extend this framework to structured Hopfield networks via the SparseMAP transformation, which can retrieve pattern associations instead of a single pattern. Experiments on multiple instance learning and text rationalization demonstrate the usefulness of our approach.
Machine Learning
What problem does this paper attempt to address?
### Problems the Paper Aims to Solve This paper aims to address the following issues: 1. **Unified Framework for Sparse Hopfield Networks**: - Establish a connection between the Hopfield energy function and the Fenchel-Young loss, proposing a new family of Hopfield-Fenchel-Young energy functions whose update rules are end-to-end differentiable sparse transformations. 2. **Accurate Memory Retrieval**: - Reveal the relationship between loss boundaries, sparsity, and accurate memory retrieval, and demonstrate new theoretical results showing exponential storage capacity in a strict sense. 3. **Structured Hopfield Networks**: - Extend this framework through SparseMAP transformations, enabling the model to retrieve pattern associations rather than single patterns. Experiments demonstrate the effectiveness of this method in multi-instance learning and text interpretation tasks. Overall, the paper aims to improve modern Hopfield networks by endowing them with sparsity and structured retrieval capabilities, achieving accurate memory retrieval while maintaining end-to-end differentiability.