On Sparse Modern Hopfield Model

We introduce the sparse modern Hopfield model as a sparse extension of the modern Hopfield model. Like its dense counterpart, the sparse modern Hopfield model equips a memory-retrieval dynamics whose one-step approximation corresponds to the sparse attention mechanism. Theoretically, our key contribution is a principled derivation of a closed-form sparse Hopfield energy using the convex conjugate of the sparse entropic regularizer. Building upon this, we derive the sparse memory retrieval dynamics from the sparse energy function and show its one-step approximation is equivalent to the sparse-structured attention. Importantly, we provide a sparsity-dependent memory retrieval error bound which is provably tighter than its dense analog. The conditions for the benefits of sparsity to arise are therefore identified and discussed. In addition, we show that the sparse modern Hopfield model maintains the robust theoretical properties of its dense counterpart, including rapid fixed point convergence and exponential memory capacity. Empirically, we use both synthetic and real-world datasets to demonstrate that the sparse Hopfield model outperforms its dense counterpart in many situations.

Paper

Similar papers

Peer review

Reviewer usKi6/10 · confidence 3/52023-07-05

Summary

The authors introduce sparse Hopfield networks that feature sparse retrieval dynamics corresponding to sparsemax attention mechanisms and resulting in sparse patterns that are more robust to noise. They prove fast convergence analogous to modern Hopfield networks and show how the sparse Hopfield model has a tighter lower bound for memory capacity compared to the dense version. Altered sparse variations of Hopfield layers to be used in Deep Learning models are introduced and their viability is shown on established Image Classification and one synthetic and four real-world Multiple Instance Learning tasks. The novel approach shows increased memory robustness in relation to Gaussian noise applied to the input images.

Strengths

# Significance The paper's main strength lies in the theoretical results and the Theorems and Lemmas whose proofs can be found in the vast appendix. It's not unlikely that these results will be utilized in future work on associative and biologically plausible Deep Learning. The authors shared their source code facilitating reproducibility. # Clarity and Quality The goals of this line of research are presented clearly and summarized into one concise research question. The formatting of math such as definitions and theorems is clear and pleasant to read. Proof sketches are more or less easy to follow. The use of language is of high quality minus a number of typos and grammatically wrong sentences.

Weaknesses

# Originality The papers originality is fair since sparse computation is a well-known topic in Deep Learning and the presented work is merely an incremental improvement on modern Hopfield networks. The connection between Hopfield networks and attention was made in previous work making the correspondence to a form of sparse attention mechanism an obvious venue of investigation. # Clarity The MIL tasks are not introduced very well: The explanation of the bit pattern experiment is insufficient for readers unfamiliar with the task and the Real-world tasks are not explained at all. # Significance Potential computation advantages gained from sparse patterns is shortly mentioned in the introduction but not touched upon in the remainder of the manuscript. Additionally, a footnote weakens the claim and puts it into perspective.

Questions

- What is the goal for the MIL tasks? - Line 192: two-layer fully connected networks -> MLPs? # Minor mistakes - Figure and Table 3 are mentioned in the text but are not found in the paper nor in the appendix. - Line 14: "exploit datasets" is worded strangely - Same goes for Line 87 "provably blessings" - Line 112: "memoery" - Theorem 3.1: Grammatically incorrect - Line 229: "to utilizes" - Corollary 3.1.2: "retrieves a memory patterns" - Line 320: "Boarder impact" Should the authors decide to fix the given mistakes I am willing to increase my overall rating!

Rating

6: Weak Accept: Technically solid, moderate-to-high impact paper, with no major concerns with respect to evaluation, resources, reproducibility, ethical considerations.

Confidence

3: You are fairly confident in your assessment. It is possible that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work. Math/other details were not carefully checked.

Soundness

3 good

Presentation

3 good

Contribution

2 fair

Limitations

The authors do not mention any limitations of their work. However, given the theoretical nature of the work, I do not deem it necessary to discuss them at length. Societal impact of this paper does not surpass the already significant implications of research in the field as a whole.

Reviewer yZUu4/10 · confidence 2/52023-07-09

Summary

The authors introduce sparse Hopfield model, which are memory-associative models used to store and retrieve patterns. Theoretically, the authors connect sparse Hopfield with sparse attention mechanism and empiricially the authors show how their method can outperform the state-of-the art.

Strengths

