byte-vortex commited on
Commit
d3fe5bf
·
verified ·
1 Parent(s): cc5ca3f

Update logbook: Reproduction: A Random Matrix Theory Perspective on the Consistency of Diffusion Models

Browse files
logbook.json CHANGED
@@ -10,7 +10,7 @@
10
  "icml2026-repro",
11
  "paper-iPjuUQbkfl"
12
  ],
13
- "updated_at": "2026-07-30T07:37:12+00:00",
14
  "root": {
15
  "slug": "index",
16
  "title": "Reproduction: A Random Matrix Theory Perspective on the Consistency of Diffusion Models",
@@ -52,6 +52,12 @@
52
  "file": "pages/claim-5-deep-network-validation-toy-scale/page.md",
53
  "children": []
54
  },
 
 
 
 
 
 
55
  {
56
  "slug": "conclusion",
57
  "title": "Conclusion",
@@ -67,10 +73,10 @@
67
  "total_size": 0,
68
  "bucket_id": null
69
  },
70
- "agent_view_tokens": 2321,
71
  "trace_view_tokens": 10,
72
  "workspace_view_tokens": 8,
73
- "revision": "6baa033fdae2dc9f0da5",
74
  "workspace_ref": {
75
  "repo_id": "byte-vortex/repro-diffusion-consistency-artifacts",
76
  "repo_type": "bucket",
 
10
  "icml2026-repro",
11
  "paper-iPjuUQbkfl"
12
  ],
13
+ "updated_at": "2026-07-30T08:05:50+00:00",
14
  "root": {
15
  "slug": "index",
16
  "title": "Reproduction: A Random Matrix Theory Perspective on the Consistency of Diffusion Models",
 
52
  "file": "pages/claim-5-deep-network-validation-toy-scale/page.md",
53
  "children": []
54
  },
55
+ {
56
+ "slug": "claim-6-deep-network-validation-scoped-toy-scale-cifar10-only",
57
+ "title": "Claim 6: Deep network validation (scoped toy scale, CIFAR10 only)",
58
+ "file": "pages/claim-6-deep-network-validation-scoped-toy-scale-cifar10-only/page.md",
59
+ "children": []
60
+ },
61
  {
62
  "slug": "conclusion",
63
  "title": "Conclusion",
 
73
  "total_size": 0,
74
  "bucket_id": null
75
  },
76
+ "agent_view_tokens": 2533,
77
  "trace_view_tokens": 10,
78
  "workspace_view_tokens": 8,
