<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.2 20190208//EN" "https://jats.nlm.nih.gov/publishing/1.2/JATS-journalpublishing1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" article-type="brief-report" dtd-version="1.2" xml:lang="en">
<front>
<journal-meta>
<journal-id journal-id-type="publisher-id">IJNNAI</journal-id>
<journal-title-group><journal-title>International Journal of Neural Networks and Artificial Intelligence</journal-title></journal-title-group>
<publisher><publisher-name>Thomson &amp; Ryberg Publications</publisher-name></publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="doi">10.62715/ijnnai.2026.v1.i1.pp21-24</article-id>
<article-id pub-id-type="publisher-id">8b6ff4224e</article-id>
<article-categories><subj-group subj-group-type="heading"><subject>Short Communication</subject></subj-group></article-categories>
<title-group><article-title>Observations on Grokking Behaviour in Small Transformers Trained on Modular Arithmetic</article-title></title-group>
<contrib-group>
<contrib contrib-type="author" corresp="yes"><name><surname>Espinoza</surname><given-names>Julien</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref><xref ref-type="corresp" rid="cor1">*</xref></contrib>
<contrib contrib-type="author"><name><surname>Lee</surname><given-names>Yousef</given-names></name><xref ref-type="aff" rid="aff2"><sup>2</sup></xref></contrib>
<contrib contrib-type="author"><name><surname>Tulegenov</surname><given-names>Mia</given-names></name><xref ref-type="aff" rid="aff3"><sup>3</sup></xref></contrib>
<aff id="aff1"><label>1</label>Department of Electrical Electronics, Han River School of Electrical Electronics, United Arab Emirates</aff>
<aff id="aff2"><label>2</label>Department of Electrical Electronics, Zambezi Research Institute of Electrical Electronics, Jordan</aff>
<aff id="aff3"><label>3</label>Department of Electrical Electronics, Irrawaddy Center for Electrical Electronics, New Zealand</aff>
</contrib-group>
<author-notes><corresp id="cor1">* Correspondence: <email>julien.espinoza@han.edu</email></corresp></author-notes>
<pub-date pub-type="epub" iso-8601-date="2026-09-10"><day>10</day><month>09</month><year>2026</year></pub-date>
<volume>1</volume>
<issue>1</issue>
<fpage>21</fpage>
<lpage>24</lpage>
<history>
<date date-type="received" iso-8601-date="2026-05-25"><day>25</day><month>05</month><year>2026</year></date>
<date date-type="accepted" iso-8601-date="2026-07-18"><day>18</day><month>07</month><year>2026</year></date>
</history>
<permissions><copyright-statement>© 2026 The Author(s)</copyright-statement><copyright-year>2026</copyright-year><license license-type="open-access" xlink:href="https://creativecommons.org/licenses/by/4.0/"><license-p>This is an open access article distributed under the Creative Commons Attribution 4.0 International License (CC BY 4.0).</license-p></license></permissions>
<self-uri xlink:href="https://trpub.org/article.php?id=8b6ff4224e"/>
<abstract><p>Grokking is the name given to a training curve in which a network first fits its training set perfectly while performing at chance on held-out data and then, after many further optimisation steps, generalises almost completely. It was first described in small Transformers trained on modular arithmetic and has since become a standard test case for ideas about generalisation and for mechanistic interpretability. This short communication offers a commentary on the published accounts and reports no experiments of its own. It summarises what the original description established, sets side by side the main explanations that have been proposed, which appeal to weight decay and weight norm, to the slow formation of structured representations, to the relative efficiency of memorising and generalising circuits, and to instabilities of adaptive optimisers, and notes where these accounts agree. It then draws out several practical observations for researchers who wish to reproduce or extend the effect, concerning which settings the delay is sensitive to, which quantities are worth tracking besides loss and accuracy, and how training curves should be plotted. The note closes by considering how far conclusions from a one-layer model on a toy task can be carried to networks of practical size, and argues that the main lesson is methodological: flat loss curves can conceal steady internal change.</p></abstract>
<kwd-group kwd-group-type="author">
<kwd>Grokking</kwd>
<kwd>Modular arithmetic</kwd>
<kwd>Transformers</kwd>
<kwd>Generalisation</kwd>
<kwd>Weight decay</kwd>
<kwd>Mechanistic interpretability</kwd>
</kwd-group>
</article-meta>
</front>
<body>
<sec id="sec1"><title>1. Introduction</title>
<p>Classical learning theory leads one to expect that a model which has fitted its training data exactly and fails on new data has overfitted, and that further training will not help. Deep networks have made that expectation unreliable more than once. They can fit randomly labelled data (Zhang et al., 2017), and their test error can fall, rise and fall again as model size or training time increases, the pattern known as double descent (Belkin et al., 2019; Nakkiran et al., 2020). Grokking is a further and especially stark departure from the textbook picture.</p>
<p>The term was introduced by Power et al. (2022), who trained small Transformers on tables of binary operations such as addition and division modulo a prime, holding out part of each table for validation. This note comments on that report and on the explanations that followed. It presents no new experimental results; its purpose is to gather what the published work agrees on and to state some practical points that a reader setting up such experiments may find useful.</p>
</sec>
<sec id="sec2"><title>2. The Phenomenon as Reported</title>
<p>In the original description the network reaches perfect training accuracy early, while validation accuracy stays near chance. Training continues with no visible change in either curve, and then, after a number of steps that can exceed the time to fit the training set by orders of magnitude, validation accuracy climbs to nearly perfect. Two regularities were reported alongside. The smaller the fraction of the table used for training, the longer the delay, until below some fraction generalisation does not occur within the budget. And among the interventions tried, weight decay was the most effective at shortening the delay (Power et al., 2022).</p>
<p>The apparent suddenness has been qualified by later work. Nanda et al. (2023) reverse-engineered a one-layer Transformer trained on modular addition and found that it computes the answer with discrete Fourier components and trigonometric identities, in effect turning addition into rotation around a circle. With that mechanism identified they defined progress measures that track it directly, and these change smoothly through the plateau. They describe three phases after the initial fit, which Figure 1 places in order: memorisation, the gradual formation of the generalising circuit, and a cleanup phase in which weight decay removes the memorising components.</p>
<fig id="fig1"><label>Figure 1</label><caption><p>Sequence of training phases described in published accounts of grokking on modular arithmetic</p></caption><graphic xlink:href="IJNNAI_V1I1_2026_04_Figure1.png" mimetype="image" mime-subtype="png"/></fig>
</sec>
<sec id="sec3"><title>3. Explanations on Offer</title>
<p>Several accounts of the delay have been published, and they are more complementary than they first appear. Table 1 lists them with the mechanism each emphasises and the prediction that distinguishes it.</p>
<table-wrap id="tbl1"><label>Table 1</label><caption><p>Published accounts of delayed generalisation and what each emphasises</p></caption><table frame="hsides" rules="groups"><thead><tr><th>Account</th><th>Mechanism emphasised</th><th>Distinctive prediction</th></tr></thead><tbody><tr><td>Representation learning (Liu et al., 2022)</td><td>Generalisation waits for structured embeddings to form</td><td>Phase diagram with a narrow favourable region of hyperparameters</td></tr><tr><td>Weight norm (Liu et al., 2023)</td><td>Train and test losses favour different weight norms</td><td>Delay shrinks or grows with initialisation scale</td></tr><tr><td>Progress measures (Nanda et al., 2023)</td><td>Fourier circuit grows, then memorisation is cleaned up</td><td>Hidden measures move smoothly during the plateau</td></tr><tr><td>Circuit efficiency (Varma et al., 2023)</td><td>Generalising circuit gives larger logits per unit of norm</td><td>A critical dataset size; reversal if data are reduced</td></tr><tr><td>Slingshot (Thilak et al., 2022)</td><td>Cyclic instability of adaptive optimisers without weight decay</td><td>Generalisation coincides with spikes in last-layer norm</td></tr></tbody></table></table-wrap>
<p>Liu et al. (2022) treat the problem as one of representation learning and map out regions of hyperparameter space in which a network generalises promptly, generalises late, only memorises, or fails to train. In a later paper the same group attribute the delay to a mismatch between the weight norms at which training loss and test loss are low, and show that the effect can be induced on tasks beyond arithmetic by starting from large weights (Liu et al., 2023). Varma et al. (2023) argue that the network holds two circuits, one that memorises and one that generalises, and that weight decay favours whichever produces the required outputs at lower parameter norm. Since memorising more examples costs more norm and generalising does not, there is a dataset size above which the generalising circuit wins.</p>
<p>Thilak et al. (2022) report the effect without explicit weight decay and connect it to a recurring instability of adaptive optimisers. A related line of theory shows that gradient descent on separable data keeps moving towards a large-margin solution long after training error is zero, and does so slowly (Soudry et al., 2018). What these accounts share is the view that a simpler solution is preferred, by explicit or implicit regularisation, and takes much longer to reach than the memorising one.</p>
</sec>
<sec id="sec4"><title>4. Observations for Reproducing the Effect</title>
<p>Four practical points follow from reading these papers together. The first is that the delay is a property of a configuration and not of the task alone. Training fraction, the strength of weight decay, the scale of initialisation and the choice of optimiser each move the onset of generalisation, and a small change can turn a long delay into none or into a run that never generalises. Weight decay should be specified exactly, including whether it is decoupled from the adaptive update as in AdamW (Loshchilov and Hutter, 2019), because the two forms regularise differently.</p>
<p>The second point is that loss and accuracy are the least informative quantities to record. Total weight norm, the norm of individual layers, and where a mechanism is known, measures tied to it, reveal movement during the plateau that the headline curves hide. The third is a matter of presentation: because the delay spans orders of magnitude, curves should be drawn on a logarithmic step axis, and a linear axis exaggerates the abruptness of the transition. The fourth is that several seeds are needed before any statement about timing is made, since the step at which generalisation appears varies between runs with identical settings.</p>
</sec>
<sec id="sec5"><title>5. What Small Models Can and Cannot Show</title>
<p>Modular arithmetic is attractive because the full input space is small, the correct algorithm is known, and a one-layer network can be understood completely. The same features limit what can be inferred. The task has an exact, compact solution, and natural data rarely do; the data are free of label noise; and the networks are far smaller than those in use. Barak et al. (2022) found a comparable pattern of hidden progress when networks learn sparse parities, which suggests the behaviour is not peculiar to one task, but that is still an algorithmic problem.</p>
<p>It would therefore be unsafe to conclude that large models trained on language or images will generalise if only they are trained long enough. The better-supported lesson is narrower. A flat validation curve does not prove that nothing is changing inside the network, and early stopping on such a curve can end training before a slower, more general solution has formed.</p>
</sec>
<sec id="sec6"><title>6. Conclusion</title>
<p>Grokking on modular arithmetic is now among the best-understood training phenomena in deep learning, largely because the task is small enough to be taken apart. The published explanations converge on a competition between a quick memorising solution and a slower, more economical generalising one, with regularisation deciding the outcome. For those who study it, the configuration matters as much as the task, internal measures matter more than accuracy, and caution is warranted in carrying conclusions to larger systems.</p>
</sec>
<sec id="sec7"><title>Conflict of interest</title>
<p>To be declared by the author(s) before publication.</p>
</sec>
<sec id="sec8"><title>Funding</title>
<p>To be declared by the author(s) before publication.</p>
</sec>
</body>
<back>
<ref-list><title>References</title>
<ref id="ref1"><label>1</label><mixed-citation publication-type="other"><person-group person-group-type="author"><string-name>Barak, B., Edelman, B.L., Goel, S., Kakade, S., Malach, E. and Zhang, C.</string-name></person-group> (<year>2022</year>). <article-title>Hidden progress in deep learning: SGD learns parities near the computational limit</article-title>. <source>Advances in Neural Information Processing Systems</source>, <fpage>35</fpage></mixed-citation></ref>
<ref id="ref2"><label>2</label><mixed-citation publication-type="other"><person-group person-group-type="author"><string-name>Belkin, M., Hsu, D., Ma, S. and Mandal, S.</string-name></person-group> (<year>2019</year>). <article-title>Reconciling modern machine-learning practice and the classical bias-variance trade-off</article-title>. <source>Proceedings of the National Academy of Sciences</source>, <volume>116(32)</volume>, <fpage>15849-15854</fpage> <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1073/pnas.1903070116">https://doi.org/10.1073/pnas.1903070116</ext-link></mixed-citation></ref>
<ref id="ref3"><label>3</label><mixed-citation publication-type="other"><person-group person-group-type="author"><string-name>Liu, Z., Kitouni, O., Nolte, N., Michaud, E.J., Tegmark, M. and Williams, M.</string-name></person-group> (<year>2022</year>). <article-title>Towards understanding grokking: An effective theory of representation learning</article-title>. <source>Advances in Neural Information Processing Systems</source>, <fpage>35</fpage></mixed-citation></ref>
<ref id="ref4"><label>4</label><mixed-citation publication-type="other"><person-group person-group-type="author"><string-name>Liu, Z., Michaud, E.J. and Tegmark, M.</string-name></person-group> (<year>2023</year>). <article-title>Omnigrok: Grokking beyond algorithmic data</article-title>. <source>Proceedings of the International Conference on Learning Representations</source></mixed-citation></ref>
<ref id="ref5"><label>5</label><mixed-citation publication-type="other"><person-group person-group-type="author"><string-name>Loshchilov, I. and Hutter, F.</string-name></person-group> (<year>2019</year>). <article-title>Decoupled weight decay regularization</article-title>. <source>Proceedings of the International Conference on Learning Representations</source></mixed-citation></ref>
<ref id="ref6"><label>6</label><mixed-citation publication-type="other"><person-group person-group-type="author"><string-name>Nakkiran, P., Kaplun, G., Bansal, Y., Yang, T., Barak, B. and Sutskever, I.</string-name></person-group> (<year>2020</year>). <article-title>Deep double descent: Where bigger models and more data hurt</article-title>. <source>Proceedings of the International Conference on Learning Representations</source></mixed-citation></ref>
<ref id="ref7"><label>7</label><mixed-citation publication-type="other"><person-group person-group-type="author"><string-name>Nanda, N., Chan, L., Lieberum, T., Smith, J. and Steinhardt, J.</string-name></person-group> (<year>2023</year>). <article-title>Progress measures for grokking via mechanistic interpretability</article-title>. <source>Proceedings of the International Conference on Learning Representations</source></mixed-citation></ref>
<ref id="ref8"><label>8</label><mixed-citation publication-type="other"><person-group person-group-type="author"><string-name>Power, A., Burda, Y., Edwards, H., Babuschkin, I. and Misra, V.</string-name></person-group> (<year>2022</year>). <article-title>Grokking: Generalization beyond overfitting on small algorithmic datasets</article-title>. <source>arXiv preprint arXiv:2201.02177</source></mixed-citation></ref>
<ref id="ref9"><label>9</label><mixed-citation publication-type="other"><person-group person-group-type="author"><string-name>Soudry, D., Hoffer, E., Nacson, M.S., Gunasekar, S. and Srebro, N.</string-name></person-group> (<year>2018</year>). <article-title>The implicit bias of gradient descent on separable data</article-title>. <source>Journal of Machine Learning Research</source>, <volume>19(70)</volume>, <fpage>1-57</fpage></mixed-citation></ref>
<ref id="ref10"><label>10</label><mixed-citation publication-type="other"><person-group person-group-type="author"><string-name>Thilak, V., Littwin, E., Zhai, S., Saremi, O., Paiss, R. and Susskind, J.</string-name></person-group> (<year>2022</year>). <article-title>The slingshot mechanism: An empirical study of adaptive optimizers and the grokking phenomenon</article-title>. <source>arXiv preprint arXiv:2206.04817</source></mixed-citation></ref>
<ref id="ref11"><label>11</label><mixed-citation publication-type="other"><person-group person-group-type="author"><string-name>Varma, V., Shah, R., Kenton, Z., Kramár, J. and Kumar, R.</string-name></person-group> (<year>2023</year>). <article-title>Explaining grokking through circuit efficiency</article-title>. <source>arXiv preprint arXiv:2309.02390</source></mixed-citation></ref>
<ref id="ref12"><label>12</label><mixed-citation publication-type="other"><person-group person-group-type="author"><string-name>Zhang, C., Bengio, S., Hardt, M., Recht, B. and Vinyals, O.</string-name></person-group> (<year>2017</year>). <article-title>Understanding deep learning requires rethinking generalization</article-title>. <source>Proceedings of the International Conference on Learning Representations</source></mixed-citation></ref>
</ref-list>
</back>
</article>