CoolFace
Datasetpublic

abidlabs/lm-memorization-repro-results

Reproduction: "How much do language models memorize?" (arXiv:2505.24832) — small scale Reproduction of Morris et al. 2025 at 0.2M–6.9M parameter scale within a ~$7 compute budget. Section 3 (capacity on uniform random data) and a mini Section 4 (FineWeb unintended memorization + MIA). All raw JSONs in results/, figures in analysis/, live dashboards in abidlabs/lm-memorization-repro-trackio. What was run Sec 3: GPT-style transformers trained from scratch on… See the full description on the dataset page: https://huggingface.co/datasets/abidlabs/lm-memorization-repro-results.

sourceHugging Faceupdated 16d agoView on Hugging Face
0likes123downloads
Dataset Card

Reproduction: "How much do language models memorize?" (arXiv:2505.24832) — small scale

Reproduction of Morris et al. 2025 at 0.2M–6.9M parameter scale within a ~$7 compute budget. Section 3 (capacity on uniform random data) and a mini Section 4 (FineWeb unintended memorization + MIA). All raw JSONs in results/, figures in analysis/, live dashboards in abidlabs/lm-memorization-repro-trackio.

What was run

  • —Sec 3: GPT-style transformers trained from scratch on uniform random tokens (vocab 2048, BOS + 64 tokens = exactly 704 bits/sequence), 5000 steps, batch 2048, AdamW lr 1e-3, bf16. Models: L2/d64 (235K), L4/d128 (1.06M), L8/d256 (6.86M). Dataset sizes N = 512 … 131072. Metric: memorized bits = 704·N − NLL2(x|θ̂).
  • —Sec 4 mini: 16M-param model (GPT-2 vocab), FineWeb sample-10BT 64-token windows (exact dedup), reference model trained on 262,144 windows; subset models trained on N ∈ {2048…262144} windows, 4000 steps. Unintended memorization = NLL2(θref) − min(NLL2(θref), NLL2(θ̂)); MIA = best-F1 over thresholds.

Confirmed (paper findings that reproduced)

  1. 1.Memorization is bounded by parameters, not data. For every model, memorized bits grow ~linearly with dataset bits while below capacity, then flatten in absolute terms. Peak absolute memorization: 0.74M bits (235K params), 3.46M bits (1.06M), ≥20M bits (6.86M, still climbing at run end) — scaling with parameters as the paper claims.
  2. 2.Below capacity, ~98% of dataset bits get memorized (train NLL → ~0.15 bits/token).
  3. 3.Test NLL on held-out uniform data degrades far past the 11-bit uniform entropy once the model memorizes — pure memorization has zero generalization on random data.
  4. 4.Sec-4 shape: unintended memorization per window collapses as N grows (409.7 → 2.35 bits/window from N=2048 to N=262144); raw-loss MIA is perfect (F1=1.0) in the fully-memorized regime and degrades once memorization disappears.

Quantitative deviations (expected at this scale)

  • —α lower bound: 3.16 / 3.26 / ≥2.99 bpp (L2/L4/L8) vs paper 3.51–3.65 (bf16). All three are lower bounds (still rising at 5000 steps; paper trained ~200× longer).
  • —Larger models in our budget memorize less per param (L8 < L4 < L2 at convergence-ish N) — consistent with slower convergence at scale, pointing toward the paper's α from below.
  • —At dataset ≫ capacity, memorized bits decline with N (fewer epochs) — our fixed 5000-step budget measures training-budget-limited memorization there, not the paper's converged plateau.

Caveats

  • —MIA best-F1 at large N is inflated by label imbalance (members ≫ non-members); raw-loss F1 is the reliable trend. The delta-score F1 increase with N should be read as an upper bound, not a confirmed effect.
  • —The reference model is undertrained (112M tokens vs Chinchilla-optimal ~330M for 16M params), so mem_U magnitudes are larger than the paper's oracle-based numbers.

Synthetic results

L/dparamsNdataset bitsmemorized bitsbits/paramfrac dataset
2/64235,328512360,448355,6571.5110.99
2/64235,3281,024720,896592,1332.5160.82
2/64235,3282,0481,441,792645,8432.7440.45
2/64235,3284,0962,883,584690,9822.9360.24
2/64235,3288,1925,767,168717,4663.0490.12
2/64235,32816,38411,534,336743,2743.1580.06
2/64235,32832,76823,068,672732,9963.1150.03
2/64235,32865,53646,137,344685,6482.9140.01
2/64235,328131,07292,274,688601,7602.5570.01
4/1281,063,808512360,448355,8370.3340.99
4/1281,063,8081,024720,896710,6320.6680.99
4/1281,063,8082,0481,441,7921,418,7991.3340.98
4/1281,063,8084,0962,883,5842,703,8492.5420.94
4/1281,063,8088,1925,767,1683,244,8103.0500.56
4/1281,063,80816,38411,534,3363,457,4783.2500.30
4/1281,063,80832,76823,068,6723,464,2263.2560.15
4/1281,063,80865,53646,137,3443,169,2802.9790.07
4/1281,063,808131,07292,274,6882,561,6162.4080.03
8/2566,859,520512360,448355,8380.0520.99
8/2566,859,5201,024720,896710,6490.1040.99
8/2566,859,5202,0481,441,7921,419,2240.2070.98
8/2566,859,5204,0962,883,5842,834,1650.4130.98
8/2566,859,5208,1925,767,1685,658,6910.8250.98
8/2566,859,52016,38411,534,33611,289,9461.6460.98
8/2566,859,52032,76823,068,67220,493,9402.9880.89
8/2566,859,52065,53646,137,34419,794,9162.8860.43

Text results (16M-param model, ref trained on 262,144 windows)

Ntrain NLL (bits/window)ref NLLmem_U/windowmem_U totalF1 deltaF1 raw
500794.9815.320.310,1710.6670.838
2,0482.1411.8409.7839,0710.2001.000
8,1923.6411.4407.73,340,1940.5001.000
32,768141.9411.7269.88,840,4030.8001.000
131,072412.4411.312.21,604,7320.9410.942
262,144433.9411.02.4617,3050.9700.970

α lower bounds: {"L2d64": {"nparams": 235328, "alphalowerboundbpp": 3.15845968180582, "peakmemorizedbits": 743274.0, "peakatN": 16384}, "L4d128": {"nparams": 1063808, "alphalowerboundbpp": 3.256439131873421, "peakmemorizedbits": 3464226.0, "peakatN": 32768}, "L8d256": {"nparams": 6859520, "alphalowerboundbpp": 2.9876638234162156, "peakmemorizedbits": 20493939.75, "peakatN": 32768}}