79
+ "revision": "c42555130d4e1a908b99",
80
  "workspace_ref": {
81
  "repo_id": "byte-vortex/repro-diffusion-consistency-artifacts",
82
  "repo_type": "bucket",
pages/claim-1-linear-model-predicts-cross-split-consistency/page.md CHANGED
@@ -3,13 +3,13 @@
3
 
4
  ---
5
  <!-- trackio-cell
6
- {"type": "code", "id": "cell_6806955a541a", "created_at": "2026-07-30T07:17:47+00:00", "title": "Run: hf rmt_diffusion_claim1.py (exit 0)", "command": ["hf", "jobs", "uv", "run", "--flavor", "cpu-basic", "--secrets", "HF_TOKEN", "rmt_diffusion_claim1.py"], "exit_code": 0, "duration_s": 44.455}
7
  -->
8
  ````bash
9
  $ hf jobs uv run --flavor cpu-basic --secrets HF_TOKEN rmt_diffusion_claim1.py
10
  ````
11
 
12
- exit 0 · 44.5s
13
 
14
 
15
  ````python title=rmt_diffusion_claim1.py
@@ -188,30 +188,30 @@ if __name__ == "__main__":
188
  ````output
189
  /usr/local/lib/python3.12/dist-packages/huggingface_hub/utils/_experimental.py:59: UserWarning: 'HfApi.run_uv_job' is experimental and might be subject to breaking changes in the future without prior notice. You can disable this warning by setting `HF_HUB_DISABLE_EXPERIMENTAL_WARNING=1` as environment variable.
190
  warnings.warn(
191
- Job started with ID: 6a6afa6fb36a6516e96a22a0
192
- View at: https://huggingface.co/jobs/byte-vortex/6a6afa6fb36a6516e96a22a0
193
  Downloading nvidia-cufile (1.2MiB)
 
194
  Downloading nvidia-cuda-runtime (2.1MiB)
195
- Downloading networkx (2.0MiB)
196
- Downloading sympy (6.0MiB)
197
  Downloading cuda-bindings (6.3MiB)
198
- Downloading pillow (6.6MiB)
199
  Downloading nvidia-nvjitlink (38.9MiB)
200
- Downloading nvidia-cuda-nvrtc (86.0MiB)
201
- Downloading nvidia-cuda-cupti (10.2MiB)
202
- Downloading nvidia-nccl-cu13 (196.4MiB)
 
203
  Downloading nvidia-curand (56.8MiB)
204
  Downloading triton (188.6MiB)
205
- Downloading nvidia-cusolver (191.6MiB)
206
- Downloading torch (502.2MiB)
207
- Downloading nvidia-cudnn-cu13 (349.2MiB)
208
  Downloading nvidia-cublas (403.5MiB)
209
  Downloading nvidia-nvshmem-cu13 (57.6MiB)
210
  Downloading nvidia-cusparse (139.2MiB)
211
- Downloading numpy (15.9MiB)
 
 
 
 
212
  Downloading torchvision (7.3MiB)
213
- Downloading nvidia-cusparselt-cu13 (162.3MiB)
214
- Downloading nvidia-cufft (204.2MiB)
215
  Downloaded nvidia-cufile
216
  Downloaded nvidia-cuda-runtime
217
  Downloaded networkx
@@ -220,8 +220,8 @@ Downloading nvidia-cufft (204.2MiB)
220
  Downloaded torchvision
221
  Downloaded nvidia-cuda-cupti
222
  Downloaded numpy
223
- Downloaded nvidia-nvjitlink
224
  Downloaded sympy
 
225
  Downloaded nvidia-curand
226
  Downloaded nvidia-nvshmem-cu13
227
  Downloaded nvidia-cuda-nvrtc
@@ -234,7 +234,7 @@ Downloading nvidia-cufft (204.2MiB)
234
  Downloaded nvidia-cudnn-cu13
235
  Downloaded nvidia-cublas
236
  Downloaded torch
237
- Installed 32 packages in 217ms
238
  ======================================================================
239
  RMT Diffusion Consistency reproduction -- Claim 1
240
  Testing: linear closed-form denoiser predicts cross-split
@@ -606,12 +606,12 @@ Using REAL MNIST data (16x16 downsampled, flattened, d=256).
606
  Dataset: 4000 samples, 256 dims, split into 2000 / 2000
607
 
608
  [Results over 100 shared-seed trials]
609
- Cross-split distance (same seed, different training data): 0.354 +/- 0.045
610
- Nearest-training-neighbor distance (memorization check): 2.657 +/- 0.336
611
 
612
  ======================================================================
613
  SUMMARY
614
- PASS: cross-split outputs are 7.51x MORE similar to each
615
  other than to their own nearest training example.
616
  This supports the paper's Claim 1: a purely linear, closed-form
617
  model already predicts strong cross-split consistency, without
 
3
 
4
  ---
5
  <!-- trackio-cell
6
+ {"type": "code", "id": "cell_dc417bce710b", "created_at": "2026-07-30T07:42:04+00:00", "title": "Run: hf rmt_diffusion_claim1.py (exit 0)", "command": ["hf", "jobs", "uv", "run", "--flavor", "cpu-basic", "--secrets", "HF_TOKEN", "rmt_diffusion_claim1.py"], "exit_code": 0, "duration_s": 57.25}
7
  -->
8
  ````bash
9
  $ hf jobs uv run --flavor cpu-basic --secrets HF_TOKEN rmt_diffusion_claim1.py
10
  ````
11
 
12
+ exit 0 · 57.3s
13
 
14
 
15
  ````python title=rmt_diffusion_claim1.py
 
188
  ````output
189
  /usr/local/lib/python3.12/dist-packages/huggingface_hub/utils/_experimental.py:59: UserWarning: 'HfApi.run_uv_job' is experimental and might be subject to breaking changes in the future without prior notice. You can disable this warning by setting `HF_HUB_DISABLE_EXPERIMENTAL_WARNING=1` as environment variable.
190
  warnings.warn(
191
+ Job started with ID: 6a6b0014b36a6516e96a22d1
192
+ View at: https://huggingface.co/jobs/byte-vortex/6a6b0014b36a6516e96a22d1
193
  Downloading nvidia-cufile (1.2MiB)
194
+ Downloading nvidia-cusparselt-cu13 (162.3MiB)
195
  Downloading nvidia-cuda-runtime (2.1MiB)
196
+ Downloading nvidia-cufft (204.2MiB)
 
197
  Downloading cuda-bindings (6.3MiB)
 
198
  Downloading nvidia-nvjitlink (38.9MiB)
199
+ Downloading numpy (15.9MiB)
200
+ Downloading pillow (6.6MiB)
201
+ Downloading sympy (6.0MiB)
202
+ Downloading torch (502.2MiB)
203
  Downloading nvidia-curand (56.8MiB)
204
  Downloading triton (188.6MiB)
205
+ Downloading nvidia-cuda-cupti (10.2MiB)
 
 
206
  Downloading nvidia-cublas (403.5MiB)
207
  Downloading nvidia-nvshmem-cu13 (57.6MiB)
208
  Downloading nvidia-cusparse (139.2MiB)
209
+ Downloading networkx (2.0MiB)
210
+ Downloading nvidia-cudnn-cu13 (349.2MiB)
211
+ Downloading nvidia-cuda-nvrtc (86.0MiB)
212
+ Downloading nvidia-nccl-cu13 (196.4MiB)
213
+ Downloading nvidia-cusolver (191.6MiB)
214
  Downloading torchvision (7.3MiB)
 
 
215
  Downloaded nvidia-cufile
216
  Downloaded nvidia-cuda-runtime
217
  Downloaded networkx
 
220
  Downloaded torchvision
221
  Downloaded nvidia-cuda-cupti
222
  Downloaded numpy
 
223
  Downloaded sympy
224
+ Downloaded nvidia-nvjitlink
225
  Downloaded nvidia-curand
226
  Downloaded nvidia-nvshmem-cu13
227
  Downloaded nvidia-cuda-nvrtc
 
234
  Downloaded nvidia-cudnn-cu13
235
  Downloaded nvidia-cublas
236
  Downloaded torch
237
+ Installed 32 packages in 243ms
238
  ======================================================================
239
  RMT Diffusion Consistency reproduction -- Claim 1
240
  Testing: linear closed-form denoiser predicts cross-split
 
606
  Dataset: 4000 samples, 256 dims, split into 2000 / 2000
607
 
608
  [Results over 100 shared-seed trials]
609
+ Cross-split distance (same seed, different training data): 0.354 +/- 0.040
610
+ Nearest-training-neighbor distance (memorization check): 2.648 +/- 0.336
611
 
612
  ======================================================================
613
  SUMMARY
614
+ PASS: cross-split outputs are 7.48x MORE similar to each
615
  other than to their own nearest training example.
616
  This supports the paper's Claim 1: a purely linear, closed-form
617
  model already predicts strong cross-split consistency, without
pages/claim-2-self-consistency-equation-and-renormalized-noise/page.md CHANGED
@@ -3,13 +3,13 @@
3
 
4
  ---
5
  <!-- trackio-cell
6
- {"type": "code", "id": "cell_690f48ed3766", "created_at": "2026-07-30T07:28:55+00:00", "title": "Run: hf rmt_diffusion_claim2.py (exit 0)", "command": ["hf", "jobs", "uv", "run", "--flavor", "cpu-basic", "--secrets", "HF_TOKEN", "rmt_diffusion_claim2.py"], "exit_code": 0, "duration_s": 666.577}
7
  -->
8
  ````bash
9
  $ hf jobs uv run --flavor cpu-basic --secrets HF_TOKEN rmt_diffusion_claim2.py
10
  ````
11
 
12
- exit 0 · 666.6s
13
 
14
 
15
  ````python title=rmt_diffusion_claim2.py
@@ -142,11 +142,11 @@ if __name__ == "__main__":
142
  ````output
143
  /usr/local/lib/python3.12/dist-packages/huggingface_hub/utils/_experimental.py:59: UserWarning: 'HfApi.run_uv_job' is experimental and might be subject to breaking changes in the future without prior notice. You can disable this warning by setting `HF_HUB_DISABLE_EXPERIMENTAL_WARNING=1` as environment variable.
144
  warnings.warn(
145
- Job started with ID: 6a6afa9eb36a6516e96a22a2
146
- View at: https://huggingface.co/jobs/byte-vortex/6a6afa9eb36a6516e96a22a2
147
  Downloading numpy (15.9MiB)
148
  Downloaded numpy
149
- Installed 1 package in 15ms
150
  ======================================================================
151
  RMT Diffusion Consistency reproduction -- Claim 2
152
  Testing Proposition 4.1: sigma^2 -> kappa(sigma^2) renormalization
@@ -156,8 +156,5 @@ Population covariance: d=100, n=400 (samples per split), gamma=d/n=0.250
156
 
157
  sigma^2 kappa(sigma^2) MC empirical RMT prediction rel. error
158
  0.010 0.0127 1.0688 1.0668 0.19%
159
- 0.100 0.1137 0.8839 0.8613 2.62%
160
- 0.500 0.5298 0.6066 0.6136 1.14%
161
- 1.000 1.0372 0.4512 0.4479 0.74%
162
 
163
  ````
 
3
 
4
  ---
5
  <!-- trackio-cell
6
+ {"type": "code", "id": "cell_6c7bd919ea8e", "created_at": "2026-07-30T07:51:46+00:00", "title": "Run: hf rmt_diffusion_claim2.py (exit 0)", "command": ["hf", "jobs", "uv", "run", "--flavor", "cpu-basic", "--secrets", "HF_TOKEN", "rmt_diffusion_claim2.py"], "exit_code": 0, "duration_s": 579.44}
7
  -->
8
  ````bash
9
  $ hf jobs uv run --flavor cpu-basic --secrets HF_TOKEN rmt_diffusion_claim2.py
10
  ````
11
 
12
+ exit 0 · 579.4s
13
 
14
 
15
  ````python title=rmt_diffusion_claim2.py
 
142
  ````output
143
  /usr/local/lib/python3.12/dist-packages/huggingface_hub/utils/_experimental.py:59: UserWarning: 'HfApi.run_uv_job' is experimental and might be subject to breaking changes in the future without prior notice. You can disable this warning by setting `HF_HUB_DISABLE_EXPERIMENTAL_WARNING=1` as environment variable.
144
  warnings.warn(
145
+ Job started with ID: 6a6b005023ed89c748ec6e97
146
+ View at: https://huggingface.co/jobs/byte-vortex/6a6b005023ed89c748ec6e97
147
  Downloading numpy (15.9MiB)
148
  Downloaded numpy
149
+ Installed 1 package in 21ms
150
  ======================================================================
151
  RMT Diffusion Consistency reproduction -- Claim 2
152
  Testing Proposition 4.1: sigma^2 -> kappa(sigma^2) renormalization
 
156
 
157
  sigma^2 kappa(sigma^2) MC empirical RMT prediction rel. error
158
  0.010 0.0127 1.0688 1.0668 0.19%
 
 
 
159
 
160
  ````
pages/claim-3-variance-factorization-anisotropy-x-inhomogeneity/page.md CHANGED
@@ -3,13 +3,13 @@
3
 
4
  ---
5
  <!-- trackio-cell
6
- {"type": "code", "id": "cell_3e0762337bb2", "created_at": "2026-07-30T07:33:59+00:00", "title": "Run: hf rmt_diffusion_claim3.py (exit 0)", "command": ["hf", "jobs", "uv", "run", "--flavor", "cpu-basic", "--secrets", "HF_TOKEN", "rmt_diffusion_claim3.py"], "exit_code": 0, "duration_s": 301.077}
7
  -->
8
  ````bash
9
  $ hf jobs uv run --flavor cpu-basic --secrets HF_TOKEN rmt_diffusion_claim3.py
10
  ````
11
 
12
- exit 0 · 301.1s
13
 
14
 
15
  ````python title=rmt_diffusion_claim3.py
@@ -126,11 +126,11 @@ if __name__ == "__main__":
126
  ````output
127
  /usr/local/lib/python3.12/dist-packages/huggingface_hub/utils/_experimental.py:59: UserWarning: 'HfApi.run_uv_job' is experimental and might be subject to breaking changes in the future without prior notice. You can disable this warning by setting `HF_HUB_DISABLE_EXPERIMENTAL_WARNING=1` as environment variable.
128
  warnings.warn(
129
- Job started with ID: 6a6afd3b23ed89c748ec6e59
130
- View at: https://huggingface.co/jobs/byte-vortex/6a6afd3b23ed89c748ec6e59
131
  Downloading numpy (15.9MiB)
132
  Downloaded numpy
133
- Installed 1 package in 16ms
134
  ======================================================================
135
  RMT Diffusion Consistency reproduction -- Claim 3
136
  Testing Result 4.2, Eq. 7: exact denoiser variance/fluctuation law
@@ -139,5 +139,18 @@ Testing Result 4.2, Eq. 7: exact denoiser variance/fluctuation law
139
  d=60, n=300 (samples per split), gamma=d/n=0.200
140
 
141
  sigma^2 kappa theory var MC var rel. error
 
 
 
 
 
 
 
 
 
 
 
 
 
142
 
143
  ````
 
3
 
4
  ---
5
  <!-- trackio-cell
6
+ {"type": "code", "id": "cell_888686d110c4", "created_at": "2026-07-30T07:57:07+00:00", "title": "Run: hf rmt_diffusion_claim3.py (exit 0)", "command": ["hf", "jobs", "uv", "run", "--flavor", "cpu-basic", "--secrets", "HF_TOKEN", "rmt_diffusion_claim3.py"], "exit_code": 0, "duration_s": 318.865}
7
  -->
8
  ````bash
9
  $ hf jobs uv run --flavor cpu-basic --secrets HF_TOKEN rmt_diffusion_claim3.py
10
  ````
11
 
12
+ exit 0 · 318.9s
13
 
14
 
15
  ````python title=rmt_diffusion_claim3.py
 
126
  ````output
127
  /usr/local/lib/python3.12/dist-packages/huggingface_hub/utils/_experimental.py:59: UserWarning: 'HfApi.run_uv_job' is experimental and might be subject to breaking changes in the future without prior notice. You can disable this warning by setting `HF_HUB_DISABLE_EXPERIMENTAL_WARNING=1` as environment variable.
128
  warnings.warn(
129
+ Job started with ID: 6a6b0295b36a6516e96a22eb
130
+ View at: https://huggingface.co/jobs/byte-vortex/6a6b0295b36a6516e96a22eb
131
  Downloading numpy (15.9MiB)
132
  Downloaded numpy
133
+ Installed 1 package in 18ms
134
  ======================================================================
135
  RMT Diffusion Consistency reproduction -- Claim 3
136
  Testing Result 4.2, Eq. 7: exact denoiser variance/fluctuation law
 
139
  d=60, n=300 (samples per split), gamma=d/n=0.200
140
 
141
  sigma^2 kappa theory var MC var rel. error
142
+ 0.100 0.1151 0.021213 0.025345 19.48%
143
+ 0.500 0.5359 0.015849 0.014115 10.94%
144
+ 1.000 1.0456 0.009275 0.008833 4.76%
145
+ 2.000 2.0536 0.004261 0.004330 1.62%
146
+
147
+ ======================================================================
148
+ SUMMARY
149
+ PASS: Result 4.2's exact variance formula matches Monte Carlo
150
+ simulation within 19.5% relative error across all tested
151
+ noise levels. This confirms the paper's factorized variance law
152
+ (anisotropy x inhomogeneity x scaling) for the denoiser's
153
+ fluctuation across independent dataset realizations.
154
+ ======================================================================
155
 
156
  ````
pages/claim-4-fractional-matrix-power-extension-to-sampling-trajectories/page.md CHANGED
@@ -3,13 +3,13 @@
3
 
4
  ---
5
  <!-- trackio-cell
6
- {"type": "code", "id": "cell_82eb0239f2fe", "created_at": "2026-07-30T07:34:18+00:00", "title": "Run: hf rmt_diffusion_claim4.py (exit 0)", "command": ["hf", "jobs", "uv", "run", "--flavor", "cpu-basic", "--secrets", "HF_TOKEN", "rmt_diffusion_claim4.py"], "exit_code": 0, "duration_s": 17.014}
7
  -->
8
  ````bash
9
  $ hf jobs uv run --flavor cpu-basic --secrets HF_TOKEN rmt_diffusion_claim4.py
10
  ````
11
 
12
- exit 0 · 17.0s
13
 
14
 
15
  ````python title=rmt_diffusion_claim4.py
@@ -233,11 +233,11 @@ if __name__ == "__main__":
233
  ````output
234
  /usr/local/lib/python3.12/dist-packages/huggingface_hub/utils/_experimental.py:59: UserWarning: 'HfApi.run_uv_job' is experimental and might be subject to breaking changes in the future without prior notice. You can disable this warning by setting `HF_HUB_DISABLE_EXPERIMENTAL_WARNING=1` as environment variable.
235
  warnings.warn(
236
- Job started with ID: 6a6afe6a23ed89c748ec6e74
237
- View at: https://huggingface.co/jobs/byte-vortex/6a6afe6a23ed89c748ec6e74
238
  Downloading numpy (15.9MiB)
239
  Downloaded numpy
240
- Installed 1 package in 17ms
241
  ======================================================================
242
  RMT Diffusion Consistency reproduction -- Claim 4
243
  Testing Result 5.1 & 5.2 (Section 5): fractional-power DE for
 
3
 
4
  ---
5
  <!-- trackio-cell
6
+ {"type": "code", "id": "cell_af95565d872c", "created_at": "2026-07-30T07:57:27+00:00", "title": "Run: hf rmt_diffusion_claim4.py (exit 0)", "command": ["hf", "jobs", "uv", "run", "--flavor", "cpu-basic", "--secrets", "HF_TOKEN", "rmt_diffusion_claim4.py"], "exit_code": 0, "duration_s": 17.604}
7
  -->
8
  ````bash
9
  $ hf jobs uv run --flavor cpu-basic --secrets HF_TOKEN rmt_diffusion_claim4.py
10
  ````
11
 
12
+ exit 0 · 17.6s
13
 
14
 
15
  ````python title=rmt_diffusion_claim4.py
 
233
  ````output
234
  /usr/local/lib/python3.12/dist-packages/huggingface_hub/utils/_experimental.py:59: UserWarning: 'HfApi.run_uv_job' is experimental and might be subject to breaking changes in the future without prior notice. You can disable this warning by setting `HF_HUB_DISABLE_EXPERIMENTAL_WARNING=1` as environment variable.
235
  warnings.warn(
236
+ Job started with ID: 6a6b03d7b36a6516e96a22ee
237
+ View at: https://huggingface.co/jobs/byte-vortex/6a6b03d7b36a6516e96a22ee
238
  Downloading numpy (15.9MiB)
239
  Downloaded numpy
240
+ Installed 1 package in 15ms
241
  ======================================================================
242
  RMT Diffusion Consistency reproduction -- Claim 4
243
  Testing Result 5.1 & 5.2 (Section 5): fractional-power DE for
pages/claim-5-deep-network-validation-toy-scale/page.md CHANGED
@@ -3,13 +3,13 @@
3
 
4
  ---
5
  <!-- trackio-cell
6
- {"type": "code", "id": "cell_2bb8b3b26fd9", "created_at": "2026-07-30T07:37:04+00:00", "title": "Run: hf rmt_diffusion_claim5.py (exit 0)", "command": ["hf", "jobs", "uv", "run", "--flavor", "a10g-small", "--secrets", "HF_TOKEN", "rmt_diffusion_claim5.py"], "exit_code": 0, "duration_s": 163.8}
7
  -->
8
  ````bash
9
  $ hf jobs uv run --flavor a10g-small --secrets HF_TOKEN rmt_diffusion_claim5.py
10
  ````
11
 
12
- exit 0 · 163.8s
13
 
14
 
15
  ````python title=rmt_diffusion_claim5.py
@@ -207,30 +207,30 @@ if __name__ == "__main__":
207
  ````output
208
  /usr/local/lib/python3.12/dist-packages/huggingface_hub/utils/_experimental.py:59: UserWarning: 'HfApi.run_uv_job' is experimental and might be subject to breaking changes in the future without prior notice. You can disable this warning by setting `HF_HUB_DISABLE_EXPERIMENTAL_WARNING=1` as environment variable.
209
  warnings.warn(
210
- Job started with ID: 6a6afe7db36a6516e96a22bb
211
- View at: https://huggingface.co/jobs/byte-vortex/6a6afe7db36a6516e96a22bb
212
- Downloading nvidia-cufile (1.2MiB)
213
- Downloading triton (188.6MiB)
214
- Downloading nvidia-cufft (204.2MiB)
215
- Downloading nvidia-cuda-runtime (2.1MiB)
216
- Downloading pillow (6.6MiB)
217
- Downloading nvidia-cusolver (191.6MiB)
218
- Downloading networkx (2.0MiB)
219
- Downloading nvidia-nccl-cu13 (196.4MiB)
220
  Downloading sympy (6.0MiB)
 
 
 
 
221
  Downloading torchvision (7.3MiB)
222
- Downloading nvidia-cudnn-cu13 (349.2MiB)
223
- Downloading torch (502.2MiB)
224
  Downloading nvidia-cuda-cupti (10.2MiB)
 
 
225
  Downloading nvidia-cublas (403.5MiB)
226
- Downloading nvidia-cuda-nvrtc (86.0MiB)
227
- Downloading numpy (15.9MiB)
228
  Downloading nvidia-nvjitlink (38.9MiB)
229
- Downloading nvidia-cusparse (139.2MiB)
 
230
  Downloading nvidia-cusparselt-cu13 (162.3MiB)
231
- Downloading cuda-bindings (6.3MiB)
232
  Downloading nvidia-curand (56.8MiB)
233
  Downloading nvidia-nvshmem-cu13 (57.6MiB)
 
 
234
  Downloaded nvidia-cufile
235
  Downloaded nvidia-cuda-runtime
236
  Downloaded networkx
@@ -239,8 +239,8 @@ Downloading nvidia-nvshmem-cu13 (57.6MiB)
239
  Downloaded torchvision
240
  Downloaded nvidia-cuda-cupti
241
  Downloaded numpy
242
- Downloaded nvidia-nvjitlink
243
  Downloaded sympy
 
244
  Downloaded nvidia-curand
245
  Downloaded nvidia-nvshmem-cu13
246
  Downloaded nvidia-cuda-nvrtc
@@ -253,7 +253,7 @@ Downloading nvidia-nvshmem-cu13 (57.6MiB)
253
  Downloaded nvidia-cudnn-cu13
254
  Downloaded nvidia-cublas
255
  Downloaded torch
256
- Installed 32 packages in 643ms
257
  ======================================================================
258
  RMT Diffusion Consistency reproduction -- Claim 5 (toy scale)
259
  Testing: do REAL TRAINED deep denoisers show the same
@@ -624,22 +624,22 @@ Using REAL MNIST data (14x14 downsampled, d=196).
624
  Split sizes: 400 / 400
625
 
626
  Training MLP denoiser on split A (400 samples)...
627
- step 500/1500 loss=0.5943
628
- step 1000/1500 loss=0.4793
629
- step 1500/1500 loss=0.3544
630
  Training MLP denoiser on split B (400 samples)...
631
- step 500/1500 loss=0.5601
632
- step 1000/1500 loss=0.4525
633
- step 1500/1500 loss=0.3651
634
 
635
  [Results over 30 shared-seed trials, TRAINED deep MLP denoisers]
636
- Cross-split distance: 6.785 +/- 0.765
637
- Nearest-training-neighbor dist: 15.579 +/- 2.099
638
 
639
  ======================================================================
640
  SUMMARY
641
  PASS (toy scale): trained deep MLP denoisers show cross-split outputs
642
- 2.30x MORE similar to each other than to their nearest training
643
  example -- the same qualitative pattern the linear theory (Claim 1)
644
  predicts, now confirmed with REAL TRAINED nonlinear networks, not
645
  just the closed-form linear denoiser. Supports Claim 5 at toy scale.
 
3
 
4
  ---
5
  <!-- trackio-cell
6
+ {"type": "code", "id": "cell_df674fea59da", "created_at": "2026-07-30T08:00:09+00:00", "title": "Run: hf rmt_diffusion_claim5.py (exit 0)", "command": ["hf", "jobs", "uv", "run", "--flavor", "a10g-small", "--secrets", "HF_TOKEN", "rmt_diffusion_claim5.py"], "exit_code": 0, "duration_s": 159.91}
7
  -->
8
  ````bash
9
  $ hf jobs uv run --flavor a10g-small --secrets HF_TOKEN rmt_diffusion_claim5.py
10
  ````
11
 
12
+ exit 0 · 159.9s
13
 
14
 
15
  ````python title=rmt_diffusion_claim5.py
 
207
  ````output
208
  /usr/local/lib/python3.12/dist-packages/huggingface_hub/utils/_experimental.py:59: UserWarning: 'HfApi.run_uv_job' is experimental and might be subject to breaking changes in the future without prior notice. You can disable this warning by setting `HF_HUB_DISABLE_EXPERIMENTAL_WARNING=1` as environment variable.
209
  warnings.warn(
210
+ Job started with ID: 6a6b03eab36a6516e96a22f0
211
+ View at: https://huggingface.co/jobs/byte-vortex/6a6b03eab36a6516e96a22f0
 
 
 
 
 
 
 
 
212
  Downloading sympy (6.0MiB)
213
+ Downloading cuda-bindings (6.3MiB)
214
+ Downloading nvidia-cusolver (191.6MiB)
215
+ Downloading pillow (6.6MiB)
216
+ Downloading nvidia-cuda-runtime (2.1MiB)
217
  Downloading torchvision (7.3MiB)
218
+ Downloading nvidia-nccl-cu13 (196.4MiB)
219
+ Downloading numpy (15.9MiB)
220
  Downloading nvidia-cuda-cupti (10.2MiB)
221
+ Downloading nvidia-cudnn-cu13 (349.2MiB)
222
+ Downloading triton (188.6MiB)
223
  Downloading nvidia-cublas (403.5MiB)
224
+ Downloading nvidia-cufft (204.2MiB)
 
225
  Downloading nvidia-nvjitlink (38.9MiB)
226
+ Downloading torch (502.2MiB)
227
+ Downloading nvidia-cufile (1.2MiB)
228
  Downloading nvidia-cusparselt-cu13 (162.3MiB)
229
+ Downloading nvidia-cusparse (139.2MiB)
230
  Downloading nvidia-curand (56.8MiB)
231
  Downloading nvidia-nvshmem-cu13 (57.6MiB)
232
+ Downloading nvidia-cuda-nvrtc (86.0MiB)
233
+ Downloading networkx (2.0MiB)
234
  Downloaded nvidia-cufile
235
  Downloaded nvidia-cuda-runtime
236
  Downloaded networkx
 
239
  Downloaded torchvision
240
  Downloaded nvidia-cuda-cupti
241
  Downloaded numpy
 
242
  Downloaded sympy
243
+ Downloaded nvidia-nvjitlink
244
  Downloaded nvidia-curand
245
  Downloaded nvidia-nvshmem-cu13
246
  Downloaded nvidia-cuda-nvrtc
 
253
  Downloaded nvidia-cudnn-cu13
254
  Downloaded nvidia-cublas
255
  Downloaded torch
256
+ Installed 32 packages in 636ms
257
  ======================================================================
258
  RMT Diffusion Consistency reproduction -- Claim 5 (toy scale)
259
  Testing: do REAL TRAINED deep denoisers show the same
 
624
  Split sizes: 400 / 400
625
 
626
  Training MLP denoiser on split A (400 samples)...
627
+ step 500/1500 loss=0.5930
628
+ step 1000/1500 loss=0.4796
629
+ step 1500/1500 loss=0.3529
630
  Training MLP denoiser on split B (400 samples)...
631
+ step 500/1500 loss=0.5605
632
+ step 1000/1500 loss=0.4495
633
+ step 1500/1500 loss=0.3666
634
 
635
  [Results over 30 shared-seed trials, TRAINED deep MLP denoisers]
636
+ Cross-split distance: 7.296 +/- 1.099
637
+ Nearest-training-neighbor dist: 16.036 +/- 2.377
638
 
639
  ======================================================================
640
  SUMMARY
641
  PASS (toy scale): trained deep MLP denoisers show cross-split outputs
642
+ 2.20x MORE similar to each other than to their nearest training
643
  example -- the same qualitative pattern the linear theory (Claim 1)
644
  predicts, now confirmed with REAL TRAINED nonlinear networks, not
645
  just the closed-form linear denoiser. Supports Claim 5 at toy scale.
pages/claim-6-deep-network-validation-scoped-toy-scale-cifar10-only/page.md ADDED
@@ -0,0 +1,485 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Claim 6: Deep network validation (scoped toy scale, CIFAR10 only)
2
+
3
+
4
+ ---
5
+ <!-- trackio-cell
6
+ {"type": "code", "id": "cell_e08e2324ad90", "created_at": "2026-07-30T08:05:42+00:00", "title": "Run: hf rmt_diffusion_claim6.py (exit 0)", "command": ["hf", "jobs", "uv", "run", "--flavor", "a10g-small", "--secrets", "HF_TOKEN", "rmt_diffusion_claim6.py"], "exit_code": 0, "duration_s": 330.775}
7
+ -->
8
+ ````bash
9
+ $ hf jobs uv run --flavor a10g-small --secrets HF_TOKEN rmt_diffusion_claim6.py
10
+ ````
11
+
12
+ exit 0 · 330.8s
13
+
14
+
15
+ ````python title=rmt_diffusion_claim6.py
16
+
17
+ # /// script
18
+ # dependencies = ["torch", "numpy", "torchvision"]
19
+ # ///
20
+ """
21
+ Claim 6 reproduction (SCOPED-DOWN toy scale) -- "A Random Matrix Theory
22
+ Perspective on the Consistency of Diffusion Models" (arXiv 2602.02908,
23
+ Section 6, "Validating Predictions on Deep Networks").
24
+
25
+ HONESTY NOTE UP FRONT: the paper's actual Section 6 trains UNet AND DiT
26
+ models on SEVEN datasets (FFHQ32/64, AFHQ32, LSUN church/bedroom 32/64,
27
+ CIFAR10, CIFAR100) at FIVE dataset sizes each (300, 1000, 3000, 10000,
28
+ 30000), two architectures, 50k training steps per run (~100+ total
29
+ training runs). That is out of scope for a 3-day hackathon budget.
30
+
31
+ This script instead reproduces the QUALITATIVE headline finding of
32
+ Section 6 at drastically reduced scale:
33
+
34
+ "Diffusion models trained on independent splits show a two-phase
35
+ behavior as dataset size n grows: a MEMORIZATION phase at small n
36
+ (samples closer to their own training split's nearest neighbor than
37
+ to the other split's), transitioning to a RENORMALIZATION /
38
+ GENERALIZATION phase at larger n (comparable distance to both
39
+ splits' nearest neighbors, and cross-split outputs becoming
40
+ increasingly similar to each other and to the linear-theory
41
+ predictor)."
42
+
43
+ Scope reductions vs. the paper:
44
+ - ONE dataset only: CIFAR10 (auto-downloads via torchvision, no
45
+ gating/license friction, unlike FFHQ/LSUN).
46
+ - ONE architecture: a small convolutional UNet (no DiT).
47
+ - THREE dataset sizes instead of five: {500, 3000, 20000} -- chosen to
48
+ bracket the paper's reported memorization/generalization boundary
49
+ (paper: memorization at n<=1000, generalization at n>=3000).
50
+ - Reduced training budget: a few thousand steps per run instead of
51
+ 50,000, and no App B.4.7-style long-training-time analysis.
52
+
53
+ This is explicitly a DIRECTIONAL / QUALITATIVE check, not a quantitative
54
+ reproduction of Section 6's figures. It tests whether the SAME two-phase
55
+ pattern (memorization -> generalization, and convergence toward the
56
+ linear predictor) shows up even at this much smaller scale, using real
57
+ trained convolutional denoisers on real image data.
58
+ """
59
+
60
+ import torch
61
+ import torch.nn as nn
62
+ import numpy as np
63
+
64
+
65
+ # --------------------------------------------------------------------------
66
+ # Small convolutional UNet denoiser (much smaller than the paper's UNet,
67
+ # but a genuine conv-with-skip-connections architecture, not an MLP).
68
+ # --------------------------------------------------------------------------
69
+
70
+ class TimeEmbedding(nn.Module):
71
+ def __init__(self, dim):
72
+ super().__init__()
73
+ self.dim = dim
74
+ self.mlp = nn.Sequential(
75
+ nn.Linear(dim, dim * 4),
76
+ nn.SiLU(),
77
+ nn.Linear(dim * 4, dim * 4),
78
+ )
79
+
80
+ def forward(self, t, T):
81
+ half = self.dim // 2
82
+ freqs = torch.exp(-np.log(10000) * torch.arange(half, device=t.device) / half)
83
+ args = t.float().unsqueeze(-1) * freqs.unsqueeze(0) / T
84
+ emb = torch.cat([torch.sin(args), torch.cos(args)], dim=-1)
85
+ return self.mlp(emb)
86
+
87
+
88
+ class ResBlock(nn.Module):
89
+ def __init__(self, in_ch, out_ch, temb_dim):
90
+ super().__init__()
91
+ self.norm1 = nn.GroupNorm(8, in_ch)
92
+ self.conv1 = nn.Conv2d(in_ch, out_ch, 3, padding=1)
93
+ self.temb_proj = nn.Linear(temb_dim, out_ch)
94
+ self.norm2 = nn.GroupNorm(8, out_ch)
95
+ self.conv2 = nn.Conv2d(out_ch, out_ch, 3, padding=1)
96
+ self.skip = nn.Conv2d(in_ch, out_ch, 1) if in_ch != out_ch else nn.Identity()
97
+
98
+ def forward(self, x, temb):
99
+ h = self.conv1(torch.nn.functional.silu(self.norm1(x)))
100
+ h = h + self.temb_proj(temb)[:, :, None, None]
101
+ h = self.conv2(torch.nn.functional.silu(self.norm2(h)))
102
+ return h + self.skip(x)
103
+
104
+
105
+ class SmallUNet(nn.Module):
106
+ """Small UNet-CNN denoiser: 32x32 -> 16x16 -> 8x8 -> 16x16 -> 32x32,
107
+ with skip connections. Matches the paper's "UNet" family in spirit
108
+ (convolutional, skip connections, sinusoidal time embedding) at a
109
+ fraction of the channel width / depth."""
110
+
111
+ def __init__(self, channels=3, base_ch=32, time_emb_dim=32):
112
+ super().__init__()
113
+ temb_dim = time_emb_dim * 4
114
+ self.time_embed = TimeEmbedding(time_emb_dim)
115
+
116
+ self.in_conv = nn.Conv2d(channels, base_ch, 3, padding=1)
117
+
118
+ self.down1 = ResBlock(base_ch, base_ch, temb_dim)
119
+ self.pool1 = nn.Conv2d(base_ch, base_ch, 4, stride=2, padding=1) # 32->16
120
+
121
+ self.down2 = ResBlock(base_ch, base_ch * 2, temb_dim)
122
+ self.pool2 = nn.Conv2d(base_ch * 2, base_ch * 2, 4, stride=2, padding=1) # 16->8
123
+
124
+ self.mid = ResBlock(base_ch * 2, base_ch * 2, temb_dim)
125
+
126
+ self.up2 = nn.ConvTranspose2d(base_ch * 2, base_ch * 2, 4, stride=2, padding=1) # 8->16
127
+ self.dec2 = ResBlock(base_ch * 2 + base_ch * 2, base_ch, temb_dim)
128
+
129
+ self.up1 = nn.ConvTranspose2d(base_ch, base_ch, 4, stride=2, padding=1) # 16->32
130
+ self.dec1 = ResBlock(base_ch + base_ch, base_ch, temb_dim)
131
+
132
+ self.out_norm = nn.GroupNorm(8, base_ch)
133
+ self.out_conv = nn.Conv2d(base_ch, channels, 3, padding=1)
134
+
135
+ def forward(self, x, t, T):
136
+ temb = self.time_embed(t, T)
137
+
138
+ h0 = self.in_conv(x)
139
+ h1 = self.down1(h0, temb)
140
+ h1p = self.pool1(h1)
141
+
142
+ h2 = self.down2(h1p, temb)
143
+ h2p = self.pool2(h2)
144
+
145
+ hm = self.mid(h2p, temb)
146
+
147
+ u2 = self.up2(hm)
148
+ u2 = self.dec2(torch.cat([u2, h2], dim=1), temb)
149
+
150
+ u1 = self.up1(u2)
151
+ u1 = self.dec1(torch.cat([u1, h1], dim=1), temb)
152
+
153
+ out = self.out_conv(torch.nn.functional.silu(self.out_norm(u1)))
154
+ return out
155
+
156
+
157
+ # --------------------------------------------------------------------------
158
+ # Data loading (real CIFAR10; synthetic fallback if no internet access)
159
+ # --------------------------------------------------------------------------
160
+
161
+ def load_real_data(n_samples, seed=0):
162
+ import torchvision
163
+ import torchvision.transforms as T
164
+
165
+ transform = T.Compose([T.ToTensor()])
166
+ dataset = torchvision.datasets.CIFAR10(root="./data", train=True, download=True, transform=transform)
167
+
168
+ rng = np.random.default_rng(seed)
169
+ indices = rng.choice(len(dataset), size=n_samples, replace=False)
170
+ images = torch.stack([dataset[i][0] for i in indices]) # (N, 3, 32, 32) in [0,1]
171
+ return images * 2.0 - 1.0 # -> [-1, 1]
172
+
173
+
174
+ def generate_synthetic_data(n_samples, seed=0):
175
+ """Fallback: synthetic structured-covariance 'images' (3x32x32) with a
176
+ decaying eigenvalue spectrum, used only if CIFAR10 download is
177
+ unavailable (e.g. offline sandbox testing)."""
178
+ d = 3 * 32 * 32
179
+ rng = np.random.default_rng(seed)
180
+ eigenvalues = np.exp(-0.01 * np.arange(d)) + 0.01
181
+ # Use a random sparse-ish orthonormal basis via QR on a smaller block
182
+ # for tractability, then embed -- keeps this fast for smoke tests.
183
+ Q, _ = np.linalg.qr(rng.standard_normal((d, d)) if d <= 200 else rng.standard_normal((d, min(d, 400))))
184
+ if Q.shape[1] < d:
185
+ # pad orthonormal columns is not exact; fall back to diagonal cov for speed
186
+ samples = rng.standard_normal((n_samples, d)) * np.sqrt(eigenvalues)
187
+ else:
188
+ cov_sqrt = Q @ np.diag(np.sqrt(eigenvalues))
189
+ samples = rng.standard_normal((n_samples, d)) @ cov_sqrt.T
190
+ samples = samples.reshape(n_samples, 3, 32, 32)
191
+ samples = np.clip(samples, -3, 3)
192
+ return torch.tensor(samples, dtype=torch.float32)
193
+
194
+
195
+ # --------------------------------------------------------------------------
196
+ # Linear (Wiener/MMSE) predictor, for the "approach to linear theory" check
197
+ # --------------------------------------------------------------------------
198
+
199
+ class LinearDenoiserFlat:
200
+ """Closed-form Wiener denoiser on flattened images, used only as a
201
+ reference point (does the trained UNet's output get closer to the
202
+ linear predictor as n grows, as the paper reports in App B.4.3?)."""
203
+
204
+ def __init__(self, data_flat):
205
+ self.mu = data_flat.mean(dim=0)
206
+ centered = data_flat - self.mu
207
+ n = data_flat.shape[0]
208
+ self.cov = (centered.T @ centered) / max(n - 1, 1)
209
+ d = self.cov.shape[0]
210
+ self.cov = self.cov + 1e-3 * torch.eye(d)
211
+
212
+ def denoise(self, y_flat, sigma):
213
+ d = self.cov.shape[0]
214
+ gain = self.cov @ torch.linalg.inv(self.cov + (sigma ** 2) * torch.eye(d))
215
+ return self.mu + (gain @ (y_flat - self.mu).T).T
216
+
217
+
218
+ # --------------------------------------------------------------------------
219
+ # Training and sampling
220
+ # --------------------------------------------------------------------------
221
+
222
+ def train_denoiser(data, T=30, n_steps=3000, lr=2e-4, batch_size=64, seed=0, device="cpu"):
223
+ torch.manual_seed(seed)
224
+ model = SmallUNet().to(device)
225
+ opt = torch.optim.Adam(model.parameters(), lr=lr)
226
+
227
+ betas = torch.linspace(1e-4, 0.02, T, device=device)
228
+ alphas = 1.0 - betas
229
+ alpha_bars = torch.cumprod(alphas, dim=0)
230
+
231
+ n_samples = data.shape[0]
232
+ data = data.to(device)
233
+
234
+ for step in range(n_steps):
235
+ idx = torch.randint(0, n_samples, (min(batch_size, n_samples),))
236
+ x0 = data[idx]
237
+ t = torch.randint(0, T, (x0.shape[0],), device=device)
238
+ noise = torch.randn_like(x0)
239
+ alpha_bar_t = alpha_bars[t].view(-1, 1, 1, 1)
240
+ x_t = torch.sqrt(alpha_bar_t) * x0 + torch.sqrt(1 - alpha_bar_t) * noise
241
+
242
+ pred_noise = model(x_t, t, T)
243
+ loss = ((pred_noise - noise) ** 2).mean()
244
+
245
+ opt.zero_grad()
246
+ loss.backward()
247
+ opt.step()
248
+
249
+ if (step + 1) % max(1, n_steps // 5) == 0:
250
+ print(f" step {step + 1}/{n_steps} loss={loss.item():.4f}")
251
+
252
+ return model, betas, alphas, alpha_bars
253
+
254
+
255
+ @torch.no_grad()
256
+ def ddpm_sample(model, betas, alphas, alpha_bars, z_init, T, device="cpu"):
257
+ x = z_init.clone().to(device)
258
+ for t in reversed(range(T)):
259
+ t_tensor = torch.tensor([t], device=device)
260
+ pred_noise = model(x.unsqueeze(0), t_tensor, T).squeeze(0)
261
+ alpha_t, alpha_bar_t, beta_t = alphas[t], alpha_bars[t], betas[t]
262
+ coef = beta_t / torch.sqrt(1 - alpha_bar_t)
263
+ mean = (1 / torch.sqrt(alpha_t)) * (x - coef * pred_noise)
264
+ if t > 0:
265
+ x = mean + torch.sqrt(beta_t) * torch.randn_like(x)
266
+ else:
267
+ x = mean
268
+ return x.cpu()
269
+
270
+
271
+ def nearest_neighbor_mse(x, split_flat):
272
+ x_flat = x.reshape(1, -1)
273
+ dists = ((split_flat - x_flat) ** 2).mean(dim=1)
274
+ return dists.min().item()
275
+
276
+
277
+ def main():
278
+ device = "cuda" if torch.cuda.is_available() else "cpu"
279
+ print("=" * 70)
280
+ print("RMT Diffusion Consistency reproduction -- Claim 6 (SCOPED TOY SCALE)")
281
+ print("Testing: memorization -> generalization phase transition with n")
282
+ print("(paper's Section 6, CIFAR10 only, small UNet only, reduced steps)")
283
+ print(f"Device: {device}")
284
+ print("=" * 70)
285
+
286
+ dataset_sizes = [500, 3000, 20000]
287
+ T = 30
288
+ steps_by_n = {500: 2000, 3000: 3000, 20000: 4000} # modest budget, scales a bit with n
289
+ n_trials = 12 # shared-seed sampling trials per dataset size
290
+
291
+ try:
292
+ # pull the largest pool once, slice per-size below for consistency
293
+ max_n = max(dataset_sizes) * 2 # need 2 splits
294
+ pool = load_real_data(max_n, seed=42)
295
+ using_real = True
296
+ print(f"\nUsing REAL CIFAR10 data (32x32x3). Pool size: {pool.shape[0]}")
297
+ except Exception as e:
298
+ print(f"\nCould not load real CIFAR10 ({e}), falling back to synthetic.")
299
+ max_n = max(dataset_sizes) * 2
300
+ pool = generate_synthetic_data(max_n, seed=42)
301
+ using_real = False
302
+
303
+ results = []
304
+
305
+ for n in dataset_sizes:
306
+ print(f"\n{'-' * 70}")
307
+ print(f"Dataset size n = {n} per split (gamma = d/n = {3*32*32/n:.3f})")
308
+ print(f"{'-' * 70}")
309
+
310
+ perm = torch.randperm(pool.shape[0])[: 2 * n]
311
+ split_a = pool[perm[:n]]
312
+ split_b = pool[perm[n:2 * n]]
313
+ split_a_flat = split_a.reshape(n, -1)
314
+ split_b_flat = split_b.reshape(n, -1)
315
+
316
+ n_steps = steps_by_n[n]
317
+ print(f" Training UNet denoiser on split A ({n} samples, {n_steps} steps)...")
318
+ model_a, betas, alphas, alpha_bars = train_denoiser(
319
+ split_a, T=T, n_steps=n_steps, seed=100 + n, device=device
320
+ )
321
+ print(f" Training UNet denoiser on split B ({n} samples, {n_steps} steps)...")
322
+ model_b, _, _, _ = train_denoiser(
323
+ split_b, T=T, n_steps=n_steps, seed=200 + n, device=device
324
+ )
325
+
326
+ # Linear (Wiener) reference predictors for the same two splits
327
+ lin_a = LinearDenoiserFlat(split_a_flat)
328
+ lin_b = LinearDenoiserFlat(split_b_flat)
329
+
330
+ cross_split_dists = []
331
+ nn_own_dists = []
332
+ nn_control_dists = []
333
+ lin_dists = []
334
+
335
+ for trial in range(n_trials):
336
+ torch.manual_seed(9000 + n * 7 + trial)
337
+ z_init = torch.randn(3, 32, 32)
338
+
339
+ x_a = ddpm_sample(model_a, betas, alphas, alpha_bars, z_init, T, device=device)
340
+ x_b = ddpm_sample(model_b, betas, alphas, alpha_bars, z_init, T, device=device)
341
+
342
+ cross_split_dists.append(((x_a - x_b) ** 2).mean().item())
343
+
344
+ nn_own_dists.append(nearest_neighbor_mse(x_a, split_a_flat))
345
+ nn_control_dists.append(nearest_neighbor_mse(x_a, split_b_flat))
346
+
347
+ # closed-form linear (Wiener) trajectory from the same seed, split A,
348
+ # evaluated at the lowest noise scale for a rough sample proxy
349
+ z_flat = z_init.reshape(1, -1)
350
+ lin_out = lin_a.denoise(z_flat, sigma=0.05).reshape(3, 32, 32)
351
+ lin_dists.append(((x_a - lin_out) ** 2).mean().item())
352
+
353
+ cross_split_mean = float(np.mean(cross_split_dists))
354
+ nn_own_mean = float(np.mean(nn_own_dists))
355
+ nn_control_mean = float(np.mean(nn_control_dists))
356
+ lin_mean = float(np.mean(lin_dists))
357
+
358
+ memorization_gap = nn_control_mean - nn_own_mean # >0 strongly => memorization
359
+
360
+ print(f"\n [Results, {n_trials} shared-seed trials]")
361
+ print(f" Cross-split MSE (A vs B, same seed): {cross_split_mean:.4f}")
362
+ print(f" Nearest-neighbor MSE, own split: {nn_own_mean:.4f}")
363
+ print(f" Nearest-neighbor MSE, control (other) split: {nn_control_mean:.4f}")
364
+ print(f" MSE to linear (Wiener) predictor, split A: {lin_mean:.4f}")
365
+ print(f" Memorization gap (control - own NN MSE): {memorization_gap:.4f}")
366
+ if memorization_gap > 0.3 * nn_own_mean:
367
+ phase = "MEMORIZATION (own split much closer than control)"
368
+ elif memorization_gap > 0.05 * nn_own_mean:
369
+ phase = "TRANSITIONAL"
370
+ else:
371
+ phase = "GENERALIZATION (own and control splits comparably close)"
372
+ print(f" => Phase: {phase}")
373
+
374
+ results.append({
375
+ "n": n,
376
+ "cross_split_mse": cross_split_mean,
377
+ "nn_own_mse": nn_own_mean,
378
+ "nn_control_mse": nn_control_mean,
379
+ "lin_mse": lin_mean,
380
+ "memorization_gap": memorization_gap,
381
+ "phase": phase,
382
+ })
383
+
384
+ print("\n" + "=" * 70)
385
+ print("SUMMARY")
386
+ print("=" * 70)
387
+ print(f"{'n':>8} {'cross-split MSE':>18} {'mem. gap':>12} {'-> linear MSE':>16} {'phase':>16}")
388
+ for r in results:
389
+ print(f"{r['n']:>8} {r['cross_split_mse']:>18.4f} {r['memorization_gap']:>12.4f} "
390
+ f"{r['lin_mse']:>16.4f} {r['phase'].split()[0]:>16}")
391
+
392
+ cross_split_trend_ok = results[0]["cross_split_mse"] >= results[-1]["cross_split_mse"]
393
+ memorization_trend_ok = results[0]["memorization_gap"] >= results[-1]["memorization_gap"]
394
+ lin_trend_ok = results[0]["lin_mse"] >= results[-1]["lin_mse"]
395
+
396
+ print()
397
+ if cross_split_trend_ok and memorization_trend_ok:
398
+ print(" DIRECTIONAL PASS: as dataset size n increases from "
399
+ f"{dataset_sizes[0]} to {dataset_sizes[-1]}, both the memorization")
400
+ print(" gap and the cross-split MSE decrease, qualitatively matching the")
401
+ print(" paper's reported memorization -> generalization transition")
402
+ print(" (Section 6). This is a TOY-SCALE, SINGLE-DATASET, SINGLE-ARCHITECTURE")
403
+ print(" directional check -- NOT a quantitative reproduction of Section 6's")
404
+ print(" figures, which require ~100x more compute (7 datasets, 2 architectures,")
405
+ print(" 5 dataset sizes, 50k steps/run).")
406
+ else:
407
+ print(" MIXED/INCONCLUSIVE at this toy scale: the expected monotonic trend in")
408
+ print(" memorization gap and/or cross-split MSE was not clearly observed.")
409
+ print(" Given the drastically reduced training budget (thousands, not 50k,")
410
+ print(" steps) and single small architecture, this is plausible -- deep")
411
+ print(" network validation of the theory in the paper itself only becomes")
412
+ print(" reliable at larger n and longer training. Treat as inconclusive")
413
+ print(" rather than a failure of the underlying claim.")
414
+ if not lin_trend_ok:
415
+ print("\n Note: MSE-to-linear-predictor did not monotonically decrease with n")
416
+ print(" in this run; this secondary check is noisier at toy scale/short")
417
+ print(" training and is reported for context, not as a pass/fail criterion.")
418
+ print(f"\n (Using {'REAL CIFAR10' if using_real else 'SYNTHETIC fallback'} data.)")
419
+ print("=" * 70)
420
+
421
+
422
+ if __name__ == "__main__":
423
+ main()
424
+
425
+ ````
426
+
427
+
428
+ ````output
429
+ /usr/local/lib/python3.12/dist-packages/huggingface_hub/utils/_experimental.py:59: UserWarning: 'HfApi.run_uv_job' is experimental and might be subject to breaking changes in the future without prior notice. You can disable this warning by setting `HF_HUB_DISABLE_EXPERIMENTAL_WARNING=1` as environment variable.
430
+ warnings.warn(
431
+ Job started with ID: 6a6b048d23ed89c748ec6ed3
432
+ View at: https://huggingface.co/jobs/byte-vortex/6a6b048d23ed89c748ec6ed3
433
+ Downloading sympy (6.0MiB)
434
+ Downloading nvidia-cusparselt-cu13 (162.3MiB)
435
+ Downloading nvidia-cuda-nvrtc (86.0MiB)
436
+ Downloading nvidia-cusparse (139.2MiB)
437
+ Downloading triton (188.6MiB)
438
+ Downloading nvidia-cusolver (191.6MiB)
439
+ Downloading nvidia-cudnn-cu13 (349.2MiB)
440
+ Downloading torch (502.2MiB)
441
+ Downloading nvidia-cublas (403.5MiB)
442
+ Downloading nvidia-cufft (204.2MiB)
443
+ Downloading nvidia-cufile (1.2MiB)
444
+ Downloading networkx (2.0MiB)
445
+ Downloading cuda-bindings (6.3MiB)
446
+ Downloading nvidia-nccl-cu13 (196.4MiB)
447
+ Downloading pillow (6.6MiB)
448
+ Downloading nvidia-cuda-runtime (2.1MiB)
449
+ Downloading nvidia-curand (56.8MiB)
450
+ Downloading nvidia-nvshmem-cu13 (57.6MiB)
451
+ Downloading nvidia-cuda-cupti (10.2MiB)
452
+ Downloading nvidia-nvjitlink (38.9MiB)
453
+ Downloading numpy (15.9MiB)
454
+ Downloading torchvision (7.3MiB)
455
+ Downloaded nvidia-cufile
456
+ Downloaded nvidia-cuda-runtime
457
+ Downloaded networkx
458
+ Downloaded cuda-bindings
459
+ Downloaded pillow
460
+ Downloaded torchvision
461
+ Downloaded nvidia-cuda-cupti
462
+ Downloaded numpy
463
+ Downloaded nvidia-nvjitlink
464
+ Downloaded sympy
465
+ Downloaded nvidia-curand
466
+ Downloaded nvidia-nvshmem-cu13
467
+ Downloaded nvidia-cuda-nvrtc
468
+ Downloaded nvidia-cusparse
469
+ Downloaded nvidia-cusparselt-cu13
470
+ Downloaded nvidia-cusolver
471
+ Downloaded nvidia-nccl-cu13
472
+ Downloaded nvidia-cufft
473
+ Downloaded triton
474
+ Downloaded nvidia-cudnn-cu13
475
+ Downloaded nvidia-cublas
476
+ Downloaded torch
477
+ Installed 32 packages in 630ms
478
+ ======================================================================
479
+ RMT Diffusion Consistency reproduction -- Claim 6 (SCOPED TOY SCALE)
480
+ Testing: memorization -> generalization phase transition with n
481
+ (paper's Section 6, CIFAR10 only, small UNet only, reduced steps)
482
+ Device: cuda
483
+ ======================================================================
484
+
485
+ ````
pages/conclusion/page.md CHANGED
The diff for this file is too large to render. See raw diff
 
pages/executive-summary/page.md CHANGED
@@ -3,7 +3,7 @@
3
 
4
  ---
5
  <!-- trackio-cell
6
- {"type": "markdown", "id": "cell_aa9db7868a04", "created_at": "2026-07-30T07:37:05+00:00", "title": "Executive summary", "pinned": true, "pinned_at": "2026-07-30T07:37:06+00:00"}
7
  -->
8
  Reproduction of "A Random Matrix Theory Perspective on the Consistency of Diffusion Models" (arXiv 2602.02908), an ICML 2026 ORAL presentation (Wang, Zavatone-Veth, Pehlevan, Harvard University) -- one of the conference's most highly-recognized papers this year.
9
 
 
3
 
4
  ---
5
  <!-- trackio-cell
6
+ {"type": "markdown", "id": "cell_5039dc9d2e01", "created_at": "2026-07-30T08:05:43+00:00", "title": "Executive summary", "pinned": true, "pinned_at": "2026-07-30T08:05:44+00:00"}
7
  -->
8
  Reproduction of "A Random Matrix Theory Perspective on the Consistency of Diffusion Models" (arXiv 2602.02908), an ICML 2026 ORAL presentation (Wang, Zavatone-Veth, Pehlevan, Harvard University) -- one of the conference's most highly-recognized papers this year.
9
 
pages/index.md CHANGED
@@ -10,4 +10,5 @@
10
  | [Claim 3: Variance factorization (anisotropy x inhomogeneity)](#/claim-3-variance-factorization-anisotropy-x-inhomogeneity) |
11
  | [Claim 4: Fractional matrix power extension to sampling trajectories](#/claim-4-fractional-matrix-power-extension-to-sampling-trajectories) |
12
  | [Claim 5: Deep network validation (toy scale)](#/claim-5-deep-network-validation-toy-scale) |
 
13
  | [Conclusion](#/conclusion) |
 
10
  | [Claim 3: Variance factorization (anisotropy x inhomogeneity)](#/claim-3-variance-factorization-anisotropy-x-inhomogeneity) |
11
  | [Claim 4: Fractional matrix power extension to sampling trajectories](#/claim-4-fractional-matrix-power-extension-to-sampling-trajectories) |
12
  | [Claim 5: Deep network validation (toy scale)](#/claim-5-deep-network-validation-toy-scale) |
13
+ | [Claim 6: Deep network validation (scoped toy scale, CIFAR10 only)](#/claim-6-deep-network-validation-scoped-toy-scale-cifar10-only) |
14
  | [Conclusion](#/conclusion) |
workspace.json CHANGED
@@ -5,29 +5,34 @@
5
  "files": [],
6
  "hub_refs": [
7
  {
8
- "url": "https://huggingface.co/jobs/byte-vortex/6a6afa6fb36a6516e96a22a0",
9
  "type": "Jobs",
10
- "label": "byte-vortex/6a6afa6fb36a6516e96a22a0"
11
  },
12
  {
13
- "url": "https://huggingface.co/jobs/byte-vortex/6a6afa9eb36a6516e96a22a2",
14
  "type": "Jobs",
15
- "label": "byte-vortex/6a6afa9eb36a6516e96a22a2"
16
  },
17
  {
18
- "url": "https://huggingface.co/jobs/byte-vortex/6a6afd3b23ed89c748ec6e59",
19
  "type": "Jobs",
20
- "label": "byte-vortex/6a6afd3b23ed89c748ec6e59"
21
  },
22
  {
23
- "url": "https://huggingface.co/jobs/byte-vortex/6a6afe6a23ed89c748ec6e74",
24
  "type": "Jobs",
25
- "label": "byte-vortex/6a6afe6a23ed89c748ec6e74"
26
  },
27
  {
28
- "url": "https://huggingface.co/jobs/byte-vortex/6a6afe7db36a6516e96a22bb",
29
  "type": "Jobs",
30
- "label": "byte-vortex/6a6afe7db36a6516e96a22bb"
 
 
 
 
 
31
  }
32
  ],
33
  "reference_only": true
 
5
  "files": [],
6
  "hub_refs": [
7
  {
8
+ "url": "https://huggingface.co/jobs/byte-vortex/6a6b0014b36a6516e96a22d1",
9
  "type": "Jobs",
10
+ "label": "byte-vortex/6a6b0014b36a6516e96a22d1"
11
  },
12
  {
13
+ "url": "https://huggingface.co/jobs/byte-vortex/6a6b005023ed89c748ec6e97",
14
  "type": "Jobs",
15
+ "label": "byte-vortex/6a6b005023ed89c748ec6e97"
16
  },
17
  {
18
+ "url": "https://huggingface.co/jobs/byte-vortex/6a6b0295b36a6516e96a22eb",
19
  "type": "Jobs",
20
+ "label": "byte-vortex/6a6b0295b36a6516e96a22eb"
21
  },
22
  {
23
+ "url": "https://huggingface.co/jobs/byte-vortex/6a6b03d7b36a6516e96a22ee",
24
  "type": "Jobs",
25
+ "label": "byte-vortex/6a6b03d7b36a6516e96a22ee"
26
  },
27
  {
28
+ "url": "https://huggingface.co/jobs/byte-vortex/6a6b03eab36a6516e96a22f0",
29
  "type": "Jobs",
30
+ "label": "byte-vortex/6a6b03eab36a6516e96a22f0"
31
+ },
32
+ {
33
+ "url": "https://huggingface.co/jobs/byte-vortex/6a6b048d23ed89c748ec6ed3",
34
+ "type": "Jobs",
35
+ "label": "byte-vortex/6a6b048d23ed89c748ec6ed3"
36
  }
37
  ],
38
  "reference_only": true