HackerPapers

arXiv:2301.02679cs.LG

Grokking modular arithmetic

Andrey Gromov

Early discovery. Linked by one identifiable commenter. This paper is outside the main ranking; a mention is not an endorsement.

Abstract

We present a simple neural network that can learn modular arithmetic tasks and exhibits a sudden jump in generalization known as ``grokking''. Concretely, we present (i) fully-connected two-layer networks that exhibit grokking on various modular arithmetic tasks under vanilla gradient descent with the MSE loss function in the absence of any regularization; (ii) evidence that grokking modular arithmetic corresponds to learning specific feature maps whose structure is determined by the task; (iii) analytic expressions for the weights -- and thus for the feature maps -- that solve a large class of modular arithmetic tasks; and (iv) evidence that these feature maps are also found by vanilla gradient descent as well as AdamW, thereby establishing complete interpretability of the representations learnt by the network.

arXiv comments
11+5 pages, 10 figures
Journal reference
DOI
Subjects
cs.LGMachine Learning cond-mat.dis-nnDisordered Systems and Neural Networks

On Hacker News

Linked by 1 identifiable commenter in 1 comment across 1 thread, from Jan 2026 to Jan 2026.

Comments linking this paper, per year.

Discussed in comments1 thread

  1. Two Concepts of Intelligence 1 comment
    • > The Turkey was an LLM. It predicted the future based entirely on the distribution of the past. It had no "understanding" of the purpose of the farmer. But we already know that LLMs can do much better than that. See the famous “grokking” paper[1], which demonstrates that with…

      p-e-wView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.