arXiv:2410.23126stat.MLcs.AI2024-10NeurIPS被引 25

揭示现代霍普菲尔德模型最优记忆容量的理论极限

Provably Optimal Memory Capacity for Modern Hopfield Models: Transformer-Compatible Dense Associative Memories as Spherical Codes

  • 将记忆配置建模为球面码,转化为超球面上点的排列问题
  • 首次给出紧致的容量上界,与已有指数下界匹配
  • 提出亚线性时间算法,提升模型记忆效率与推理性能

我们研究现代霍普菲尔德模型与核化霍普菲尔德模型(KHMs)的最优记忆容量,后者是兼容Transformer的密集关联记忆。通过建立KHMs的记忆配置与信息论中球面码的联系,将记忆问题转化为超球面上点的排列问题。我们证明:当特征空间允许记忆形成最优球面码时,KHMs达到最大容量。这一视角带来三方面突破:(i) 首次获得现代霍普菲尔德模型的紧致渐近容量上界,与文献中已知的指数下界一致;(ii) 提出子线性时间算法$ exttt{U} ext{-} exttt{Hop}$+,可实现容量上限;(iii) 分析了所需特征维度随存储记忆数的缩放规律。实验验证了理论结论,显著提升了KHMs的检索能力与对应Transformer的表示学习效果。

原文摘要 · Abstract (English)

We study the optimal memorization capacity of modern Hopfield models and Kernelized Hopfield Models (KHMs), a transformer-compatible class of Dense Associative Memories. We present a tight analysis by establishing a connection between the memory configuration of KHMs and spherical codes from information theory. Specifically, we treat the stored memory set as a specialized spherical code. This enables us to cast the memorization problem in KHMs into a point arrangement problem on a hypersphere. We show that the optimal capacity of KHMs occurs when the feature space allows memories to form an optimal spherical code. This unique perspective leads to: (i) An analysis of how KHMs achieve optimal memory capacity, and identify corresponding necessary conditions. Importantly, we establish an upper capacity bound that matches the well-known exponential lower bound in the literature. This provides the first tight and optimal asymptotic memory capacity for modern Hopfield models. (ii) A sub-linear time algorithm $\mathtt{U}\text{-}\mathtt{Hop}$+ to reach KHMs' optimal capacity. (iii) An analysis of the scaling behavior of the required feature dimension relative to the number of stored memories. These efforts improve both the retrieval capability of KHMs and the representation learning of corresponding transformers. Experimentally, we provide thorough numerical results to back up theoretical findings.

霍普菲尔德模型记忆容量球面码Transformer

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。