The authors present the key research questions, limitations of the current state of the art and their contribution in well-organized sections, detailed theoretic analysis is provided. The figure captions are detailed, and the contributions are clearly stated.

Weaknesses

The paper in terms of language is very hard to follow for layman readers. As Hopfield network may not be familiar to all interested readers, perhaps the authors can give a very basic understanding of what Hopfield network is, why it is interesting and important. The authors talk about computational efficiency and noise-robustness in the introduction, however experiments comparing efficiency of their method with baseline is missing in current manuscript. How and why sparsity increase noise-robustness is not clearly explained.

Questions

Please see the weakness section.

Rating

4: Borderline reject: Technically solid paper where reasons to reject, e.g., limited evaluation, outweigh reasons to accept, e.g., good evaluation. Please use sparingly.

Confidence

2: You are willing to defend your assessment, but it is quite likely that you did not understand the central parts of the submission or that you are unfamiliar with some pieces of related work. Math/other details were not carefully checked.

Soundness

3 good

Presentation

2 fair

Contribution

2 fair

Limitations

Yes, limitations are discussed.

Reviewer XuPM6/10 · confidence 2/52023-07-12

Summary

This paper proposes the sparse modern Hopfield network. It studies the new proposed model from both perspectives, theoretical and empirical, validating the approach.

Strengths

* The proposed model and the introduction of sparsity in the modern Hopfield network seem novel * The theoretical analyse is well received * The empirical validation shows that the sparse model is competitive (if not better) than its dense equivalent * The code is provided for easy reproducibility

Weaknesses

* The paper is very hard to read. It looks to me that it has a mathematical exposition which is much more complex than necessary, while it fails to develop for the reader basic intuitions about the proposed approach * The paper structure could have been improved by reserving a fair amount of space to give more details (besides math) about the proposed model and by using any other possible tools (algorithms, illustrations, etc.) to actually show/present how it actually works. Some of the current paper material can be moved into the appendix. This would really ease the reader job. * I mention that I didn’t follow the math completely, but even so it can be observed that some mathematical notations are not defined, e.g., what is n on line 111? * The literature survey on related works about sparsity in deep learning is quite weak. I believe that this is relatively important as long as the proposed model aims to be used in deep learning models. Also, the related works discussion shall be in the main paper and not in the appendix. * The paper needs a careful proofread as it contains typos (for instance, “memoery” on line 112) and English usage can be enhanced for clarity. * The paper may be potentially impactful in the research community, but given its current state it is arguable (in my opinion) if it can actually become influential

Questions

Q1) Can you please add a nomenclature in the Appendix with all the mathematical notations and symbols? The paper is not an easy read, and a nomenclature would help the reader seriously. Q2) Can you please discuss and quantify (using various metrics and techniques) the sparsity patterns obtained, besides the relation with sparse attention? How the various sparsity patterns are before, during, or after training? Some (numerical, or visual) examples would help.

Rating

6: Weak Accept: Technically solid, moderate-to-high impact paper, with no major concerns with respect to evaluation, resources, reproducibility, ethical considerations.

Confidence

2: You are willing to defend your assessment, but it is quite likely that you did not understand the central parts of the submission or that you are unfamiliar with some pieces of related work. Math/other details were not carefully checked.

Soundness

2 fair

Presentation

1 poor

Contribution

2 fair

Limitations

Fairly well discussed.

Reviewer haSG6/10 · confidence 3/52023-07-27

Summary

The paper proposes a new model from the Dense Associative Memory family that uses Sparsemax function for its energy. This model is studied and compared to the model with the softmax-based energy from both theoretical and empirical perspectives. The work proposes that the sparse model outperforms the model with the softmax (dense model) in terms of the memory retrieval bound.

Strengths

The work derives a novel model from the modern HN family and analyses its energy and dynamics using convex conjugate of the sparse entropic regularizer. As far as I can tell this is a sophisticated result, which meaningfully extends the family of models that has been previously studied. The work studies theoretically several properties of the convergence dynamics in this new model. In general, results pertaining to continues models from this family are scarce, which makes this submission even more valuable. The authors also discuss possible ways of integrating their model into existing Hopfield-like frameworks, and propose Sparse Hopfield, SparseHopfieldPooling, SparseHopfieldLayer layers based on their energy function. Empirical results look promising. The proofs in the appendices look convincing, although I have not checked them carefully.

Weaknesses

