CoolFace
Datasetpublic

YMRohit/icml17708-grok-grokking-repro

To Grok Grokking — independent reproduction This package independently reproduces and audits the five requested claims of To Grok Grokking: Provable Grokking in Ridge Regression by Mingyue Xu, Gal Vardi, and Itay Safran (ICML 2026 paper 17708; OpenReview 5nNNVY8NW4; arXiv 2601.19791, v3). Reproduction date: 2026-07-16. Outcome first The ridge mechanism and its hyperparameter predictions reproduce strongly, but the package does not support every claim without… See the full description on the dataset page: https://huggingface.co/datasets/YMRohit/icml17708-grok-grokking-repro.

sourceHugging Facemitupdated 2mo agoView on Hugging Face
0likes150downloads
Dataset Card

To Grok Grokking — independent reproduction

This package independently reproduces and audits the five requested claims of To Grok Grokking: Provable Grokking in Ridge Regression by Mingyue Xu, Gal Vardi, and Itay Safran (ICML 2026 paper 17708; OpenReview 5nNNVY8NW4; arXiv 2601.19791, v3). Reproduction date: 2026-07-16.

Outcome first

The ridge mechanism and its hyperparameter predictions reproduce strongly, but the package does not support every claim without qualification. Theorem 4.1 states end-to-end bounds for all three zero-teacher phases; a numerical mechanism check gives t1=210, t2=22,469, and a 22,259-step delay. Theorem 4.2 and Theorems 4.4–4.6 have the advertised scope and decomposition, but their printed optimization conditions need repair: a two-eigenvalue empirical operator diverges under a step size that satisfies the stated bound. At the paper's Figure 2 dimensions, 200 exact trajectory evaluations reproduce the predicted t2 ∝ lambda^-1 relation and the sample-size direction. In the nonlinear extension, the selected Figure 4 sweeps reproduce on an L4, while the stated independent nonzero-teacher Figure 3 protocol never reaches the 0.01 test-MSE threshold and is therefore not reproduced under the documented assumptions.

ClaimVerdictWhat the evidence supportsBoundary
1 — Theorem 4.1, zero teacherSupported, conditionalThe source theorem gives training-loss contraction, a delayed population-loss lower bound, and eventual convergence. The exact seeded check has training loss 0.01009 and population loss 0.86069 at t1=210, then population loss crosses 0.01 at t2=22,469.A visible delay needs the stated overparameterized, positive-covariance, small-positive-decay regime. At lambda=0, the null component does not decay. One seeded check illustrates the mechanism; it is not the proof.
2 — Theorem 4.2, realizable teachersPartially supportedThe theorem explicitly extends the end-to-end result to every teacher exactly realizable by the same fixed bounded feature map, subject to its sample, width, decay, and probability conditions. The nonzero-teacher ridge simulation is stable and reproduces the dynamics.“Arbitrary” does not mean noisy, agnostic, or outside the fixed feature span. The printed step-size condition alone is insufficient to ensure general quadratic-GD stability.
3 — Theorems 4.4–4.6, decompositionPartially supportedThe three theorem statements separately address training convergence, poor generalization during overfitting, and eventual generalization.Theorem 4.4 inherits the insufficient step-size bound; Theorem 4.6 states GD convergence without a stability restriction.
4 — Figure 2, ridge hyperparametersSupportedTwenty trials at n=100, m=1000 give a weight-decay log-log slope of -1.0000029 for t2 (R²≈1) and -0.00135 for t1. The grokking interval grows 16.04× across the tested decay range; smaller samples also enlarge it. Both printed Equation (8) checks pass on all 200 trajectory rows.The supplied plot's t1 dashed-line magnitude looks log10-based, whereas printed Equation (8) uses ln; the trends agree and the verifier uses the printed natural logarithm.
5 — Figures 3–4, ReLU extensionPartially supportedFigure 4's selected full-network sweeps reproduce: median t2 is 147,625, 73,875, 37,000, 18,625 as decay doubles from .05 to .4, and median delay falls from 172,754 at n=10 to 100,986 at n=160.All 18 selected Figure 3 random-feature runs have censored t2; interpolation occurs, but final test MSE remains 0.177–0.212 for the decay sweep. The paper omits several protocol details, so this is a protocol-scoped non-reproduction, not evidence of author error.

