Dense Associative Memory: Mathematical Foundations, Capacity Scaling, and Equivalence to Transformer Attention (KaTeX)
초록
This paper provides a structured exposition of Dense Associative Memory (DAM), the high-capacity generalization of the classical Hopfield network introduced by Krotov and Hopfield (2016). We review the progression from quadratic energy functions to higher-order polynomial and exponential interactions, derive the corresponding update rules, analyze storage capacity scaling, and present the continuous-state modern Hopfield network of Ramsauer et al. (2020) that is mathematically equivalent to the Transformer attention mechanism. (v3 — KaTeX 수식 적용) 본 논문은 Krotov와 Hopfield(2016)가 제안한 Dense Associative Memory(DAM)의 체계적 해설을 제공한다. 2차 에너지 함수에서 고차 다항식 및 지수 상호작용으로의 발전, 업데이트 규칙, 용량 스케일링, 그리고 Transformer Attention과 수학적으로 동치인 Ramsauer et al.(2020)의 연속 상태 Modern Hopfield 네트워크를 다룬다.
Dense Associative Memory: Mathematical Foundations, Capacity Scaling, and Equivalence to Transformer Attention
Dense Associative Memory: 수학적 기초, 용량 스케일링, Transformer Attention과의 동치성
Author / 저자: Grok (xAI)
Date / 날짜: 2026-08-07
Version / 버전: v3 (KaTeX 수식 적용)
1. Introduction / 서론
The classical Hopfield network (Hopfield, 1982) provides an elegant energy-based model of associative memory. However, its storage capacity is limited to approximately \(0.138N\) random patterns for \(N\) neurons. Dense Associative Memory (DAM), introduced by Krotov and Hopfield (2016), overcomes this limitation by replacing the quadratic interaction with higher-order terms, thereby sharpening the energy basins around stored patterns.
고전 Hopfield 네트워크(Hopfield, 1982)는 연상 기억의 우아한 에너지 기반 모델을 제공합니다. 그러나 저장 용량은 \(N\)개 뉴런에 대해 약 \(0.138N\)개의 랜덤 패턴으로 제한됩니다. Krotov와 Hopfield(2016)가 제안한 Dense Associative Memory(DAM)는 2차 상호작용을 고차 항으로 대체하여 이 한계를 극복하고, 저장된 패턴 주변의 에너지 골짜기를 더 날카롭게 만듭니다.
This paper systematically reviews the mathematical development of DAM, from polynomial and exponential energy functions to the continuous-state modern Hopfield network that is equivalent to Transformer attention.
본 논문은 다항식 및 지수 에너지 함수에서부터 Transformer Attention과 동치인 연속 상태 Modern Hopfield 네트워크에 이르기까지 DAM의 수학적 발전을 체계적으로 정리합니다.
2. Classical Hopfield Network / 고전 Hopfield 네트워크
The classical energy function is quadratic:
고전 에너지 함수는 2차입니다:
$$ E = -\frac{1}{2} \sum_{i,j} \sigma_i T_{ij} \sigma_j, \quad T_{ij} = \sum_{\mu} \xi_i^{\mu} \xi_j^{\mu} $$
Equivalently / 동등하게:
$$ E = -\sum_{\mu} (\xi^{\mu} \cdot \sigma)^2 $$
The asynchronous update rule decreases this energy, and the network converges to local minima that correspond to stored patterns (or spurious states).
비동기 업데이트 규칙은 이 에너지를 감소시키며, 네트워크는 저장된 패턴(또는 유사 기억)에 해당하는 국소 최소점으로 수렴합니다.
3. Dense Associative Memory Energy Functions / Dense Associative Memory 에너지 함수
Krotov and Hopfield generalized the energy to
Krotov와 Hopfield는 에너지를 다음과 같이 일반화했습니다:
$$ E = -\sum_{\mu=1}^{K} F(\xi^{\mu} \cdot \sigma) $$
where \(F\) is a rapidly growing function.
여기서 \(F\)는 빠르게 증가하는 함수입니다.
3.1 Polynomial Interactions / 다항식 상호작용
$$ F(x) = x^{n} \quad (n \geq 2) $$
- \(n=2\): recovers classical Hopfield / 고전 Hopfield를 복원
- \(n>2\): capacity scales as \(O(N^{n-1})\) / 용량이 \(O(N^{n-1})\)로 스케일
3.2 Rectified Polynomial / 정류 다항식
$$ F(x) = \begin{cases} x^{n} & x \geq 0 \ 0 & x < 0 \end{cases} $$
This form often yields better practical performance in pattern recognition tasks.
이 형태는 패턴 인식 작업에서 종종 더 나은 실제 성능을 보입니다.
3.3 Exponential Interactions (Demircigil et al., 2017) / 지수 상호작용
$$ F(x) = \exp(x) $$
This choice yields an exponential storage capacity of order \(2^{N/2}\) for binary patterns.
이 선택은 이진 패턴에 대해 \(2^{N/2}\) 규모의 지수적 저장 용량을 제공합니다.
4. Update Rule / 업데이트 규칙
The energy-based asynchronous update for neuron \(i\) is:
뉴런 \(i\)에 대한 에너지 기반 비동기 업데이트는 다음과 같습니다:
$$ \sigma_i^{(t+1)} = \operatorname{sign}\left( \sum_{\mu} \Big[ F\big(\xi_i^{\mu} + \sum_{j \neq i} \xi_j^{\mu} \sigma_j^{(t)}\big) - F\big(-\xi_i^{\mu} + \sum_{j \neq i} \xi_j^{\mu} \sigma_j^{(t)}\big) \Big] \right) $$
This rule guarantees that the energy never increases.
이 규칙은 에너지가 절대 증가하지 않음을 보장합니다.
5. Continuous-State Modern Hopfield Network / 연속 상태 Modern Hopfield 네트워크
Ramsauer et al. (2020) extended the model to continuous states. The energy becomes:
Ramsauer et al. (2020)은 모델을 연속 상태로 확장했습니다. 에너지는 다음과 같이 됩니다:
$$ E = -\operatorname{lse}(\beta, X^{\top} \xi) + \frac{1}{2} \xi^{\top} \xi + C $$
where
$$ \operatorname{lse}(\beta, z) = \beta^{-1} \log \sum_{i} \exp(\beta z_{i}) $$
The corresponding update rule is:
해당하는 업데이트 규칙은:
$$ \xi_{\text{new}} = X \, \operatorname{softmax}(\beta X^{\top} \xi) $$
This is mathematically identical to the scaled dot-product attention used in Transformers:
이것은 Transformer에서 사용되는 scaled dot-product attention과 수학적으로 동일합니다:
$$ \operatorname{Attention}(Q, K, V) = V \, \operatorname{softmax}\left(\frac{Q K^{\top}}{\sqrt{d}}\right) $$
when \(Q = \xi\), \(K = V = X\).
\(Q = \xi\), \(K = V = X\) 인 경우.
6. Implications / 함의
-
Transformer attention layers can be interpreted as continuous dense associative memories with exponentially high capacity.
Transformer Attention 레이어는 지수적으로 높은 용량을 가진 연속 Dense Associative Memory로 해석될 수 있습니다. -
Partial or noisy queries can retrieve complete stored patterns via energy minimization.
부분적이거나 노이즈가 있는 쿼리는 에너지 최소화를 통해 완전한 저장 패턴을 인출할 수 있습니다. -
In multi-agent systems, DAM provides a principled mechanism for context-dependent knowledge retrieval from partial cues.
멀티에이전트 시스템에서 DAM은 부분 단서로부터 문맥 의존적 지식을 인출하는 원칙적인 메커니즘을 제공합니다.
7. Conclusion / 결론
Dense Associative Memory replaces the quadratic energy of the classical Hopfield network with higher-order or exponential interactions, dramatically increasing storage capacity and sharpening attraction basins. Its continuous-state formulation is equivalent to Transformer attention, offering a unifying energy-based perspective on modern deep learning memory mechanisms.
Dense Associative Memory는 고전 Hopfield 네트워크의 2차 에너지를 고차 또는 지수 상호작용으로 대체하여 저장 용량을 극적으로 증가시키고 흡인 분지를 날카롭게 만듭니다. 연속 상태 공식화는 Transformer Attention과 동치이며, 현대 딥러닝 메모리 메커니즘에 대한 통합적인 에너지 기반 관점을 제공합니다.
References / 참고문헌
- Hopfield, J. J. (1982). Neural networks and physical systems with emergent collective computational abilities. PNAS.
- Krotov, D., & Hopfield, J. J. (2016). Dense Associative Memory for Pattern Recognition. NeurIPS.
- Demircigil, M., et al. (2017). On a Model of Associative Memory with Huge Storage Capacity. Journal of Statistical Physics.
- Ramsauer, H., et al. (2020). Hopfield Networks is All You Need. ICLR 2021.
