A remark on a paper of Krotov and Hopfield [arXiv: 2008.06996]

Michael Kopp, Fei Tang, Michael Kopp 0001arXiv 2021

Abstract

Modern deep learning architectures, such as the MLP-mixer, have achieved state-of-the-art performance in computer vision and natural language processing, yet their design often relies on engineering heuristics. This paper provides a theoretical bridge between these practical architectures and the biological theories of associative memory. By analyzing the continuous-time dynamical equations of Dense Associative Memory (DAM), the authors demonstrate that the core components of an MLP-mixer—including LayerNorm and skip connections—emerge naturally from a specific choice of Lagrangian function and a discretization of neuron dynamics.

Introduction

The rapid evolution of deep learning has introduced several architectural components that are now standard, such as Layer Normalization (LayerNorm) and residual (skip) connections. While empirically successful, the "first principles" justification for these components remains an active area of research. Concurrently, neuroscientific models like the Dense Associative Memory (DAM) framework proposed by Krotov and Hopfield offer a microscopic theory of how neurons store and retrieve information.

This paper addresses a specific gap in the DAM framework: "Model C," a variant involving spherical normalization that previously lacked a clear practical counterpart in artificial intelligence. The authors demonstrate that Model C is, in fact, the mathematical equivalent of the MLP-mixer architecture.

Theoretical Framework: From Dynamics to Discretization

The derivation begins with the continuous-time dynamical equations for "feature" and "memory" neurons as defined in the Krotov-Hopfield framework. To align these biological dynamics with modern neural networks, the authors perform a multi-step mathematical mapping:

  1. The Amended Lagrangian ($L_v$): The authors propose a specific Lagrangian function that incorporates mean-subtraction and variance scaling. This choice is critical as it sets the stage for normalization operations to appear in the final equations.
  2. Discretization: By setting the decay rate $\alpha = 0$ and moving from continuous differential equations to discrete-time update steps, the authors derive a new update rule for the neuron states.
  3. Structural Mapping: The resulting discrete equations are compared to the standard definition of an MLP-mixer layer. The authors find a near-perfect structural match between the theoretical neuron updates and the practical implementation of modern layers.

Key Structural Correspondences

The most significant contribution of this work is the one-to-one mapping between biological neuron dynamics and the components of the MLP-mixer:

  • LayerNorm as a Physical Property: The LayerNorm operation—a standard trick used to stabilize deep network training—is shown to be the gradient of the proposed Lagrangian. This suggests that normalization is not just an engineering heuristic but corresponds to a specific energy-minimizing function in a biological neuron model.
  • Skip Connections as Natural Integration: The "skip connection" emerges naturally from the discrete-time update of the neuron's state. It represents the "current state" of the neuron being updated by new synaptic input over a single time step.
  • Weight Matrices and Synapses: The weight matrices ($W_1, W_2$, etc.) in the MLP-mixer correspond directly to the synaptic connections between feature and memory neurons.
  • Activation Functions: The non-linear activation function ($f$) in the MLP-mixer corresponds to the activation function of the memory neurons in the DAM framework.

Implications and Limitations

While the mapping is remarkably consistent, it introduces a specific constraint known as Weight Symmetry. In the original Krotov-Hopfield theory, synaptic weights are assumed to be symmetric, implying that the weights used to project data "up" into a higher dimension should be the transpose of the weights used to project it back "down" ($W_1 = W_2^T$).

In standard MLP-mixers used in industry, these weights are usually learned independently. The authors suggest that dropping the symmetric weight assumption in the biological model could lead to an exact, one-to-one mapping that accounts for independent weights. This potential extension could open the door to even more biologically plausible and efficient architectures.

Conclusion

This academic remark provides a fascinating bridge between the "black box" of modern deep learning and biological theories of memory. By showing that LayerNorm and skip connections are natural consequences of neuron dynamics, the paper moves the field closer to a "first principles" understanding of why modern architectures work as well as they do.

Summary updated

BibTeX
@misc{kopp2021remark,
  author = {Michael Kopp and Fei Tang and Michael Kopp},
  title = {{A remark on a paper of Krotov and Hopfield [arXiv: 2008.06996]}},
  year = {2021},
  eprint = {2105.15034},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2105.15034},
}
Figure