The machine-readable version of this table is `evidence_manifest.csv`. Explicit permitted and forbidden inferences are in `data/audit_negative_cases.json`.

Primary-source and code-availability audit

  • —Paper: https://arxiv.org/abs/2601.19791
  • —OpenReview: https://openreview.net/forum?id=5nNNVY8NW4
  • —Archived v3 PDF, text, source tarball, and OpenReview metadata: `references/`
  • —Unpacked TeX used for line-level theorem and experiment audits: `ridge_agent/paper_source/`

No official experiment code or raw experiment data were linked from the OpenReview submission or included in the arXiv v3 source archive, and no author repository was found in exact-title/source searches as of 2026-07-16. The implementations in this package were reconstructed independently from the paper's equations, prose, captions, plot axes, and released plot PNGs. They must not be described as the authors' code.

Main findings

Theorem audit: a concrete step-size gap

Theorems 4.2 and 4.4 print eta < 1 / (lambda + lambda_min_plus(Phi^T Phi / n)). That controls the smallest positive eigenvalue, not the largest eigenvalue governing quadratic-GD stability. `scripts/audit_theorems.py` tests a concrete two-eigenvalue empirical operator with eigenvalues 0.99 and 0.01, takes lambda=0.001, and tests eta=3:

  • —the printed upper bound is 90.909, so eta=3 satisfies it;
  • —the update's actual spectral radius is 1.973;
  • —the training loss grows 11,986,302.7× in 12 steps;
  • —the standard largest-eigenvalue stability bound is eta < 2.0182;
  • —a stable control with eta=0.5 reduces training loss to 0.00887× its initial value over the same 12 steps.

Theorem 4.6 also says GD converges to the ridge minimizer without stating a step-size restriction. The bounded-feature, sample-complexity, and statistical parts were not invalidated by this audit; the finding isolates the optimization condition. It also does not imply that the paper's Gaussian simulations with eta=1 diverge—the reproduced trajectories are stable.

Figure 2: paper-scale ridge result

The ridge solver evaluates discrete full-batch GD exactly in the eigensystem; it is mathematically the same integer-step trajectory, not a shortened-training proxy. The T4 campaign used the paper dimensions and selected plot values: m=1000, default n=100, 20 deterministic trials, five decays 2^-19,…,2^-15, and n∈{10,20,40,80,160}. This yields 200 trajectory rows (100 decay + 100 sample-size evaluations) from 120 sampled/eigendecomposed problems. Mean grokking time rises from 74,981 to 1,202,915 across the decay range. For sample size, it is 23,478.45 at n=10 versus 22,237.55 at n=160; the main effect is the predicted rise in training time (t1 mean 17.55 to 355.10). All 200 rows satisfy both literal natural-log Equation (8) bounds.

Figures 3 and 4: corrected post-hoc interpretation

The selected Figure 3 campaign uses the stated random-feature dimensions d=100, m=10,000, the paper initialization and independent unit ReLU teacher, Gaussian inputs, an 8,192-example Gaussian test set, three seeds, and 18 runs spanning three decay and three sample-size values. Every run reaches the training threshold; all 18 generalization crossings are censored. In the decay sweep, final test MSE medians are 0.20670, 0.20705, and 0.20914, far above 0.01.

The selected Figure 4 campaign uses explicit simultaneous full-batch GD for both layers at d=50, m=1000, a zero teacher, a 4,096-example test set, two seeds, and 18 runs. All t2 values are observed at 250-step resolution and both tested directions reproduce.