It would be nice if the authors could summarize in a concise and crisp way what is the theoretical advantage of their model with the Sparsemax compared to previously studied modern HN models. I can see that the new model uses a very different language for its formulation (which is great), but I am struggling to understand its computational benefits compared to previously studied models. The improvements in empirical performance, which the authors present are great, but they are not too significant to claim superiority just based on them. I would appreciate a clear theoretical proposition here. The statement in lines 578-579 is somewhat confusing. The model studied in Ramsauer 2020 uses softmax activation function, the model studied in Demircigil uses exponential activation function. Several papers (incorrectly) state that these two models are identical. This is wrong, since they have mathematically distinct energy functions and update equations. Some wording in Appendix C might be somewhat confusing. The appendix makes it sound that everyone before Ramsauer 2020 studied binary Hopfield networks, but Ramsauer 2020 introduced the continuous networks. This is not quite correct. For instance https://www.pnas.org/doi/10.1073/pnas.81.10.3088 introduced continues sparse (as opposed to dense) Hopfield networks in 1984. Krotov & Hopfield 2016 introduced continuous dense Hopfield networks (see equation 10 in their paper and most of the empirical results on MNIST), etc. Ramsauer 2020 focused on studying a specific model from that family (with softmax activation) and calculated the capacity of that specific model. But the continuous networks (both sparse and dense) were introduced in prior work.

Questions

1. Could the authors please explain the computational benefits of their model compared to previously studied dense associative memories? 2. I am not too familiar with Gini entropy and its conjugate, but formulas for the relationship between $F(\mathbf{p})$ and $\Psi(\mathbf{p})$ (e.g. above equation 2.4) look very similar to Legendre transformation to me. Krotov & Hopfield 2020 also use Legendge transformation to compute the energy function using Lagrangians. Is there a precise relationship between the Lagrangian language of Krotov and Hopfield and the formalism developed in this submission? 3. The authors present quantitative metrics to empirically evaluate the performance of their model. This is great, but in order to get more intuition about the new model it would be helpful to show a few images for experiments presented in section 4.1 that the authors used in their experiments. For example pairs of initial states and final retrieved images. It would be interesting to see visually what kinds of mistakes the new network makes compared to previously studied models.

Rating

6: Weak Accept: Technically solid, moderate-to-high impact paper, with no major concerns with respect to evaluation, resources, reproducibility, ethical considerations.

Confidence

3: You are fairly confident in your assessment. It is possible that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work. Math/other details were not carefully checked.

Soundness

3 good

Presentation

3 good

Contribution

3 good

Limitations

This is a theoretical work. The authors address societal impacts in the last section “Broader Impact” and appendix A.

Reviewer usKi2023-08-15

Updated overall rating

Thank you for your thorough response to my review! You were able to convince me of the originality of your work. Using the Gini entropy regularizer to derive energy function and retrieval dynamics is undoubtedly a valuable contribution towards understanding the nature of MHNs. Since the authors addressed most of my concerns in the revised version I adjusted my overall rating suggesting acceptance of the manuscript. Best of Luck, Reviewer usKi

Authorsrebuttal2023-08-15

Dear Reviewer usKi, We are pleased to hear that our revisions have addressed your concerns, and we are grateful for the time and effort you invested in reviewing our work. Your insightful comments have been constructive in enhancing the quality of the draft, especially the careful proofreading. Thank you! Warm regards, Authors

Reviewer haSG2023-08-17

Thank you for answering my questions and clarifications.

Dear Authors, thanks for answering my questions and all the clarifications. I think I understand the paper better now.

Authorsrebuttal2023-08-17

Thank You for Insightful Review

Dear Reviewer haSG, We are happy to hear that our revisions have addressed your concerns. Thank you again for your constructive comments, which are pivotal in improving our draft and presenting a clearer view of the modern Hopfield model family. We truly appreciate your thorough review. Best, Authors

Reviewer XuPM2023-08-18

Rating updated

I thank the authors for carefully considering all my comments and for the extensive rebuttal in general. Really appreciating it. After reading the other reviews and the authors' answers, I have increased my rating to weak accept.

Authorsrebuttal2023-08-18

Thank You for Constructive Comments

Dear Reviewer XuPM, We're happy that our revisions have met your expectations. We truly appreciate your thoughtful feedback throughout the review process! Your insights have been invaluable in refining our paper. Thank you! Best regards, Authors

Program Chairsdecision2023-09-21

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC