Sparse and Structured Hopfield Networks

Saul Santos, Vlad Niculae, Daniel McNamee, Andre F. T. Martins
2/21/2024
cs.LG

No official code found. Best implementation: deep-spin/SSHN (3 stars, MIT, last commit 2024-07-04).

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.

View on arXivView PDF

Code Implementations(1)

deep-spin/SSHNCommunity100%
MIT

Sparse and Structured Hopfield Networks

30PythonFeb 14, 20242 years agoMIT

Similar Papers

Cite this paper

@article{santos2024sparse,
  title  = {Sparse and Structured Hopfield Networks},
  author = {Saul Santos and Vlad Niculae and Daniel McNamee and Andre F. T. Martins},
  year   = {2024},
  eprint = {2402.13725},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2402.13725v2},
  journal = {ICML 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2402.13725.svg)](https://codeofpaper.com/paper/2402.13725)

Discussion