The raw GPU artifacts contain a pre-fix claim5_verdict.json whose all_tested_trends_supported field counted only assessable trends and could therefore be true while Figure 3 was entirely censored. The frozen CSVs are the source of truth; `outputs/jobs/claim5_posthoc_verdict.json` is the corrected campaign-level verdict and supersedes that boolean.

A matched, one-seed zero-target sensitivity holds all Figure 3 dimensions, test size, initialization, thresholds, and decay values fixed while changing only the teacher target. It gives t2={14,694; 146,943; 1,469,430} for lambda={1e-4; 1e-5; 1e-6}, with t1={664; 703; 707}. This clean 1/lambda response shows that the implementation can express the predicted mechanism and that teacher realizability is material. It is diagnostic only: Figure 3 states an independent nonzero ReLU teacher, so the sensitivity does not establish which hidden protocol the authors used and is not counted as a Figure 3 reproduction.

Compute, hardware, scale, and cost

EvidenceHardwareScaleEnd-to-end timeApprox. costURL
Claim 1 exact mechanismLocal CPUn=100, m=1000, seed 17708; exact spectral trajectory2.2 s$0local output
Claims 2–3 operator auditLocal CPU2D counterexample + stable control, 12 updates each2.0 s$0local output
Ridge smokeLocal CPUfull dimensions/sweeps, two trials1.2 s$0local output
Figure 21× T4 16 GB (t4-small)20 trials; 200 exact trajectory evaluations0.99 min$0.0066Job `6a58e514…`
Figure 3 selected sweeps1× L4 24 GB (l4x1)18 RF runs; d=100, m=10000, 3 seeds0.89 min$0.0119Job `6a58e524…`
Figure 4 selected sweeps1× L4 24 GB (l4x1)18 explicit full-network runs; d=50, m=1000, 2 seeds12.78 min$0.1700Job `6a58e54a…`
Matched zero-target diagnosticLocal CPUFigure 3 dimensions/test size; 3 decay values, 1 seed4.3 s$0local output

Estimated GPU total: $0.1885. GPU durations are the difference between Job creation and Trackio artifact creation and therefore include environment setup and artifact upload. The Figure 2 Job reports Linux 6.12, Python 3.12.12, PyTorch 2.13.0+cu130, and a Tesla T4. Local verified smoke output records WSL2, Python 3.13.11, and PyTorch 2.10.0+cu130. The L4 runs resolved torch and trackio through uv --with; the exact executed source/config hashes and raw results are preserved, but this campaign did not freeze a package lockfile.

Exact commands

Install the two small dependency sets from the repository root:

bash
python -m pip install -r repro_17708/ridge_agent/requirements.txt
python -m pip install -r repro_17708/relu_agent/requirements.txt

Run the local checks and deterministic report build:

bash
python repro_17708/scripts/verify_zero_teacher.py
python repro_17708/scripts/audit_theorems.py
python repro_17708/ridge_agent/test_closed_form.py
python repro_17708/ridge_agent/reproduce_figure2.py \
  --trials 2 --device cpu \
  --output-dir repro_17708/outputs/ridge_smoke_verified \
  --trackio-run-name ridge-local-smoke-verified
python repro_17708/relu_agent/relu_grokking.py \
  --config repro_17708/relu_agent/configs/smoke.json \
  --output-dir repro_17708/outputs/relu_smoke_verified \
  --device cpu --trackio-project icml17708-relu
python repro_17708/relu_agent/relu_grokking.py \
  --config repro_17708/relu_agent/configs/fig3_zero_matched.json \
  --output-dir repro_17708/outputs/fig3_zero_matched \
  --device cpu --trackio-project icml17708-relu-zero-sensitivity
python repro_17708/scripts/build_report_assets.py

After the folder is finalized, log the complete publication bundle (code, configs, raw outputs, manifests, figures, and primary-source archive) as one Trackio artifact:

