Modern Hopfield networks (also known as Dense Associative Memories) are generalizations of the classical Hopfield networks that break the linear scaling relationship between the number of input features and the number of stored memories. This is achieved by introducing stronger non-linearities (either in the energy function or neurons’ activation functions) leading to super-linear (even an exponential) memory storage capacity as a function of the number of feature neurons. The network still requires a sufficient number of hidden neurons. The key theoretical idea behind the modern Hopfield networks is to use an energy function and an update rule that is more sharply peaked around the stored memories in the space of neuron’s configurations compared to the classical Hopfield network.
Classical Hopfield networks Hopfield networks are recurrent neural networks with dynamical trajectories converging to fixed point attractor states and described by an energy function. The state of each model neuron i {\textstyle i} is defined by a time-dependent variable V i {\displaystyle V_{i}} , which can be chosen to be either discrete or continuous. A complete model describes the mathematics of how the future state of activity of each neuron depends on the known present or previous activity of all the neurons. In the original Hopfield model of associative memory, the variables were binary, and the dynamics were described by a one-at-a-time update of the state of the neurons. An energy function quadratic in the V i {\displaystyle V_{i}} was defined, and the dynamics consisted of changing the activity of each single neuron i {\displaystyle i} only if doing so would lower the total energy of the system. This same idea was extended to the case of V i {\displaystyle V_{i}} being a continuous variable representing the output of neuron i {\displaystyle i} , and V i {\displaystyle V_{i}} being a monotonic function of an input current. The dynamics became expressed as a set of first-order differential equations for which the "energy" of the system always decreased. The energy in the continuous case has one term which is quadratic in the V i {\displaystyle V_{i}} (as in the binary model), and a second term which depends on the gain function (neuron's activation function). While having many desirable properties of associative memory, both of these classical systems suffer from a small memory storage capacity, which scales linearly with the number of input features.
… excerpt ends here. Continue reading the full article.

![Modern Hopfield network: Fig.2 Effective theory on the feature neurons for various common choices of the Lagrangian functions. Model A reduces to the models studied in[3][4] depending on the choice of the activation function, model B reduces to the model studied in,[1] model C reduces to the model of.[5]](https://upload.wikimedia.org/wikipedia/commons/thumb/2/20/Effective_theory_of_Modern_Hopfield_Networks.png/1280px-Effective_theory_of_Modern_Hopfield_Networks.png?utm_source=en.wikipedia.org&utm_campaign=parser&utm_content=thumbnail)

![Modern Hopfield network: Fig.4 The connectivity diagram of the layered Hierarchical Associative Memory network.[8] Each layer can have different number of neurons, different activation function, and different time scales. The feedforward weights and feedback weights are equal.](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7f/Hierarchical_Associative_Memory.png/1280px-Hierarchical_Associative_Memory.png?utm_source=en.wikipedia.org&utm_campaign=parser&utm_content=thumbnail)
