Grokking Modular Polynomials

Darshil Doshi, Tianyu He, Aritra Das, Andrey Gromov
6/5/2024
cs.LGcond-mat.dis-nnhep-th

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

Neural networks readily learn a subset of the modular arithmetic tasks, while failing to generalize on the rest. This limitation remains unmoved by the choice of architecture and training strategies. On the other hand, an analytical solution for the weights of Multi-layer Perceptron (MLP) networks that generalize on the modular addition task is known in the literature. In this work, we (i) extend the class of analytical solutions to include modular multiplication as well as modular addition with many terms. Additionally, we show that real networks trained on these datasets learn similar solutions upon generalization (grokking). (ii) We combine these "expert" solutions to construct networks that generalize on arbitrary modular polynomials. (iii) We hypothesize a classification of modular polynomials into learnable and non-learnable via neural networks training; and provide experimental evidence supporting our claims.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Cite this paper

@article{doshi2024grokking,
  title  = {Grokking Modular Polynomials},
  author = {Darshil Doshi and Tianyu He and Aritra Das and Andrey Gromov},
  year   = {2024},
  eprint = {2406.03495},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2406.03495v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2406.03495.svg)](https://codeofpaper.com/paper/2406.03495)

Discussion