bash
HF_HOME=/home/tihor/ICML/.hf TRACKIO_LOGBOOK_AUTONOTE=0 \
  python repro_17708/scripts/log_reproduction_bundle.py \
  --project icml17708-reproduction-package
HF_HOME=/home/tihor/ICML/.hf \
HF_TOKEN_PATH=/home/tihor/.cache/huggingface/token \
  trackio sync --project icml17708-reproduction-package \
  --space-id YMRohit/icml17708-grokking-metrics --force

These are the three GPU commands captured by the logbook:

bash
hf jobs uv run --flavor t4-small --timeout 30m --detach \
  --secrets HF_TOKEN \
  --env TRACKIO_SPACE_ID=YMRohit/icml17708-grokking-metrics \
  --label paper=5nNNVY8NW4 --label claim=4 \
  --with torch --with trackio \
  https://huggingface.co/datasets/YMRohit/icml17708-grok-grokking-repro/resolve/main/ridge_agent/reproduce_figure2.py \
  --trials 20 --device cuda --dtype float32 \
  --output-dir outputs/claim4-gpu \
  --trackio-project icml17708-ridge \
  --trackio-run-name ridge-figure2-t4-20seed

hf jobs uv run --flavor l4x1 --timeout 60m --detach \
  --secrets HF_TOKEN \
  --env TRACKIO_SPACE_ID=YMRohit/icml17708-grokking-metrics \
  --label paper=5nNNVY8NW4 --label claim=5-fig3 \
  --with torch --with trackio \
  https://huggingface.co/datasets/YMRohit/icml17708-grok-grokking-repro/resolve/main/relu_agent/relu_grokking.py \
  --config https://huggingface.co/datasets/YMRohit/icml17708-grok-grokking-repro/resolve/main/relu_agent/configs/job_fig3_selected.json \
  --output-dir outputs/claim5-fig3-gpu --device cuda \
  --trackio-project icml17708-relu

hf jobs uv run --flavor l4x1 --timeout 2h --detach \
  --secrets HF_TOKEN \
  --env TRACKIO_SPACE_ID=YMRohit/icml17708-grokking-metrics \
  --label paper=5nNNVY8NW4 --label claim=5-fig4 \
  --with torch --with trackio \
  https://huggingface.co/datasets/YMRohit/icml17708-grok-grokking-repro/resolve/main/relu_agent/relu_grokking.py \
  --config https://huggingface.co/datasets/YMRohit/icml17708-grok-grokking-repro/resolve/main/relu_agent/configs/job_fig4_selected.json \
  --output-dir outputs/claim5-fig4-gpu --device cuda \
  --trackio-project icml17708-relu

The commands above used /resolve/main/, but all three were launched after dataset commit `8b373bfa6dcd08342989fb1cfa3e2a7bcba3fa37` and before any later dataset commit. The exact files downloaded from that immutable revision are under `job_snapshots/revision_8b373bfa/`. For an immutable rerun, replace resolve/main in each URL with resolve/8b373bfa6dcd08342989fb1cfa3e2a7bcba3fa37.

Artifact and provenance map

