Lune

AAAI2025Top-tier venue

Rectified Lagrangian for Out-of-Distribution Detection in Modern Hopfield Networks

Ryo Moriai, Nakamasa Inoue, Masayuki Tanaka, Rei Kawakami, Satoshi Ikehata, Ikuro Sato

Abstract

Modern Hopfield networks (MHNs) have recently gained significant attention in the field of artificial intelligence because they can store and retrieve a large set of patterns with an exponentially large memory capacity. A MHN is generally a dynamical system defined with Lagrangians of memory and feature neurons,where memories associated with in-distribution (ID) samples are represented by attractors in the feature space. One major problem in existing MHNs lies in managing out-of-distribution (OOD) samples because it was originally assumed that all samples are ID samples. To address this, we propose the rectified Lagrangian (RegLag), a new Lagrangian for memory neurons that explicitly incorporates an attractor for OOD samples in the dynamical system of MHNs. RecLag creates a trivial point attractor for any interaction matrix, enabling OOD detection by identifying samples that fall into this attractor as OOD. The interaction matrix is optimized so that the probability densities can be estimated to identify ID/OOD. We demonstrate the effectiveness of RecLag-based MHNs compared to energy-based OOD detection methods, including those using state-of-the-art Hopfield energies, across nine image datasets.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

  • CLOOB: Modern Hopfield Networks with InfoLOOB Outperform CLIP cites Modern Hopfield Networks and Attention for Immune Repertoire Classification
  • ReAct: Out-of-distribution Detection With Rectified Activations cites Energy-based Out-of-distribution Detection
  • Large Associative Memory Problem in Neurobiology and Machine Learning cites Modern Hopfield Networks and Attention for Immune Repertoire Classification
Builds onCited byLeft to right by year; the more cited, the higher.

Builds on11

  1. Energy-based Out-of-distribution DetectionWeitang Liu, Xiaoyun Wang, John D. Owens, Yixuan LiNeurIPS 2020 · 2,213 citations
  2. ReAct: Out-of-distribution Detection With Rectified ActivationsYiyou Sun, Chuan Guo, Yixuan LiNeurIPS 2021 · 733 citations
  3. Large Associative Memory Problem in Neurobiology and Machine LearningDmitry Krotov, John J. HopfieldICLR 2021 · 202 citations
  4. Modern Hopfield Networks and Attention for Immune Repertoire ClassificationMichael Widrich, Bernhard Schäfl, Milena Pavlovic, Hubert Ramsauer et al.NeurIPS 2020 · 152 citations
  5. CLOOB: Modern Hopfield Networks with InfoLOOB Outperform CLIPAndreas Fürst, Elisabeth Rumetshofer, Johannes Lehner, Viet T. Tran et al.NeurIPS 2022 · 131 citations

Related papers

  1. Out-of-Distribution Detection based on In-Distribution Data Patterns Memorization with Modern Hopfield EnergyJinsong Zhang, Qiang Fu, Xu Chen, Lun Du et al.ICLR 2023
  2. Energy-based Hopfield Boosting for Out-of-Distribution DetectionClaus Hofmann, Simon Schmid, Bernhard Lehner, Daniel Klotz et al.NeurIPS 2024 · 19 citations
  3. Meta-Learning Deep Energy-Based Memory ModelsSergey Bartunov, Jack W. Rae, Simon Osindero, Timothy P. LillicrapICLR 2020 · 35 citations
  4. Igeood: An Information Geometry Approach to Out-of-Distribution DetectionEduardo Dadalto Câmara Gomes, Florence Alberge, Pierre Duhamel, Pablo PiantanidaICLR 2022 · 32 citations
  5. Dynamical properties of dense associative memoryKazushi Mimura, Jun'ichi Takeuchi, Yuto Sumikawa, Yoshiyuki Kabashima et al.ICLR 2026 · 6 citations
Dusk over the sea between two cliffs drawn in fine vertical lines