Learning Associative Memories with Gradient Descent

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Cabannes, Vivien, Simsek, Berfin, Bietti, Alberto
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866916142050705408
author Cabannes, Vivien
Simsek, Berfin
Bietti, Alberto
author_facet Cabannes, Vivien
Simsek, Berfin
Bietti, Alberto
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2402_18724
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Learning Associative Memories with Gradient Descent
Cabannes, Vivien
Simsek, Berfin
Bietti, Alberto
Machine Learning
Artificial Intelligence
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.
title Learning Associative Memories with Gradient Descent
topic Machine Learning
Artificial Intelligence
url https://arxiv.org/abs/2402.18724