PathContents / role
`evidence_manifest.csv`One verdict, evidence chain, scale statement, permitted conclusion, and non-conclusion per requested claim.
`data/source_run_manifest.csv`SHA-256 inventory binding authored source, exact Job snapshots/configs, frozen result tables, corrected verdicts, and report figures.
`data/audit_negative_cases.json`Negative findings with explicit inference boundaries.
`outputs/jobs/jobs.json`Job IDs/URLs, exact commands, hardware, durations, price snapshot, costs, artifact digests, dataset revision, and executed-file hashes.
`job_snapshots/revision_8b373bfa/`Exact source and configs executed by all three GPU Jobs.
`scripts/verify_zero_teacher.py` and `outputs/claim1_zero_teacher/`Claim 1 exact spectral check, selected-step data, machine verdict, and figure.
`scripts/audit_theorems.py` and `outputs/theory_audit/`Claims 2–3 operator counterexample, stable control, raw trajectories, verdict, and figure.
`ridge_agent/reproduce_figure2.py` and `outputs/jobs/figure2_t4/`Exact ridge solver; 20-trial raw/aggregate data, verification JSON, and reproduction figure.
`relu_agent/relu_grokking.py`, `relu_agent/configs/`, and `outputs/jobs/`Exact RF evaluator, explicit two-layer GD, resolved configs, frozen CSVs/curves, raw campaign verdicts, and corrected post-hoc verdict.
`outputs/fig3_zero_matched/`One-seed matched zero-target sensitivity with raw curves and resolved config.
`outputs/report_assets/`Deterministically generated claim-status and ReLU-evidence SVGs plus their machine summary.
`scripts/log_reproduction_bundle.py`Final Trackio publication-bundle logger; records file count/bytes, stages a cache-free copy, and logs the complete repro_17708 tree as a versioned dataset artifact.
`references/` and `ridge_agent/paper_source/`Primary-source archive used for the independent reconstruction.
`SUBMISSION_CHECKLIST.md`Release/readback gates; unchecked publication items are intentionally not represented as complete.

Each GPU output directory was downloaded from its Trackio artifact. Artifact version names and manifest digests are recorded in outputs/jobs/jobs.json. The working ReLU script was subsequently patched so censored trends cannot be counted as successes; the unmodified Job source remains in the snapshot, and the corrected interpretation is derived only from the frozen results.csv files.

Public resources

ResourceLink / status
Reproduction datasethttps://huggingface.co/datasets/YMRohit/icml17708-grok-grokking-repro
Trackio metrics Spacehttps://huggingface.co/spaces/YMRohit/icml17708-grokking-metrics
Metrics artifact Buckethttps://huggingface.co/buckets/YMRohit/icml17708-grokking-metrics-bucket
Figure 2 T4 Jobhttps://huggingface.co/jobs/YMRohit/6a58e514b1669a49bf077a66
Figure 3 L4 Jobhttps://huggingface.co/jobs/YMRohit/6a58e524b1669a49bf077a76
Figure 4 L4 Jobhttps://huggingface.co/jobs/YMRohit/6a58e54ab1669a49bf077a7d
Final Trackio logbookhttps://huggingface.co/spaces/YMRohit/icml17708-grokking-logbook (static render; remotely read back after publication)
Hugging Face Collectionhttps://huggingface.co/collections/YMRohit/icml-2026-17708-to-grok-grokking-reproduction-6a58f362de4fc22a535ea5f7

Scope and limitations

  1. 1.The theory assessment is a direct source audit plus executable sanity and counterexample checks; it is not a machine-checked formal proof.
  2. 2.No author code or raw data were available. The ridge setup is well specified, but the ReLU section omits its input distribution, test-set size, random seeds/repeats, and threshold-interpolation rule. We declare Gaussian inputs, held-out sizes, seeds, and evaluation resolution in every config.
  3. 3.Figure 3 and Figure 4 retain the paper dimensions for the tested lambda and sample-size panels but do not rerun every width/initialization panel. Three and two seeds, respectively, are directional evidence rather than exhaustive statistical replication.
  4. 4.Random-feature and ridge trajectories are evaluated analytically at exact integer GD steps after eigendecomposition. Figure 4 uses explicit updates; its test crossing is resolved only to 250 steps.
  5. 5.The Figure 3 negative result is scoped to the stated independent nonzero teacher plus our documented missing-protocol choices. It does not establish what code or hidden settings generated the authors' plot.
  6. 6.The Dataset card's MIT license covers the reproduction code and original package materials. Archived paper/source assets remain the authors' work and retain their original terms.
  7. 7.Two independent local review passes audited the claim evidence and poster; their findings were resolved in the final package. The requested Claude Code Fable 5 review was not run because explicit approval to transmit the evidence to that external service was not received.