arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2402.18724cs.LGcs.AIstat.ML
收藏

使用梯度下降学习联想记忆

Learning Associative Memories with Gradient Descent

Meta AI;Flatiron Institute(弗拉蒂伦研究所)

Vivien Cabannes, Berfin Simsek, Alberto Bietti

AI总结:

论文将存储 token 嵌入外积的联想记忆模块训练建模为相互作用粒子系统,揭示过参数化下的间隔对数增长、频率不平衡与相关嵌入引发的振荡,以及欠参数化时交叉熵导致的次优记忆,并在小型 Transformer 上验证。

摘要:

本工作聚焦于一个存储 token 嵌入外积的联想记忆模块的训练动态。我们将该问题归约为对一个粒子系统的研究,粒子之间根据数据分布的性质以及嵌入之间的相关性发生相互作用。通过理论与实验,我们给出了若干洞见。在过参数化区域,我们得到了“分类间隔”的对数增长。然而,我们表明,token 频率的不平衡以及由相关嵌入导致的记忆干扰会引发振荡性的瞬态区域。这种振荡在大步长下更加明显,并可能产生良性的损失尖峰,尽管这些学习率会加快动态过程并加速渐近收敛。在欠参数化区域,我们阐明了交叉熵损失如何导致次优的记忆方案。最后,我们在小型 Transformer 模型上评估了所得发现的有效性。

英文摘要:

This work focuses on the training dynamics of one associative memory module storing outer products of token embeddings. We reduce this problem to the study of a system of particles, which interact according to properties of the data distribution and correlations between embeddings. Through theory and experiments, we provide several insights. In overparameterized regimes, we obtain logarithmic growth of the ``classification margins.'' Yet, we show that imbalance in token frequencies and memory interferences due to correlated embeddings lead to oscillatory transitory regimes. The oscillations are more pronounced with large step sizes, which can create benign loss spikes, although these learning rates speed up the dynamics and accelerate the asymptotic convergence. In underparameterized regimes, we illustrate how the cross-entropy loss can lead to suboptimal memorization schemes. Finally, we assess the validity of our findings on small Transformer models.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