Update logbook: Reproduction: A Random Matrix Theory Perspective on the Consistency of Diffusion Models
Browse files- README.md +2 -2
- index.html +1 -1
- logbook.json +5 -5
- pages/claim-1-linear-model-predicts-cross-split-consistency/page.md +21 -641
- pages/claim-2-self-consistency-equation-and-renormalized-noise/page.md +4 -177
- pages/claim-3-variance-factorization-anisotropy-x-inhomogeneity/page.md +4 -159
- pages/claim-4-fractional-matrix-power-extension-to-sampling-trajectories/page.md +5 -276
- pages/claim-5-deep-network-validation-toy-scale/page.md +26 -673
- pages/claim-6-deep-network-validation-scoped-toy-scale-cifar10-only/page.md +19 -564
- pages/conclusion/page.md +1 -1
- pages/executive-summary/page.md +2 -2
- pages/index.md +1 -1
- workspace.json +12 -42
README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
---
|
| 2 |
-
title: "Reproduction: A Random Matrix Perspective on the Consistency of Diffusion Models"
|
| 3 |
emoji: 🎯
|
| 4 |
colorFrom: yellow
|
| 5 |
colorTo: red
|
|
@@ -14,6 +14,6 @@ tags:
|
|
| 14 |
- arxiv:2602.02908
|
| 15 |
---
|
| 16 |
|
| 17 |
-
# Reproduction: A Random Matrix Perspective on the Consistency of Diffusion Models
|
| 18 |
|
| 19 |
An open experiment logbook, published with [Trackio](https://github.com/gradio-app/trackio).
|
|
|
|
| 1 |
---
|
| 2 |
+
title: "Reproduction: A Random Matrix Theory Perspective on the Consistency of Diffusion Models"
|
| 3 |
emoji: 🎯
|
| 4 |
colorFrom: yellow
|
| 5 |
colorTo: red
|
|
|
|
| 14 |
- arxiv:2602.02908
|
| 15 |
---
|
| 16 |
|
| 17 |
+
# Reproduction: A Random Matrix Theory Perspective on the Consistency of Diffusion Models
|
| 18 |
|
| 19 |
An open experiment logbook, published with [Trackio](https://github.com/gradio-app/trackio).
|
index.html
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
<head>
|
| 4 |
<meta charset="utf-8" />
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
| 6 |
-
<title>Reproduction: A Random Matrix Perspective on the Consistency of Diffusion Models</title>
|
| 7 |
<link rel="stylesheet" href="./logbook.css" />
|
| 8 |
</head>
|
| 9 |
<body>
|
|
|
|
| 3 |
<head>
|
| 4 |
<meta charset="utf-8" />
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
| 6 |
+
<title>Reproduction: A Random Matrix Theory Perspective on the Consistency of Diffusion Models</title>
|
| 7 |
<link rel="stylesheet" href="./logbook.css" />
|
| 8 |
</head>
|
| 9 |
<body>
|
logbook.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"schema_version": 2,
|
| 3 |
-
"title": "Reproduction: A Random Matrix Perspective on the Consistency of Diffusion Models",
|
| 4 |
"emoji": "🎯",
|
| 5 |
"space_id": "byte-vortex/repro-diffusion-consistency",
|
| 6 |
"paper": {
|
|
@@ -10,10 +10,10 @@
|
|
| 10 |
"icml2026-repro",
|
| 11 |
"paper-iPjuUQbkfl"
|
| 12 |
],
|
| 13 |
-
"updated_at": "2026-08-01T19:
|
| 14 |
"root": {
|
| 15 |
"slug": "index",
|
| 16 |
-
"title": "Reproduction: A Random Matrix Perspective on the Consistency of Diffusion Models",
|
| 17 |
"file": "pages/index.md",
|
| 18 |
"children": [
|
| 19 |
{
|
|
@@ -73,8 +73,8 @@
|
|
| 73 |
"total_size": 0,
|
| 74 |
"bucket_id": null
|
| 75 |
},
|
| 76 |
-
"agent_view_tokens":
|
| 77 |
"trace_view_tokens": 10,
|
| 78 |
"workspace_view_tokens": 8,
|
| 79 |
-
"revision": "
|
| 80 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"schema_version": 2,
|
| 3 |
+
"title": "Reproduction: A Random Matrix Theory Perspective on the Consistency of Diffusion Models",
|
| 4 |
"emoji": "🎯",
|
| 5 |
"space_id": "byte-vortex/repro-diffusion-consistency",
|
| 6 |
"paper": {
|
|
|
|
| 10 |
"icml2026-repro",
|
| 11 |
"paper-iPjuUQbkfl"
|
| 12 |
],
|
| 13 |
+
"updated_at": "2026-08-01T19:59:17+00:00",
|
| 14 |
"root": {
|
| 15 |
"slug": "index",
|
| 16 |
+
"title": "Reproduction: A Random Matrix Theory Perspective on the Consistency of Diffusion Models",
|
| 17 |
"file": "pages/index.md",
|
| 18 |
"children": [
|
| 19 |
{
|
|
|
|
| 73 |
"total_size": 0,
|
| 74 |
"bucket_id": null
|
| 75 |
},
|
| 76 |
+
"agent_view_tokens": 3154,
|
| 77 |
"trace_view_tokens": 10,
|
| 78 |
"workspace_view_tokens": 8,
|
| 79 |
+
"revision": "0dd65439b788e3144e52"
|
| 80 |
}
|
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": "
|
| 7 |
-->
|
| 8 |
````bash
|
| 9 |
$ hf jobs uv run --flavor cpu-basic --secrets HF_TOKEN rmt_diffusion_claim1.py
|
| 10 |
````
|
| 11 |
|
| 12 |
-
exit 0 ·
|
| 13 |
|
| 14 |
|
| 15 |
````python title=rmt_diffusion_claim1.py
|
|
@@ -188,649 +188,29 @@ 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:
|
| 192 |
-
View at: https://huggingface.co/jobs/byte-vortex/
|
| 193 |
-
Downloading nvidia-
|
| 194 |
-
Downloading nvidia-cusparselt-cu13 (162.3MiB)
|
| 195 |
-
Downloading nvidia-cusparse (139.2MiB)
|
| 196 |
-
Downloading nvidia-cuda-nvrtc (86.0MiB)
|
| 197 |
-
Downloading nvidia-nvshmem-cu13 (57.6MiB)
|
| 198 |
-
Downloading nvidia-cuda-cupti (10.2MiB)
|
| 199 |
-
Downloading networkx (2.0MiB)
|
| 200 |
-
Downloading nvidia-cufile (1.2MiB)
|
| 201 |
-
Downloading torch (502.2MiB)
|
| 202 |
-
Downloading numpy (15.9MiB)
|
| 203 |
-
Downloading cuda-bindings (6.3MiB)
|
| 204 |
-
Downloading triton (188.6MiB)
|
| 205 |
-
Downloading sympy (6.0MiB)
|
| 206 |
-
Downloading nvidia-cufft (204.2MiB)
|
| 207 |
-
Downloading nvidia-cublas (403.5MiB)
|
| 208 |
-
Downloading nvidia-cuda-runtime (2.1MiB)
|
| 209 |
-
Downloading nvidia-nvjitlink (38.9MiB)
|
| 210 |
-
Downloading nvidia-cudnn-cu13 (349.2MiB)
|
| 211 |
-
Downloading pillow (6.6MiB)
|
| 212 |
-
Downloading nvidia-nccl-cu13 (196.4MiB)
|
| 213 |
-
Downloading nvidia-curand (56.8MiB)
|
| 214 |
-
Downloading torchvision (7.3MiB)
|
| 215 |
-
Downloaded nvidia-cufile
|
| 216 |
-
Downloaded nvidia-cuda-runtime
|
| 217 |
-
Downloaded networkx
|
| 218 |
-
Downloaded cuda-bindings
|
| 219 |
-
Downloaded pillow
|
| 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
|
| 228 |
-
Downloaded nvidia-cusparse
|
| 229 |
-
Downloaded nvidia-cusparselt-cu13
|
| 230 |
-
Downloaded nvidia-cusolver
|
| 231 |
-
Downloaded nvidia-nccl-cu13
|
| 232 |
-
Downloaded nvidia-cufft
|
| 233 |
-
Downloaded triton
|
| 234 |
-
Downloaded nvidia-cudnn-cu13
|
| 235 |
-
Downloaded nvidia-cublas
|
| 236 |
-
Downloaded torch
|
| 237 |
-
Installed 32 packages in 237ms
|
| 238 |
-
======================================================================
|
| 239 |
-
RMT Diffusion Consistency reproduction -- Claim 1
|
| 240 |
-
Testing: linear closed-form denoiser predicts cross-split
|
| 241 |
-
consistency of generated samples from a shared noise seed
|
| 242 |
-
======================================================================
|
| 243 |
-
|
| 244 |
-
0.3%
|
| 245 |
-
0.7%
|
| 246 |
-
1.0%
|
| 247 |
-
1.3%
|
| 248 |
-
1.7%
|
| 249 |
-
2.0%
|
| 250 |
-
2.3%
|
| 251 |
-
2.6%
|
| 252 |
-
3.0%
|
| 253 |
-
3.3%
|
| 254 |
-
3.6%
|
| 255 |
-
4.0%
|
| 256 |
-
4.3%
|
| 257 |
-
4.6%
|
| 258 |
-
5.0%
|
| 259 |
-
5.3%
|
| 260 |
-
5.6%
|
| 261 |
-
6.0%
|
| 262 |
-
6.3%
|
| 263 |
-
6.6%
|
| 264 |
-
6.9%
|
| 265 |
-
7.3%
|
| 266 |
-
7.6%
|
| 267 |
-
7.9%
|
| 268 |
-
8.3%
|
| 269 |
-
8.6%
|
| 270 |
-
8.9%
|
| 271 |
-
9.3%
|
| 272 |
-
9.6%
|
| 273 |
-
9.9%
|
| 274 |
-
10.2%
|
| 275 |
-
10.6%
|
| 276 |
-
10.9%
|
| 277 |
-
11.2%
|
| 278 |
-
11.6%
|
| 279 |
-
11.9%
|
| 280 |
-
12.2%
|
| 281 |
-
12.6%
|
| 282 |
-
12.9%
|
| 283 |
-
13.2%
|
| 284 |
-
13.6%
|
| 285 |
-
13.9%
|
| 286 |
-
14.2%
|
| 287 |
-
14.5%
|
| 288 |
-
14.9%
|
| 289 |
-
15.2%
|
| 290 |
-
15.5%
|
| 291 |
-
15.9%
|
| 292 |
-
16.2%
|
| 293 |
-
16.5%
|
| 294 |
-
16.9%
|
| 295 |
-
17.2%
|
| 296 |
-
17.5%
|
| 297 |
-
17.9%
|
| 298 |
-
18.2%
|
| 299 |
-
18.5%
|
| 300 |
-
18.8%
|
| 301 |
-
19.2%
|
| 302 |
-
19.5%
|
| 303 |
-
19.8%
|
| 304 |
-
20.2%
|
| 305 |
-
20.5%
|
| 306 |
-
20.8%
|
| 307 |
-
21.2%
|
| 308 |
-
21.5%
|
| 309 |
-
21.8%
|
| 310 |
-
22.1%
|
| 311 |
-
22.5%
|
| 312 |
-
22.8%
|
| 313 |
-
23.1%
|
| 314 |
-
23.5%
|
| 315 |
-
23.8%
|
| 316 |
-
24.1%
|
| 317 |
-
24.5%
|
| 318 |
-
24.8%
|
| 319 |
-
25.1%
|
| 320 |
-
25.5%
|
| 321 |
-
25.8%
|
| 322 |
-
26.1%
|
| 323 |
-
26.4%
|
| 324 |
-
26.8%
|
| 325 |
-
27.1%
|
| 326 |
-
27.4%
|
| 327 |
-
27.8%
|
| 328 |
-
28.1%
|
| 329 |
-
28.4%
|
| 330 |
-
28.8%
|
| 331 |
-
29.1%
|
| 332 |
-
29.4%
|
| 333 |
-
29.8%
|
| 334 |
-
30.1%
|
| 335 |
-
30.4%
|
| 336 |
-
30.7%
|
| 337 |
-
31.1%
|
| 338 |
-
31.4%
|
| 339 |
-
31.7%
|
| 340 |
-
32.1%
|
| 341 |
-
32.4%
|
| 342 |
-
32.7%
|
| 343 |
-
33.1%
|
| 344 |
-
33.4%
|
| 345 |
-
33.7%
|
| 346 |
-
34.0%
|
| 347 |
-
34.4%
|
| 348 |
-
34.7%
|
| 349 |
-
35.0%
|
| 350 |
-
35.4%
|
| 351 |
-
35.7%
|
| 352 |
-
36.0%
|
| 353 |
-
36.4%
|
| 354 |
-
36.7%
|
| 355 |
-
37.0%
|
| 356 |
-
37.4%
|
| 357 |
-
37.7%
|
| 358 |
-
38.0%
|
| 359 |
-
38.3%
|
| 360 |
-
38.7%
|
| 361 |
-
39.0%
|
| 362 |
-
39.3%
|
| 363 |
-
39.7%
|
| 364 |
-
40.0%
|
| 365 |
-
40.3%
|
| 366 |
-
40.7%
|
| 367 |
-
41.0%
|
| 368 |
-
41.3%
|
| 369 |
-
41.7%
|
| 370 |
-
42.0%
|
| 371 |
-
42.3%
|
| 372 |
-
42.6%
|
| 373 |
-
43.0%
|
| 374 |
-
43.3%
|
| 375 |
-
43.6%
|
| 376 |
-
44.0%
|
| 377 |
-
44.3%
|
| 378 |
-
44.6%
|
| 379 |
-
45.0%
|
| 380 |
-
45.3%
|
| 381 |
-
45.6%
|
| 382 |
-
45.9%
|
| 383 |
-
46.3%
|
| 384 |
-
46.6%
|
| 385 |
-
46.9%
|
| 386 |
-
47.3%
|
| 387 |
-
47.6%
|
| 388 |
-
47.9%
|
| 389 |
-
48.3%
|
| 390 |
-
48.6%
|
| 391 |
-
48.9%
|
| 392 |
-
49.3%
|
| 393 |
-
49.6%
|
| 394 |
-
49.9%
|
| 395 |
-
50.2%
|
| 396 |
-
50.6%
|
| 397 |
-
50.9%
|
| 398 |
-
51.2%
|
| 399 |
-
51.6%
|
| 400 |
-
51.9%
|
| 401 |
-
52.2%
|
| 402 |
-
52.6%
|
| 403 |
-
52.9%
|
| 404 |
-
53.2%
|
| 405 |
-
53.6%
|
| 406 |
-
53.9%
|
| 407 |
-
54.2%
|
| 408 |
-
54.5%
|
| 409 |
-
54.9%
|
| 410 |
-
55.2%
|
| 411 |
-
55.5%
|
| 412 |
-
55.9%
|
| 413 |
-
56.2%
|
| 414 |
-
56.5%
|
| 415 |
-
56.9%
|
| 416 |
-
57.2%
|
| 417 |
-
57.5%
|
| 418 |
-
57.9%
|
| 419 |
-
58.2%
|
| 420 |
-
58.5%
|
| 421 |
-
58.8%
|
| 422 |
-
59.2%
|
| 423 |
-
59.5%
|
| 424 |
-
59.8%
|
| 425 |
-
60.2%
|
| 426 |
-
60.5%
|
| 427 |
-
60.8%
|
| 428 |
-
61.2%
|
| 429 |
-
61.5%
|
| 430 |
-
61.8%
|
| 431 |
-
62.1%
|
| 432 |
-
62.5%
|
| 433 |
-
62.8%
|
| 434 |
-
63.1%
|
| 435 |
-
63.5%
|
| 436 |
-
63.8%
|
| 437 |
-
64.1%
|
| 438 |
-
64.5%
|
| 439 |
-
64.8%
|
| 440 |
-
65.1%
|
| 441 |
-
65.5%
|
| 442 |
-
65.8%
|
| 443 |
-
66.1%
|
| 444 |
-
66.4%
|
| 445 |
-
66.8%
|
| 446 |
-
67.1%
|
| 447 |
-
67.4%
|
| 448 |
-
67.8%
|
| 449 |
-
68.1%
|
| 450 |
-
68.4%
|
| 451 |
-
68.8%
|
| 452 |
-
69.1%
|
| 453 |
-
69.4%
|
| 454 |
-
69.8%
|
| 455 |
-
70.1%
|
| 456 |
-
70.4%
|
| 457 |
-
70.7%
|
| 458 |
-
71.1%
|
| 459 |
-
71.4%
|
| 460 |
-
71.7%
|
| 461 |
-
72.1%
|
| 462 |
-
72.4%
|
| 463 |
-
72.7%
|
| 464 |
-
73.1%
|
| 465 |
-
73.4%
|
| 466 |
-
73.7%
|
| 467 |
-
74.0%
|
| 468 |
-
74.4%
|
| 469 |
-
74.7%
|
| 470 |
-
75.0%
|
| 471 |
-
75.4%
|
| 472 |
-
75.7%
|
| 473 |
-
76.0%
|
| 474 |
-
76.4%
|
| 475 |
-
76.7%
|
| 476 |
-
77.0%
|
| 477 |
-
77.4%
|
| 478 |
-
77.7%
|
| 479 |
-
78.0%
|
| 480 |
-
78.3%
|
| 481 |
-
78.7%
|
| 482 |
-
79.0%
|
| 483 |
-
79.3%
|
| 484 |
-
79.7%
|
| 485 |
-
80.0%
|
| 486 |
-
80.3%
|
| 487 |
-
80.7%
|
| 488 |
-
81.0%
|
| 489 |
-
81.3%
|
| 490 |
-
81.7%
|
| 491 |
-
82.0%
|
| 492 |
-
82.3%
|
| 493 |
-
82.6%
|
| 494 |
-
83.0%
|
| 495 |
-
83.3%
|
| 496 |
-
83.6%
|
| 497 |
-
84.0%
|
| 498 |
-
84.3%
|
| 499 |
-
84.6%
|
| 500 |
-
85.0%
|
| 501 |
-
85.3%
|
| 502 |
-
85.6%
|
| 503 |
-
85.9%
|
| 504 |
-
86.3%
|
| 505 |
-
86.6%
|
| 506 |
-
86.9%
|
| 507 |
-
87.3%
|
| 508 |
-
87.6%
|
| 509 |
-
87.9%
|
| 510 |
-
88.3%
|
| 511 |
-
88.6%
|
| 512 |
-
88.9%
|
| 513 |
-
89.3%
|
| 514 |
-
89.6%
|
| 515 |
-
89.9%
|
| 516 |
-
90.2%
|
| 517 |
-
90.6%
|
| 518 |
-
90.9%
|
| 519 |
-
91.2%
|
| 520 |
-
91.6%
|
| 521 |
-
91.9%
|
| 522 |
-
92.2%
|
| 523 |
-
92.6%
|
| 524 |
-
92.9%
|
| 525 |
-
93.2%
|
| 526 |
-
93.6%
|
| 527 |
-
93.9%
|
| 528 |
-
94.2%
|
| 529 |
-
94.5%
|
| 530 |
-
94.9%
|
| 531 |
-
95.2%
|
| 532 |
-
95.5%
|
| 533 |
-
95.9%
|
| 534 |
-
96.2%
|
| 535 |
-
96.5%
|
| 536 |
-
96.9%
|
| 537 |
-
97.2%
|
| 538 |
-
97.5%
|
| 539 |
-
97.9%
|
| 540 |
-
98.2%
|
| 541 |
-
98.5%
|
| 542 |
-
98.8%
|
| 543 |
-
99.2%
|
| 544 |
-
99.5%
|
| 545 |
-
99.8%
|
| 546 |
-
100.0%
|
| 547 |
-
|
| 548 |
-
100.0%
|
| 549 |
-
|
| 550 |
-
2.0%
|
| 551 |
-
4.0%
|
| 552 |
-
6.0%
|
| 553 |
-
7.9%
|
| 554 |
-
9.9%
|
| 555 |
-
11.9%
|
| 556 |
-
13.9%
|
| 557 |
-
15.9%
|
| 558 |
-
17.9%
|
| 559 |
-
19.9%
|
| 560 |
-
21.9%
|
| 561 |
-
23.8%
|
| 562 |
-
25.8%
|
| 563 |
-
27.8%
|
| 564 |
-
29.8%
|
| 565 |
-
31.8%
|
| 566 |
-
33.8%
|
| 567 |
-
35.8%
|
| 568 |
-
37.8%
|
| 569 |
-
39.7%
|
| 570 |
-
41.7%
|
| 571 |
-
43.7%
|
| 572 |
-
45.7%
|
| 573 |
-
47.7%
|
| 574 |
-
49.7%
|
| 575 |
-
51.7%
|
| 576 |
-
53.7%
|
| 577 |
-
55.6%
|
| 578 |
-
57.6%
|
| 579 |
-
59.6%
|
| 580 |
-
61.6%
|
| 581 |
-
63.6%
|
| 582 |
-
65.6%
|
| 583 |
-
67.6%
|
| 584 |
-
69.6%
|
| 585 |
-
71.5%
|
| 586 |
-
73.5%
|
| 587 |
-
75.5%
|
| 588 |
-
77.5%
|
| 589 |
-
79.5%
|
| 590 |
-
81.5%
|
| 591 |
-
83.5%
|
| 592 |
-
85.5%
|
| 593 |
-
87.4%
|
| 594 |
-
89.4%
|
| 595 |
-
91.4%
|
| 596 |
-
93.4%
|
| 597 |
-
95.4%
|
| 598 |
-
97.4%
|
| 599 |
-
99.4%
|
| 600 |
-
100.0%
|
| 601 |
-
|
| 602 |
-
100.0%
|
| 603 |
-
|
| 604 |
-
Using REAL MNIST data (16x16 downsampled, flattened, d=256).
|
| 605 |
-
|
| 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.377 +/- 0.056
|
| 610 |
-
Nearest-training-neighbor distance (memorization check): 2.649 +/- 0.337
|
| 611 |
-
|
| 612 |
-
======================================================================
|
| 613 |
-
SUMMARY
|
| 614 |
-
PASS: cross-split outputs are 7.03x 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
|
| 618 |
-
requiring memorization or complex deep-learning dynamics.
|
| 619 |
-
======================================================================
|
| 620 |
-
|
| 621 |
-
````
|
| 622 |
-
|
| 623 |
-
|
| 624 |
-
---
|
| 625 |
-
<!-- trackio-cell
|
| 626 |
-
{"type": "code", "id": "cell_8c237a88bb7e", "created_at": "2026-08-01T19:07:12+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.818}
|
| 627 |
-
-->
|
| 628 |
-
````bash
|
| 629 |
-
$ hf jobs uv run --flavor cpu-basic --secrets HF_TOKEN rmt_diffusion_claim1.py
|
| 630 |
-
````
|
| 631 |
-
|
| 632 |
-
exit 0 · 44.8s
|
| 633 |
-
|
| 634 |
-
|
| 635 |
-
````python title=rmt_diffusion_claim1.py
|
| 636 |
-
|
| 637 |
-
# /// script
|
| 638 |
-
# dependencies = ["torch", "numpy", "torchvision"]
|
| 639 |
-
# ///
|
| 640 |
-
"""
|
| 641 |
-
Claim 1 reproduction -- "A Random Matrix Theory Perspective on the
|
| 642 |
-
Consistency of Diffusion Models" (arXiv 2602.02908, ICML 2026 Honorable
|
| 643 |
-
Mention for Outstanding Paper).
|
| 644 |
-
|
| 645 |
-
Tests the paper's motivating observation (Figure 1, Section 1): diffusion
|
| 646 |
-
models trained on non-overlapping data splits produce similar outputs for
|
| 647 |
-
the same noise seed, and this is already largely explained by a LINEAR
|
| 648 |
-
Gaussian model -- specifically, the closed-form Wiener/MMSE linear
|
| 649 |
-
denoiser built from each split's empirical mean and covariance.
|
| 650 |
-
|
| 651 |
-
Method:
|
| 652 |
-
1. Split a dataset into two non-overlapping halves.
|
| 653 |
-
2. For each split, compute the empirical mean mu_s and covariance Sigma_s.
|
| 654 |
-
3. Build the closed-form linear denoiser:
|
| 655 |
-
x_hat(y; sigma) = mu_s + Sigma_s (Sigma_s + sigma^2 I)^{-1} (y - mu_s)
|
| 656 |
-
-- this is the exact posterior mean under a Gaussian prior N(mu_s, Sigma_s)
|
| 657 |
-
observing y = x + sigma*z, i.e. the optimal LINEAR denoiser for this split.
|
| 658 |
-
4. Run a simple discretized reverse-diffusion sampler using each split's
|
| 659 |
-
linear denoiser, from the SAME shared initial noise seed.
|
| 660 |
-
5. Compare: how close are the two splits' generated samples to each
|
| 661 |
-
other, versus how close either is to its own nearest training
|
| 662 |
-
neighbor (checking the effect isn't just memorization)?
|
| 663 |
-
|
| 664 |
-
This runs with a SYNTHETIC structured-covariance dataset by default
|
| 665 |
-
(decaying eigenvalue spectrum, mimicking real image statistics) so it's
|
| 666 |
-
self-contained and runs anywhere with no downloads. Swap in a real image
|
| 667 |
-
dataset (MNIST/CIFAR) by replacing `generate_synthetic_data` with a real
|
| 668 |
-
loader when running where dataset downloads are available.
|
| 669 |
-
"""
|
| 670 |
-
|
| 671 |
-
import torch
|
| 672 |
-
import numpy as np
|
| 673 |
-
|
| 674 |
-
|
| 675 |
-
def load_real_data(n_samples, seed=0):
|
| 676 |
-
"""Load real MNIST digits (flattened, downsampled), as the paper's
|
| 677 |
-
actual setting uses real image data, not synthetic. Requires internet
|
| 678 |
-
access (works on Kaggle/HF Jobs, not in a fully offline sandbox)."""
|
| 679 |
-
import torchvision
|
| 680 |
-
import torchvision.transforms as T
|
| 681 |
-
|
| 682 |
-
transform = T.Compose([T.Resize((16, 16)), T.ToTensor()])
|
| 683 |
-
dataset = torchvision.datasets.MNIST(root="./data", train=True, download=True, transform=transform)
|
| 684 |
-
|
| 685 |
-
rng = np.random.default_rng(seed)
|
| 686 |
-
indices = rng.choice(len(dataset), size=n_samples, replace=False)
|
| 687 |
-
images = torch.stack([dataset[i][0].reshape(-1) for i in indices])
|
| 688 |
-
return images
|
| 689 |
-
|
| 690 |
-
|
| 691 |
-
def generate_synthetic_data(n_samples, d, decay_rate=0.05, seed=0):
|
| 692 |
-
"""Synthetic fallback with a structured, decaying-eigenvalue covariance,
|
| 693 |
-
mimicking the anisotropic statistics of real image data. Used only if
|
| 694 |
-
real data loading is unavailable (e.g. no internet access)."""
|
| 695 |
-
rng = np.random.default_rng(seed)
|
| 696 |
-
eigenvalues = np.exp(-decay_rate * np.arange(d)) + 0.01
|
| 697 |
-
Q, _ = np.linalg.qr(rng.standard_normal((d, d))) # random orthonormal basis
|
| 698 |
-
true_cov = Q @ np.diag(eigenvalues) @ Q.T
|
| 699 |
-
true_mean = rng.standard_normal(d) * 0.5
|
| 700 |
-
samples = rng.multivariate_normal(true_mean, true_cov, size=n_samples)
|
| 701 |
-
return torch.tensor(samples, dtype=torch.float32)
|
| 702 |
-
|
| 703 |
-
|
| 704 |
-
class LinearDenoiser:
|
| 705 |
-
"""Closed-form Wiener/MMSE denoiser under a Gaussian prior fit to
|
| 706 |
-
one data split, per the paper's linear theory (Section 2)."""
|
| 707 |
-
|
| 708 |
-
def __init__(self, data):
|
| 709 |
-
self.mu = data.mean(dim=0)
|
| 710 |
-
centered = data - self.mu
|
| 711 |
-
self.cov = (centered.T @ centered) / (data.shape[0] - 1)
|
| 712 |
-
# regularize slightly for numerical stability with small samples
|
| 713 |
-
d = self.cov.shape[0]
|
| 714 |
-
self.cov = self.cov + 1e-4 * torch.eye(d)
|
| 715 |
-
|
| 716 |
-
def denoise(self, y, sigma):
|
| 717 |
-
d = self.cov.shape[0]
|
| 718 |
-
gain = self.cov @ torch.linalg.inv(self.cov + (sigma ** 2) * torch.eye(d))
|
| 719 |
-
return self.mu + (gain @ (y - self.mu).T).T
|
| 720 |
-
|
| 721 |
-
|
| 722 |
-
def reverse_diffusion_sample(denoiser, z_init, sigma_schedule):
|
| 723 |
-
"""Simple discretized reverse-diffusion sampler (DDIM-style, linear
|
| 724 |
-
denoiser case has a closed-form deterministic trajectory)."""
|
| 725 |
-
x = z_init * sigma_schedule[0]
|
| 726 |
-
for i in range(len(sigma_schedule) - 1):
|
| 727 |
-
sigma_cur, sigma_next = sigma_schedule[i], sigma_schedule[i + 1]
|
| 728 |
-
x0_pred = denoiser.denoise(x.unsqueeze(0), sigma_cur).squeeze(0)
|
| 729 |
-
if sigma_next > 0:
|
| 730 |
-
direction = (x - x0_pred) / sigma_cur
|
| 731 |
-
x = x0_pred + sigma_next * direction
|
| 732 |
-
else:
|
| 733 |
-
x = x0_pred
|
| 734 |
-
return x
|
| 735 |
-
|
| 736 |
-
|
| 737 |
-
def main():
|
| 738 |
-
print("=" * 70)
|
| 739 |
-
print("RMT Diffusion Consistency reproduction -- Claim 1")
|
| 740 |
-
print("Testing: linear closed-form denoiser predicts cross-split")
|
| 741 |
-
print("consistency of generated samples from a shared noise seed")
|
| 742 |
-
print("=" * 70)
|
| 743 |
-
|
| 744 |
-
n_total = 4000
|
| 745 |
-
try:
|
| 746 |
-
data = load_real_data(n_total, seed=42)
|
| 747 |
-
d = data.shape[1]
|
| 748 |
-
print(f"\nUsing REAL MNIST data (16x16 downsampled, flattened, d={d}).")
|
| 749 |
-
except Exception as e:
|
| 750 |
-
print(f"\nCould not load real data ({e}), falling back to synthetic.")
|
| 751 |
-
d = 64
|
| 752 |
-
data = generate_synthetic_data(n_total, d, seed=42)
|
| 753 |
-
|
| 754 |
-
perm = torch.randperm(n_total)
|
| 755 |
-
split_a = data[perm[:n_total // 2]]
|
| 756 |
-
split_b = data[perm[n_total // 2:]]
|
| 757 |
-
print(f"\nDataset: {n_total} samples, {d} dims, split into "
|
| 758 |
-
f"{split_a.shape[0]} / {split_b.shape[0]}")
|
| 759 |
-
|
| 760 |
-
denoiser_a = LinearDenoiser(split_a)
|
| 761 |
-
denoiser_b = LinearDenoiser(split_b)
|
| 762 |
-
|
| 763 |
-
sigma_schedule = torch.linspace(5.0, 0.01, 30)
|
| 764 |
-
|
| 765 |
-
n_trials = 100
|
| 766 |
-
cross_split_dists, nn_dists_a, nn_dists_b = [], [], []
|
| 767 |
-
for trial in range(n_trials):
|
| 768 |
-
torch.manual_seed(1000 + trial)
|
| 769 |
-
z_init = torch.randn(d) # SAME seed used for both splits
|
| 770 |
-
|
| 771 |
-
x_a = reverse_diffusion_sample(denoiser_a, z_init, sigma_schedule)
|
| 772 |
-
x_b = reverse_diffusion_sample(denoiser_b, z_init, sigma_schedule)
|
| 773 |
-
|
| 774 |
-
cross_split_dists.append(torch.norm(x_a - x_b).item())
|
| 775 |
-
nn_dists_a.append(torch.min(torch.norm(split_a - x_a, dim=1)).item())
|
| 776 |
-
nn_dists_b.append(torch.min(torch.norm(split_b - x_b, dim=1)).item())
|
| 777 |
-
|
| 778 |
-
cross_split_mean = np.mean(cross_split_dists)
|
| 779 |
-
nn_mean = np.mean(nn_dists_a + nn_dists_b)
|
| 780 |
-
|
| 781 |
-
print(f"\n[Results over {n_trials} shared-seed trials]")
|
| 782 |
-
print(f" Cross-split distance (same seed, different training data): "
|
| 783 |
-
f"{cross_split_mean:.3f} +/- {np.std(cross_split_dists):.3f}")
|
| 784 |
-
print(f" Nearest-training-neighbor distance (memorization check): "
|
| 785 |
-
f"{nn_mean:.3f} +/- {np.std(nn_dists_a + nn_dists_b):.3f}")
|
| 786 |
-
|
| 787 |
-
print("\n" + "=" * 70)
|
| 788 |
-
print("SUMMARY")
|
| 789 |
-
if cross_split_mean < nn_mean:
|
| 790 |
-
ratio = nn_mean / cross_split_mean
|
| 791 |
-
print(f" PASS: cross-split outputs are {ratio:.2f}x MORE similar to each")
|
| 792 |
-
print(f" other than to their own nearest training example.")
|
| 793 |
-
print(f" This supports the paper's Claim 1: a purely linear, closed-form")
|
| 794 |
-
print(f" model already predicts strong cross-split consistency, without")
|
| 795 |
-
print(f" requiring memorization or complex deep-learning dynamics.")
|
| 796 |
-
else:
|
| 797 |
-
print(f" FAIL: cross-split consistency was not clearly stronger than")
|
| 798 |
-
print(f" nearest-neighbor similarity in this setting.")
|
| 799 |
-
print("=" * 70)
|
| 800 |
-
|
| 801 |
-
|
| 802 |
-
if __name__ == "__main__":
|
| 803 |
-
main()
|
| 804 |
-
|
| 805 |
-
````
|
| 806 |
-
|
| 807 |
-
|
| 808 |
-
````output
|
| 809 |
-
/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.
|
| 810 |
-
warnings.warn(
|
| 811 |
-
Job started with ID: 6a6e43b4a00abefd4b28be84
|
| 812 |
-
View at: https://huggingface.co/jobs/byte-vortex/6a6e43b4a00abefd4b28be84
|
| 813 |
-
Downloading nvidia-curand (56.8MiB)
|
| 814 |
-
Downloading cuda-bindings (6.3MiB)
|
| 815 |
Downloading pillow (6.6MiB)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 816 |
Downloading nvidia-cuda-cupti (10.2MiB)
|
| 817 |
-
Downloading
|
|
|
|
| 818 |
Downloading numpy (15.9MiB)
|
| 819 |
-
Downloading nvidia-
|
| 820 |
-
Downloading nvidia-cufile (1.2MiB)
|
| 821 |
Downloading nvidia-cudnn-cu13 (349.2MiB)
|
|
|
|
|
|
|
| 822 |
Downloading torch (502.2MiB)
|
| 823 |
-
Downloading nvidia-
|
| 824 |
-
Downloading
|
| 825 |
-
Downloading nvidia-cublas (403.5MiB)
|
| 826 |
-
Downloading networkx (2.0MiB)
|
| 827 |
-
Downloading nvidia-nvjitlink (38.9MiB)
|
| 828 |
Downloading triton (188.6MiB)
|
| 829 |
Downloading nvidia-cusparselt-cu13 (162.3MiB)
|
| 830 |
Downloading nvidia-cuda-nvrtc (86.0MiB)
|
| 831 |
-
Downloading nvidia-cuda-runtime (2.1MiB)
|
| 832 |
-
Downloading nvidia-cufft (204.2MiB)
|
| 833 |
-
Downloading nvidia-cusolver (191.6MiB)
|
| 834 |
Downloading torchvision (7.3MiB)
|
| 835 |
Downloaded nvidia-cufile
|
| 836 |
Downloaded nvidia-cuda-runtime
|
|
@@ -854,7 +234,7 @@ Downloading torchvision (7.3MiB)
|
|
| 854 |
Downloaded nvidia-cudnn-cu13
|
| 855 |
Downloaded nvidia-cublas
|
| 856 |
Downloaded torch
|
| 857 |
-
Installed 32 packages in
|
| 858 |
======================================================================
|
| 859 |
RMT Diffusion Consistency reproduction -- Claim 1
|
| 860 |
Testing: linear closed-form denoiser predicts cross-split
|
|
@@ -1226,12 +606,12 @@ Using REAL MNIST data (16x16 downsampled, flattened, d=256).
|
|
| 1226 |
Dataset: 4000 samples, 256 dims, split into 2000 / 2000
|
| 1227 |
|
| 1228 |
[Results over 100 shared-seed trials]
|
| 1229 |
-
Cross-split distance (same seed, different training data): 0.
|
| 1230 |
-
Nearest-training-neighbor distance (memorization check): 2.
|
| 1231 |
|
| 1232 |
======================================================================
|
| 1233 |
SUMMARY
|
| 1234 |
-
PASS: cross-split outputs are 7.
|
| 1235 |
other than to their own nearest training example.
|
| 1236 |
This supports the paper's Claim 1: a purely linear, closed-form
|
| 1237 |
model already predicts strong cross-split consistency, without
|
|
|
|
| 3 |
|
| 4 |
---
|
| 5 |
<!-- trackio-cell
|
| 6 |
+
{"type": "code", "id": "cell_8921e46d1099", "created_at": "2026-08-01T19:50:51+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": 42.275}
|
| 7 |
-->
|
| 8 |
````bash
|
| 9 |
$ hf jobs uv run --flavor cpu-basic --secrets HF_TOKEN rmt_diffusion_claim1.py
|
| 10 |
````
|
| 11 |
|
| 12 |
+
exit 0 · 42.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: 6a6e4df26b79c09949c1ea2a
|
| 192 |
+
View at: https://huggingface.co/jobs/byte-vortex/6a6e4df26b79c09949c1ea2a
|
| 193 |
+
Downloading nvidia-cusparse (139.2MiB)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 194 |
Downloading pillow (6.6MiB)
|
| 195 |
+
Downloading nvidia-cuda-runtime (2.1MiB)
|
| 196 |
+
Downloading nvidia-cufile (1.2MiB)
|
| 197 |
+
Downloading nvidia-cusolver (191.6MiB)
|
| 198 |
+
Downloading networkx (2.0MiB)
|
| 199 |
+
Downloading nvidia-nvjitlink (38.9MiB)
|
| 200 |
Downloading nvidia-cuda-cupti (10.2MiB)
|
| 201 |
+
Downloading nvidia-nvshmem-cu13 (57.6MiB)
|
| 202 |
+
Downloading nvidia-nccl-cu13 (196.4MiB)
|
| 203 |
Downloading numpy (15.9MiB)
|
| 204 |
+
Downloading nvidia-cublas (403.5MiB)
|
|
|
|
| 205 |
Downloading nvidia-cudnn-cu13 (349.2MiB)
|
| 206 |
+
Downloading sympy (6.0MiB)
|
| 207 |
+
Downloading nvidia-curand (56.8MiB)
|
| 208 |
Downloading torch (502.2MiB)
|
| 209 |
+
Downloading nvidia-cufft (204.2MiB)
|
| 210 |
+
Downloading cuda-bindings (6.3MiB)
|
|
|
|
|
|
|
|
|
|
| 211 |
Downloading triton (188.6MiB)
|
| 212 |
Downloading nvidia-cusparselt-cu13 (162.3MiB)
|
| 213 |
Downloading nvidia-cuda-nvrtc (86.0MiB)
|
|
|
|
|
|
|
|
|
|
| 214 |
Downloading torchvision (7.3MiB)
|
| 215 |
Downloaded nvidia-cufile
|
| 216 |
Downloaded nvidia-cuda-runtime
|
|
|
|
| 234 |
Downloaded nvidia-cudnn-cu13
|
| 235 |
Downloaded nvidia-cublas
|
| 236 |
Downloaded torch
|
| 237 |
+
Installed 32 packages in 240ms
|
| 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.370 +/- 0.048
|
| 610 |
+
Nearest-training-neighbor distance (memorization check): 2.649 +/- 0.330
|
| 611 |
|
| 612 |
======================================================================
|
| 613 |
SUMMARY
|
| 614 |
+
PASS: cross-split outputs are 7.16x 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": "
|
| 7 |
-->
|
| 8 |
````bash
|
| 9 |
$ hf jobs uv run --flavor cpu-basic --secrets HF_TOKEN rmt_diffusion_claim2.py
|
| 10 |
````
|
| 11 |
|
| 12 |
-
exit 0 ·
|
| 13 |
|
| 14 |
|
| 15 |
````python title=rmt_diffusion_claim2.py
|
|
@@ -142,181 +142,8 @@ 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:
|
| 146 |
-
View at: https://huggingface.co/jobs/byte-vortex/
|
| 147 |
-
Downloading numpy (15.9MiB)
|
| 148 |
-
Downloaded numpy
|
| 149 |
-
Installed 1 package in 16ms
|
| 150 |
-
======================================================================
|
| 151 |
-
RMT Diffusion Consistency reproduction -- Claim 2
|
| 152 |
-
Testing Proposition 4.1: sigma^2 -> kappa(sigma^2) renormalization
|
| 153 |
-
======================================================================
|
| 154 |
-
|
| 155 |
-
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 |
-
2.000 2.0433 0.2889 0.2901 0.40%
|
| 163 |
-
5.000 5.0486 0.1399 0.1410 0.79%
|
| 164 |
-
|
| 165 |
-
======================================================================
|
| 166 |
-
SUMMARY
|
| 167 |
-
PASS: RMT prediction matches Monte Carlo empirical average within
|
| 168 |
-
2.6% relative error across all tested noise levels.
|
| 169 |
-
This confirms Proposition 4.1's self-consistency equation and
|
| 170 |
-
renormalization relation sigma^2 -> kappa(sigma^2) accurately
|
| 171 |
-
predicts the finite-sample denoiser's expected behavior.
|
| 172 |
-
======================================================================
|
| 173 |
-
|
| 174 |
-
````
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
---
|
| 178 |
-
<!-- trackio-cell
|
| 179 |
-
{"type": "code", "id": "cell_5ee181bd5abb", "created_at": "2026-08-01T19:08:36+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": 82.43}
|
| 180 |
-
-->
|
| 181 |
-
````bash
|
| 182 |
-
$ hf jobs uv run --flavor cpu-basic --secrets HF_TOKEN rmt_diffusion_claim2.py
|
| 183 |
-
````
|
| 184 |
-
|
| 185 |
-
exit 0 · 82.4s
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
````python title=rmt_diffusion_claim2.py
|
| 189 |
-
|
| 190 |
-
# /// script
|
| 191 |
-
# dependencies = ["numpy"]
|
| 192 |
-
# ///
|
| 193 |
-
"""
|
| 194 |
-
Claim 2 reproduction -- "A Random Matrix Theory Perspective on the
|
| 195 |
-
Consistency of Diffusion Models" (arXiv 2602.02908).
|
| 196 |
-
|
| 197 |
-
Tests Proposition 4.1 (Section 4.1-4.2): finite-sample randomness in the
|
| 198 |
-
empirical covariance acts as a RENORMALIZATION of the noise level,
|
| 199 |
-
sigma^2 -> kappa(sigma^2), via the self-consistent equation (Eq. 4):
|
| 200 |
-
|
| 201 |
-
kappa(lambda) - lambda = gamma * kappa(lambda) * tr[Sigma (Sigma + kappa(lambda) I)^-1]
|
| 202 |
-
|
| 203 |
-
where gamma = d/n (aspect ratio), tr is the NORMALIZED trace (tr[I]=1),
|
| 204 |
-
and Sigma is the population covariance.
|
| 205 |
-
|
| 206 |
-
The theorem claims (Eq. 5): averaging the empirical denoiser's behavior
|
| 207 |
-
over many random dataset realizations of size n gives (approximately,
|
| 208 |
-
in the large-d/n deterministic-equivalence sense) the SAME result as
|
| 209 |
-
using the deterministic denoiser with the population covariance Sigma,
|
| 210 |
-
but evaluated at the renormalized noise kappa(sigma^2) instead of the
|
| 211 |
-
raw sigma^2.
|
| 212 |
-
|
| 213 |
-
Test: (1) solve the self-consistency equation numerically via fixed-point
|
| 214 |
-
iteration; (2) directly verify Eq. 5 by Monte Carlo -- draw many random
|
| 215 |
-
n-sample covariance estimates from a known population, compute the
|
| 216 |
-
average empirical denoiser gain, and compare to the closed-form
|
| 217 |
-
prediction using kappa(sigma^2).
|
| 218 |
-
"""
|
| 219 |
-
|
| 220 |
-
import numpy as np
|
| 221 |
-
|
| 222 |
-
|
| 223 |
-
def solve_kappa(sigma2, Sigma_eigenvalues, gamma, n_iters=200, tol=1e-10):
|
| 224 |
-
"""Fixed-point iteration for Eq. 4: kappa(lambda) - lambda =
|
| 225 |
-
gamma * kappa(lambda) * tr[Sigma (Sigma + kappa(lambda) I)^-1]
|
| 226 |
-
tr[] here is the NORMALIZED trace (mean over eigenvalues)."""
|
| 227 |
-
kappa = sigma2 + 1.0 # initial guess, must be > 0
|
| 228 |
-
for _ in range(n_iters):
|
| 229 |
-
trace_term = np.mean(Sigma_eigenvalues / (Sigma_eigenvalues + kappa))
|
| 230 |
-
kappa_new = sigma2 + gamma * kappa * trace_term
|
| 231 |
-
if abs(kappa_new - kappa) < tol:
|
| 232 |
-
kappa = kappa_new
|
| 233 |
-
break
|
| 234 |
-
kappa = kappa_new
|
| 235 |
-
return kappa
|
| 236 |
-
|
| 237 |
-
|
| 238 |
-
def generate_population(d, decay_rate=0.05, seed=0):
|
| 239 |
-
"""Structured population covariance (decaying eigenvalue spectrum,
|
| 240 |
-
mimicking real image statistics)."""
|
| 241 |
-
rng = np.random.default_rng(seed)
|
| 242 |
-
eigenvalues = np.exp(-decay_rate * np.arange(d)) + 0.01
|
| 243 |
-
Q, _ = np.linalg.qr(rng.standard_normal((d, d)))
|
| 244 |
-
Sigma = Q @ np.diag(eigenvalues) @ Q.T
|
| 245 |
-
return Sigma, eigenvalues
|
| 246 |
-
|
| 247 |
-
|
| 248 |
-
def main():
|
| 249 |
-
print("=" * 70)
|
| 250 |
-
print("RMT Diffusion Consistency reproduction -- Claim 2")
|
| 251 |
-
print("Testing Proposition 4.1: sigma^2 -> kappa(sigma^2) renormalization")
|
| 252 |
-
print("=" * 70)
|
| 253 |
-
|
| 254 |
-
d, n = 100, 400
|
| 255 |
-
gamma = d / n
|
| 256 |
-
Sigma, eigvals = generate_population(d, seed=7)
|
| 257 |
-
print(f"\nPopulation covariance: d={d}, n={n} (samples per split), gamma=d/n={gamma:.3f}")
|
| 258 |
-
|
| 259 |
-
sigma2_values = [0.01, 0.1, 0.5, 1.0, 2.0, 5.0]
|
| 260 |
-
n_realizations = 300 # number of independent n-sample dataset draws (Monte Carlo)
|
| 261 |
-
|
| 262 |
-
rng = np.random.default_rng(123)
|
| 263 |
-
# Fixed probe direction and evaluation point (Eq. 5's v and x - mu)
|
| 264 |
-
v = rng.standard_normal(d)
|
| 265 |
-
v = v / np.linalg.norm(v)
|
| 266 |
-
x_minus_mu = rng.standard_normal(d) * 2.0
|
| 267 |
-
|
| 268 |
-
print(f"\n{'sigma^2':>10} {'kappa(sigma^2)':>16} {'MC empirical':>14} "
|
| 269 |
-
f"{'RMT prediction':>16} {'rel. error':>12}")
|
| 270 |
-
|
| 271 |
-
max_rel_error = 0.0
|
| 272 |
-
for sigma2 in sigma2_values:
|
| 273 |
-
kappa = solve_kappa(sigma2, eigvals, gamma)
|
| 274 |
-
|
| 275 |
-
# Monte Carlo: average the empirical denoiser's gain over many
|
| 276 |
-
# random n-sample covariance realizations from the population.
|
| 277 |
-
empirical_gains = []
|
| 278 |
-
for _ in range(n_realizations):
|
| 279 |
-
samples = rng.multivariate_normal(np.zeros(d), Sigma, size=n)
|
| 280 |
-
Sigma_hat = (samples.T @ samples) / n
|
| 281 |
-
gain = v @ Sigma_hat @ np.linalg.inv(Sigma_hat + sigma2 * np.eye(d)) @ x_minus_mu
|
| 282 |
-
empirical_gains.append(gain)
|
| 283 |
-
mc_mean = np.mean(empirical_gains)
|
| 284 |
-
|
| 285 |
-
# RMT closed-form prediction: population denoiser at renormalized kappa
|
| 286 |
-
rmt_prediction = v @ Sigma @ np.linalg.inv(Sigma + kappa * np.eye(d)) @ x_minus_mu
|
| 287 |
-
|
| 288 |
-
rel_error = abs(mc_mean - rmt_prediction) / (abs(rmt_prediction) + 1e-8)
|
| 289 |
-
max_rel_error = max(max_rel_error, rel_error)
|
| 290 |
-
|
| 291 |
-
print(f"{sigma2:>10.3f} {kappa:>16.4f} {mc_mean:>14.4f} "
|
| 292 |
-
f"{rmt_prediction:>16.4f} {rel_error:>12.2%}")
|
| 293 |
-
|
| 294 |
-
print("\n" + "=" * 70)
|
| 295 |
-
print("SUMMARY")
|
| 296 |
-
if max_rel_error < 0.15:
|
| 297 |
-
print(f" PASS: RMT prediction matches Monte Carlo empirical average within")
|
| 298 |
-
print(f" {max_rel_error:.1%} relative error across all tested noise levels.")
|
| 299 |
-
print(f" This confirms Proposition 4.1's self-consistency equation and")
|
| 300 |
-
print(f" renormalization relation sigma^2 -> kappa(sigma^2) accurately")
|
| 301 |
-
print(f" predicts the finite-sample denoiser's expected behavior.")
|
| 302 |
-
else:
|
| 303 |
-
print(f" PARTIAL/FAIL: max relative error {max_rel_error:.1%} exceeds the")
|
| 304 |
-
print(f" 15% threshold -- deterministic equivalence may need larger d,n")
|
| 305 |
-
print(f" (theory is asymptotic in d,n -> infinity, d/n -> gamma).")
|
| 306 |
-
print("=" * 70)
|
| 307 |
-
|
| 308 |
-
|
| 309 |
-
if __name__ == "__main__":
|
| 310 |
-
main()
|
| 311 |
-
|
| 312 |
-
````
|
| 313 |
-
|
| 314 |
-
|
| 315 |
-
````output
|
| 316 |
-
/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.
|
| 317 |
-
warnings.warn(
|
| 318 |
-
Job started with ID: 6a6e43e36b79c09949c1e9b5
|
| 319 |
-
View at: https://huggingface.co/jobs/byte-vortex/6a6e43e36b79c09949c1e9b5
|
| 320 |
Downloading numpy (15.9MiB)
|
| 321 |
Downloaded numpy
|
| 322 |
Installed 1 package in 15ms
|
|
|
|
| 3 |
|
| 4 |
---
|
| 5 |
<!-- trackio-cell
|
| 6 |
+
{"type": "code", "id": "cell_6ad6da748870", "created_at": "2026-08-01T19:52:01+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": 68.477}
|
| 7 |
-->
|
| 8 |
````bash
|
| 9 |
$ hf jobs uv run --flavor cpu-basic --secrets HF_TOKEN rmt_diffusion_claim2.py
|
| 10 |
````
|
| 11 |
|
| 12 |
+
exit 0 · 68.5s
|
| 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: 6a6e4e1e6b79c09949c1ea2c
|
| 146 |
+
View at: https://huggingface.co/jobs/byte-vortex/6a6e4e1e6b79c09949c1ea2c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 147 |
Downloading numpy (15.9MiB)
|
| 148 |
Downloaded numpy
|
| 149 |
Installed 1 package in 15ms
|
pages/claim-3-variance-factorization-anisotropy-x-inhomogeneity/page.md
CHANGED
|
@@ -3,13 +3,13 @@
|
|
| 3 |
|
| 4 |
---
|
| 5 |
<!-- trackio-cell
|
| 6 |
-
{"type": "code", "id": "
|
| 7 |
-->
|
| 8 |
````bash
|
| 9 |
$ hf jobs uv run --flavor cpu-basic --secrets HF_TOKEN rmt_diffusion_claim3.py
|
| 10 |
````
|
| 11 |
|
| 12 |
-
exit 0 ·
|
| 13 |
|
| 14 |
|
| 15 |
````python title=rmt_diffusion_claim3.py
|
|
@@ -126,163 +126,8 @@ 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:
|
| 130 |
-
View at: https://huggingface.co/jobs/byte-vortex/
|
| 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
|
| 137 |
-
======================================================================
|
| 138 |
-
|
| 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 |
-
````
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
---
|
| 160 |
-
<!-- trackio-cell
|
| 161 |
-
{"type": "code", "id": "cell_a774f6bf6e0a", "created_at": "2026-08-01T19:09:23+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": 44.103}
|
| 162 |
-
-->
|
| 163 |
-
````bash
|
| 164 |
-
$ hf jobs uv run --flavor cpu-basic --secrets HF_TOKEN rmt_diffusion_claim3.py
|
| 165 |
-
````
|
| 166 |
-
|
| 167 |
-
exit 0 · 44.1s
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
````python title=rmt_diffusion_claim3.py
|
| 171 |
-
|
| 172 |
-
# /// script
|
| 173 |
-
# dependencies = ["numpy"]
|
| 174 |
-
# ///
|
| 175 |
-
"""
|
| 176 |
-
Claim 3 reproduction -- "A Random Matrix Theory Perspective on the
|
| 177 |
-
Consistency of Diffusion Models" (arXiv 2602.02908).
|
| 178 |
-
|
| 179 |
-
Tests Result 4.2, Eq. 7 (Section 4.3) -- the paper's exact variance
|
| 180 |
-
formula for the denoiser's fluctuation across dataset realizations:
|
| 181 |
-
|
| 182 |
-
Var[v^T D*(x;sigma)] =~ [kappa(sigma^2)^2 / (n - df_2(kappa(sigma^2)))]
|
| 183 |
-
* diamond(v, kappa, Sigma) * diamond(x-mu, kappa, Sigma)
|
| 184 |
-
|
| 185 |
-
where:
|
| 186 |
-
diamond(u, kappa, Sigma) := u^T (Sigma + kappa*I)^-2 Sigma u
|
| 187 |
-
df_2(lambda) := Tr[Sigma^2 (Sigma + lambda*I)^-2] (UNNORMALIZED trace)
|
| 188 |
-
"""
|
| 189 |
-
|
| 190 |
-
import numpy as np
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
def solve_kappa(sigma2, Sigma_eigenvalues, gamma, n_iters=200, tol=1e-10):
|
| 194 |
-
kappa = sigma2 + 1.0
|
| 195 |
-
for _ in range(n_iters):
|
| 196 |
-
trace_term = np.mean(Sigma_eigenvalues / (Sigma_eigenvalues + kappa))
|
| 197 |
-
kappa_new = sigma2 + gamma * kappa * trace_term
|
| 198 |
-
if abs(kappa_new - kappa) < tol:
|
| 199 |
-
kappa = kappa_new
|
| 200 |
-
break
|
| 201 |
-
kappa = kappa_new
|
| 202 |
-
return kappa
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
def generate_population(d, decay_rate=0.05, seed=0):
|
| 206 |
-
rng = np.random.default_rng(seed)
|
| 207 |
-
eigenvalues = np.exp(-decay_rate * np.arange(d)) + 0.01
|
| 208 |
-
Q, _ = np.linalg.qr(rng.standard_normal((d, d)))
|
| 209 |
-
Sigma = Q @ np.diag(eigenvalues) @ Q.T
|
| 210 |
-
return Sigma, eigenvalues
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
def main():
|
| 214 |
-
print("=" * 70)
|
| 215 |
-
print("RMT Diffusion Consistency reproduction -- Claim 3")
|
| 216 |
-
print("Testing Result 4.2, Eq. 7: exact denoiser variance/fluctuation law")
|
| 217 |
-
print("=" * 70)
|
| 218 |
-
|
| 219 |
-
d, n = 60, 300
|
| 220 |
-
gamma = d / n
|
| 221 |
-
Sigma, eigvals = generate_population(d, seed=11)
|
| 222 |
-
print(f"\nd={d}, n={n} (samples per split), gamma=d/n={gamma:.3f}")
|
| 223 |
-
|
| 224 |
-
rng = np.random.default_rng(321)
|
| 225 |
-
v = rng.standard_normal(d)
|
| 226 |
-
v = v / np.linalg.norm(v)
|
| 227 |
-
x_minus_mu = rng.standard_normal(d) * 1.5
|
| 228 |
-
|
| 229 |
-
sigma2_values = [0.1, 0.5, 1.0, 2.0]
|
| 230 |
-
n_realizations = 400
|
| 231 |
-
|
| 232 |
-
print(f"\n{'sigma^2':>10} {'kappa':>10} {'theory var':>14} {'MC var':>14} {'rel. error':>12}")
|
| 233 |
-
|
| 234 |
-
max_rel_error = 0.0
|
| 235 |
-
for sigma2 in sigma2_values:
|
| 236 |
-
kappa = solve_kappa(sigma2, eigvals, gamma)
|
| 237 |
-
|
| 238 |
-
inv_mat = np.linalg.inv(Sigma + kappa * np.eye(d))
|
| 239 |
-
Sigma_plus_kappa_inv2 = inv_mat @ inv_mat
|
| 240 |
-
|
| 241 |
-
diamond_v = v @ Sigma_plus_kappa_inv2 @ Sigma @ v
|
| 242 |
-
diamond_x = x_minus_mu @ Sigma_plus_kappa_inv2 @ Sigma @ x_minus_mu
|
| 243 |
-
|
| 244 |
-
Sigma2 = Sigma @ Sigma
|
| 245 |
-
df2 = np.trace(Sigma2 @ Sigma_plus_kappa_inv2)
|
| 246 |
-
|
| 247 |
-
theory_var = (kappa ** 2 / (n - df2)) * diamond_v * diamond_x
|
| 248 |
-
|
| 249 |
-
vals = []
|
| 250 |
-
for _ in range(n_realizations):
|
| 251 |
-
samples = rng.multivariate_normal(np.zeros(d), Sigma, size=n)
|
| 252 |
-
Sigma_hat = (samples.T @ samples) / n
|
| 253 |
-
denoiser_out = np.linalg.inv(Sigma_hat + sigma2 * np.eye(d)) @ Sigma_hat @ x_minus_mu
|
| 254 |
-
vals.append(v @ denoiser_out)
|
| 255 |
-
mc_var = np.var(vals)
|
| 256 |
-
|
| 257 |
-
rel_error = abs(mc_var - theory_var) / (abs(theory_var) + 1e-8)
|
| 258 |
-
max_rel_error = max(max_rel_error, rel_error)
|
| 259 |
-
print(f"{sigma2:>10.3f} {kappa:>10.4f} {theory_var:>14.6f} {mc_var:>14.6f} {rel_error:>12.2%}")
|
| 260 |
-
|
| 261 |
-
print("\n" + "=" * 70)
|
| 262 |
-
print("SUMMARY")
|
| 263 |
-
if max_rel_error < 0.25:
|
| 264 |
-
print(f" PASS: Result 4.2's exact variance formula matches Monte Carlo")
|
| 265 |
-
print(f" simulation within {max_rel_error:.1%} relative error across all tested")
|
| 266 |
-
print(f" noise levels. This confirms the paper's factorized variance law")
|
| 267 |
-
print(f" (anisotropy x inhomogeneity x scaling) for the denoiser's")
|
| 268 |
-
print(f" fluctuation across independent dataset realizations.")
|
| 269 |
-
else:
|
| 270 |
-
print(f" PARTIAL: max relative error {max_rel_error:.1%} -- theory is asymptotic")
|
| 271 |
-
print(f" in d,n -> infinity, d/n -> gamma; finite-size deviations expected.")
|
| 272 |
-
print("=" * 70)
|
| 273 |
-
|
| 274 |
-
|
| 275 |
-
if __name__ == "__main__":
|
| 276 |
-
main()
|
| 277 |
-
|
| 278 |
-
````
|
| 279 |
-
|
| 280 |
-
|
| 281 |
-
````output
|
| 282 |
-
/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.
|
| 283 |
-
warnings.warn(
|
| 284 |
-
Job started with ID: 6a6e44376b79c09949c1e9bb
|
| 285 |
-
View at: https://huggingface.co/jobs/byte-vortex/6a6e44376b79c09949c1e9bb
|
| 286 |
Downloading numpy (15.9MiB)
|
| 287 |
Downloaded numpy
|
| 288 |
Installed 1 package in 15ms
|
|
|
|
| 3 |
|
| 4 |
---
|
| 5 |
<!-- trackio-cell
|
| 6 |
+
{"type": "code", "id": "cell_05608bbc9dda", "created_at": "2026-08-01T19:52:37+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": 33.242}
|
| 7 |
-->
|
| 8 |
````bash
|
| 9 |
$ hf jobs uv run --flavor cpu-basic --secrets HF_TOKEN rmt_diffusion_claim3.py
|
| 10 |
````
|
| 11 |
|
| 12 |
+
exit 0 · 33.2s
|
| 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_DISABL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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 131 |
Downloading numpy (15.9MiB)
|
| 132 |
Downloaded numpy
|
| 133 |
Installed 1 package in 15ms
|
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": "
|
| 7 |
-->
|
| 8 |
````bash
|
| 9 |
$ hf jobs uv run --flavor cpu-basic --secrets HF_TOKEN rmt_diffusion_claim4.py
|
| 10 |
````
|
| 11 |
|
| 12 |
-
exit 0 ·
|
| 13 |
|
| 14 |
|
| 15 |
````python title=rmt_diffusion_claim4.py
|
|
@@ -233,282 +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:
|
| 237 |
-
View at: https://huggingface.co/jobs/byte-vortex/
|
| 238 |
Downloading numpy (15.9MiB)
|
| 239 |
Downloaded numpy
|
| 240 |
-
Installed 1 package in
|
| 241 |
-
======================================================================
|
| 242 |
-
RMT Diffusion Consistency reproduction -- Claim 4
|
| 243 |
-
Testing Result 5.1 & 5.2 (Section 5): fractional-power DE for
|
| 244 |
-
the full sampling trajectory / sampling map, Sigma_hat^(1/2)
|
| 245 |
-
======================================================================
|
| 246 |
-
|
| 247 |
-
d=20, population covariance fixed; probe v and x_bar fixed across n.
|
| 248 |
-
|
| 249 |
-
--- Result 5.1 (Eq. 9): E[x] deterministic equivalent ---
|
| 250 |
-
n gamma pred (norm) MC (norm) rel. error
|
| 251 |
-
60 0.333 3.5448 3.5270 0.70%
|
| 252 |
-
100 0.200 3.6040 3.5935 0.48%
|
| 253 |
-
200 0.100 3.6470 3.6445 0.24%
|
| 254 |
-
400 0.050 3.6681 3.6700 0.24%
|
| 255 |
-
|
| 256 |
-
--- Result 5.2 (Eq. 10): Var[v^T x] deterministic equivalent ---
|
| 257 |
-
n gamma theory var MC var rel. error
|
| 258 |
-
60 0.333 0.052430 0.057407 9.49%
|
| 259 |
-
100 0.200 0.031148 0.034727 11.49%
|
| 260 |
-
200 0.100 0.015469 0.016994 9.86%
|
| 261 |
-
400 0.050 0.007709 0.008454 9.66%
|
| 262 |
-
|
| 263 |
-
======================================================================
|
| 264 |
-
SUMMARY
|
| 265 |
-
PASS: Result 5.1 (max 0.7% rel. error) and Result 5.2
|
| 266 |
-
(max 11.5% rel. error) both match direct Monte Carlo
|
| 267 |
-
simulation of the fractional-power sampling map Sigma_hat^(1/2),
|
| 268 |
-
confirming the paper's extension of deterministic equivalence to
|
| 269 |
-
fractional matrix powers for full sampling trajectories (Section 5).
|
| 270 |
-
======================================================================
|
| 271 |
-
|
| 272 |
-
````
|
| 273 |
-
|
| 274 |
-
|
| 275 |
-
---
|
| 276 |
-
<!-- trackio-cell
|
| 277 |
-
{"type": "code", "id": "cell_3c262d2d34cd", "created_at": "2026-08-01T19:09:41+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": 16.3}
|
| 278 |
-
-->
|
| 279 |
-
````bash
|
| 280 |
-
$ hf jobs uv run --flavor cpu-basic --secrets HF_TOKEN rmt_diffusion_claim4.py
|
| 281 |
-
````
|
| 282 |
-
|
| 283 |
-
exit 0 · 16.3s
|
| 284 |
-
|
| 285 |
-
|
| 286 |
-
````python title=rmt_diffusion_claim4.py
|
| 287 |
-
|
| 288 |
-
# /// script
|
| 289 |
-
# dependencies = ["numpy"]
|
| 290 |
-
# ///
|
| 291 |
-
"""
|
| 292 |
-
Claim 4 reproduction -- "A Random Matrix Theory Perspective on the
|
| 293 |
-
Consistency of Diffusion Models" (arXiv 2602.02908, Section 5).
|
| 294 |
-
|
| 295 |
-
Tests the paper's extension of deterministic equivalence to FRACTIONAL
|
| 296 |
-
matrix powers, used to analyze full sampling trajectories (not just a
|
| 297 |
-
single denoiser evaluation). Under the infinite-sigma_T approximation,
|
| 298 |
-
the sampling map reduces to x = mu + Sigma_hat^(1/2) @ x_bar (Eq. 8),
|
| 299 |
-
and the paper derives closed-form deterministic equivalents for its
|
| 300 |
-
expectation (Result 5.1, Eq. 9) and variance (Result 5.2, Eq. 10)
|
| 301 |
-
across independent dataset realizations Sigma_hat.
|
| 302 |
-
|
| 303 |
-
Result 5.1 (expectation, infinite-sigma_T approximation):
|
| 304 |
-
|
| 305 |
-
E[x] ~= mu + (2/pi) * INTEGRAL_0^inf Sigma (Sigma + kappa(u^2) I)^-1 x_bar du
|
| 306 |
-
|
| 307 |
-
Result 5.2 (variance, infinite-sigma_T approximation):
|
| 308 |
-
|
| 309 |
-
Var[v^T x] ~= (4/pi^2) * INTEGRAL INTEGRAL_0^inf
|
| 310 |
-
[kappa*kappa' / (n - df_2(kappa,kappa'))]
|
| 311 |
-
* circ(v; kappa,kappa',Sigma) * circ(x_bar; kappa,kappa',Sigma)
|
| 312 |
-
du dv
|
| 313 |
-
|
| 314 |
-
where kappa = kappa(u^2), kappa' = kappa(v^2) solve the Silverstein
|
| 315 |
-
self-consistency equation (same kappa(.) as Claims 2 & 3), and
|
| 316 |
-
|
| 317 |
-
circ(a; k, k', Sigma) := a^T Sigma (Sigma + k I)^-1 (Sigma + k' I)^-1 a
|
| 318 |
-
df_2(k, k') := Tr[Sigma^2 (Sigma + k I)^-1 (Sigma + k' I)^-1] (UNNORMALIZED trace)
|
| 319 |
-
|
| 320 |
-
Both integrals run over noise scale u (resp. u,v) in (0, infinity); we
|
| 321 |
-
evaluate them numerically via the substitution u = t/(1-t), t in (0,1),
|
| 322 |
-
which maps the semi-infinite domain to a finite one, then apply the
|
| 323 |
-
trapezoidal rule. This substitution is the paper's own numerical
|
| 324 |
-
approach is not published in the authors' repo (as of this writing,
|
| 325 |
-
their example notebooks for the fractional-power / trajectory results
|
| 326 |
-
are marked "being added"); the quadrature scheme used here is our own,
|
| 327 |
-
built directly from the formulas stated in the paper.
|
| 328 |
-
|
| 329 |
-
We validate both results against direct Monte Carlo: draw many random
|
| 330 |
-
n-sample covariance estimates Sigma_hat from a known population Sigma,
|
| 331 |
-
form Sigma_hat^(1/2) via eigendecomposition, and empirically average /
|
| 332 |
-
take variance of v^T Sigma_hat^(1/2) x_bar across draws, for a fixed
|
| 333 |
-
probe direction v and fixed initial-noise direction x_bar.
|
| 334 |
-
"""
|
| 335 |
-
|
| 336 |
-
import numpy as np
|
| 337 |
-
|
| 338 |
-
|
| 339 |
-
def solve_kappa(sigma2, Sigma_eigenvalues, gamma, n_iters=200, tol=1e-12):
|
| 340 |
-
"""Fixed-point solve of the Silverstein self-consistency equation (Eq. 4),
|
| 341 |
-
same routine used for Claims 2 & 3."""
|
| 342 |
-
kappa = sigma2 + 1.0
|
| 343 |
-
for _ in range(n_iters):
|
| 344 |
-
trace_term = np.mean(Sigma_eigenvalues / (Sigma_eigenvalues + kappa))
|
| 345 |
-
kappa_new = sigma2 + gamma * kappa * trace_term
|
| 346 |
-
if abs(kappa_new - kappa) < tol:
|
| 347 |
-
kappa = kappa_new
|
| 348 |
-
break
|
| 349 |
-
kappa = kappa_new
|
| 350 |
-
return kappa
|
| 351 |
-
|
| 352 |
-
|
| 353 |
-
def generate_population(d, decay_rate=0.05, seed=0):
|
| 354 |
-
"""Structured population covariance (decaying eigenvalue spectrum,
|
| 355 |
-
mimicking real image statistics), same construction as Claims 2 & 3."""
|
| 356 |
-
rng = np.random.default_rng(seed)
|
| 357 |
-
eigenvalues = np.exp(-decay_rate * np.arange(d)) + 0.01
|
| 358 |
-
Q, _ = np.linalg.qr(rng.standard_normal((d, d)))
|
| 359 |
-
Sigma = Q @ np.diag(eigenvalues) @ Q.T
|
| 360 |
-
return Sigma, eigenvalues
|
| 361 |
-
|
| 362 |
-
|
| 363 |
-
def _quadrature_grid(n_points, eps=1e-6):
|
| 364 |
-
"""u = t/(1-t) substitution mapping (0, inf) -> (0, 1); returns the
|
| 365 |
-
t-grid, corresponding u values, and the Jacobian du/dt."""
|
| 366 |
-
ts = np.linspace(eps, 1 - eps, n_points)
|
| 367 |
-
us = ts / (1 - ts)
|
| 368 |
-
jac = 1.0 / (1 - ts) ** 2
|
| 369 |
-
return ts, us, jac
|
| 370 |
-
|
| 371 |
-
|
| 372 |
-
def predict_expectation(Sigma, eigvals, gamma, x_bar, n_points=300):
|
| 373 |
-
"""Result 5.1 (Eq. 9): deterministic equivalent of E[Sigma_hat^(1/2)] x_bar."""
|
| 374 |
-
d = Sigma.shape[0]
|
| 375 |
-
I = np.eye(d)
|
| 376 |
-
ts, us, jac = _quadrature_grid(n_points)
|
| 377 |
-
integrand = np.zeros((n_points, d))
|
| 378 |
-
for i, u in enumerate(us):
|
| 379 |
-
kappa = solve_kappa(u ** 2, eigvals, gamma)
|
| 380 |
-
mat = Sigma @ np.linalg.inv(Sigma + kappa * I)
|
| 381 |
-
integrand[i] = (mat @ x_bar) * jac[i]
|
| 382 |
-
return (2.0 / np.pi) * np.trapezoid(integrand, ts, axis=0)
|
| 383 |
-
|
| 384 |
-
|
| 385 |
-
def predict_variance(Sigma, eigvals, gamma, n, v, x_bar, n_points=80):
|
| 386 |
-
"""Result 5.2 (Eq. 10): deterministic equivalent of Var[v^T Sigma_hat^(1/2) x_bar]."""
|
| 387 |
-
d = Sigma.shape[0]
|
| 388 |
-
I = np.eye(d)
|
| 389 |
-
Sigma2 = Sigma @ Sigma
|
| 390 |
-
ts, us, jac = _quadrature_grid(n_points)
|
| 391 |
-
|
| 392 |
-
kappas = np.array([solve_kappa(u ** 2, eigvals, gamma) for u in us])
|
| 393 |
-
resolvents = [np.linalg.inv(Sigma + k * I) for k in kappas]
|
| 394 |
-
Sigma_G = [Sigma @ G for G in resolvents]
|
| 395 |
-
|
| 396 |
-
integrand = np.zeros((n_points, n_points))
|
| 397 |
-
for i in range(n_points):
|
| 398 |
-
for j in range(n_points):
|
| 399 |
-
Gj = resolvents[j]
|
| 400 |
-
M = Sigma_G[i] @ Gj # Sigma (Sigma+k_i I)^-1 (Sigma+k_j I)^-1
|
| 401 |
-
df2 = np.trace(Sigma2 @ resolvents[i] @ Gj)
|
| 402 |
-
denom = n - df2
|
| 403 |
-
circ_v = v @ M @ v
|
| 404 |
-
circ_x = x_bar @ M @ x_bar
|
| 405 |
-
integrand[i, j] = (kappas[i] * kappas[j] / denom) * circ_v * circ_x * jac[i] * jac[j]
|
| 406 |
-
|
| 407 |
-
inner = np.trapezoid(integrand, ts, axis=1)
|
| 408 |
-
return (4.0 / np.pi ** 2) * np.trapezoid(inner, ts, axis=0)
|
| 409 |
-
|
| 410 |
-
|
| 411 |
-
def mc_expectation(Sigma, n, x_bar, rng, n_real):
|
| 412 |
-
d = Sigma.shape[0]
|
| 413 |
-
acc = np.zeros(d)
|
| 414 |
-
for _ in range(n_real):
|
| 415 |
-
samples = rng.multivariate_normal(np.zeros(d), Sigma, size=n)
|
| 416 |
-
Sigma_hat = (samples.T @ samples) / n
|
| 417 |
-
w, U = np.linalg.eigh(Sigma_hat)
|
| 418 |
-
w = np.clip(w, 0, None)
|
| 419 |
-
Sigma_hat_sqrt = (U * np.sqrt(w)) @ U.T
|
| 420 |
-
acc += Sigma_hat_sqrt @ x_bar
|
| 421 |
-
return acc / n_real
|
| 422 |
-
|
| 423 |
-
|
| 424 |
-
def mc_variance(Sigma, n, v, x_bar, rng, n_real):
|
| 425 |
-
d = Sigma.shape[0]
|
| 426 |
-
vals = np.zeros(n_real)
|
| 427 |
-
for r in range(n_real):
|
| 428 |
-
samples = rng.multivariate_normal(np.zeros(d), Sigma, size=n)
|
| 429 |
-
Sigma_hat = (samples.T @ samples) / n
|
| 430 |
-
w, U = np.linalg.eigh(Sigma_hat)
|
| 431 |
-
w = np.clip(w, 0, None)
|
| 432 |
-
Sigma_hat_sqrt = (U * np.sqrt(w)) @ U.T
|
| 433 |
-
vals[r] = v @ (Sigma_hat_sqrt @ x_bar)
|
| 434 |
-
return np.var(vals)
|
| 435 |
-
|
| 436 |
-
|
| 437 |
-
def main():
|
| 438 |
-
print("=" * 70)
|
| 439 |
-
print("RMT Diffusion Consistency reproduction -- Claim 4")
|
| 440 |
-
print("Testing Result 5.1 & 5.2 (Section 5): fractional-power DE for")
|
| 441 |
-
print("the full sampling trajectory / sampling map, Sigma_hat^(1/2)")
|
| 442 |
-
print("=" * 70)
|
| 443 |
-
|
| 444 |
-
d = 20
|
| 445 |
-
n_values = [60, 100, 200, 400]
|
| 446 |
-
Sigma, eigvals = generate_population(d, seed=11)
|
| 447 |
-
|
| 448 |
-
rng = np.random.default_rng(321)
|
| 449 |
-
v = rng.standard_normal(d)
|
| 450 |
-
v = v / np.linalg.norm(v)
|
| 451 |
-
x_bar = rng.standard_normal(d) # normalized initial noise direction, ~ N(0, I)
|
| 452 |
-
|
| 453 |
-
print(f"\nd={d}, population covariance fixed; probe v and x_bar fixed across n.")
|
| 454 |
-
|
| 455 |
-
# ---- Result 5.1: expectation (overshrinkage / Wiener-filter bias) ----
|
| 456 |
-
print("\n--- Result 5.1 (Eq. 9): E[x] deterministic equivalent ---")
|
| 457 |
-
print(f"{'n':>6} {'gamma':>8} {'pred (norm)':>13} {'MC (norm)':>13} "
|
| 458 |
-
f"{'rel. error':>12}")
|
| 459 |
-
max_rel_error_exp = 0.0
|
| 460 |
-
for n in n_values:
|
| 461 |
-
gamma = d / n
|
| 462 |
-
pred = predict_expectation(Sigma, eigvals, gamma, x_bar, n_points=250)
|
| 463 |
-
mc = mc_expectation(Sigma, n, x_bar, rng, n_real=3000)
|
| 464 |
-
rel_error = np.linalg.norm(mc - pred) / (np.linalg.norm(pred) + 1e-8)
|
| 465 |
-
max_rel_error_exp = max(max_rel_error_exp, rel_error)
|
| 466 |
-
print(f"{n:>6} {gamma:>8.3f} {np.linalg.norm(pred):>13.4f} "
|
| 467 |
-
f"{np.linalg.norm(mc):>13.4f} {rel_error:>12.2%}")
|
| 468 |
-
|
| 469 |
-
# ---- Result 5.2: variance (anisotropy x inhomogeneity for trajectories) ----
|
| 470 |
-
print("\n--- Result 5.2 (Eq. 10): Var[v^T x] deterministic equivalent ---")
|
| 471 |
-
print(f"{'n':>6} {'gamma':>8} {'theory var':>14} {'MC var':>14} {'rel. error':>12}")
|
| 472 |
-
max_rel_error_var = 0.0
|
| 473 |
-
for n in n_values:
|
| 474 |
-
gamma = d / n
|
| 475 |
-
pred_var = predict_variance(Sigma, eigvals, gamma, n, v, x_bar, n_points=70)
|
| 476 |
-
mc_var = mc_variance(Sigma, n, v, x_bar, rng, n_real=4000)
|
| 477 |
-
rel_error = abs(mc_var - pred_var) / (abs(pred_var) + 1e-8)
|
| 478 |
-
max_rel_error_var = max(max_rel_error_var, rel_error)
|
| 479 |
-
print(f"{n:>6} {gamma:>8.3f} {pred_var:>14.6f} {mc_var:>14.6f} {rel_error:>12.2%}")
|
| 480 |
-
|
| 481 |
-
print("\n" + "=" * 70)
|
| 482 |
-
print("SUMMARY")
|
| 483 |
-
threshold = 0.25 # same tolerance used for Claim 3's variance law
|
| 484 |
-
if max_rel_error_exp < threshold and max_rel_error_var < threshold:
|
| 485 |
-
print(f" PASS: Result 5.1 (max {max_rel_error_exp:.1%} rel. error) and Result 5.2")
|
| 486 |
-
print(f" (max {max_rel_error_var:.1%} rel. error) both match direct Monte Carlo")
|
| 487 |
-
print(f" simulation of the fractional-power sampling map Sigma_hat^(1/2),")
|
| 488 |
-
print(f" confirming the paper's extension of deterministic equivalence to")
|
| 489 |
-
print(f" fractional matrix powers for full sampling trajectories (Section 5).")
|
| 490 |
-
else:
|
| 491 |
-
print(f" PARTIAL: max relative error exp={max_rel_error_exp:.1%}, "
|
| 492 |
-
f"var={max_rel_error_var:.1%} -- theory is asymptotic in d,n -> infinity,")
|
| 493 |
-
print(f" d/n -> gamma; finite-size deviations and quadrature truncation")
|
| 494 |
-
print(f" error both contribute at small n.")
|
| 495 |
-
print("=" * 70)
|
| 496 |
-
|
| 497 |
-
|
| 498 |
-
if __name__ == "__main__":
|
| 499 |
-
main()
|
| 500 |
-
|
| 501 |
-
````
|
| 502 |
-
|
| 503 |
-
|
| 504 |
-
````output
|
| 505 |
-
/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.
|
| 506 |
-
warnings.warn(
|
| 507 |
-
Job started with ID: 6a6e4465a00abefd4b28be8e
|
| 508 |
-
View at: https://huggingface.co/jobs/byte-vortex/6a6e4465a00abefd4b28be8e
|
| 509 |
-
Downloading numpy (15.9MiB)
|
| 510 |
-
Downloaded numpy
|
| 511 |
-
Installed 1 package in 16ms
|
| 512 |
======================================================================
|
| 513 |
RMT Diffusion Consistency reproduction -- Claim 4
|
| 514 |
Testing Result 5.1 & 5.2 (Section 5): fractional-power DE for
|
|
|
|
| 3 |
|
| 4 |
---
|
| 5 |
<!-- trackio-cell
|
| 6 |
+
{"type": "code", "id": "cell_fe5037d46fa2", "created_at": "2026-08-01T19:52:54+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": 14.978}
|
| 7 |
-->
|
| 8 |
````bash
|
| 9 |
$ hf jobs uv run --flavor cpu-basic --secrets HF_TOKEN rmt_diffusion_claim4.py
|
| 10 |
````
|
| 11 |
|
| 12 |
+
exit 0 · 15.0s
|
| 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: 6a6e4e87a00abefd4b28bf4a
|
| 237 |
+
View at: https://huggingface.co/jobs/byte-vortex/6a6e4e87a00abefd4b28bf4a
|
| 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": "
|
| 7 |
-->
|
| 8 |
````bash
|
| 9 |
$ hf jobs uv run --flavor a10g-small --secrets HF_TOKEN rmt_diffusion_claim5.py
|
| 10 |
````
|
| 11 |
|
| 12 |
-
exit 0 ·
|
| 13 |
|
| 14 |
|
| 15 |
````python title=rmt_diffusion_claim5.py
|
|
@@ -207,676 +207,29 @@ 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:
|
| 211 |
-
View at: https://huggingface.co/jobs/byte-vortex/
|
| 212 |
-
Downloading nvidia-cuda-runtime (2.1MiB)
|
| 213 |
-
Downloading nvidia-cufile (1.2MiB)
|
| 214 |
-
Downloading nvidia-curand (56.8MiB)
|
| 215 |
-
Downloading networkx (2.0MiB)
|
| 216 |
-
Downloading nvidia-nccl-cu13 (196.4MiB)
|
| 217 |
-
Downloading nvidia-cusparselt-cu13 (162.3MiB)
|
| 218 |
-
Downloading nvidia-cusparse (139.2MiB)
|
| 219 |
-
Downloading nvidia-nvshmem-cu13 (57.6MiB)
|
| 220 |
-
Downloading torch (502.2MiB)
|
| 221 |
-
Downloading nvidia-cusolver (191.6MiB)
|
| 222 |
-
Downloading nvidia-cuda-cupti (10.2MiB)
|
| 223 |
-
Downloading nvidia-cudnn-cu13 (349.2MiB)
|
| 224 |
-
Downloading nvidia-nvjitlink (38.9MiB)
|
| 225 |
-
Downloading triton (188.6MiB)
|
| 226 |
-
Downloading numpy (15.9MiB)
|
| 227 |
-
Downloading nvidia-cublas (403.5MiB)
|
| 228 |
-
Downloading pillow (6.6MiB)
|
| 229 |
-
Downloading cuda-bindings (6.3MiB)
|
| 230 |
-
Downloading nvidia-cufft (204.2MiB)
|
| 231 |
-
Downloading sympy (6.0MiB)
|
| 232 |
-
Downloading nvidia-cuda-nvrtc (86.0MiB)
|
| 233 |
-
Downloading torchvision (7.3MiB)
|
| 234 |
-
Downloaded nvidia-cufile
|
| 235 |
-
Downloaded nvidia-cuda-runtime
|
| 236 |
-
Downloaded networkx
|
| 237 |
-
Downloaded cuda-bindings
|
| 238 |
-
Downloaded pillow
|
| 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
|
| 247 |
-
Downloaded nvidia-cusparse
|
| 248 |
-
Downloaded nvidia-cusparselt-cu13
|
| 249 |
-
Downloaded nvidia-cusolver
|
| 250 |
-
Downloaded nvidia-nccl-cu13
|
| 251 |
-
Downloaded nvidia-cufft
|
| 252 |
-
Downloaded triton
|
| 253 |
-
Downloaded nvidia-cudnn-cu13
|
| 254 |
-
Downloaded nvidia-cublas
|
| 255 |
-
Downloaded torch
|
| 256 |
-
Installed 32 packages in 616ms
|
| 257 |
-
======================================================================
|
| 258 |
-
RMT Diffusion Consistency reproduction -- Claim 5 (toy scale)
|
| 259 |
-
Testing: do REAL TRAINED deep denoisers show the same
|
| 260 |
-
cross-split consistency pattern the linear theory predicts?
|
| 261 |
-
======================================================================
|
| 262 |
-
|
| 263 |
-
0.3%
|
| 264 |
-
0.7%
|
| 265 |
-
1.0%
|
| 266 |
-
1.3%
|
| 267 |
-
1.7%
|
| 268 |
-
2.0%
|
| 269 |
-
2.3%
|
| 270 |
-
2.6%
|
| 271 |
-
3.0%
|
| 272 |
-
3.3%
|
| 273 |
-
3.6%
|
| 274 |
-
4.0%
|
| 275 |
-
4.3%
|
| 276 |
-
4.6%
|
| 277 |
-
5.0%
|
| 278 |
-
5.3%
|
| 279 |
-
5.6%
|
| 280 |
-
6.0%
|
| 281 |
-
6.3%
|
| 282 |
-
6.6%
|
| 283 |
-
6.9%
|
| 284 |
-
7.3%
|
| 285 |
-
7.6%
|
| 286 |
-
7.9%
|
| 287 |
-
8.3%
|
| 288 |
-
8.6%
|
| 289 |
-
8.9%
|
| 290 |
-
9.3%
|
| 291 |
-
9.6%
|
| 292 |
-
9.9%
|
| 293 |
-
10.2%
|
| 294 |
-
10.6%
|
| 295 |
-
10.9%
|
| 296 |
-
11.2%
|
| 297 |
-
11.6%
|
| 298 |
-
11.9%
|
| 299 |
-
12.2%
|
| 300 |
-
12.6%
|
| 301 |
-
12.9%
|
| 302 |
-
13.2%
|
| 303 |
-
13.6%
|
| 304 |
-
13.9%
|
| 305 |
-
14.2%
|
| 306 |
-
14.5%
|
| 307 |
-
14.9%
|
| 308 |
-
15.2%
|
| 309 |
-
15.5%
|
| 310 |
-
15.9%
|
| 311 |
-
16.2%
|
| 312 |
-
16.5%
|
| 313 |
-
16.9%
|
| 314 |
-
17.2%
|
| 315 |
-
17.5%
|
| 316 |
-
17.9%
|
| 317 |
-
18.2%
|
| 318 |
-
18.5%
|
| 319 |
-
18.8%
|
| 320 |
-
19.2%
|
| 321 |
-
19.5%
|
| 322 |
-
19.8%
|
| 323 |
-
20.2%
|
| 324 |
-
20.5%
|
| 325 |
-
20.8%
|
| 326 |
-
21.2%
|
| 327 |
-
21.5%
|
| 328 |
-
21.8%
|
| 329 |
-
22.1%
|
| 330 |
-
22.5%
|
| 331 |
-
22.8%
|
| 332 |
-
23.1%
|
| 333 |
-
23.5%
|
| 334 |
-
23.8%
|
| 335 |
-
24.1%
|
| 336 |
-
24.5%
|
| 337 |
-
24.8%
|
| 338 |
-
25.1%
|
| 339 |
-
25.5%
|
| 340 |
-
25.8%
|
| 341 |
-
26.1%
|
| 342 |
-
26.4%
|
| 343 |
-
26.8%
|
| 344 |
-
27.1%
|
| 345 |
-
27.4%
|
| 346 |
-
27.8%
|
| 347 |
-
28.1%
|
| 348 |
-
28.4%
|
| 349 |
-
28.8%
|
| 350 |
-
29.1%
|
| 351 |
-
29.4%
|
| 352 |
-
29.8%
|
| 353 |
-
30.1%
|
| 354 |
-
30.4%
|
| 355 |
-
30.7%
|
| 356 |
-
31.1%
|
| 357 |
-
31.4%
|
| 358 |
-
31.7%
|
| 359 |
-
32.1%
|
| 360 |
-
32.4%
|
| 361 |
-
32.7%
|
| 362 |
-
33.1%
|
| 363 |
-
33.4%
|
| 364 |
-
33.7%
|
| 365 |
-
34.0%
|
| 366 |
-
34.4%
|
| 367 |
-
34.7%
|
| 368 |
-
35.0%
|
| 369 |
-
35.4%
|
| 370 |
-
35.7%
|
| 371 |
-
36.0%
|
| 372 |
-
36.4%
|
| 373 |
-
36.7%
|
| 374 |
-
37.0%
|
| 375 |
-
37.4%
|
| 376 |
-
37.7%
|
| 377 |
-
38.0%
|
| 378 |
-
38.3%
|
| 379 |
-
38.7%
|
| 380 |
-
39.0%
|
| 381 |
-
39.3%
|
| 382 |
-
39.7%
|
| 383 |
-
40.0%
|
| 384 |
-
40.3%
|
| 385 |
-
40.7%
|
| 386 |
-
41.0%
|
| 387 |
-
41.3%
|
| 388 |
-
41.7%
|
| 389 |
-
42.0%
|
| 390 |
-
42.3%
|
| 391 |
-
42.6%
|
| 392 |
-
43.0%
|
| 393 |
-
43.3%
|
| 394 |
-
43.6%
|
| 395 |
-
44.0%
|
| 396 |
-
44.3%
|
| 397 |
-
44.6%
|
| 398 |
-
45.0%
|
| 399 |
-
45.3%
|
| 400 |
-
45.6%
|
| 401 |
-
45.9%
|
| 402 |
-
46.3%
|
| 403 |
-
46.6%
|
| 404 |
-
46.9%
|
| 405 |
-
47.3%
|
| 406 |
-
47.6%
|
| 407 |
-
47.9%
|
| 408 |
-
48.3%
|
| 409 |
-
48.6%
|
| 410 |
-
48.9%
|
| 411 |
-
49.3%
|
| 412 |
-
49.6%
|
| 413 |
-
49.9%
|
| 414 |
-
50.2%
|
| 415 |
-
50.6%
|
| 416 |
-
50.9%
|
| 417 |
-
51.2%
|
| 418 |
-
51.6%
|
| 419 |
-
51.9%
|
| 420 |
-
52.2%
|
| 421 |
-
52.6%
|
| 422 |
-
52.9%
|
| 423 |
-
53.2%
|
| 424 |
-
53.6%
|
| 425 |
-
53.9%
|
| 426 |
-
54.2%
|
| 427 |
-
54.5%
|
| 428 |
-
54.9%
|
| 429 |
-
55.2%
|
| 430 |
-
55.5%
|
| 431 |
-
55.9%
|
| 432 |
-
56.2%
|
| 433 |
-
56.5%
|
| 434 |
-
56.9%
|
| 435 |
-
57.2%
|
| 436 |
-
57.5%
|
| 437 |
-
57.9%
|
| 438 |
-
58.2%
|
| 439 |
-
58.5%
|
| 440 |
-
58.8%
|
| 441 |
-
59.2%
|
| 442 |
-
59.5%
|
| 443 |
-
59.8%
|
| 444 |
-
60.2%
|
| 445 |
-
60.5%
|
| 446 |
-
60.8%
|
| 447 |
-
61.2%
|
| 448 |
-
61.5%
|
| 449 |
-
61.8%
|
| 450 |
-
62.1%
|
| 451 |
-
62.5%
|
| 452 |
-
62.8%
|
| 453 |
-
63.1%
|
| 454 |
-
63.5%
|
| 455 |
-
63.8%
|
| 456 |
-
64.1%
|
| 457 |
-
64.5%
|
| 458 |
-
64.8%
|
| 459 |
-
65.1%
|
| 460 |
-
65.5%
|
| 461 |
-
65.8%
|
| 462 |
-
66.1%
|
| 463 |
-
66.4%
|
| 464 |
-
66.8%
|
| 465 |
-
67.1%
|
| 466 |
-
67.4%
|
| 467 |
-
67.8%
|
| 468 |
-
68.1%
|
| 469 |
-
68.4%
|
| 470 |
-
68.8%
|
| 471 |
-
69.1%
|
| 472 |
-
69.4%
|
| 473 |
-
69.8%
|
| 474 |
-
70.1%
|
| 475 |
-
70.4%
|
| 476 |
-
70.7%
|
| 477 |
-
71.1%
|
| 478 |
-
71.4%
|
| 479 |
-
71.7%
|
| 480 |
-
72.1%
|
| 481 |
-
72.4%
|
| 482 |
-
72.7%
|
| 483 |
-
73.1%
|
| 484 |
-
73.4%
|
| 485 |
-
73.7%
|
| 486 |
-
74.0%
|
| 487 |
-
74.4%
|
| 488 |
-
74.7%
|
| 489 |
-
75.0%
|
| 490 |
-
75.4%
|
| 491 |
-
75.7%
|
| 492 |
-
76.0%
|
| 493 |
-
76.4%
|
| 494 |
-
76.7%
|
| 495 |
-
77.0%
|
| 496 |
-
77.4%
|
| 497 |
-
77.7%
|
| 498 |
-
78.0%
|
| 499 |
-
78.3%
|
| 500 |
-
78.7%
|
| 501 |
-
79.0%
|
| 502 |
-
79.3%
|
| 503 |
-
79.7%
|
| 504 |
-
80.0%
|
| 505 |
-
80.3%
|
| 506 |
-
80.7%
|
| 507 |
-
81.0%
|
| 508 |
-
81.3%
|
| 509 |
-
81.7%
|
| 510 |
-
82.0%
|
| 511 |
-
82.3%
|
| 512 |
-
82.6%
|
| 513 |
-
83.0%
|
| 514 |
-
83.3%
|
| 515 |
-
83.6%
|
| 516 |
-
84.0%
|
| 517 |
-
84.3%
|
| 518 |
-
84.6%
|
| 519 |
-
85.0%
|
| 520 |
-
85.3%
|
| 521 |
-
85.6%
|
| 522 |
-
85.9%
|
| 523 |
-
86.3%
|
| 524 |
-
86.6%
|
| 525 |
-
86.9%
|
| 526 |
-
87.3%
|
| 527 |
-
87.6%
|
| 528 |
-
87.9%
|
| 529 |
-
88.3%
|
| 530 |
-
88.6%
|
| 531 |
-
88.9%
|
| 532 |
-
89.3%
|
| 533 |
-
89.6%
|
| 534 |
-
89.9%
|
| 535 |
-
90.2%
|
| 536 |
-
90.6%
|
| 537 |
-
90.9%
|
| 538 |
-
91.2%
|
| 539 |
-
91.6%
|
| 540 |
-
91.9%
|
| 541 |
-
92.2%
|
| 542 |
-
92.6%
|
| 543 |
-
92.9%
|
| 544 |
-
93.2%
|
| 545 |
-
93.6%
|
| 546 |
-
93.9%
|
| 547 |
-
94.2%
|
| 548 |
-
94.5%
|
| 549 |
-
94.9%
|
| 550 |
-
95.2%
|
| 551 |
-
95.5%
|
| 552 |
-
95.9%
|
| 553 |
-
96.2%
|
| 554 |
-
96.5%
|
| 555 |
-
96.9%
|
| 556 |
-
97.2%
|
| 557 |
-
97.5%
|
| 558 |
-
97.9%
|
| 559 |
-
98.2%
|
| 560 |
-
98.5%
|
| 561 |
-
98.8%
|
| 562 |
-
99.2%
|
| 563 |
-
99.5%
|
| 564 |
-
99.8%
|
| 565 |
-
100.0%
|
| 566 |
-
|
| 567 |
-
100.0%
|
| 568 |
-
|
| 569 |
-
2.0%
|
| 570 |
-
4.0%
|
| 571 |
-
6.0%
|
| 572 |
-
7.9%
|
| 573 |
-
9.9%
|
| 574 |
-
11.9%
|
| 575 |
-
13.9%
|
| 576 |
-
15.9%
|
| 577 |
-
17.9%
|
| 578 |
-
19.9%
|
| 579 |
-
21.9%
|
| 580 |
-
23.8%
|
| 581 |
-
25.8%
|
| 582 |
-
27.8%
|
| 583 |
-
29.8%
|
| 584 |
-
31.8%
|
| 585 |
-
33.8%
|
| 586 |
-
35.8%
|
| 587 |
-
37.8%
|
| 588 |
-
39.7%
|
| 589 |
-
41.7%
|
| 590 |
-
43.7%
|
| 591 |
-
45.7%
|
| 592 |
-
47.7%
|
| 593 |
-
49.7%
|
| 594 |
-
51.7%
|
| 595 |
-
53.7%
|
| 596 |
-
55.6%
|
| 597 |
-
57.6%
|
| 598 |
-
59.6%
|
| 599 |
-
61.6%
|
| 600 |
-
63.6%
|
| 601 |
-
65.6%
|
| 602 |
-
67.6%
|
| 603 |
-
69.6%
|
| 604 |
-
71.5%
|
| 605 |
-
73.5%
|
| 606 |
-
75.5%
|
| 607 |
-
77.5%
|
| 608 |
-
79.5%
|
| 609 |
-
81.5%
|
| 610 |
-
83.5%
|
| 611 |
-
85.5%
|
| 612 |
-
87.4%
|
| 613 |
-
89.4%
|
| 614 |
-
91.4%
|
| 615 |
-
93.4%
|
| 616 |
-
95.4%
|
| 617 |
-
97.4%
|
| 618 |
-
99.4%
|
| 619 |
-
100.0%
|
| 620 |
-
|
| 621 |
-
100.0%
|
| 622 |
-
|
| 623 |
-
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.5911
|
| 628 |
-
step 1000/1500 loss=0.4839
|
| 629 |
-
step 1500/1500 loss=0.3490
|
| 630 |
-
Training MLP denoiser on split B (400 samples)...
|
| 631 |
-
step 500/1500 loss=0.5587
|
| 632 |
-
step 1000/1500 loss=0.4498
|
| 633 |
-
step 1500/1500 loss=0.3691
|
| 634 |
-
|
| 635 |
-
[Results over 30 shared-seed trials, TRAINED deep MLP denoisers]
|
| 636 |
-
Cross-split distance: 7.575 +/- 1.562
|
| 637 |
-
Nearest-training-neighbor dist: 16.197 +/- 2.676
|
| 638 |
-
|
| 639 |
-
======================================================================
|
| 640 |
-
SUMMARY
|
| 641 |
-
PASS (toy scale): trained deep MLP denoisers show cross-split outputs
|
| 642 |
-
2.14x 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.
|
| 646 |
-
======================================================================
|
| 647 |
-
|
| 648 |
-
````
|
| 649 |
-
|
| 650 |
-
|
| 651 |
-
---
|
| 652 |
-
<!-- trackio-cell
|
| 653 |
-
{"type": "code", "id": "cell_7f1e5f5eefd9", "created_at": "2026-08-01T19:10:40+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": 57.112}
|
| 654 |
-
-->
|
| 655 |
-
````bash
|
| 656 |
-
$ hf jobs uv run --flavor a10g-small --secrets HF_TOKEN rmt_diffusion_claim5.py
|
| 657 |
-
````
|
| 658 |
-
|
| 659 |
-
exit 0 · 57.1s
|
| 660 |
-
|
| 661 |
-
|
| 662 |
-
````python title=rmt_diffusion_claim5.py
|
| 663 |
-
|
| 664 |
-
# /// script
|
| 665 |
-
# dependencies = ["torch", "numpy", "torchvision"]
|
| 666 |
-
# ///
|
| 667 |
-
"""
|
| 668 |
-
Claim 5 reproduction (toy scale) -- "A Random Matrix Theory Perspective
|
| 669 |
-
on the Consistency of Diffusion Models" (arXiv 2602.02908).
|
| 670 |
-
|
| 671 |
-
Tests whether REAL TRAINED deep networks show the same cross-split
|
| 672 |
-
consistency pattern the paper's linear theory predicts (Claim 1),
|
| 673 |
-
rather than relying on the closed-form linear denoiser alone.
|
| 674 |
-
|
| 675 |
-
Uses a small MLP denoiser -- matching one of the paper's own actual
|
| 676 |
-
model configurations ("UNet_MLP", per their released analysis code's
|
| 677 |
-
naming convention), not a full convolutional UNet, to keep this
|
| 678 |
-
tractable as a toy-scale reproduction.
|
| 679 |
-
|
| 680 |
-
HONESTY NOTE: this is explicitly a TOY-scale test (small MLP, small
|
| 681 |
-
MNIST subset, short training) -- not a reproduction of the paper's
|
| 682 |
-
actual FFHQ32/CIFAR/UNet/DiT experiments, which need far more compute.
|
| 683 |
-
"""
|
| 684 |
-
|
| 685 |
-
import torch
|
| 686 |
-
import torch.nn as nn
|
| 687 |
-
import numpy as np
|
| 688 |
-
|
| 689 |
-
|
| 690 |
-
class MLPDenoiser(nn.Module):
|
| 691 |
-
def __init__(self, dim, hidden=256, time_emb_dim=32):
|
| 692 |
-
super().__init__()
|
| 693 |
-
self.time_emb_dim = time_emb_dim
|
| 694 |
-
self.net = nn.Sequential(
|
| 695 |
-
nn.Linear(dim + time_emb_dim, hidden),
|
| 696 |
-
nn.SiLU(),
|
| 697 |
-
nn.Linear(hidden, hidden),
|
| 698 |
-
nn.SiLU(),
|
| 699 |
-
nn.Linear(hidden, dim),
|
| 700 |
-
)
|
| 701 |
-
|
| 702 |
-
def time_embedding(self, t, T):
|
| 703 |
-
half = self.time_emb_dim // 2
|
| 704 |
-
freqs = torch.exp(-np.log(10000) * torch.arange(half, device=t.device) / half)
|
| 705 |
-
args = t.float().unsqueeze(-1) * freqs.unsqueeze(0) / T
|
| 706 |
-
return torch.cat([torch.sin(args), torch.cos(args)], dim=-1)
|
| 707 |
-
|
| 708 |
-
def forward(self, x, t, T):
|
| 709 |
-
emb = self.time_embedding(t, T)
|
| 710 |
-
return self.net(torch.cat([x, emb], dim=-1))
|
| 711 |
-
|
| 712 |
-
|
| 713 |
-
def load_real_data(n_samples, seed=0):
|
| 714 |
-
import torchvision
|
| 715 |
-
import torchvision.transforms as T
|
| 716 |
-
|
| 717 |
-
transform = T.Compose([T.Resize((14, 14)), T.ToTensor()])
|
| 718 |
-
dataset = torchvision.datasets.MNIST(root="./data", train=True, download=True, transform=transform)
|
| 719 |
-
rng = np.random.default_rng(seed)
|
| 720 |
-
indices = rng.choice(len(dataset), size=n_samples, replace=False)
|
| 721 |
-
images = torch.stack([dataset[i][0].reshape(-1) for i in indices])
|
| 722 |
-
return images * 2.0 - 1.0
|
| 723 |
-
|
| 724 |
-
|
| 725 |
-
def generate_synthetic_data(n_samples, d, decay_rate=0.05, seed=0):
|
| 726 |
-
rng = np.random.default_rng(seed)
|
| 727 |
-
eigenvalues = np.exp(-decay_rate * np.arange(d)) + 0.01
|
| 728 |
-
Q, _ = np.linalg.qr(rng.standard_normal((d, d)))
|
| 729 |
-
true_cov = Q @ np.diag(eigenvalues) @ Q.T
|
| 730 |
-
samples = rng.multivariate_normal(np.zeros(d), true_cov, size=n_samples)
|
| 731 |
-
return torch.tensor(samples, dtype=torch.float32).clamp(-3, 3)
|
| 732 |
-
|
| 733 |
-
|
| 734 |
-
def train_denoiser(data, T=50, n_steps=1500, lr=1e-3, seed=0):
|
| 735 |
-
torch.manual_seed(seed)
|
| 736 |
-
d = data.shape[1]
|
| 737 |
-
model = MLPDenoiser(d)
|
| 738 |
-
opt = torch.optim.Adam(model.parameters(), lr=lr)
|
| 739 |
-
|
| 740 |
-
betas = torch.linspace(1e-4, 0.02, T)
|
| 741 |
-
alphas = 1.0 - betas
|
| 742 |
-
alpha_bars = torch.cumprod(alphas, dim=0)
|
| 743 |
-
|
| 744 |
-
n_samples = data.shape[0]
|
| 745 |
-
for step in range(n_steps):
|
| 746 |
-
idx = torch.randint(0, n_samples, (128,))
|
| 747 |
-
x0 = data[idx]
|
| 748 |
-
t = torch.randint(0, T, (x0.shape[0],))
|
| 749 |
-
noise = torch.randn_like(x0)
|
| 750 |
-
alpha_bar_t = alpha_bars[t].unsqueeze(-1)
|
| 751 |
-
x_t = torch.sqrt(alpha_bar_t) * x0 + torch.sqrt(1 - alpha_bar_t) * noise
|
| 752 |
-
|
| 753 |
-
pred_noise = model(x_t, t, T)
|
| 754 |
-
loss = ((pred_noise - noise) ** 2).mean()
|
| 755 |
-
|
| 756 |
-
opt.zero_grad()
|
| 757 |
-
loss.backward()
|
| 758 |
-
opt.step()
|
| 759 |
-
|
| 760 |
-
if (step + 1) % 500 == 0:
|
| 761 |
-
print(f" step {step + 1}/{n_steps} loss={loss.item():.4f}")
|
| 762 |
-
|
| 763 |
-
return model, betas, alphas, alpha_bars
|
| 764 |
-
|
| 765 |
-
|
| 766 |
-
@torch.no_grad()
|
| 767 |
-
def ddpm_sample(model, betas, alphas, alpha_bars, z_init, T):
|
| 768 |
-
x = z_init.clone()
|
| 769 |
-
for t in reversed(range(T)):
|
| 770 |
-
t_tensor = torch.tensor([t])
|
| 771 |
-
pred_noise = model(x.unsqueeze(0), t_tensor, T).squeeze(0)
|
| 772 |
-
alpha_t, alpha_bar_t, beta_t = alphas[t], alpha_bars[t], betas[t]
|
| 773 |
-
coef = beta_t / torch.sqrt(1 - alpha_bar_t)
|
| 774 |
-
mean = (1 / torch.sqrt(alpha_t)) * (x - coef * pred_noise)
|
| 775 |
-
if t > 0:
|
| 776 |
-
x = mean + torch.sqrt(beta_t) * torch.randn_like(x)
|
| 777 |
-
else:
|
| 778 |
-
x = mean
|
| 779 |
-
return x
|
| 780 |
-
|
| 781 |
-
|
| 782 |
-
def main():
|
| 783 |
-
print("=" * 70)
|
| 784 |
-
print("RMT Diffusion Consistency reproduction -- Claim 5 (toy scale)")
|
| 785 |
-
print("Testing: do REAL TRAINED deep denoisers show the same")
|
| 786 |
-
print("cross-split consistency pattern the linear theory predicts?")
|
| 787 |
-
print("=" * 70)
|
| 788 |
-
|
| 789 |
-
n_total = 800
|
| 790 |
-
try:
|
| 791 |
-
data = load_real_data(n_total, seed=42)
|
| 792 |
-
d = data.shape[1]
|
| 793 |
-
print(f"\nUsing REAL MNIST data (14x14 downsampled, d={d}).")
|
| 794 |
-
except Exception as e:
|
| 795 |
-
print(f"\nCould not load real data ({e}), falling back to synthetic.")
|
| 796 |
-
d = 49
|
| 797 |
-
data = generate_synthetic_data(n_total, d, seed=42)
|
| 798 |
-
|
| 799 |
-
perm = torch.randperm(n_total)
|
| 800 |
-
split_a = data[perm[:n_total // 2]]
|
| 801 |
-
split_b = data[perm[n_total // 2:]]
|
| 802 |
-
print(f"Split sizes: {split_a.shape[0]} / {split_b.shape[0]}")
|
| 803 |
-
|
| 804 |
-
T = 50
|
| 805 |
-
print(f"\nTraining MLP denoiser on split A ({split_a.shape[0]} samples)...")
|
| 806 |
-
model_a, betas, alphas, alpha_bars = train_denoiser(split_a, T=T, seed=1)
|
| 807 |
-
print(f"Training MLP denoiser on split B ({split_b.shape[0]} samples)...")
|
| 808 |
-
model_b, _, _, _ = train_denoiser(split_b, T=T, seed=2)
|
| 809 |
-
|
| 810 |
-
n_trials = 30
|
| 811 |
-
cross_split_dists, nn_dists = [], []
|
| 812 |
-
for trial in range(n_trials):
|
| 813 |
-
torch.manual_seed(5000 + trial)
|
| 814 |
-
z_init = torch.randn(d)
|
| 815 |
-
|
| 816 |
-
x_a = ddpm_sample(model_a, betas, alphas, alpha_bars, z_init.clone(), T)
|
| 817 |
-
torch.manual_seed(5000 + trial)
|
| 818 |
-
z_init_b = torch.randn(d)
|
| 819 |
-
x_b = ddpm_sample(model_b, betas, alphas, alpha_bars, z_init_b.clone(), T)
|
| 820 |
-
|
| 821 |
-
cross_split_dists.append(torch.norm(x_a - x_b).item())
|
| 822 |
-
nn_a = torch.min(torch.norm(split_a - x_a, dim=1)).item()
|
| 823 |
-
nn_b = torch.min(torch.norm(split_b - x_b, dim=1)).item()
|
| 824 |
-
nn_dists.extend([nn_a, nn_b])
|
| 825 |
-
|
| 826 |
-
cross_split_mean = np.mean(cross_split_dists)
|
| 827 |
-
nn_mean = np.mean(nn_dists)
|
| 828 |
-
|
| 829 |
-
print(f"\n[Results over {n_trials} shared-seed trials, TRAINED deep MLP denoisers]")
|
| 830 |
-
print(f" Cross-split distance: {cross_split_mean:.3f} +/- {np.std(cross_split_dists):.3f}")
|
| 831 |
-
print(f" Nearest-training-neighbor dist: {nn_mean:.3f} +/- {np.std(nn_dists):.3f}")
|
| 832 |
-
|
| 833 |
-
print("\n" + "=" * 70)
|
| 834 |
-
print("SUMMARY")
|
| 835 |
-
if cross_split_mean < nn_mean:
|
| 836 |
-
ratio = nn_mean / cross_split_mean
|
| 837 |
-
print(f" PASS (toy scale): trained deep MLP denoisers show cross-split outputs")
|
| 838 |
-
print(f" {ratio:.2f}x MORE similar to each other than to their nearest training")
|
| 839 |
-
print(f" example -- the same qualitative pattern the linear theory (Claim 1)")
|
| 840 |
-
print(f" predicts, now confirmed with REAL TRAINED nonlinear networks, not")
|
| 841 |
-
print(f" just the closed-form linear denoiser. Supports Claim 5 at toy scale.")
|
| 842 |
-
else:
|
| 843 |
-
print(f" FAIL: trained deep denoisers did not show clearer cross-split")
|
| 844 |
-
print(f" consistency than nearest-neighbor similarity in this toy setting.")
|
| 845 |
-
print("=" * 70)
|
| 846 |
-
|
| 847 |
-
|
| 848 |
-
if __name__ == "__main__":
|
| 849 |
-
main()
|
| 850 |
-
|
| 851 |
-
````
|
| 852 |
-
|
| 853 |
-
|
| 854 |
-
````output
|
| 855 |
-
/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.
|
| 856 |
-
warnings.warn(
|
| 857 |
-
Job started with ID: 6a6e4478a00abefd4b28be94
|
| 858 |
-
View at: https://huggingface.co/jobs/byte-vortex/6a6e4478a00abefd4b28be94
|
| 859 |
Downloading nvidia-curand (56.8MiB)
|
| 860 |
Downloading nvidia-cuda-cupti (10.2MiB)
|
| 861 |
Downloading pillow (6.6MiB)
|
| 862 |
Downloading sympy (6.0MiB)
|
| 863 |
-
Downloading nvidia-cufile (1.2MiB)
|
| 864 |
-
Downloading nvidia-cufft (204.2MiB)
|
| 865 |
-
Downloading nvidia-cusolver (191.6MiB)
|
| 866 |
-
Downloading triton (188.6MiB)
|
| 867 |
-
Downloading nvidia-cudnn-cu13 (349.2MiB)
|
| 868 |
-
Downloading nvidia-nccl-cu13 (196.4MiB)
|
| 869 |
-
Downloading nvidia-cuda-nvrtc (86.0MiB)
|
| 870 |
-
Downloading nvidia-cusparselt-cu13 (162.3MiB)
|
| 871 |
-
Downloading nvidia-cublas (403.5MiB)
|
| 872 |
Downloading networkx (2.0MiB)
|
| 873 |
-
Downloading nvidia-cusparse (139.2MiB)
|
| 874 |
-
Downloading nvidia-nvjitlink (38.9MiB)
|
| 875 |
Downloading nvidia-cuda-runtime (2.1MiB)
|
| 876 |
Downloading cuda-bindings (6.3MiB)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 877 |
Downloading nvidia-nvshmem-cu13 (57.6MiB)
|
|
|
|
|
|
|
|
|
|
| 878 |
Downloading numpy (15.9MiB)
|
| 879 |
-
Downloading
|
|
|
|
| 880 |
Downloading torchvision (7.3MiB)
|
| 881 |
Downloaded nvidia-cufile
|
| 882 |
Downloaded nvidia-cuda-runtime
|
|
@@ -900,7 +253,7 @@ Downloading torchvision (7.3MiB)
|
|
| 900 |
Downloaded nvidia-cudnn-cu13
|
| 901 |
Downloaded nvidia-cublas
|
| 902 |
Downloaded torch
|
| 903 |
-
Installed 32 packages in
|
| 904 |
======================================================================
|
| 905 |
RMT Diffusion Consistency reproduction -- Claim 5 (toy scale)
|
| 906 |
Testing: do REAL TRAINED deep denoisers show the same
|
|
@@ -1271,22 +624,22 @@ Using REAL MNIST data (14x14 downsampled, d=196).
|
|
| 1271 |
Split sizes: 400 / 400
|
| 1272 |
|
| 1273 |
Training MLP denoiser on split A (400 samples)...
|
| 1274 |
-
step 500/1500 loss=0.
|
| 1275 |
-
step 1000/1500 loss=0.
|
| 1276 |
-
step 1500/1500 loss=0.
|
| 1277 |
Training MLP denoiser on split B (400 samples)...
|
| 1278 |
-
step 500/1500 loss=0.
|
| 1279 |
-
step 1000/1500 loss=0.
|
| 1280 |
-
step 1500/1500 loss=0.
|
| 1281 |
|
| 1282 |
[Results over 30 shared-seed trials, TRAINED deep MLP denoisers]
|
| 1283 |
-
Cross-split distance: 7.
|
| 1284 |
-
Nearest-training-neighbor dist:
|
| 1285 |
|
| 1286 |
======================================================================
|
| 1287 |
SUMMARY
|
| 1288 |
PASS (toy scale): trained deep MLP denoisers show cross-split outputs
|
| 1289 |
-
2.
|
| 1290 |
example -- the same qualitative pattern the linear theory (Claim 1)
|
| 1291 |
predicts, now confirmed with REAL TRAINED nonlinear networks, not
|
| 1292 |
just the closed-form linear denoiser. Supports Claim 5 at toy scale.
|
|
|
|
| 3 |
|
| 4 |
---
|
| 5 |
<!-- trackio-cell
|
| 6 |
+
{"type": "code", "id": "cell_9768114378cc", "created_at": "2026-08-01T19:53:44+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": 48.329}
|
| 7 |
-->
|
| 8 |
````bash
|
| 9 |
$ hf jobs uv run --flavor a10g-small --secrets HF_TOKEN rmt_diffusion_claim5.py
|
| 10 |
````
|
| 11 |
|
| 12 |
+
exit 0 · 48.3s
|
| 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: 6a6e4e99a00abefd4b28bf4c
|
| 211 |
+
View at: https://huggingface.co/jobs/byte-vortex/6a6e4e99a00abefd4b28bf4c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 212 |
Downloading nvidia-curand (56.8MiB)
|
| 213 |
Downloading nvidia-cuda-cupti (10.2MiB)
|
| 214 |
Downloading pillow (6.6MiB)
|
| 215 |
Downloading sympy (6.0MiB)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 216 |
Downloading networkx (2.0MiB)
|
|
|
|
|
|
|
| 217 |
Downloading nvidia-cuda-runtime (2.1MiB)
|
| 218 |
Downloading cuda-bindings (6.3MiB)
|
| 219 |
+
Downloading torch (502.2MiB)
|
| 220 |
+
Downloading triton (188.6MiB)
|
| 221 |
+
Downloading nvidia-cusolver (191.6MiB)
|
| 222 |
+
Downloading nvidia-cufft (204.2MiB)
|
| 223 |
+
Downloading nvidia-nccl-cu13 (196.4MiB)
|
| 224 |
+
Downloading nvidia-cusparselt-cu13 (162.3MiB)
|
| 225 |
+
Downloading nvidia-cufile (1.2MiB)
|
| 226 |
Downloading nvidia-nvshmem-cu13 (57.6MiB)
|
| 227 |
+
Downloading nvidia-nvjitlink (38.9MiB)
|
| 228 |
+
Downloading nvidia-cudnn-cu13 (349.2MiB)
|
| 229 |
+
Downloading nvidia-cublas (403.5MiB)
|
| 230 |
Downloading numpy (15.9MiB)
|
| 231 |
+
Downloading nvidia-cusparse (139.2MiB)
|
| 232 |
+
Downloading nvidia-cuda-nvrtc (86.0MiB)
|
| 233 |
Downloading torchvision (7.3MiB)
|
| 234 |
Downloaded nvidia-cufile
|
| 235 |
Downloaded nvidia-cuda-runtime
|
|
|
|
| 253 |
Downloaded nvidia-cudnn-cu13
|
| 254 |
Downloaded nvidia-cublas
|
| 255 |
Downloaded torch
|
| 256 |
+
Installed 32 packages in 604ms
|
| 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.5903
|
| 628 |
+
step 1000/1500 loss=0.4854
|
| 629 |
+
step 1500/1500 loss=0.3534
|
| 630 |
Training MLP denoiser on split B (400 samples)...
|
| 631 |
+
step 500/1500 loss=0.5592
|
| 632 |
+
step 1000/1500 loss=0.4484
|
| 633 |
+
step 1500/1500 loss=0.3653
|
| 634 |
|
| 635 |
[Results over 30 shared-seed trials, TRAINED deep MLP denoisers]
|
| 636 |
+
Cross-split distance: 7.231 +/- 1.080
|
| 637 |
+
Nearest-training-neighbor dist: 16.052 +/- 2.412
|
| 638 |
|
| 639 |
======================================================================
|
| 640 |
SUMMARY
|
| 641 |
PASS (toy scale): trained deep MLP denoisers show cross-split outputs
|
| 642 |
+
2.22x 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
CHANGED
|
@@ -3,13 +3,13 @@
|
|
| 3 |
|
| 4 |
---
|
| 5 |
<!-- trackio-cell
|
| 6 |
-
{"type": "code", "id": "
|
| 7 |
-->
|
| 8 |
````bash
|
| 9 |
$ hf jobs uv run --flavor a10g-small --timeout 3600 --secrets HF_TOKEN rmt_diffusion_claim6.py
|
| 10 |
````
|
| 11 |
|
| 12 |
-
exit 0 ·
|
| 13 |
|
| 14 |
|
| 15 |
````python title=rmt_diffusion_claim6.py
|
|
@@ -489,574 +489,29 @@ if __name__ == "__main__":
|
|
| 489 |
````output
|
| 490 |
/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.
|
| 491 |
warnings.warn(
|
| 492 |
-
Job started with ID:
|
| 493 |
-
View at: https://huggingface.co/jobs/byte-vortex/
|
| 494 |
-
Downloading nvidia-nvjitlink (38.9MiB)
|
| 495 |
-
Downloading nvidia-cusparse (139.2MiB)
|
| 496 |
-
Downloading sympy (6.0MiB)
|
| 497 |
-
Downloading nvidia-cusparselt-cu13 (162.3MiB)
|
| 498 |
-
Downloading nvidia-curand (56.8MiB)
|
| 499 |
-
Downloading nvidia-cuda-cupti (10.2MiB)
|
| 500 |
-
Downloading networkx (2.0MiB)
|
| 501 |
-
Downloading nvidia-cuda-runtime (2.1MiB)
|
| 502 |
-
Downloading cuda-bindings (6.3MiB)
|
| 503 |
-
Downloading pillow (6.6MiB)
|
| 504 |
-
Downloading nvidia-cuda-nvrtc (86.0MiB)
|
| 505 |
-
Downloading numpy (15.9MiB)
|
| 506 |
-
Downloading nvidia-cublas (403.5MiB)
|
| 507 |
-
Downloading nvidia-nvshmem-cu13 (57.6MiB)
|
| 508 |
-
Downloading torchvision (7.3MiB)
|
| 509 |
-
Downloading nvidia-cufft (204.2MiB)
|
| 510 |
-
Downloading triton (188.6MiB)
|
| 511 |
-
Downloading nvidia-cudnn-cu13 (349.2MiB)
|
| 512 |
-
Downloading nvidia-cufile (1.2MiB)
|
| 513 |
-
Downloading nvidia-nccl-cu13 (196.4MiB)
|
| 514 |
-
Downloading nvidia-cusolver (191.6MiB)
|
| 515 |
-
Downloading torch (502.2MiB)
|
| 516 |
-
Downloaded nvidia-cufile
|
| 517 |
-
Downloaded nvidia-cuda-runtime
|
| 518 |
-
Downloaded networkx
|
| 519 |
-
Downloaded cuda-bindings
|
| 520 |
-
Downloaded pillow
|
| 521 |
-
Downloaded torchvision
|
| 522 |
-
Downloaded nvidia-cuda-cupti
|
| 523 |
-
Downloaded numpy
|
| 524 |
-
Downloaded nvidia-nvjitlink
|
| 525 |
-
Downloaded sympy
|
| 526 |
-
Downloaded nvidia-curand
|
| 527 |
-
Downloaded nvidia-nvshmem-cu13
|
| 528 |
-
Downloaded nvidia-cuda-nvrtc
|
| 529 |
-
Downloaded nvidia-cusparse
|
| 530 |
-
Downloaded nvidia-cusparselt-cu13
|
| 531 |
-
Downloaded nvidia-cusolver
|
| 532 |
-
Downloaded nvidia-nccl-cu13
|
| 533 |
-
Downloaded nvidia-cufft
|
| 534 |
-
Downloaded triton
|
| 535 |
-
Downloaded nvidia-cudnn-cu13
|
| 536 |
-
Downloaded nvidia-cublas
|
| 537 |
-
Downloaded torch
|
| 538 |
-
Installed 32 packages in 595ms
|
| 539 |
-
======================================================================
|
| 540 |
-
RMT Diffusion Consistency reproduction -- Claim 6 (SCOPED TOY SCALE)
|
| 541 |
-
Testing official Claim 5: consistency vs linear theory,
|
| 542 |
-
overshrinkage, and eigenmode-dependent cross-split deviation
|
| 543 |
-
Device: cuda
|
| 544 |
-
======================================================================
|
| 545 |
-
|
| 546 |
-
````
|
| 547 |
-
|
| 548 |
-
|
| 549 |
-
---
|
| 550 |
-
<!-- trackio-cell
|
| 551 |
-
{"type": "code", "id": "cell_7e0117b33bad", "created_at": "2026-08-01T19:16:08+00:00", "title": "Run: hf rmt_diffusion_claim6.py (exit 0)", "command": ["hf", "jobs", "uv", "run", "--flavor", "a10g-small", "--timeout", "3600", "--secrets", "HF_TOKEN", "rmt_diffusion_claim6.py"], "exit_code": 0, "duration_s": 326.078}
|
| 552 |
-
-->
|
| 553 |
-
````bash
|
| 554 |
-
$ hf jobs uv run --flavor a10g-small --timeout 3600 --secrets HF_TOKEN rmt_diffusion_claim6.py
|
| 555 |
-
````
|
| 556 |
-
|
| 557 |
-
exit 0 · 326.1s
|
| 558 |
-
|
| 559 |
-
|
| 560 |
-
````python title=rmt_diffusion_claim6.py
|
| 561 |
-
|
| 562 |
-
# /// script
|
| 563 |
-
# dependencies = ["torch", "numpy", "torchvision"]
|
| 564 |
-
# ///
|
| 565 |
-
"""
|
| 566 |
-
Claim 6 reproduction (SCOPED-DOWN toy scale) -- "A Random Matrix Theory
|
| 567 |
-
Perspective on the Consistency of Diffusion Models" (arXiv 2602.02908,
|
| 568 |
-
OpenReview iPjuUQbkfl, ICML 2026 Oral).
|
| 569 |
-
|
| 570 |
-
REWRITE NOTE: the previous version of this script tested a "memorization
|
| 571 |
-
-> generalization phase transition with n" hypothesis, which does not
|
| 572 |
-
appear anywhere in the official challenge's claim list for this paper.
|
| 573 |
-
It was the wrong target. The official Claim 5 this page should address
|
| 574 |
-
is: "UNet and DiT experiments validate the theory's predictions about
|
| 575 |
-
consistency, overshrinkage, and eigenmode-dependent deviations in the
|
| 576 |
-
non-memorization regime (Figure 5)." This rewrite tests exactly that,
|
| 577 |
-
with three sub-checks tied to the paper's actual claims:
|
| 578 |
-
|
| 579 |
-
(a) CONSISTENCY vs. linear theory (relates to Claim 1 / Figure 1):
|
| 580 |
-
is the trained UNet's cross-split output distance comparable to
|
| 581 |
-
what a purely LINEAR (closed-form Wiener) diffusion sampler run
|
| 582 |
-
through the identical reverse-diffusion schedule would predict?
|
| 583 |
-
|
| 584 |
-
(b) OVERSHRINKAGE (relates to Claim 2 / Figure 2): does the model's
|
| 585 |
-
output variance along LOW-eigenvalue directions of the data
|
| 586 |
-
covariance shrink MORE (relative to the true variance in that
|
| 587 |
-
direction) than along high-eigenvalue directions -- the
|
| 588 |
-
signature of finite-sample noise-scale renormalization?
|
| 589 |
-
|
| 590 |
-
(c) EIGENMODE-DEPENDENT / ANISOTROPIC cross-split deviation, decaying
|
| 591 |
-
with n (relates to Result 4.2 / Claim 3): does the cross-split
|
| 592 |
-
output deviation vary systematically across covariance
|
| 593 |
-
eigenmodes (not flat/isotropic), and shrink as dataset size n
|
| 594 |
-
grows?
|
| 595 |
-
|
| 596 |
-
HONESTY NOTE (unchanged from before): the paper's real Section 6 uses
|
| 597 |
-
UNet AND DiT on seven datasets at five sizes each with 50k training
|
| 598 |
-
steps per run. This is a drastically scoped-down, single-dataset,
|
| 599 |
-
single-architecture, short-training qualitative check -- not a
|
| 600 |
-
quantitative reproduction of the paper's actual figures. But it now at
|
| 601 |
-
least tests the RIGHT hypotheses, using the same UNet training/sampling
|
| 602 |
-
infrastructure as before.
|
| 603 |
-
"""
|
| 604 |
-
|
| 605 |
-
import sys
|
| 606 |
-
import torch
|
| 607 |
-
import torch.nn as nn
|
| 608 |
-
import numpy as np
|
| 609 |
-
|
| 610 |
-
# FIX (kept from the previous version): force line-buffered stdout so
|
| 611 |
-
# output isn't lost to a buffering race against the job runner's log
|
| 612 |
-
# capture at process exit.
|
| 613 |
-
sys.stdout.reconfigure(line_buffering=True)
|
| 614 |
-
|
| 615 |
-
|
| 616 |
-
# --------------------------------------------------------------------------
|
| 617 |
-
# Small convolutional UNet denoiser (unchanged from the previous version)
|
| 618 |
-
# --------------------------------------------------------------------------
|
| 619 |
-
|
| 620 |
-
class TimeEmbedding(nn.Module):
|
| 621 |
-
def __init__(self, dim):
|
| 622 |
-
super().__init__()
|
| 623 |
-
self.dim = dim
|
| 624 |
-
self.mlp = nn.Sequential(
|
| 625 |
-
nn.Linear(dim, dim * 4),
|
| 626 |
-
nn.SiLU(),
|
| 627 |
-
nn.Linear(dim * 4, dim * 4),
|
| 628 |
-
)
|
| 629 |
-
|
| 630 |
-
def forward(self, t, T):
|
| 631 |
-
half = self.dim // 2
|
| 632 |
-
freqs = torch.exp(-np.log(10000) * torch.arange(half, device=t.device) / half)
|
| 633 |
-
args = t.float().unsqueeze(-1) * freqs.unsqueeze(0) / T
|
| 634 |
-
emb = torch.cat([torch.sin(args), torch.cos(args)], dim=-1)
|
| 635 |
-
return self.mlp(emb)
|
| 636 |
-
|
| 637 |
-
|
| 638 |
-
class ResBlock(nn.Module):
|
| 639 |
-
def __init__(self, in_ch, out_ch, temb_dim):
|
| 640 |
-
super().__init__()
|
| 641 |
-
self.norm1 = nn.GroupNorm(8, in_ch)
|
| 642 |
-
self.conv1 = nn.Conv2d(in_ch, out_ch, 3, padding=1)
|
| 643 |
-
self.temb_proj = nn.Linear(temb_dim, out_ch)
|
| 644 |
-
self.norm2 = nn.GroupNorm(8, out_ch)
|
| 645 |
-
self.conv2 = nn.Conv2d(out_ch, out_ch, 3, padding=1)
|
| 646 |
-
self.skip = nn.Conv2d(in_ch, out_ch, 1) if in_ch != out_ch else nn.Identity()
|
| 647 |
-
|
| 648 |
-
def forward(self, x, temb):
|
| 649 |
-
h = self.conv1(torch.nn.functional.silu(self.norm1(x)))
|
| 650 |
-
h = h + self.temb_proj(temb)[:, :, None, None]
|
| 651 |
-
h = self.conv2(torch.nn.functional.silu(self.norm2(h)))
|
| 652 |
-
return h + self.skip(x)
|
| 653 |
-
|
| 654 |
-
|
| 655 |
-
class SmallUNet(nn.Module):
|
| 656 |
-
"""Small UNet-CNN denoiser: 32x32 -> 16x16 -> 8x8 -> 16x16 -> 32x32,
|
| 657 |
-
with skip connections. Matches the paper's "UNet" family in spirit
|
| 658 |
-
(convolutional, skip connections, sinusoidal time embedding) at a
|
| 659 |
-
fraction of the channel width / depth."""
|
| 660 |
-
|
| 661 |
-
def __init__(self, channels=3, base_ch=32, time_emb_dim=32):
|
| 662 |
-
super().__init__()
|
| 663 |
-
temb_dim = time_emb_dim * 4
|
| 664 |
-
self.time_embed = TimeEmbedding(time_emb_dim)
|
| 665 |
-
|
| 666 |
-
self.in_conv = nn.Conv2d(channels, base_ch, 3, padding=1)
|
| 667 |
-
|
| 668 |
-
self.down1 = ResBlock(base_ch, base_ch, temb_dim)
|
| 669 |
-
self.pool1 = nn.Conv2d(base_ch, base_ch, 4, stride=2, padding=1) # 32->16
|
| 670 |
-
|
| 671 |
-
self.down2 = ResBlock(base_ch, base_ch * 2, temb_dim)
|
| 672 |
-
self.pool2 = nn.Conv2d(base_ch * 2, base_ch * 2, 4, stride=2, padding=1) # 16->8
|
| 673 |
-
|
| 674 |
-
self.mid = ResBlock(base_ch * 2, base_ch * 2, temb_dim)
|
| 675 |
-
|
| 676 |
-
self.up2 = nn.ConvTranspose2d(base_ch * 2, base_ch * 2, 4, stride=2, padding=1) # 8->16
|
| 677 |
-
self.dec2 = ResBlock(base_ch * 2 + base_ch * 2, base_ch, temb_dim)
|
| 678 |
-
|
| 679 |
-
self.up1 = nn.ConvTranspose2d(base_ch, base_ch, 4, stride=2, padding=1) # 16->32
|
| 680 |
-
self.dec1 = ResBlock(base_ch + base_ch, base_ch, temb_dim)
|
| 681 |
-
|
| 682 |
-
self.out_norm = nn.GroupNorm(8, base_ch)
|
| 683 |
-
self.out_conv = nn.Conv2d(base_ch, channels, 3, padding=1)
|
| 684 |
-
|
| 685 |
-
def forward(self, x, t, T):
|
| 686 |
-
temb = self.time_embed(t, T)
|
| 687 |
-
|
| 688 |
-
h0 = self.in_conv(x)
|
| 689 |
-
h1 = self.down1(h0, temb)
|
| 690 |
-
h1p = self.pool1(h1)
|
| 691 |
-
|
| 692 |
-
h2 = self.down2(h1p, temb)
|
| 693 |
-
h2p = self.pool2(h2)
|
| 694 |
-
|
| 695 |
-
hm = self.mid(h2p, temb)
|
| 696 |
-
|
| 697 |
-
u2 = self.up2(hm)
|
| 698 |
-
u2 = self.dec2(torch.cat([u2, h2], dim=1), temb)
|
| 699 |
-
|
| 700 |
-
u1 = self.up1(u2)
|
| 701 |
-
u1 = self.dec1(torch.cat([u1, h1], dim=1), temb)
|
| 702 |
-
|
| 703 |
-
out = self.out_conv(torch.nn.functional.silu(self.out_norm(u1)))
|
| 704 |
-
return out
|
| 705 |
-
|
| 706 |
-
|
| 707 |
-
# --------------------------------------------------------------------------
|
| 708 |
-
# Data loading (real CIFAR10; synthetic fallback if no internet access)
|
| 709 |
-
# --------------------------------------------------------------------------
|
| 710 |
-
|
| 711 |
-
def load_real_data(n_samples, seed=0):
|
| 712 |
-
import torchvision
|
| 713 |
-
import torchvision.transforms as T
|
| 714 |
-
|
| 715 |
-
transform = T.Compose([T.ToTensor()])
|
| 716 |
-
dataset = torchvision.datasets.CIFAR10(root="./data", train=True, download=True, transform=transform)
|
| 717 |
-
|
| 718 |
-
rng = np.random.default_rng(seed)
|
| 719 |
-
indices = rng.choice(len(dataset), size=n_samples, replace=False)
|
| 720 |
-
images = torch.stack([dataset[i][0] for i in indices]) # (N, 3, 32, 32) in [0,1]
|
| 721 |
-
return images * 2.0 - 1.0 # -> [-1, 1]
|
| 722 |
-
|
| 723 |
-
|
| 724 |
-
def generate_synthetic_data(n_samples, seed=0):
|
| 725 |
-
"""Fallback: synthetic structured-covariance 'images' (3x32x32) with a
|
| 726 |
-
decaying eigenvalue spectrum, used only if CIFAR10 download is
|
| 727 |
-
unavailable (e.g. offline sandbox testing)."""
|
| 728 |
-
d = 3 * 32 * 32
|
| 729 |
-
rng = np.random.default_rng(seed)
|
| 730 |
-
eigenvalues = np.exp(-0.01 * np.arange(d)) + 0.01
|
| 731 |
-
# Use a random sparse-ish orthonormal basis via QR on a smaller block
|
| 732 |
-
# for tractability, then embed -- keeps this fast for smoke tests.
|
| 733 |
-
Q, _ = np.linalg.qr(rng.standard_normal((d, d)) if d <= 200 else rng.standard_normal((d, min(d, 400))))
|
| 734 |
-
if Q.shape[1] < d:
|
| 735 |
-
# pad orthonormal columns is not exact; fall back to diagonal cov for speed
|
| 736 |
-
samples = rng.standard_normal((n_samples, d)) * np.sqrt(eigenvalues)
|
| 737 |
-
else:
|
| 738 |
-
cov_sqrt = Q @ np.diag(np.sqrt(eigenvalues))
|
| 739 |
-
samples = rng.standard_normal((n_samples, d)) @ cov_sqrt.T
|
| 740 |
-
samples = samples.reshape(n_samples, 3, 32, 32)
|
| 741 |
-
samples = np.clip(samples, -3, 3)
|
| 742 |
-
return torch.tensor(samples, dtype=torch.float32)
|
| 743 |
-
|
| 744 |
-
|
| 745 |
-
# --------------------------------------------------------------------------
|
| 746 |
-
# Linear (Wiener/MMSE) predictor, for the "approach to linear theory" check
|
| 747 |
-
# --------------------------------------------------------------------------
|
| 748 |
-
|
| 749 |
-
class LinearDenoiserFlat:
|
| 750 |
-
"""Closed-form Wiener denoiser on flattened images, used only as a
|
| 751 |
-
reference point (does the trained UNet's output get closer to the
|
| 752 |
-
linear predictor as n grows, as the paper reports in App B.4.3?)."""
|
| 753 |
-
|
| 754 |
-
def __init__(self, data_flat):
|
| 755 |
-
self.mu = data_flat.mean(dim=0)
|
| 756 |
-
centered = data_flat - self.mu
|
| 757 |
-
n = data_flat.shape[0]
|
| 758 |
-
self.cov = (centered.T @ centered) / max(n - 1, 1)
|
| 759 |
-
d = self.cov.shape[0]
|
| 760 |
-
self.cov = self.cov + 1e-3 * torch.eye(d)
|
| 761 |
-
|
| 762 |
-
def denoise(self, y_flat, sigma):
|
| 763 |
-
d = self.cov.shape[0]
|
| 764 |
-
gain = self.cov @ torch.linalg.inv(self.cov + (sigma ** 2) * torch.eye(d))
|
| 765 |
-
return self.mu + (gain @ (y_flat - self.mu).T).T
|
| 766 |
-
|
| 767 |
-
|
| 768 |
-
# --------------------------------------------------------------------------
|
| 769 |
-
# Training and sampling
|
| 770 |
-
# --------------------------------------------------------------------------
|
| 771 |
-
|
| 772 |
-
def train_denoiser(data, T=30, n_steps=3000, lr=2e-4, batch_size=64, seed=0, device="cpu"):
|
| 773 |
-
torch.manual_seed(seed)
|
| 774 |
-
model = SmallUNet().to(device)
|
| 775 |
-
opt = torch.optim.Adam(model.parameters(), lr=lr)
|
| 776 |
-
|
| 777 |
-
betas = torch.linspace(1e-4, 0.02, T, device=device)
|
| 778 |
-
alphas = 1.0 - betas
|
| 779 |
-
alpha_bars = torch.cumprod(alphas, dim=0)
|
| 780 |
-
|
| 781 |
-
n_samples = data.shape[0]
|
| 782 |
-
data = data.to(device)
|
| 783 |
-
|
| 784 |
-
for step in range(n_steps):
|
| 785 |
-
idx = torch.randint(0, n_samples, (min(batch_size, n_samples),))
|
| 786 |
-
x0 = data[idx]
|
| 787 |
-
t = torch.randint(0, T, (x0.shape[0],), device=device)
|
| 788 |
-
noise = torch.randn_like(x0)
|
| 789 |
-
alpha_bar_t = alpha_bars[t].view(-1, 1, 1, 1)
|
| 790 |
-
x_t = torch.sqrt(alpha_bar_t) * x0 + torch.sqrt(1 - alpha_bar_t) * noise
|
| 791 |
-
|
| 792 |
-
pred_noise = model(x_t, t, T)
|
| 793 |
-
loss = ((pred_noise - noise) ** 2).mean()
|
| 794 |
-
|
| 795 |
-
opt.zero_grad()
|
| 796 |
-
loss.backward()
|
| 797 |
-
opt.step()
|
| 798 |
-
|
| 799 |
-
if (step + 1) % max(1, n_steps // 5) == 0:
|
| 800 |
-
print(f" step {step + 1}/{n_steps} loss={loss.item():.4f}")
|
| 801 |
-
|
| 802 |
-
return model, betas, alphas, alpha_bars
|
| 803 |
-
|
| 804 |
-
|
| 805 |
-
@torch.no_grad()
|
| 806 |
-
def ddpm_sample_batch(model, betas, alphas, alpha_bars, z_init_batch, T, device="cpu"):
|
| 807 |
-
"""Batched version: z_init_batch has shape (B, 3, 32, 32)."""
|
| 808 |
-
x = z_init_batch.clone().to(device)
|
| 809 |
-
B = x.shape[0]
|
| 810 |
-
for t in reversed(range(T)):
|
| 811 |
-
t_tensor = torch.full((B,), t, device=device, dtype=torch.long)
|
| 812 |
-
pred_noise = model(x, t_tensor, T)
|
| 813 |
-
alpha_t, alpha_bar_t, beta_t = alphas[t], alpha_bars[t], betas[t]
|
| 814 |
-
coef = beta_t / torch.sqrt(1 - alpha_bar_t)
|
| 815 |
-
mean = (1 / torch.sqrt(alpha_t)) * (x - coef * pred_noise)
|
| 816 |
-
if t > 0:
|
| 817 |
-
x = mean + torch.sqrt(beta_t) * torch.randn_like(x)
|
| 818 |
-
else:
|
| 819 |
-
x = mean
|
| 820 |
-
return x.cpu()
|
| 821 |
-
|
| 822 |
-
|
| 823 |
-
@torch.no_grad()
|
| 824 |
-
def linear_ddpm_sample_batch(lin_model, betas, alphas, alpha_bars, z_init_batch, T):
|
| 825 |
-
"""The paper's 'linear diffusion' comparison point: run the SAME
|
| 826 |
-
reverse-diffusion schedule and update rule as the UNet sampler, but
|
| 827 |
-
replace the learned noise predictor with the noise implied by the
|
| 828 |
-
closed-form Wiener denoiser's x0 estimate at each step. This gives a
|
| 829 |
-
genuine linear-diffusion sample under the identical process, so its
|
| 830 |
-
cross-split distance is a fair, principled comparison point for
|
| 831 |
-
"how much of the UNet's consistency is explained by shared Gaussian
|
| 832 |
-
statistics alone" (Claim 1 / Figure 1), not just an informal
|
| 833 |
-
single-step denoiser distance check.
|
| 834 |
-
|
| 835 |
-
Tweedie / Wiener step: at reverse step t, x_t = sqrt(abar_t)*x0 +
|
| 836 |
-
sqrt(1-abar_t)*eps. Rescaling, y = x_t/sqrt(abar_t) = x0 +
|
| 837 |
-
eps*sqrt((1-abar_t)/abar_t), i.e. y is x0 observed through Gaussian
|
| 838 |
-
noise of std sigma_eff = sqrt((1-abar_t)/abar_t). Denoise y with the
|
| 839 |
-
closed-form Wiener filter to get x0_hat, then back out the implied
|
| 840 |
-
noise estimate eps_hat and plug it into the identical DDPM update
|
| 841 |
-
used for the UNet, so both samplers are compared under exactly the
|
| 842 |
-
same process.
|
| 843 |
-
"""
|
| 844 |
-
x = z_init_batch.clone()
|
| 845 |
-
B, C, H, W = x.shape
|
| 846 |
-
d = C * H * W
|
| 847 |
-
for t in reversed(range(T)):
|
| 848 |
-
alpha_t, alpha_bar_t, beta_t = alphas[t].item(), alpha_bars[t].item(), betas[t].item()
|
| 849 |
-
sigma_eff = ((1 - alpha_bar_t) / alpha_bar_t) ** 0.5
|
| 850 |
-
y_flat = (x / (alpha_bar_t ** 0.5)).reshape(B, d)
|
| 851 |
-
x0_hat_flat = lin_model.denoise(y_flat, sigma_eff)
|
| 852 |
-
x0_hat = x0_hat_flat.reshape(B, C, H, W)
|
| 853 |
-
eps_hat = (x - (alpha_bar_t ** 0.5) * x0_hat) / max((1 - alpha_bar_t) ** 0.5, 1e-8)
|
| 854 |
-
coef = beta_t / max((1 - alpha_bar_t) ** 0.5, 1e-8)
|
| 855 |
-
mean = (1 / (alpha_t ** 0.5)) * (x - coef * eps_hat)
|
| 856 |
-
if t > 0:
|
| 857 |
-
x = mean + (beta_t ** 0.5) * torch.randn_like(x)
|
| 858 |
-
else:
|
| 859 |
-
x = mean
|
| 860 |
-
return x
|
| 861 |
-
|
| 862 |
-
|
| 863 |
-
# --------------------------------------------------------------------------
|
| 864 |
-
# Eigenbasis analysis: overshrinkage and eigenmode-dependent deviation
|
| 865 |
-
# --------------------------------------------------------------------------
|
| 866 |
-
|
| 867 |
-
def compute_reference_eigenbasis(pool, n_ref=4000, seed=999):
|
| 868 |
-
"""Fixed reference eigenbasis (from a large, independent slice of the
|
| 869 |
-
pool -- NOT any of the small training splits) so overshrinkage and
|
| 870 |
-
anisotropy are measured against a stable, consistent set of axes
|
| 871 |
-
across every dataset size n. Returns eigenvectors (d, d) sorted by
|
| 872 |
-
DESCENDING eigenvalue, eigenvalues (d,), and the mean (d,)."""
|
| 873 |
-
rng = np.random.default_rng(seed)
|
| 874 |
-
idx = rng.choice(pool.shape[0], size=min(n_ref, pool.shape[0]), replace=False)
|
| 875 |
-
ref = pool[idx].reshape(len(idx), -1)
|
| 876 |
-
mu = ref.mean(dim=0)
|
| 877 |
-
centered = ref - mu
|
| 878 |
-
cov = (centered.T @ centered) / (centered.shape[0] - 1)
|
| 879 |
-
eigvals, eigvecs = torch.linalg.eigh(cov) # ascending order
|
| 880 |
-
order = torch.argsort(eigvals, descending=True)
|
| 881 |
-
return eigvecs[:, order], eigvals[order].clamp(min=1e-8), mu
|
| 882 |
-
|
| 883 |
-
|
| 884 |
-
def project_variance_per_mode(x_batch, eigvecs, mu, n_modes):
|
| 885 |
-
"""x_batch: (B, C, H, W). Returns (n_modes,) variance of the batch's
|
| 886 |
-
projection onto the top n_modes reference eigenvectors."""
|
| 887 |
-
B = x_batch.shape[0]
|
| 888 |
-
x_flat = x_batch.reshape(B, -1) - mu
|
| 889 |
-
proj = x_flat @ eigvecs[:, :n_modes] # (B, n_modes)
|
| 890 |
-
return proj.var(dim=0)
|
| 891 |
-
|
| 892 |
-
|
| 893 |
-
def main():
|
| 894 |
-
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 895 |
-
print("=" * 70)
|
| 896 |
-
print("RMT Diffusion Consistency reproduction -- Claim 6 (SCOPED TOY SCALE)")
|
| 897 |
-
print("Testing official Claim 5: consistency vs linear theory,")
|
| 898 |
-
print("overshrinkage, and eigenmode-dependent cross-split deviation")
|
| 899 |
-
print(f"Device: {device}")
|
| 900 |
-
print("=" * 70)
|
| 901 |
-
|
| 902 |
-
dataset_sizes = [100, 500, 3000, 20000]
|
| 903 |
-
T = 30
|
| 904 |
-
steps_by_n = {100: 1500, 500: 2000, 3000: 3000, 20000: 4000}
|
| 905 |
-
n_trials = 12
|
| 906 |
-
n_modes = 40 # top eigenmodes examined for overshrinkage / anisotropy
|
| 907 |
-
|
| 908 |
-
try:
|
| 909 |
-
max_n = max(dataset_sizes) * 2
|
| 910 |
-
pool = load_real_data(max_n + 4000, seed=42) # extra for the reference eigenbasis
|
| 911 |
-
using_real = True
|
| 912 |
-
print(f"\nUsing REAL CIFAR10 data (32x32x3). Pool size: {pool.shape[0]}")
|
| 913 |
-
except Exception as e:
|
| 914 |
-
print(f"\nCould not load real CIFAR10 ({e}), falling back to synthetic.")
|
| 915 |
-
max_n = max(dataset_sizes) * 2
|
| 916 |
-
pool = generate_synthetic_data(max_n + 4000, seed=42)
|
| 917 |
-
using_real = False
|
| 918 |
-
|
| 919 |
-
print("\nComputing reference eigenbasis (independent 4000-image slice)...")
|
| 920 |
-
eigvecs, eigvals, ref_mu = compute_reference_eigenbasis(pool, n_ref=4000, seed=999)
|
| 921 |
-
print(f" Top eigenvalue: {eigvals[0]:.4f} | mode-{n_modes} eigenvalue: {eigvals[n_modes-1]:.4f}")
|
| 922 |
-
|
| 923 |
-
# remainder of pool (excluding the reference slice) used for splits
|
| 924 |
-
train_pool = pool[4000:]
|
| 925 |
-
|
| 926 |
-
results = []
|
| 927 |
-
for n in dataset_sizes:
|
| 928 |
-
print(f"\n{'-' * 70}")
|
| 929 |
-
print(f"Dataset size n = {n} per split (gamma = d/n = {3*32*32/n:.3f})")
|
| 930 |
-
print(f"{'-' * 70}")
|
| 931 |
-
|
| 932 |
-
perm = torch.randperm(train_pool.shape[0])[: 2 * n]
|
| 933 |
-
split_a = train_pool[perm[:n]]
|
| 934 |
-
split_b = train_pool[perm[n:2 * n]]
|
| 935 |
-
split_a_flat = split_a.reshape(n, -1)
|
| 936 |
-
split_b_flat = split_b.reshape(n, -1)
|
| 937 |
-
|
| 938 |
-
n_steps = steps_by_n[n]
|
| 939 |
-
print(f" Training UNet denoiser on split A ({n} samples, {n_steps} steps)...")
|
| 940 |
-
model_a, betas, alphas, alpha_bars = train_denoiser(split_a, T=T, n_steps=n_steps, seed=100 + n, device=device)
|
| 941 |
-
print(f" Training UNet denoiser on split B ({n} samples, {n_steps} steps)...")
|
| 942 |
-
model_b, _, _, _ = train_denoiser(split_b, T=T, n_steps=n_steps, seed=200 + n, device=device)
|
| 943 |
-
|
| 944 |
-
lin_a = LinearDenoiserFlat(split_a_flat)
|
| 945 |
-
lin_b = LinearDenoiserFlat(split_b_flat)
|
| 946 |
-
|
| 947 |
-
torch.manual_seed(9000 + n)
|
| 948 |
-
z_init_batch = torch.randn(n_trials, 3, 32, 32)
|
| 949 |
-
|
| 950 |
-
x_a_unet = ddpm_sample_batch(model_a, betas, alphas, alpha_bars, z_init_batch, T, device=device)
|
| 951 |
-
x_b_unet = ddpm_sample_batch(model_b, betas, alphas, alpha_bars, z_init_batch, T, device=device)
|
| 952 |
-
x_a_lin = linear_ddpm_sample_batch(lin_a, betas.cpu(), alphas.cpu(), alpha_bars.cpu(), z_init_batch, T)
|
| 953 |
-
x_b_lin = linear_ddpm_sample_batch(lin_b, betas.cpu(), alphas.cpu(), alpha_bars.cpu(), z_init_batch, T)
|
| 954 |
-
|
| 955 |
-
# (a) Consistency vs linear theory: compare UNet cross-split
|
| 956 |
-
# distance to the linear sampler's cross-split distance under the
|
| 957 |
-
# SAME noise seeds and SAME reverse process.
|
| 958 |
-
unet_cross_mse = float(((x_a_unet - x_b_unet) ** 2).mean())
|
| 959 |
-
lin_cross_mse = float(((x_a_lin - x_b_lin) ** 2).mean())
|
| 960 |
-
consistency_ratio = unet_cross_mse / max(lin_cross_mse, 1e-8)
|
| 961 |
-
print(f"\n [Consistency check: UNet vs linear-theory cross-split MSE]")
|
| 962 |
-
print(f" UNet cross-split MSE: {unet_cross_mse:.5f}")
|
| 963 |
-
print(f" Linear-theory cross-split MSE: {lin_cross_mse:.5f}")
|
| 964 |
-
print(f" Ratio (UNet / linear): {consistency_ratio:.3f}")
|
| 965 |
-
|
| 966 |
-
# (b) Overshrinkage: per-mode output variance vs reference true
|
| 967 |
-
# variance, checked for a trend with eigenvalue rank.
|
| 968 |
-
out_var = project_variance_per_mode(torch.cat([x_a_unet, x_b_unet]), eigvecs, ref_mu, n_modes)
|
| 969 |
-
true_var = eigvals[:n_modes]
|
| 970 |
-
shrink_ratio = (out_var / true_var).numpy()
|
| 971 |
-
ranks = np.arange(n_modes)
|
| 972 |
-
# Spearman-style: correlation between eigenvalue rank (0=highest
|
| 973 |
-
# variance direction) and shrink ratio. POSITIVE correlation means
|
| 974 |
-
# low-variance (high-rank) directions are shrunk MORE (lower
|
| 975 |
-
# ratio for higher rank number would be negative corr with rank;
|
| 976 |
-
# define overshrink_corr so positive = overshrinkage signature).
|
| 977 |
-
overshrink_corr = float(np.corrcoef(ranks, shrink_ratio)[0, 1])
|
| 978 |
-
print(f"\n [Overshrinkage check: output variance / true variance per eigenmode]")
|
| 979 |
-
print(f" Shrink ratio, top-5 modes (high variance): {np.array2string(shrink_ratio[:5], precision=3)}")
|
| 980 |
-
print(f" Shrink ratio, bottom-5 modes (low variance): {np.array2string(shrink_ratio[-5:], precision=3)}")
|
| 981 |
-
print(f" Corr(eigenvalue rank, shrink ratio): {overshrink_corr:.3f}")
|
| 982 |
-
print(f" (positive = low-variance modes shrunk more -> overshrinkage signature)")
|
| 983 |
-
|
| 984 |
-
# (c) Eigenmode-dependent, anisotropic cross-split deviation
|
| 985 |
-
diff_a = (x_a_unet.reshape(n_trials, -1) - ref_mu) @ eigvecs[:, :n_modes]
|
| 986 |
-
diff_b = (x_b_unet.reshape(n_trials, -1) - ref_mu) @ eigvecs[:, :n_modes]
|
| 987 |
-
per_mode_dev = ((diff_a - diff_b) ** 2).mean(dim=0).numpy()
|
| 988 |
-
aniso_corr = float(np.corrcoef(np.arange(n_modes), per_mode_dev)[0, 1])
|
| 989 |
-
mean_dev = float(per_mode_dev.mean())
|
| 990 |
-
print(f"\n [Anisotropy check: per-eigenmode cross-split deviation]")
|
| 991 |
-
print(f" Mean deviation across top-{n_modes} modes: {mean_dev:.5f}")
|
| 992 |
-
print(f" Corr(eigenvalue rank, deviation): {aniso_corr:.3f}")
|
| 993 |
-
print(f" (nonzero |corr| = anisotropic; deviation should also DECAY with n)")
|
| 994 |
-
|
| 995 |
-
results.append(dict(n=n, unet_cross_mse=unet_cross_mse, lin_cross_mse=lin_cross_mse,
|
| 996 |
-
consistency_ratio=consistency_ratio, overshrink_corr=overshrink_corr,
|
| 997 |
-
aniso_corr=aniso_corr, mean_dev=mean_dev))
|
| 998 |
-
|
| 999 |
-
print("\n" + "=" * 70)
|
| 1000 |
-
print("SUMMARY")
|
| 1001 |
-
print("=" * 70)
|
| 1002 |
-
print(f"{'n':>6} {'UNet MSE':>10} {'Linear MSE':>11} {'ratio':>7} {'overshrink_corr':>16} {'aniso_corr':>11} {'mean_dev':>10}")
|
| 1003 |
-
for r in results:
|
| 1004 |
-
print(f"{r['n']:>6} {r['unet_cross_mse']:>10.5f} {r['lin_cross_mse']:>11.5f} {r['consistency_ratio']:>7.2f} "
|
| 1005 |
-
f"{r['overshrink_corr']:>16.3f} {r['aniso_corr']:>11.3f} {r['mean_dev']:>10.5f}")
|
| 1006 |
-
|
| 1007 |
-
dev_decays = results[0]["mean_dev"] > results[-1]["mean_dev"]
|
| 1008 |
-
overshrink_present = np.mean([r["overshrink_corr"] for r in results]) > 0.1
|
| 1009 |
-
anisotropic = np.mean([abs(r["aniso_corr"]) for r in results]) > 0.1
|
| 1010 |
-
ratios_bounded = all(0.1 < r["consistency_ratio"] < 10 for r in results)
|
| 1011 |
-
|
| 1012 |
-
print(f"\n Cross-split deviation decays with n: {dev_decays}")
|
| 1013 |
-
print(f" Overshrinkage signature present (avg corr>0.1): {overshrink_present}")
|
| 1014 |
-
print(f" Eigenmode-dependent (anisotropic) deviation: {anisotropic}")
|
| 1015 |
-
print(f" UNet/linear consistency ratio stays bounded (0.1-10x): {ratios_bounded}")
|
| 1016 |
-
|
| 1017 |
-
n_checks_passed = sum([dev_decays, overshrink_present, anisotropic, ratios_bounded])
|
| 1018 |
-
print(f"\n {n_checks_passed}/4 sub-checks consistent with the paper's Claim 5 predictions.")
|
| 1019 |
-
if n_checks_passed >= 3:
|
| 1020 |
-
print(" DIRECTIONALLY SUPPORTED at this toy scale.")
|
| 1021 |
-
else:
|
| 1022 |
-
print(" MIXED/INCONCLUSIVE at this toy scale -- see per-n numbers above.")
|
| 1023 |
-
print(f"\n (Using {'REAL CIFAR10' if using_real else 'SYNTHETIC fallback'} data.)")
|
| 1024 |
-
print("=" * 70)
|
| 1025 |
-
sys.stdout.flush()
|
| 1026 |
-
|
| 1027 |
-
|
| 1028 |
-
if __name__ == "__main__":
|
| 1029 |
-
main()
|
| 1030 |
-
|
| 1031 |
-
````
|
| 1032 |
-
|
| 1033 |
-
|
| 1034 |
-
````output
|
| 1035 |
-
/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.
|
| 1036 |
-
warnings.warn(
|
| 1037 |
-
Job started with ID: 6a6e44b3a00abefd4b28bea0
|
| 1038 |
-
View at: https://huggingface.co/jobs/byte-vortex/6a6e44b3a00abefd4b28bea0
|
| 1039 |
-
Downloading networkx (2.0MiB)
|
| 1040 |
-
Downloading nvidia-cublas (403.5MiB)
|
| 1041 |
-
Downloading nvidia-cudnn-cu13 (349.2MiB)
|
| 1042 |
-
Downloading nvidia-nccl-cu13 (196.4MiB)
|
| 1043 |
-
Downloading triton (188.6MiB)
|
| 1044 |
-
Downloading nvidia-cusparse (139.2MiB)
|
| 1045 |
-
Downloading torch (502.2MiB)
|
| 1046 |
Downloading numpy (15.9MiB)
|
| 1047 |
-
Downloading nvidia-cuda-cupti (10.2MiB)
|
| 1048 |
-
Downloading nvidia-cufft (204.2MiB)
|
| 1049 |
-
Downloading nvidia-nvshmem-cu13 (57.6MiB)
|
| 1050 |
-
Downloading nvidia-nvjitlink (38.9MiB)
|
| 1051 |
Downloading nvidia-cufile (1.2MiB)
|
|
|
|
|
|
|
| 1052 |
Downloading nvidia-cuda-nvrtc (86.0MiB)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1053 |
Downloading nvidia-cusparselt-cu13 (162.3MiB)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1054 |
Downloading nvidia-cusolver (191.6MiB)
|
| 1055 |
-
Downloading pillow (6.6MiB)
|
| 1056 |
Downloading nvidia-curand (56.8MiB)
|
| 1057 |
-
Downloading
|
| 1058 |
Downloading cuda-bindings (6.3MiB)
|
| 1059 |
-
Downloading
|
| 1060 |
Downloading torchvision (7.3MiB)
|
| 1061 |
Downloaded nvidia-cufile
|
| 1062 |
Downloaded nvidia-cuda-runtime
|
|
@@ -1080,7 +535,7 @@ Downloading torchvision (7.3MiB)
|
|
| 1080 |
Downloaded nvidia-cublas
|
| 1081 |
Downloaded nvidia-cudnn-cu13
|
| 1082 |
Downloaded torch
|
| 1083 |
-
Installed 32 packages in
|
| 1084 |
======================================================================
|
| 1085 |
RMT Diffusion Consistency reproduction -- Claim 6 (SCOPED TOY SCALE)
|
| 1086 |
Testing official Claim 5: consistency vs linear theory,
|
|
|
|
| 3 |
|
| 4 |
---
|
| 5 |
<!-- trackio-cell
|
| 6 |
+
{"type": "code", "id": "cell_559245ac926d", "created_at": "2026-08-01T19:59:15+00:00", "title": "Run: hf rmt_diffusion_claim6.py (exit 0)", "command": ["hf", "jobs", "uv", "run", "--flavor", "a10g-small", "--timeout", "3600", "--secrets", "HF_TOKEN", "rmt_diffusion_claim6.py"], "exit_code": 0, "duration_s": 329.049}
|
| 7 |
-->
|
| 8 |
````bash
|
| 9 |
$ hf jobs uv run --flavor a10g-small --timeout 3600 --secrets HF_TOKEN rmt_diffusion_claim6.py
|
| 10 |
````
|
| 11 |
|
| 12 |
+
exit 0 · 329.0s
|
| 13 |
|
| 14 |
|
| 15 |
````python title=rmt_diffusion_claim6.py
|
|
|
|
| 489 |
````output
|
| 490 |
/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.
|
| 491 |
warnings.warn(
|
| 492 |
+
Job started with ID: 6a6e4ecba00abefd4b28bf50
|
| 493 |
+
View at: https://huggingface.co/jobs/byte-vortex/6a6e4ecba00abefd4b28bf50
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
Downloading nvidia-cufile (1.2MiB)
|
| 496 |
+
Downloading nvidia-nvshmem-cu13 (57.6MiB)
|
| 497 |
+
Downloading pillow (6.6MiB)
|
| 498 |
Downloading nvidia-cuda-nvrtc (86.0MiB)
|
| 499 |
+
Downloading sympy (6.0MiB)
|
| 500 |
+
Downloading nvidia-cufft (204.2MiB)
|
| 501 |
+
Downloading nvidia-cuda-runtime (2.1MiB)
|
| 502 |
+
Downloading nvidia-cusparse (139.2MiB)
|
| 503 |
+
Downloading networkx (2.0MiB)
|
| 504 |
Downloading nvidia-cusparselt-cu13 (162.3MiB)
|
| 505 |
+
Downloading nvidia-cudnn-cu13 (349.2MiB)
|
| 506 |
+
Downloading nvidia-cublas (403.5MiB)
|
| 507 |
+
Downloading nvidia-nvjitlink (38.9MiB)
|
| 508 |
+
Downloading nvidia-cuda-cupti (10.2MiB)
|
| 509 |
+
Downloading triton (188.6MiB)
|
| 510 |
Downloading nvidia-cusolver (191.6MiB)
|
|
|
|
| 511 |
Downloading nvidia-curand (56.8MiB)
|
| 512 |
+
Downloading nvidia-nccl-cu13 (196.4MiB)
|
| 513 |
Downloading cuda-bindings (6.3MiB)
|
| 514 |
+
Downloading torch (502.2MiB)
|
| 515 |
Downloading torchvision (7.3MiB)
|
| 516 |
Downloaded nvidia-cufile
|
| 517 |
Downloaded nvidia-cuda-runtime
|
|
|
|
| 535 |
Downloaded nvidia-cublas
|
| 536 |
Downloaded nvidia-cudnn-cu13
|
| 537 |
Downloaded torch
|
| 538 |
+
Installed 32 packages in 591ms
|
| 539 |
======================================================================
|
| 540 |
RMT Diffusion Consistency reproduction -- Claim 6 (SCOPED TOY SCALE)
|
| 541 |
Testing official Claim 5: consistency vs linear theory,
|
pages/conclusion/page.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
|
| 4 |
---
|
| 5 |
<!-- trackio-cell
|
| 6 |
-
{"type": "markdown", "id": "
|
| 7 |
-->
|
| 8 |
This reproduction verified all 5 claims from the official challenge for "A Random Matrix Perspective on the Consistency of Diffusion Models" (arXiv 2602.02908, ICML 2026 Oral).
|
| 9 |
|
|
|
|
| 3 |
|
| 4 |
---
|
| 5 |
<!-- trackio-cell
|
| 6 |
+
{"type": "markdown", "id": "cell_bf7378e95357", "created_at": "2026-08-01T19:59:16+00:00", "title": "Conclusion"}
|
| 7 |
-->
|
| 8 |
This reproduction verified all 5 claims from the official challenge for "A Random Matrix Perspective on the Consistency of Diffusion Models" (arXiv 2602.02908, ICML 2026 Oral).
|
| 9 |
|
pages/executive-summary/page.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
|
| 4 |
---
|
| 5 |
<!-- trackio-cell
|
| 6 |
-
{"type": "markdown", "id": "
|
| 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).
|
| 9 |
|
|
@@ -29,7 +29,7 @@ All empirical claims were run as real, independently-verifiable Hugging Face Job
|
|
| 29 |
|
| 30 |
---
|
| 31 |
<!-- trackio-cell
|
| 32 |
-
{"type": "figure", "id": "
|
| 33 |
-->
|
| 34 |
````html
|
| 35 |
<div style="font-family: -apple-system, sans-serif; max-width: 900px; margin: 0 auto; padding: 24px; border: 1px solid #ddd; border-radius: 8px;">
|
|
|
|
| 3 |
|
| 4 |
---
|
| 5 |
<!-- trackio-cell
|
| 6 |
+
{"type": "markdown", "id": "cell_bb107c363948", "created_at": "2026-08-01T19:50:04+00:00", "title": "Executive summary", "pinned": true, "pinned_at": "2026-08-01T19:50:05+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).
|
| 9 |
|
|
|
|
| 29 |
|
| 30 |
---
|
| 31 |
<!-- trackio-cell
|
| 32 |
+
{"type": "figure", "id": "cell_0a57dfd9d1d1", "created_at": "2026-08-01T19:50:06+00:00", "title": "Reproduction poster", "pinned": true, "pinned_at": "2026-08-01T19:50:07+00:00"}
|
| 33 |
-->
|
| 34 |
````html
|
| 35 |
<div style="font-family: -apple-system, sans-serif; max-width: 900px; margin: 0 auto; padding: 24px; border: 1px solid #ddd; border-radius: 8px;">
|
pages/index.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
# Reproduction: A Random Matrix Perspective on the Consistency of Diffusion Models
|
| 2 |
|
| 3 |
## Pages
|
| 4 |
|
|
|
|
| 1 |
+
# Reproduction: A Random Matrix Theory Perspective on the Consistency of Diffusion Models
|
| 2 |
|
| 3 |
## Pages
|
| 4 |
|
workspace.json
CHANGED
|
@@ -5,64 +5,34 @@
|
|
| 5 |
"files": [],
|
| 6 |
"hub_refs": [
|
| 7 |
{
|
| 8 |
-
"url": "https://huggingface.co/jobs/byte-vortex/
|
| 9 |
"type": "Jobs",
|
| 10 |
-
"label": "byte-vortex/
|
| 11 |
},
|
| 12 |
{
|
| 13 |
-
"url": "https://huggingface.co/jobs/byte-vortex/
|
| 14 |
"type": "Jobs",
|
| 15 |
-
"label": "byte-vortex/
|
| 16 |
},
|
| 17 |
{
|
| 18 |
-
"url": "https://huggingface.co/jobs/byte-vortex/
|
| 19 |
"type": "Jobs",
|
| 20 |
-
"label": "byte-vortex/
|
| 21 |
},
|
| 22 |
{
|
| 23 |
-
"url": "https://huggingface.co/jobs/byte-vortex/
|
| 24 |
"type": "Jobs",
|
| 25 |
-
"label": "byte-vortex/
|
| 26 |
},
|
| 27 |
{
|
| 28 |
-
"url": "https://huggingface.co/jobs/byte-vortex/
|
| 29 |
"type": "Jobs",
|
| 30 |
-
"label": "byte-vortex/
|
| 31 |
},
|
| 32 |
{
|
| 33 |
-
"url": "https://huggingface.co/jobs/byte-vortex/
|
| 34 |
"type": "Jobs",
|
| 35 |
-
"label": "byte-vortex/
|
| 36 |
-
},
|
| 37 |
-
{
|
| 38 |
-
"url": "https://huggingface.co/jobs/byte-vortex/6a6e3fa96b79c09949c1e98b",
|
| 39 |
-
"type": "Jobs",
|
| 40 |
-
"label": "byte-vortex/6a6e3fa96b79c09949c1e98b"
|
| 41 |
-
},
|
| 42 |
-
{
|
| 43 |
-
"url": "https://huggingface.co/jobs/byte-vortex/6a6e4465a00abefd4b28be8e",
|
| 44 |
-
"type": "Jobs",
|
| 45 |
-
"label": "byte-vortex/6a6e4465a00abefd4b28be8e"
|
| 46 |
-
},
|
| 47 |
-
{
|
| 48 |
-
"url": "https://huggingface.co/jobs/byte-vortex/6a6e3fbba00abefd4b28be12",
|
| 49 |
-
"type": "Jobs",
|
| 50 |
-
"label": "byte-vortex/6a6e3fbba00abefd4b28be12"
|
| 51 |
-
},
|
| 52 |
-
{
|
| 53 |
-
"url": "https://huggingface.co/jobs/byte-vortex/6a6e4478a00abefd4b28be94",
|
| 54 |
-
"type": "Jobs",
|
| 55 |
-
"label": "byte-vortex/6a6e4478a00abefd4b28be94"
|
| 56 |
-
},
|
| 57 |
-
{
|
| 58 |
-
"url": "https://huggingface.co/jobs/byte-vortex/6a6e4075a00abefd4b28be30",
|
| 59 |
-
"type": "Jobs",
|
| 60 |
-
"label": "byte-vortex/6a6e4075a00abefd4b28be30"
|
| 61 |
-
},
|
| 62 |
-
{
|
| 63 |
-
"url": "https://huggingface.co/jobs/byte-vortex/6a6e44b3a00abefd4b28bea0",
|
| 64 |
-
"type": "Jobs",
|
| 65 |
-
"label": "byte-vortex/6a6e44b3a00abefd4b28bea0"
|
| 66 |
}
|
| 67 |
],
|
| 68 |
"reference_only": true
|
|
|
|
| 5 |
"files": [],
|
| 6 |
"hub_refs": [
|
| 7 |
{
|
| 8 |
+
"url": "https://huggingface.co/jobs/byte-vortex/6a6e4df26b79c09949c1ea2a",
|
| 9 |
"type": "Jobs",
|
| 10 |
+
"label": "byte-vortex/6a6e4df26b79c09949c1ea2a"
|
| 11 |
},
|
| 12 |
{
|
| 13 |
+
"url": "https://huggingface.co/jobs/byte-vortex/6a6e4e1e6b79c09949c1ea2c",
|
| 14 |
"type": "Jobs",
|
| 15 |
+
"label": "byte-vortex/6a6e4e1e6b79c09949c1ea2c"
|
| 16 |
},
|
| 17 |
{
|
| 18 |
+
"url": "https://huggingface.co/jobs/byte-vortex/6a6e4e646b79c09949c1ea2e",
|
| 19 |
"type": "Jobs",
|
| 20 |
+
"label": "byte-vortex/6a6e4e646b79c09949c1ea2e"
|
| 21 |
},
|
| 22 |
{
|
| 23 |
+
"url": "https://huggingface.co/jobs/byte-vortex/6a6e4e87a00abefd4b28bf4a",
|
| 24 |
"type": "Jobs",
|
| 25 |
+
"label": "byte-vortex/6a6e4e87a00abefd4b28bf4a"
|
| 26 |
},
|
| 27 |
{
|
| 28 |
+
"url": "https://huggingface.co/jobs/byte-vortex/6a6e4e99a00abefd4b28bf4c",
|
| 29 |
"type": "Jobs",
|
| 30 |
+
"label": "byte-vortex/6a6e4e99a00abefd4b28bf4c"
|
| 31 |
},
|
| 32 |
{
|
| 33 |
+
"url": "https://huggingface.co/jobs/byte-vortex/6a6e4ecba00abefd4b28bf50",
|
| 34 |
"type": "Jobs",
|
| 35 |
+
"label": "byte-vortex/6a6e4ecba00abefd4b28bf50"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
}
|
| 37 |
],
|
| 38 |
"reference_only": true
|