Saved in:
Bibliographic Details
Main Author: Musat, Tiberiu
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2408.09414
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866913565348200448
author Musat, Tiberiu
author_facet Musat, Tiberiu
contents Recent studies have revealed that neural networks learn interpretable algorithms for many simple problems. However, little is known about how these algorithms emerge during training. In this article, I study the training dynamics of a small neural network with 2-dimensional embeddings on the problem of modular addition. I observe that embedding vectors tend to organize into two types of structures: grids and circles. I study these structures and explain their emergence as a result of two simple tendencies exhibited by pairs of embeddings: clustering and alignment. I propose explicit formulae for these tendencies as interaction forces between different pairs of embeddings. To show that my formulae can fully account for the emergence of these structures, I construct an equivalent particle simulation where I show that identical structures emerge. I discuss the role of weight decay in my setup and reveal a new mechanism that links regularization and training dynamics. To support my findings, I also release an interactive demo available at https://modular-addition.vercel.app/.
format Preprint
id arxiv_https___arxiv_org_abs_2408_09414
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Clustering and Alignment: Understanding the Training Dynamics in Modular Addition
Musat, Tiberiu
Machine Learning
Recent studies have revealed that neural networks learn interpretable algorithms for many simple problems. However, little is known about how these algorithms emerge during training. In this article, I study the training dynamics of a small neural network with 2-dimensional embeddings on the problem of modular addition. I observe that embedding vectors tend to organize into two types of structures: grids and circles. I study these structures and explain their emergence as a result of two simple tendencies exhibited by pairs of embeddings: clustering and alignment. I propose explicit formulae for these tendencies as interaction forces between different pairs of embeddings. To show that my formulae can fully account for the emergence of these structures, I construct an equivalent particle simulation where I show that identical structures emerge. I discuss the role of weight decay in my setup and reveal a new mechanism that links regularization and training dynamics. To support my findings, I also release an interactive demo available at https://modular-addition.vercel.app/.
title Clustering and Alignment: Understanding the Training Dynamics in Modular Addition
topic Machine Learning
url https://arxiv.org/abs/2408.09414