Mirror Descent of Hopfield Model

Hyungjoon Soh, Dongyeob Kim, Juno Hwang, Junghyo Jo

This paper, recently published by researchers at Seoul National University and the Korea Institute for Advanced Study, explores a sophisticated optimization technique called Mirror Descent (MD). By applying it to the classic Hopfield model, the authors demonstrate a principled way to perform data-driven parameter initialization, significantly outperforming traditional random initialization methods.

TL;DR

The researchers show that Mirror Descent provides a natural bridge between data statistics and neural network parameters. By using the Hopfield model as a prototype, they demonstrate that MD-based initialization allows models to start closer to the global optimum and converge much faster than standard gradient descent.

What Problem Does This Paper Address?

In modern deep learning, how we initialize a network's weights is often a "black art." Most popular schemes, like Xavier or He initialization, are data-independent—they simply scale random numbers based on the size of the layers to prevent signals from exploding or vanishing.

While these work, they ignore the actual information contained in the training data. This leads to higher computational costs and longer training times. The authors seek a data-driven initialization method. They turn to Mirror Descent, an optimization framework that operates in a "dual space" where the variables are often more closely related to observable data than the raw model parameters.

Methods

The authors focus on the Hopfield model, a type of recurrent neural network that belongs to the exponential family of probability distributions.

  1. Mirror Descent (MD): Unlike standard Gradient Descent (GD), which moves in the parameter space ($\theta$), MD maps parameters to a dual space ($\mu$), performs a gradient step there, and then maps back.
  2. The Duality Link: A key contribution of this paper is highlighting that for exponential family models, the dual variable $\mu$ corresponds exactly to the expectation values (means and correlations) of the data.
  3. The Hopfield Solution: The authors use the "Hopfield solution"—where weights are set directly to the correlations found in the data—as the starting point for their optimization.
  4. Approximating the Inverse: Mapping from the dual space back to the parameter space is mathematically difficult. The authors solve this by using a Taylor expansion of the dual function, which effectively transforms the MD update into a form of Natural Gradient Descent (NGD), but one that is uniquely "anchored" to the data distribution.

Datasets

The study uses synthesized data to ensure a "ground truth" is available for comparison.

  • Model: A 10-neuron Hopfield model ($n=10$).
  • Generation: True parameters ($\theta$) were sampled from a standard normal distribution $\mathcal{N}(0, 1)$. Binary patterns were then sampled from the resulting distribution.
  • Evaluation: To eliminate sampling noise and focus on optimization performance, the authors assumed an "infinite sample" limit, using the exact model distribution as the target empirical distribution.

Key Insights and Ideas

  • The Observable Connection: In the context of the Hopfield model, the "dual space" isn't just an abstract mathematical construct; it represents the actual correlations between neurons. This makes it the perfect place to incorporate data.
  • Vanishing Gradient Paradox: The authors note a subtle trap: if you initialize the dual variable exactly to the data distribution, the gradient becomes zero immediately (the model thinks it's already finished). To avoid this, they use the Hopfield solution to initialize the parameters ($\theta^0$) instead of the dual variables ($\mu^0$).
  • Implicit Second-Order Optimization: MD naturally behaves like a second-order method (like NGD) because it accounts for the "curvature" of the space. However, it does so through the geometry of the dual mapping rather than just brute-force Hessian calculations.
  • Fixed Curvature Proxy: They found that using a "fixed curvature" (calculating the covariance matrix once at the start) still outperforms standard GD, offering a potential way to save on the heavy computational cost of updating the curvature at every step.

Key Results

  • Faster Convergence: MD starting from the Hopfield solution reached low loss levels (discrepancy between model and data) orders of magnitude faster than standard GD or NGD with random starts.
  • Superior Accuracy: In terms of "Inferred $\theta$ vs. True $\theta$," MD provided the most accurate parameter recovery, following a much more direct path to the global minimum (visualized via PCA learning paths).
  • Robustness: MD proved more stable than NGD. While NGD with random starts often diverged or became unstable due to large eigenvalues in the curvature matrix, the data-driven starting point of MD provided a "robust inversion" of the covariance matrix.

Limitations and Future Work

  • Scalability: The current work uses a small 10-neuron model. Inverting the covariance matrix (required for the mapping back to parameter space) becomes computationally expensive as the number of neurons increases.
  • Hidden Variables: The Hopfield model used here assumes all neurons are "visible" (observed in the data). Real-world deep networks rely heavily on hidden/latent layers. Extending this MD framework to include hidden variables is a major next step.
  • Beyond Exponential Families: While the link between MD and data expectations is clear for exponential families, generalizing this to other architectures (like standard feed-forward ReLUs) remains an open challenge.

Reference: Soh, H., Kim, D., Hwang, J., & Jo, J. (2023). Mirror descent of Hopfield model. arXiv:2211.15880v2 [cs.LG].

Summary updated

BibTeX
@article{soh2023mirror,
  author = {Hyungjoon Soh and Dongyeob Kim and Juno Hwang and Junghyo Jo},
  title = {{Mirror Descent of Hopfield Model}},
  journal = {Neural Computation},
  year = {2023},
  url = {https://openreview.net/forum?id=rZZvhTo1OG},
}

Loading related content...

Figure