Research map / Architectures and efficiency / Attention and transformers
Do Transformers Grok Succinct Algorithms? Mechanistic Evidence for Counting Circuits
Yizheng Zhao
Nanjing University
Read the paperPlace an idea next to itCheck your own paper ↗
AI-extracted. The measured effects below were read by AI from the paper's full text (no summary yet). Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
This paper tried a common change: Higher weight decay
increase weight decay to 2.0 · LargeCounter · test accuracy Hurt
What 94 accepted papers report for this change
- 55 improved
- 9 no clear effect
- 6 mixed
- 24 hurt
- Theoretical Analysis of Sparse Optimization with Reparameterization, Weight Decay, and Adaptive Learning Rate ICML 2026 · increase weight decay lambda · Synthetic linear regression (10000 dims) · sparsityImproved
- FACT: a first-principles alternative to the Neural Feature Ansatz for how networks learn representations ICLR 2026 · increase weight decay from 1e-4 to 1e-3 on CIFAR-10 · CIFAR-10 (n=50K) · Pearson correlation: 0.896 -> 0.830Hurt
- Ubiquity of Emergent Hebbian Dynamics in Regularized Learning ICML 2026 · increase weight decay from 0 to 5e-3 · SRE (second layer) · Hebbian alignment: -0.10 -> 0.59Improved
See this change in detailMatched by the wording of each paper's own result, read by AI from the full text. Papers report gains more often than failures, so this shows what gets published, not the chance a change works.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| use a 2-layer Transformer (d=64) instead of LSTM/GRU up to d=2048 | LargeCounter n=20 · LargeCounter held-out | sequence accuracy: LSTM-2048 5.8% -> Transformer 100.0% | Improved |
| use Transformer instead of Mamba / Mamba-2 | LargeCounter n=20 · LargeCounter held-out | sequence accuracy: Mamba best 1.1%, Mamba-2 best 0.6% -> 100.0% | Improved |
| scale LSTM hidden size from 64 to 2048 (ablation) | LSTM · LargeCounter (big-endian) | sequence accuracy: 0.0% -> 5.8% | Mixed |
| little-endian instead of big-endian encoding (ablation) | LSTM-2048 · LargeCounter | sequence accuracy: 5.8% -> 15.4% | Improved |
| use stratified carry-chain sampling instead of uniform sampling (ablation) | Transformer-64 · LargeCounter | overall sequence accuracy: 72.4% -> 100.0% | Improved |
| use stratified sampling (ablation) | Transformer-64 · LargeCounter k>=10 | accuracy: 0.3% -> 100.0% | Improved |
| high weight decay (1.0 vs <=0.01) (ablation) | Transformer-64 · LargeCounter | test accuracy: lambda<=0.01 stays in memorization; lambda=1.0 groks around step 15k | Improved |
| increase weight decay to 2.0 (ablation) | Transformer-64 · LargeCounter | test accuracy | Hurt |
| weight decay 0.3 or 0.5 instead of 1.0 (ablation) | Transformer-64 · LargeCounter | accuracy: lambda=0.3: 95.7%; lambda=0.5: 99.2% | Mixed |
| train RNN/SSM with any weight decay (ablation) | RNN, SSM · LargeCounter | grokking | No clear effect |
| test on n=25 with a model trained on n=20 | Transformer-64 · LargeCounter length generalization | accuracy: >99% -> near chance for positions p>=20 | Hurt |
| space-delimited digits instead of standard BPE tokenization | Pythia-160M · multi-digit addition | arithmetic heads emerge | Improved |
Open problems in Transformer expressivity and learnability
Do theorems about transformer expressivity and learning still hold for deep, softmax, trained models?
- Experiments use small models and synthetic tasks only. · 16 papers state it
- Theory covers one layer, linear attention or fixed matrices, not full transformers. · 12 papers state it
- Theorems and constructions are not shown to match trained transformers. · 6 papers state it
Closest papers by meaning
- The Expressive Power of Transformers with Chain of Thought (ICLR 2024 · similarity 0.89)
- Counting in Small Transformers: The Delicate Interplay between Attention and Feed-Forward Layers (ICML 2025 · similarity 0.88)
- Algorithmic Capabilities of Random Transformers (NeurIPS 2024 · similarity 0.88)
- Chain of Thought Empowers Transformers to Solve Inherently Serial Problems (ICLR 2024 · similarity 0.88)
- Grokking of Implicit Reasoning in Transformers: A Mechanistic Journey to the Edge of Generalization (NeurIPS 2024 · similarity 0.88)
- Learning Linear Attention in Polynomial Time (NeurIPS 2025 · similarity 0.88)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.