Rootport commited on
Commit
fa78de4
·
verified ·
1 Parent(s): 69d8e54

Add Stage5 analysis: analysis-stage5-families (FINDINGS, tables, surfaces/scatter figures, scripts)

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. analysis/stage5-families/FINDINGS-families.md +243 -0
  2. analysis/stage5-families/analyze_families.py +335 -0
  3. analysis/stage5-families/run.log +926 -0
  4. analysis/stage5-families/scatter/make_scatter.py +209 -0
  5. analysis/stage5-families/scatter/scatter-lpips_ERSDE-Simple_Prompt001-schoolgirl-5193.png +3 -0
  6. analysis/stage5-families/scatter/scatter-lpips_ERSDE-Simple_Prompt001-schoolgirl-6111.png +3 -0
  7. analysis/stage5-families/scatter/scatter-lpips_ERSDE-Simple_Prompt001-schoolgirl-9676.png +3 -0
  8. analysis/stage5-families/scatter/scatter-lpips_ERSDE-Simple_Prompt002-android-5193.png +3 -0
  9. analysis/stage5-families/scatter/scatter-lpips_ERSDE-Simple_Prompt002-android-6111.png +3 -0
  10. analysis/stage5-families/scatter/scatter-lpips_ERSDE-Simple_Prompt002-android-9676.png +3 -0
  11. analysis/stage5-families/scatter/scatter-lpips_ERSDE-Simple_Prompt003-woman-5193.png +3 -0
  12. analysis/stage5-families/scatter/scatter-lpips_ERSDE-Simple_Prompt003-woman-6111.png +3 -0
  13. analysis/stage5-families/scatter/scatter-lpips_ERSDE-Simple_Prompt003-woman-9676.png +3 -0
  14. analysis/stage5-families/scatter/scatter-lpips_ERSDE-Simple_Prompt004-shop-5193.png +3 -0
  15. analysis/stage5-families/scatter/scatter-lpips_ERSDE-Simple_Prompt004-shop-6111.png +3 -0
  16. analysis/stage5-families/scatter/scatter-lpips_ERSDE-Simple_Prompt004-shop-9676.png +3 -0
  17. analysis/stage5-families/scatter/scatter-lpips_ERSDE-Simple_Prompt005-inkwash-5193.png +3 -0
  18. analysis/stage5-families/scatter/scatter-lpips_ERSDE-Simple_Prompt005-inkwash-6111.png +3 -0
  19. analysis/stage5-families/scatter/scatter-lpips_ERSDE-Simple_Prompt005-inkwash-9676.png +3 -0
  20. analysis/stage5-families/scatter/scatter-lpips_Euler-Beta_Prompt001-schoolgirl-5193.png +3 -0
  21. analysis/stage5-families/scatter/scatter-lpips_Euler-Beta_Prompt001-schoolgirl-6111.png +3 -0
  22. analysis/stage5-families/scatter/scatter-lpips_Euler-Beta_Prompt001-schoolgirl-9676.png +3 -0
  23. analysis/stage5-families/scatter/scatter-lpips_Euler-Beta_Prompt002-android-5193.png +3 -0
  24. analysis/stage5-families/scatter/scatter-lpips_Euler-Beta_Prompt002-android-6111.png +3 -0
  25. analysis/stage5-families/scatter/scatter-lpips_Euler-Beta_Prompt002-android-9676.png +3 -0
  26. analysis/stage5-families/scatter/scatter-lpips_Euler-Beta_Prompt003-woman-5193.png +3 -0
  27. analysis/stage5-families/scatter/scatter-lpips_Euler-Beta_Prompt003-woman-6111.png +3 -0
  28. analysis/stage5-families/scatter/scatter-lpips_Euler-Beta_Prompt003-woman-9676.png +3 -0
  29. analysis/stage5-families/scatter/scatter-lpips_Euler-Beta_Prompt004-shop-5193.png +3 -0
  30. analysis/stage5-families/scatter/scatter-lpips_Euler-Beta_Prompt004-shop-6111.png +3 -0
  31. analysis/stage5-families/scatter/scatter-lpips_Euler-Beta_Prompt004-shop-9676.png +3 -0
  32. analysis/stage5-families/scatter/scatter-lpips_Euler-Beta_Prompt005-inkwash-5193.png +3 -0
  33. analysis/stage5-families/scatter/scatter-lpips_Euler-Beta_Prompt005-inkwash-6111.png +3 -0
  34. analysis/stage5-families/scatter/scatter-lpips_Euler-Beta_Prompt005-inkwash-9676.png +3 -0
  35. analysis/stage5-families/scatter/scatter-ssim_ERSDE-Simple_Prompt001-schoolgirl-5193.png +3 -0
  36. analysis/stage5-families/scatter/scatter-ssim_ERSDE-Simple_Prompt001-schoolgirl-6111.png +3 -0
  37. analysis/stage5-families/scatter/scatter-ssim_ERSDE-Simple_Prompt001-schoolgirl-9676.png +3 -0
  38. analysis/stage5-families/scatter/scatter-ssim_ERSDE-Simple_Prompt002-android-5193.png +3 -0
  39. analysis/stage5-families/scatter/scatter-ssim_ERSDE-Simple_Prompt002-android-6111.png +3 -0
  40. analysis/stage5-families/scatter/scatter-ssim_ERSDE-Simple_Prompt002-android-9676.png +3 -0
  41. analysis/stage5-families/scatter/scatter-ssim_ERSDE-Simple_Prompt003-woman-5193.png +3 -0
  42. analysis/stage5-families/scatter/scatter-ssim_ERSDE-Simple_Prompt003-woman-6111.png +3 -0
  43. analysis/stage5-families/scatter/scatter-ssim_ERSDE-Simple_Prompt003-woman-9676.png +3 -0
  44. analysis/stage5-families/scatter/scatter-ssim_ERSDE-Simple_Prompt004-shop-5193.png +3 -0
  45. analysis/stage5-families/scatter/scatter-ssim_ERSDE-Simple_Prompt004-shop-6111.png +3 -0
  46. analysis/stage5-families/scatter/scatter-ssim_ERSDE-Simple_Prompt004-shop-9676.png +3 -0
  47. analysis/stage5-families/scatter/scatter-ssim_ERSDE-Simple_Prompt005-inkwash-5193.png +3 -0
  48. analysis/stage5-families/scatter/scatter-ssim_ERSDE-Simple_Prompt005-inkwash-6111.png +3 -0
  49. analysis/stage5-families/scatter/scatter-ssim_ERSDE-Simple_Prompt005-inkwash-9676.png +3 -0
  50. analysis/stage5-families/scatter/scatter-ssim_Euler-Beta_Prompt001-schoolgirl-5193.png +3 -0
analysis/stage5-families/FINDINGS-families.md ADDED
@@ -0,0 +1,243 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 第5段階・サンプラー系比較 応答曲面分析(ERSDE-Simple / Euler-Beta)
2
+
3
+ - データ: `Judge-results/Stage5-Families_20260907-235041/merged-results.csv`(3,330行 = 2系 x 15条件 x 111枚、欠損なし)
4
+ - 対象: ERSDE-Simple、Euler-Beta x Prompt001〜005 x seed {5193, 6111, 9676}、各系 N=15
5
+ - 主要指標: LPIPS-VGG(小さいほど良い)。副次: SSIM win11 (Wang)、散布図は SSIM win7 (skimage)
6
+ - 損傷スケールの物差し: アンカー(±1ステップの自然揺らぎ)= 0.121
7
+ - 生成スクリプト: `analyze_families.py`、`scatter/make_scatter.py`(いずれも再実行可能)
8
+ - 比較対象: ERSDE-Beta(走査1)の既分析結果 `analysis-stage5-scan1/tables/`(再計算していない)
9
+
10
+ ## 0. 分析上の扱い(走査1と同一)
11
+
12
+ **strength=0 行の扱い**: strength=0 では予測項が消えるため smoothing は無効になる。実生成でも `reuse.png` 1枚しか撮っていない。11x11 グリッドの strength=0 行には **reuse の実測値を11列すべてに複製**して埋めた(11点の独立測定ではなく1点の複製)。したがって「条件の最適点が strength=0 に来た」という結果は、**その条件では格子上のどの予測設定も reuse を上回れなかった**ことを意味する。
13
+
14
+ **局所最小の数え方**: 実測された strength>=0.1 の 10x11 ブロックについて、8近傍のいずれよりも真に小さいセルを局所最小として数えた(複製行 strength=0 は除外)。
15
+
16
+ **y軸レンジの扱い(散布図)**: 走査1のレンジ(LPIPS 0.255〜0.993 / SSIM-win7 0.000〜0.881)では本データがはみ出す(実測 LPIPS 0.078〜1.043、SSIM-win7 0.0005〜0.971)。そこで**3系を通した全系共通の新レンジ**に統一した:
17
+
18
+ - **LPIPS-VGG: 0.058 〜 1.063**
19
+ - **SSIM (win7): 0.000 〜 0.991**
20
+
21
+ 走査1の散布図は既存ファイル変更禁止のため再描画していない。**3系を並べて目視比較する際は、走査1のCSVにも同じレンジを適用して描き直す必要がある**(`scatter/make_scatter.py` 冒頭の `UNIFIED_*` を流用可)。
22
+
23
+ ---
24
+
25
+ # I. ERSDE-Simple
26
+
27
+ 出力: ヒートマップ `surfaces/surface_ERSDE-Simple_*.png` と `surface_MEDIAN-15cond_ERSDE-Simple.png` / `surface_MEAN-15cond_ERSDE-Simple.png`、散布図 `scatter/scatter-lpips_ERSDE-Simple_*.png`・`scatter/scatter-ssim_ERSDE-Simple_*.png` と `scatter/sheet-lpips_ERSDE-Simple.png`・`scatter/sheet-ssim_ERSDE-Simple.png`、表 `tables/*_ERSDE-Simple.csv`、`tables/summary_ERSDE-Simple.json`
28
+
29
+ ## I-1. 条件別曲面と最適点
30
+
31
+ reuse 基線: LPIPS 中央値 **0.324**、範囲 0.160〜0.504(ERSDE-Beta の 0.413 より軽い)。
32
+
33
+ | 条件 | strength | smoothing | LPIPS | reuse | 改善 |
34
+ |---|---|---|---|---|---|
35
+ | P001-schoolgirl-5193 | 0.1 | 0.4 | 0.2972 | 0.3059 | +0.0087 |
36
+ | P001-schoolgirl-6111 | **0.0 (reuse)** | - | 0.4248 | 0.4248 | 0 |
37
+ | P001-schoolgirl-9676 | 0.6 | 0.4 | 0.3774 | 0.4294 | +0.0520 |
38
+ | P002-android-5193 | 0.2 | 0.5 | 0.3042 | 0.3312 | +0.0270 |
39
+ | P002-android-6111 | **0.0 (reuse)** | - | 0.3332 | 0.3332 | 0 |
40
+ | P002-android-9676 | 0.6 | 0.1 | 0.2380 | 0.2841 | +0.0461 |
41
+ | P003-woman-5193 | 0.2 | 0.4 | 0.1556 | 0.1605 | +0.0048 |
42
+ | P003-woman-6111 | 0.8 | 0.1 | 0.4386 | 0.4395 | +0.0009 |
43
+ | P003-woman-9676 | 0.1 | 0.0 | 0.1944 | 0.1978 | +0.0034 |
44
+ | P004-shop-5193 | 0.2 | 0.5 | 0.3561 | 0.3777 | +0.0215 |
45
+ | P004-shop-6111 | **0.0 (reuse)** | - | 0.5045 | 0.5045 | 0 |
46
+ | P004-shop-9676 | 0.1 | 0.0 | 0.3135 | 0.3235 | +0.0101 |
47
+ | P005-inkwash-5193 | 0.2 | 0.5 | 0.1865 | 0.2113 | +0.0247 |
48
+ | P005-inkwash-6111 | **0.0 (reuse)** | - | 0.2762 | 0.2762 | 0 |
49
+ | P005-inkwash-9676 | 0.1 | 0.1 | 0.2433 | 0.2571 | +0.0138 |
50
+
51
+ **4条件(P001-6111 / P002-6111 / P004-6111 / P005-6111)で121セルのどこにも reuse を上回る設定がなかった。** ERSDE-Beta では負ける条件がプロンプト(shop)に固まっていたのに対し、ERSDE-Simple では **seed 6111 の5条件中4条件**に固まっている(偏りの軸がプロンプト側からシード側へ移っている)。
52
+
53
+ - **strength 軸**: 範囲 0.0〜0.8、中央値 0.1、IQR 0.05〜0.20
54
+ - **smoothing 軸**: 範囲 0.0〜0.5、中央値 0.1、IQR 0.0〜0.40
55
+
56
+ ## I-2. 共通1点
57
+
58
+ - **中央値基準: (strength 0.1, smoothing 0.0)、集約LPIPS 0.3135**(reuse行 0.3235 より良い)
59
+ - **平均基準: (strength 0.0) = reuse そのもの、集約LPIPS 0.3238**。予測をかける前提(strength>=0.1)に制限した平均最小セルは **(0.1, 0.3)、平均LPIPS 0.3330**(reuse行の平均 0.3238 より悪い)
60
+ - 上位5セル(中央値基準)は 0.3135〜0.3163 の 0.003 差に密集し、**strength 0.1〜0.2 x smoothing 0.0〜0.4** にばらける。位置は集約方法にあまり頑健ではない(中央値 (0.1,0.0) と制限付き平均 (0.1,0.3) が食い違う)。
61
+
62
+ **共通点 (0.1, 0.0) における各条件の損失**(`tables/common-point-loss_ERSDE-Simple.csv`): 中央値 **+0.0204(アンカー比 16.9%)**、最大 **+0.1041(86.0%)**。
63
+
64
+ ## I-3. Reuse 比の改善
65
+
66
+ `tables/reuse-comparison_ERSDE-Simple.csv`。共通点 (0.1, 0.0) と各条件の reuse の対応差(正=改善):
67
+
68
+ - **改善の中央値: -0.0049(アンカー比 -4.1%、中央値では悪化)**
69
+ - 範囲: -0.0816 〜 +0.0121
70
+ - **改善 6 / 15、悪化 9 / 15**
71
+ - **Wilcoxon 符号順位検定 p = 0.208**(有意差なし)
72
+ - 制限付き平均基準の共通点 (0.1, 0.3) でも: 改善中央値 +0.0007(+0.6%)、改善 8/15、**p = 0.762**(有意差なし)
73
+
74
+ プロンプト別改善中央値: schoolgirl -0.0008、android -0.0272、woman -0.0049、shop -0.0100、inkwash +0.0043
75
+ シード別改善中央値: 5193 -0.0060、6111 -0.0272、9676 +0.0074
76
+
77
+ **チェリーピック上限**(各条件が格子から自条件最良の予測セル(strength>=0.1)を後から選ぶ場合、`tables/best-prediction-vs-reuse_ERSDE-Simple.csv`):
78
+
79
+ - 改善中央値 **+0.0087(アンカー比 7.2%)**、範囲 -0.0816 〜 +0.0520、改善 11/15、**Wilcoxon p = 0.359**
80
+ - strength=0(改善0)も選択肢に含めた自条件最適では中央値 +0.0087、p = 0.0033
81
+
82
+ ## I-4. 単峰性
83
+
84
+ `tables/unimodality_ERSDE-Simple.csv`。**単峰仮説は文字どおりには成立しない**が、ERSDE-Beta より凹凸は少ない: 局所最小の個数は 2個が6条件、3個が3条件、4個が2条件、5個が1条件、6個が2条件、7個が1条件(**中央値3個**、ERSDE-Beta は中央値5個)。低損傷側(その条件の実測レンジの下半分)に限れば 1〜2個が9条件(中央値2個)。
85
+
86
+ 中央値曲面の局所最小: (0.1,0.0)=0.3135、(0.1,0.4)=0.3144、(0.6,0.4)=0.3774、(1.0,0.99)=0.8774。低損傷帯の2点は 0.0009 差の実質同点で、**低損傷帯は概ね一つのなだらかな谷**である。
87
+
88
+ **二層構造**: 中央値曲面の EMA別プロファイル(strength>=0.1 の中央値)は 0.0→0.410、0.4→0.380、0.5→0.392、0.6→0.430、0.7→0.547、0.8→0.668、0.9→0.855、0.99→0.878。**EMA 0.0〜0.5 が安定層(0.38〜0.41)、EMA 0.7 以降が崩壊層(0.55→0.88)** という二層構造が明確に存在する。
89
+
90
+ ## I-5. 平坦さ
91
+
92
+ `tables/curvature-near-common_ERSDE-Simple.csv`。共通点 (0.1, 0.0) の4近傍(±0.1):
93
+
94
+ - 近傍差の絶対値平均: 条件ごとの中央値 **0.0053**、最大 0.0498
95
+ - 変化幅のアンカー比: 条件ごとの中央値 **10.8%**
96
+ - 中央値曲面での近傍差: strength 0.0 側 +0.0101、strength 0.2 側 +0.0024、smoothing 0.1 側 +0.0028
97
+
98
+ **ERSDE-Beta(中央値 30.5%)よりさらに平坦**。格子解像度は結論を動かす要因ではない。
99
+
100
+ ## I-6. SSIM との整合
101
+
102
+ `tables/ssim-vs-lpips-optima_ERSDE-Simple.csv`。中央値SSIM曲面のピークは **(0.1, 0.5)**、LPIPS の共通ボトム (0.1, 0.0) と smoothing で 0.5 ずれる(ただし LPIPS 側でも (0.1,0.4) が 0.0009 差の実質同点であり、谷が smoothing 方向に平坦なことの反映)。条件別では 7/15 で完全一致。
103
+
104
+ ---
105
+
106
+ # II. Euler-Beta
107
+
108
+ 出力: ヒートマップ `surfaces/surface_Euler-Beta_*.png` と `surface_MEDIAN-15cond_Euler-Beta.png` / `surface_MEAN-15cond_Euler-Beta.png`、散布図 `scatter/scatter-lpips_Euler-Beta_*.png`・`scatter/scatter-ssim_Euler-Beta_*.png` と `scatter/sheet-lpips_Euler-Beta.png`・`scatter/sheet-ssim_Euler-Beta.png`、表 `tables/*_Euler-Beta.csv`、`tables/summary_Euler-Beta.json`
109
+
110
+ ## II-1. 条件別曲面と最適点
111
+
112
+ reuse 基線: LPIPS 中央値 **0.286**、範囲 0.182〜0.399(3系で最も軽く、最もばらつきが小さい)。
113
+
114
+ | 条件 | strength | smoothing | LPIPS | reuse | 改善 |
115
+ |---|---|---|---|---|---|
116
+ | P001-schoolgirl-5193 | 0.7 | 0.2 | 0.3090 | 0.3437 | +0.0347 |
117
+ | P001-schoolgirl-6111 | 0.4 | 0.4 | 0.1904 | 0.3433 | +0.1529 |
118
+ | P001-schoolgirl-9676 | 0.7 | 0.0 | 0.3055 | 0.3987 | +0.0932 |
119
+ | P002-android-5193 | 1.0 | 0.0 | 0.1333 | 0.2862 | +0.1528 |
120
+ | P002-android-6111 | 0.6 | 0.3 | 0.3169 | 0.3683 | +0.0514 |
121
+ | P002-android-9676 | 0.1 | 0.7 | 0.3454 | 0.3654 | +0.0200 |
122
+ | P003-woman-5193 | 0.9 | 0.0 | 0.0778 | 0.1815 | +0.1037 |
123
+ | P003-woman-6111 | 0.7 | 0.0 | 0.1459 | 0.2102 | +0.0643 |
124
+ | P003-woman-9676 | 0.6 | 0.1 | 0.1288 | 0.1924 | +0.0636 |
125
+ | P004-shop-5193 | 0.7 | 0.2 | 0.2574 | 0.3001 | +0.0427 |
126
+ | P004-shop-6111 | 0.3 | 0.2 | 0.2270 | 0.2589 | +0.0319 |
127
+ | P004-shop-9676 | 0.3 | 0.1 | 0.2503 | 0.2698 | +0.0195 |
128
+ | P005-inkwash-5193 | 0.9 | 0.0 | 0.1585 | 0.1995 | +0.0410 |
129
+ | P005-inkwash-6111 | 0.3 | 0.1 | 0.2795 | 0.2923 | +0.0129 |
130
+ | P005-inkwash-9676 | **0.0 (reuse)** | - | 0.2138 | 0.2138 | 0 |
131
+
132
+ **reuse を上回れなかったのは1条件のみ**(P005-inkwash-9676)。ERSDE-Beta の4条件、ERSDE-Simple の4条件と対照的である。
133
+
134
+ - **strength 軸**: 範囲 0.0〜1.0、中央値 **0.6**、IQR 0.3〜0.7 — 他2系(中央値 0.1)と大きく異なり、**強い予測が有利**
135
+ - **smoothing 軸**: 範囲 0.0〜0.7、中央値 0.1、IQR 0.0〜0.2 — 他2系より**低平滑寄り**
136
+
137
+ ## II-2. 共通1点
138
+
139
+ - **中央値基準: (strength 0.3, smoothing 0.1)、集約LPIPS 0.2503**(reuse行 0.2862 より 0.0359 良い)
140
+ - **平均基準: (strength 0.6, smoothing 0.1)、集約LPIPS 0.2487**(reuse行平均 0.2816 より 0.0329 良い)
141
+ - **どちらの基準でも strength>0 が選ばれる**(他2系では平均基準が reuse そのものを選んだ)
142
+ - 上位5セル(中央値基準)は 0.2503〜0.2572 の 0.007 差で **strength 0.3〜0.4 x smoothing 0.0〜0.2** に密集。位置は頑健。
143
+
144
+ **共通点 (0.3, 0.1) における各条件の損失**: 中央値 **+0.0286(アンカー比 23.6%)**、最大 **+0.1013(83.7%)**。損失自体は3系で最大だが、後述のとおり reuse を上回る幅がそれを超えている。
145
+
146
+ ## II-3. Reuse 比の改善
147
+
148
+ `tables/reuse-comparison_Euler-Beta.csv`。共通点 (0.3, 0.1):
149
+
150
+ - **改善の中央値: +0.0271(アンカー比 +22.4%)**
151
+ - 範囲: -0.0365 〜 +0.0727
152
+ - **改善 13 / 15、悪化 2 / 15**
153
+ - **Wilcoxon 符号順位検定 p = 0.015(有意)**
154
+ - 平均基準の共通点 (0.6, 0.1) でも: 改善中央値 **+0.0349(+28.8%)**、改善 12/15、**p = 0.030(有意)**
155
+
156
+ プロンプト別改善中央値: schoolgirl +0.0704、android +0.0324、woman +0.0409、shop +0.0195、inkwash +0.0129(**全プロンプトで正**)
157
+ シード別改善中央値: 5193 +0.0143、6111 +0.0324、9676 +0.0195(**全シードで正**)
158
+
159
+ **チェリーピック上限**(`tables/best-prediction-vs-reuse_Euler-Beta.csv`):
160
+
161
+ - 改善中央値 **+0.0427(アンカー比 35.3%)**、範囲 -0.0039 〜 +0.1529、改善 **14/15**、**Wilcoxon p = 0.0001**
162
+
163
+ ## II-4. 単峰性
164
+
165
+ `tables/unimodality_Euler-Beta.csv`。局所最小の個数は 1個が1条件、2個が2条件、3個が3条件、4個が2条件、5個が3条件、7個/9個/10個/14個が各1条件(**中央値4個**)。局所最小が最も多い条件(14個)が現れる一方、1個の条件もあり、**条件間の曲面形状のばらつきが3系で最大**である。低損傷側の下半分に限れば 1〜2個が8条件(中央値2個)。
166
+
167
+ 中央値曲面の局所最小は3個: (0.3,0.1)=0.2503、(0.7,0.2)=0.2574、(0.1,0.5)=0.2693。**3個とも低損傷帯にあり**、高平滑帯の浅い凹凸が中央値曲面から消えている点が他2系と異なる。ただし低損傷帯に (0.3,0.1) と (0.7,0.2) という strength で 0.4 離れた2つの谷が並存しており、**低損傷帯が単一の谷とは言い切れない**(他2系では低損傷帯の複数最小が互いに 0.001 以内の実質同点だったのに対し、ここは 0.007 差の別々の谷)。
168
+
169
+ **二層構造**: 中央値曲面の EMA別プロファイル 0.0→0.271、0.2→0.267、0.3→0.276、0.4→0.304、0.5→0.338、0.6→0.426、0.7→0.543、0.8→0.703、0.9→0.737、0.99→0.759。**EMA 0.0〜0.3 が安定層(0.267〜0.276)、EMA 0.6 以降が崩壊層(0.43→0.76)**。安定層が3系で最も狭い(Simple が 0.0〜0.5 なのに対し 0.0〜0.3)。二層構造そのものは3系すべてに存在する。
170
+
171
+ ## II-5. 平坦さ
172
+
173
+ 共通点 (0.3, 0.1) の4近傍: 近傍差の絶対値平均は条件ごとの中央値 **0.0065**、最大 0.0236。変化幅のアンカー比の中央値 **11.1%**。中央値曲面での近傍差は +0.0048〜+0.0079。ERSDE-Simple 同様に平坦。
174
+
175
+ ## II-6. SSIM との整合
176
+
177
+ 中央値SSIM曲面のピークは **(0.1, 0.0)**、LPIPS の共通ボトム (0.3, 0.1) と strength で 0.2 ずれる。条件別完全一致は 5/15。**Euler-Beta では2指標のズレが3系で最も大きい**(ERSDE-Beta は完全一致、Simple は smoothing のみズレ)。SSIM は LPIPS より弱い予測を好む方向にずれている。強い予測(strength 0.6〜1.0)は LPIPS では有利だが SSIM ではそこまで有利にならない、という指標間の食い違いが Euler-Beta に固有に現れている。
178
+
179
+ ---
180
+
181
+ # III. 3系比較
182
+
183
+ すべて N=15(Prompt001〜005 x seed 3種)、11x11格子、アンカー 0.121。ERSDE-Beta の数値は `analysis-stage5-scan1/tables/summary.json` からの引用(再計算していない)。
184
+
185
+ ## III-1. 突き合わせ表
186
+
187
+ | 項目 | ERSDE-Beta(走査1) | ERSDE-Simple | Euler-Beta |
188
+ |---|---|---|---|
189
+ | reuse 基線 LPIPS 中央値(範囲) | 0.413(0.285〜0.625) | 0.324(0.160〜0.504) | **0.286(0.182〜0.399)** |
190
+ | 共通最適点(中央値基準) | (0.1, 0.5) | (0.1, 0.0) | **(0.3, 0.1)** |
191
+ | 共通最適点(平均基準) | (0.0)=reuse | (0.0)=reuse | **(0.6, 0.1)** |
192
+ | 平均基準が予測を選ぶか | No | No | **Yes** |
193
+ | 条件別最適 strength 中央値(IQR) | 0.1(0.05〜0.30) | 0.1(0.05〜0.20) | **0.6(0.3〜0.7)** |
194
+ | 条件別最適 smoothing 中央値(IQR) | 0.4(0.0〜0.55) | 0.1(0.0〜0.40) | 0.1(0.0〜0.2) |
195
+ | reuse に勝てなかった条件数 | 4/15 | 4/15 | **1/15** |
196
+ | **共通���での reuse 比改善 中央値** | **-0.0025(-2.1%)** | **-0.0049(-4.1%)** | **+0.0271(+22.4%)** |
197
+ | **改善/悪化 条件数** | 7 / 8 | 6 / 9 | **13 / 2** |
198
+ | **Wilcoxon p(共通点 vs reuse)** | 0.359 | 0.208 | **0.015(有意)** |
199
+ | 平均基準共通点での改善中央値・p | 0(reuse自身) | +0.0007 / p=0.762 | **+0.0349 / p=0.030(有意)** |
200
+ | **チェリーピック上限 改善中央値** | +0.0130(10.7%) | +0.0087(7.2%) | **+0.0427(35.3%)** |
201
+ | チェリーピック上限 改善条件数・p | 11/15、p=0.095 | 11/15、p=0.359 | **14/15、p=0.0001** |
202
+ | 共通点損失(中央値 / 最大, アンカー比) | 21.6% / 116.4% | 16.9% / 86.0% | 23.6% / 83.7% |
203
+ | 局所最小の個数(条件別中央値) | 5 | 3 | 4 |
204
+ | 中央値曲面の局所最小 | 4個(うち2個は高平滑帯) | 4個(うち1個は高平滑帯) | 3個(**全て低損傷帯**) |
205
+ | **二層構造の有無** | あり | **あり**(安定 EMA<=0.5 / 崩壊 EMA>=0.7) | **あり**(安定 EMA<=0.3 / 崩壊 EMA>=0.6) |
206
+ | 低損傷帯が単一の谷か | 概ね単一 | 概ね単一(2点が 0.0009 差) | **単一とは言えない**(strength 0.3 と 0.7 に別の谷) |
207
+ | 共通点近傍の変化幅(アンカー比中央値) | 30.5% | 10.8% | 11.1% |
208
+ | SSIM ピークと LPIPS ボトムの一致 | 完全一致(条件別 6/15) | smoothing のみズレ(7/15) | strength 0.2 ズレ(5/15) |
209
+ | 偏りが強く出る軸 | プロンプト(shop が全滅) | シード(6111 が4/5全滅) | なし(全プロンプト・全シードで正) |
210
+
211
+ ## III-2. 事前登録仮説への答え
212
+
213
+ **仮説「ER SDE系1系で見えた『予測は Reuse に勝てない』が Euler 決定論系でも再現するか」**
214
+
215
+ **再現しなかった。** 事実として:
216
+
217
+ 1. **ER SDE系の2系(Beta / Simple)では再現した。** 共通1点での reuse 比改善中央値はいずれも負(Beta -0.0025、Simple -0.0049)、改善条件数は半数以下(7/15、6/15)、Wilcoxon はいずれも有意でない(p=0.359、p=0.208)。平均基準の集約曲面は両系とも予測を一切かけない(strength=0)を選ぶ。**スケジュールが Beta から Simple に変わっても、ER SDE の枠内では結論は同一方向である。**
218
+
219
+ 2. **Euler-Beta では逆転した。** 共通1点 (0.3, 0.1) での改善中央値は **+0.0271(アンカー比 +22.4%)**、13/15 の条件で改善、**Wilcoxon p = 0.015 で有意**。平均基準の共通点 (0.6, 0.1) でも +0.0349、p = 0.030 で有意。全5プロンプト・全3シードで改善中央値が正であり、偏りの方向が揃っている。
220
+
221
+ 3. **効く予測の設定そのものが違う。** ER SDE系2系の最適 strength 中央値は 0.1(弱い予測)だが、Euler-Beta は **0.6**(IQR 0.3〜0.7、strength=1.0 が最適の条件もある)。**弱い予測を少しだけ足す ER SDE系と、強い予測を主に使う Euler 系で、応答曲面の性格が定性的に異なる。** smoothing は3系とも低〜中(中央値 0.1〜0.4)で、EMA を強くかけると崩壊する二層構造は3系すべてに共通する。
222
+
223
+ 4. **チェリーピック上限でも差は開く。** 条件ごとに後から最良セルを選ぶ上限性能では、ER SDE系が +0.0087〜+0.0130(アンカー比 7〜11%)にとどまるのに対し、Euler-Beta は **+0.0427(35.3%)、14/15 改善、p=0.0001**。H4(スキップ1回あたり損傷2〜3割減)の水準は、ER SDE系では上限ケースでも届かないが、**Euler-Beta では共通1点運用(22.4%)で下限側に、上限ケース(35.3%)で上振れ側に触れている。**
224
+
225
+ ## III-3. 注意すべき交絡・限界(事実として)
226
+
227
+ - **reuse 基線の重さが3系で違う**(中央値 0.413 / 0.324 / 0.286)。Euler-Beta は基線が最も軽い。改善幅は絶対値(LPIPS差)で比較しており、基線に対する相対比では見ていない。基線が軽い系ほど改善の絶対幅が出やすいのか出にくいのかは、本データからは判定できない。
228
+ - **Beta スケジュールは ERSDE-Beta と Euler-Beta で共通、ER SDE は Beta と Simple で共通**という 2x2 の欠けた設計であり、Euler vs ER SDE の効果と Beta vs Simple の効果は完全には分離できない。ただし ER SDE内で Beta から Simple に変えても結論が変わらなかったこと(III-2 第1項)は、**スケジュール側の寄与が小さく、サンプラー側(Euler か ER SDE か)の寄与が大きい**方向の材料である。Euler-Simple は未測定である。
229
+ - **Euler-Beta では SSIM と LPIPS が3系で最も食い違う**(ピーク strength 差 0.2、条件別一致 5/15)。SSIM は Euler-Beta でも予測側を選ぶ(ピークは strength 0.1 で reuse ではない)が、LPIPS ほど強い予測を支持しない。指標選択で改善幅の見積もりは変わりうる。
230
+ - **1複製・formula=Linear 固定**であ��。条件は決定論的(同一シード・同一パターン)で再現ノイズはないが、他の formula や複数複製での確認はしていない。
231
+ - **Euler-Beta の低損傷帯には strength 0.3 と 0.7 の2つの谷が並存する**(0.007 差)。共通1点をどちらに置くかは集約方法で変わり(中央値なら 0.3、平均なら 0.6)、いずれも reuse に有意に勝つが、両者の間で運用上の意味が同じかは本データでは判定していない。
232
+
233
+ ## 所見(事実ベース。採否の裁定はユーザーの領分)
234
+
235
+ 1. **事前登録仮説は棄却される側の結果である。** 予測は Reuse に勝てない、という像は ER SDE系(Beta / Simple)に限定された現象であり、Euler-Beta では**逆に有意な改善**(共通1点で中央値 +22.4%、13/15改善、p=0.015)が観測された。
236
+ 2. **ER SDE系内部では結論が安定している。** Beta から Simple へのスケジュール変更で、共通点の位置(strength 0.1)、改善中央値が負であること、平均基準が reuse を選ぶこと、いずれも変わらなかった。
237
+ 3. **Euler-Beta は最適 strength が中央値 0.6 と高い。** 3系を横断する単一の推奨設定は存在せず、少なくともサンプラー系ごとに別の較正が要る、という像になる。系をまたいだプロンプト非依存の共通1点を要件とするなら、この差そのものが論点である。
238
+ 4. **EMA の二層構造は3系すべてに共通する。** 安定層の上限は ERSDE-Beta で概ね EMA 0.5〜0.6、ERSDE-Simple で 0.5、Euler-Beta で 0.3。**高EMAでの崩壊は系に依存しない構造的な性質**である一方、**安定層の広さは系依存**である。
239
+ 5. **単峰仮説は3系いずれでも文字どおりには成立しない。** ただし ER SDE系2系は低損傷帯が概ね一つの谷であるのに対し、Euler-Beta は低損傷帯に別々の2つの谷を持つ。
240
+ 6. **格子解像度は3系いずれでもボトルネックではない。** 共通点近傍±0.1 での変化幅はアンカー比で 10.8%〜30.5%、中央値曲面では 0.002〜0.019 しか動かない。密走査で詰められる余地は、系間の差(Euler-Beta の +0.027 と ER SDE系の -0.005、その差 0.032)より一桁小さい。
241
+ 7. **未測定の穴は Euler-Simple である。** 2x2 の残り1マスであり、Euler かどうか、と、Simple かどうか、の分離を最も直接に詰められる条件である(実施の可否は裁定事項)。
242
+
243
+ (本報告は Stage5-Families の実測を要約したものであり、走査2の実施可否・Euler-Simple の追試可否・ResRefine の採否・実装方針の変更についての裁定は行わない。)
analysis/stage5-families/analyze_families.py ADDED
@@ -0,0 +1,335 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # -*- coding: utf-8 -*-
2
+ """Stage5 Families response-surface analysis (ERSDE-Simple / Euler-Beta).
3
+
4
+ Framework identical to analysis-stage5-scan1/analyze_scan1.py, run per family.
5
+ Does not modify any existing file.
6
+ """
7
+ import os, re, json
8
+ import numpy as np, pandas as pd
9
+ import matplotlib
10
+ matplotlib.use("Agg")
11
+ import matplotlib.pyplot as plt
12
+ from scipy.stats import wilcoxon
13
+
14
+ ROOT = r"S:\30_OriginalApps\16_HareSkip\experiment-HareSkip"
15
+ CSV = os.path.join(ROOT, "Judge-results", "Stage5-Families_20260907-235041", "merged-results.csv")
16
+ OUT = os.path.join(ROOT, "analysis-stage5-families")
17
+ SURF = os.path.join(OUT, "surfaces"); TAB = os.path.join(OUT, "tables")
18
+ os.makedirs(SURF, exist_ok=True); os.makedirs(TAB, exist_ok=True)
19
+ ANCHOR = 0.121
20
+
21
+ LP = "LPIPS - VGG"
22
+ SS11 = "SSIM - win size 11 (Wang)"
23
+
24
+ df_all = pd.read_csv(CSV, encoding="utf-8-sig")
25
+ for c in df_all.columns:
26
+ if c not in ("Condition", "Job ID", "File name"):
27
+ df_all[c] = pd.to_numeric(df_all[c], errors="coerce")
28
+
29
+
30
+ def parse(fn):
31
+ if fn == "reuse.png":
32
+ return 0.0, np.nan
33
+ m = re.match(r"str-(\d+)_ema-(\d+)\.png$", fn)
34
+ s = int(m.group(1)) / 10.0
35
+ e = m.group(2)
36
+ e = 0.99 if e == "099" else int(e) / 10.0
37
+ return s, e
38
+
39
+
40
+ df_all[["strength", "smoothing"]] = df_all["File name"].apply(lambda f: pd.Series(parse(f)))
41
+ df_all["prompt"] = df_all["Condition"].str.extract(r"_(Prompt\d+-[a-z]+)-")
42
+ df_all["seed"] = df_all["Condition"].str.extract(r"-(\d+)$")
43
+ df_all["family"] = df_all["Condition"].str.split("_").str[0]
44
+
45
+ STR = [round(x, 1) for x in np.arange(0.0, 1.01, 0.1)]
46
+ SMO = [round(x, 1) for x in np.arange(0.0, 0.91, 0.1)] + [0.99]
47
+
48
+ FAMILIES = sorted(df_all["family"].unique())
49
+
50
+
51
+ def heat(g, title, path, cbl="LPIPS-VGG (lower=better)"):
52
+ fig, ax = plt.subplots(figsize=(7.6, 6.2))
53
+ im = ax.imshow(g, origin="lower", aspect="auto", cmap="viridis_r")
54
+ ax.set_xticks(range(len(SMO))); ax.set_xticklabels([str(s) for s in SMO], fontsize=8)
55
+ ax.set_yticks(range(len(STR))); ax.set_yticklabels([str(s) for s in STR], fontsize=8)
56
+ ax.set_xlabel("EMA smoothing"); ax.set_ylabel("prediction strength")
57
+ ax.set_title(title, fontsize=9)
58
+ idx = np.unravel_index(np.argmin(g), g.shape)
59
+ ax.plot(idx[1], idx[0], marker="*", ms=18, color="red", mec="white", mew=1.0)
60
+ mid = (g.min() + g.max()) / 2
61
+ for a in range(g.shape[0]):
62
+ for b in range(g.shape[1]):
63
+ ax.text(b, a, ("%.3f" % g[a, b]).lstrip("0"), ha="center", va="center",
64
+ fontsize=5.2, color="white" if g[a, b] > mid else "black")
65
+ fig.colorbar(im, ax=ax, label=cbl)
66
+ fig.tight_layout(); fig.savefig(path, dpi=130); plt.close(fig)
67
+
68
+
69
+ def local_minima(g, include_row0=False):
70
+ sub = g if include_row0 else g[1:, :]
71
+ n, m = sub.shape; out = []
72
+ for a in range(n):
73
+ for b in range(m):
74
+ v = sub[a, b]; ok = True
75
+ for da in (-1, 0, 1):
76
+ for db in (-1, 0, 1):
77
+ if da == 0 and db == 0:
78
+ continue
79
+ aa, bb = a + da, b + db
80
+ if 0 <= aa < n and 0 <= bb < m and sub[aa, bb] < v:
81
+ ok = False
82
+ if ok:
83
+ out.append((a + (0 if include_row0 else 1), b, v))
84
+ return out
85
+
86
+
87
+ ALL = {}
88
+
89
+ for FAM in FAMILIES:
90
+ df = df_all[df_all["family"] == FAM].copy()
91
+ conds = sorted(df["Condition"].unique())
92
+ grids, reuse = {}, {}
93
+ for c in conds:
94
+ d = df[df["Condition"] == c]
95
+ r = float(d[d["strength"] == 0][LP].iloc[0])
96
+ reuse[c] = r
97
+ g = np.full((len(STR), len(SMO)), np.nan)
98
+ g[0, :] = r
99
+ for _, row in d[d["strength"] > 0].iterrows():
100
+ g[STR.index(round(row["strength"], 1)), SMO.index(round(row["smoothing"], 2))] = row[LP]
101
+ assert not np.isnan(g).any(), c
102
+ grids[c] = g
103
+ G = np.stack([grids[c] for c in conds])
104
+
105
+ # ---------- 1. per-condition optima + heatmaps ----------
106
+ rows = []
107
+ for i, c in enumerate(conds):
108
+ g = grids[c]
109
+ idx = np.unravel_index(np.argmin(g), g.shape)
110
+ rows.append(dict(Condition=c, prompt=df[df.Condition == c]["prompt"].iloc[0],
111
+ seed=df[df.Condition == c]["seed"].iloc[0],
112
+ best_strength=STR[idx[0]], best_smoothing=SMO[idx[1]],
113
+ best_LPIPS=g[idx], reuse_LPIPS=reuse[c],
114
+ improvement_vs_reuse=reuse[c] - g[idx],
115
+ improvement_pct_anchor=100 * (reuse[c] - g[idx]) / ANCHOR))
116
+ opt = pd.DataFrame(rows)
117
+ opt.to_csv(os.path.join(TAB, "per-condition-optima_%s.csv" % FAM), index=False, encoding="utf-8-sig")
118
+
119
+ for c in conds:
120
+ heat(grids[c], c + "\nLPIPS-VGG surface (strength x smoothing); row 0.0 = reuse, replicated",
121
+ os.path.join(SURF, "surface_%s.png" % c))
122
+ Gmed = np.median(G, axis=0); Gmean = G.mean(axis=0)
123
+ heat(Gmed, "%s / 15 conditions: MEDIAN LPIPS-VGG surface" % FAM,
124
+ os.path.join(SURF, "surface_MEDIAN-15cond_%s.png" % FAM))
125
+ heat(Gmean, "%s / 15 conditions: MEAN LPIPS-VGG surface" % FAM,
126
+ os.path.join(SURF, "surface_MEAN-15cond_%s.png" % FAM))
127
+ pd.DataFrame(Gmed, index=STR, columns=SMO).to_csv(
128
+ os.path.join(TAB, "median-surface_%s.csv" % FAM), encoding="utf-8-sig")
129
+
130
+ # ---------- 2. common single point ----------
131
+ im_ = np.unravel_index(np.argmin(Gmed), Gmed.shape)
132
+ ia_ = np.unravel_index(np.argmin(Gmean), Gmean.shape)
133
+ common = {"median": (STR[im_[0]], SMO[im_[1]], float(Gmed[im_])),
134
+ "mean": (STR[ia_[0]], SMO[ia_[1]], float(Gmean[ia_]))}
135
+ # restricted (strength >= 0.1) aggregate minima
136
+ def restricted(A):
137
+ sub = A[1:, :]
138
+ j = np.unravel_index(np.argmin(sub), sub.shape)
139
+ return (STR[j[0] + 1], SMO[j[1]], float(sub[j]))
140
+ common_restricted = {"median": restricted(Gmed), "mean": restricted(Gmean)}
141
+
142
+ def topk(A, k=5):
143
+ flat = [(float(A[a, b]), STR[a], SMO[b]) for a in range(11) for b in range(11)]
144
+ return sorted(flat)[:k]
145
+
146
+ loss_rows = []
147
+ for key, (s, e, _) in common.items():
148
+ si, ei = STR.index(s), SMO.index(e)
149
+ for i, c in enumerate(conds):
150
+ own = opt.loc[i, "best_LPIPS"]; at = G[i, si, ei]
151
+ loss_rows.append(dict(criterion=key, common_strength=s, common_smoothing=e, Condition=c,
152
+ prompt=opt.loc[i, "prompt"], seed=opt.loc[i, "seed"],
153
+ own_best_LPIPS=own, own_best_strength=opt.loc[i, "best_strength"],
154
+ own_best_smoothing=opt.loc[i, "best_smoothing"],
155
+ LPIPS_at_common=at, loss_vs_own_best=at - own,
156
+ loss_pct_anchor=100 * (at - own) / ANCHOR))
157
+ loss = pd.DataFrame(loss_rows)
158
+ loss.to_csv(os.path.join(TAB, "common-point-loss_%s.csv" % FAM), index=False, encoding="utf-8-sig")
159
+
160
+ # ---------- 3. reuse comparison ----------
161
+ cmp_rows = []
162
+ for key, (s, e, _) in common.items():
163
+ si, ei = STR.index(s), SMO.index(e)
164
+ for i, c in enumerate(conds):
165
+ at = G[i, si, ei]; r = reuse[c]
166
+ cmp_rows.append(dict(criterion=key, common_strength=s, common_smoothing=e, Condition=c,
167
+ prompt=opt.loc[i, "prompt"], seed=opt.loc[i, "seed"],
168
+ reuse_LPIPS=r, common_LPIPS=at, improvement=r - at,
169
+ improvement_pct_anchor=100 * (r - at) / ANCHOR,
170
+ improved=bool(at < r)))
171
+ # also record the restricted-median common point explicitly
172
+ for key, (s, e, _) in common_restricted.items():
173
+ si, ei = STR.index(s), SMO.index(e)
174
+ for i, c in enumerate(conds):
175
+ at = G[i, si, ei]; r = reuse[c]
176
+ cmp_rows.append(dict(criterion=key + "_restricted", common_strength=s, common_smoothing=e,
177
+ Condition=c, prompt=opt.loc[i, "prompt"], seed=opt.loc[i, "seed"],
178
+ reuse_LPIPS=r, common_LPIPS=at, improvement=r - at,
179
+ improvement_pct_anchor=100 * (r - at) / ANCHOR,
180
+ improved=bool(at < r)))
181
+ cmpdf = pd.DataFrame(cmp_rows)
182
+ cmpdf.to_csv(os.path.join(TAB, "reuse-comparison_%s.csv" % FAM), index=False, encoding="utf-8-sig")
183
+
184
+ stats = {}
185
+ for key in cmpdf.criterion.unique():
186
+ d = cmpdf[cmpdf.criterion == key]
187
+ if (d.reuse_LPIPS - d.common_LPIPS).abs().sum() == 0:
188
+ wstat, wp = 0.0, float("nan")
189
+ else:
190
+ w = wilcoxon(d.reuse_LPIPS, d.common_LPIPS); wstat, wp = float(w.statistic), float(w.pvalue)
191
+ stats[key] = dict(point=(float(d.common_strength.iloc[0]), float(d.common_smoothing.iloc[0])),
192
+ median_improvement=float(d.improvement.median()),
193
+ min_improvement=float(d.improvement.min()),
194
+ max_improvement=float(d.improvement.max()),
195
+ median_pct_anchor=float(d.improvement_pct_anchor.median()),
196
+ wilcoxon_stat=wstat, wilcoxon_p=wp,
197
+ n_improved=int(d.improved.sum()), n_worse=int((~d.improved).sum()),
198
+ by_prompt={k: float(v) for k, v in d.groupby("prompt").improvement.median().items()},
199
+ by_seed={k: float(v) for k, v in d.groupby("seed").improvement.median().items()})
200
+
201
+ # cherry-pick ceiling: per-condition best prediction cell (strength>=0.1)
202
+ bp_rows = []
203
+ for i, c in enumerate(conds):
204
+ sub = G[i][1:, :]
205
+ j = np.unravel_index(np.argmin(sub), sub.shape)
206
+ v = float(sub[j]); r = reuse[c]
207
+ bp_rows.append(dict(Condition=c, prompt=opt.loc[i, "prompt"], seed=opt.loc[i, "seed"],
208
+ reuse_LPIPS=r, best_pred_strength=STR[j[0] + 1], best_pred_smoothing=SMO[j[1]],
209
+ best_pred_LPIPS=v, delta_vs_reuse=r - v,
210
+ delta_pct_anchor=100 * (r - v) / ANCHOR, prediction_helps=bool(v < r)))
211
+ bp = pd.DataFrame(bp_rows)
212
+ bp.to_csv(os.path.join(TAB, "best-prediction-vs-reuse_%s.csv" % FAM), index=False, encoding="utf-8-sig")
213
+ bp_stats = dict(median=float(bp.delta_vs_reuse.median()), min=float(bp.delta_vs_reuse.min()),
214
+ max=float(bp.delta_vs_reuse.max()),
215
+ median_pct_anchor=float(bp.delta_pct_anchor.median()),
216
+ wilcoxon_p=float(wilcoxon(bp.reuse_LPIPS, bp.best_pred_LPIPS).pvalue),
217
+ n_helps=int(bp.prediction_helps.sum()), n_hurts=int((~bp.prediction_helps).sum()),
218
+ by_prompt={k: float(v) for k, v in bp.groupby("prompt").delta_vs_reuse.median().items()},
219
+ by_seed={k: float(v) for k, v in bp.groupby("seed").delta_vs_reuse.median().items()})
220
+
221
+ own_stats = dict(median=float(opt.improvement_vs_reuse.median()),
222
+ min=float(opt.improvement_vs_reuse.min()), max=float(opt.improvement_vs_reuse.max()),
223
+ wilcoxon_p=(float(wilcoxon(opt.reuse_LPIPS, opt.best_LPIPS).pvalue)
224
+ if (opt.reuse_LPIPS - opt.best_LPIPS).abs().sum() > 0 else float("nan")),
225
+ by_prompt={k: float(v) for k, v in opt.groupby("prompt").improvement_vs_reuse.median().items()},
226
+ by_seed={k: float(v) for k, v in opt.groupby("seed").improvement_vs_reuse.median().items()})
227
+
228
+ # ---------- 4. unimodality ----------
229
+ uni_rows = []
230
+ for i, c in enumerate(conds):
231
+ lm = local_minima(grids[c])
232
+ # split by low-damage half of that condition's own range
233
+ thr = grids[c][1:, :].min() + 0.5 * (grids[c][1:, :].max() - grids[c][1:, :].min())
234
+ lm_low = [t for t in lm if t[2] <= thr]
235
+ uni_rows.append(dict(Condition=c, n_local_minima=len(lm),
236
+ n_local_minima_low_damage_half=len(lm_low),
237
+ minima=";".join("(%s,%s,%.4f)" % (STR[a], SMO[b], v)
238
+ for a, b, v in sorted(lm, key=lambda t: t[2]))))
239
+ uni = pd.DataFrame(uni_rows)
240
+ uni.to_csv(os.path.join(TAB, "unimodality_%s.csv" % FAM), index=False, encoding="utf-8-sig")
241
+ lm_med = local_minima(Gmed); lm_mean = local_minima(Gmean)
242
+ thr_med = Gmed[1:, :].min() + 0.5 * (Gmed[1:, :].max() - Gmed[1:, :].min())
243
+ lm_med_low = [t for t in lm_med if t[2] <= thr_med]
244
+
245
+ # ---------- 5. curvature around the median common optimum ----------
246
+ si, ei = STR.index(common["median"][0]), SMO.index(common["median"][1])
247
+ curv = []
248
+ for i, c in enumerate(conds):
249
+ g = G[i]; v = g[si, ei]; nb = []
250
+ for da, db in ((-1, 0), (1, 0), (0, -1), (0, 1)):
251
+ a, b = si + da, ei + db
252
+ if 0 <= a < 11 and 0 <= b < 11:
253
+ nb.append(g[a, b] - v)
254
+ curv.append(dict(Condition=c, LPIPS_at_common=v, max_neighbor_delta=max(nb),
255
+ min_neighbor_delta=min(nb), mean_abs_neighbor_delta=float(np.mean(np.abs(nb))),
256
+ range_pct_anchor=100 * (max(nb) - min(nb)) / ANCHOR))
257
+ curvdf = pd.DataFrame(curv)
258
+ curvdf.to_csv(os.path.join(TAB, "curvature-near-common_%s.csv" % FAM), index=False, encoding="utf-8-sig")
259
+ vmedc = Gmed[si, ei]
260
+ med_nb = {"s%s_e%s" % (STR[si + da], SMO[ei + db]): float(Gmed[si + da, ei + db] - vmedc)
261
+ for da, db in ((-1, 0), (1, 0), (0, -1), (0, 1))
262
+ if 0 <= si + da < 11 and 0 <= ei + db < 11}
263
+
264
+ # ---------- 6. SSIM (win11) ----------
265
+ ssim_rows = []
266
+ Gs = np.full((len(conds), 11, 11), np.nan)
267
+ for i, c in enumerate(conds):
268
+ d = df[df["Condition"] == c]
269
+ rs = float(d[d["strength"] == 0][SS11].iloc[0]); Gs[i, 0, :] = rs
270
+ for _, row in d[d["strength"] > 0].iterrows():
271
+ Gs[i, STR.index(round(row["strength"], 1)), SMO.index(round(row["smoothing"], 2))] = row[SS11]
272
+ idx = np.unravel_index(np.argmax(Gs[i]), Gs[i].shape)
273
+ ssim_rows.append(dict(Condition=c, ssim_peak_strength=STR[idx[0]], ssim_peak_smoothing=SMO[idx[1]],
274
+ ssim_peak=Gs[i][idx],
275
+ lpips_bottom_strength=opt.loc[i, "best_strength"],
276
+ lpips_bottom_smoothing=opt.loc[i, "best_smoothing"],
277
+ d_strength=STR[idx[0]] - opt.loc[i, "best_strength"],
278
+ d_smoothing=SMO[idx[1]] - opt.loc[i, "best_smoothing"]))
279
+ ssdf = pd.DataFrame(ssim_rows)
280
+ ssdf.to_csv(os.path.join(TAB, "ssim-vs-lpips-optima_%s.csv" % FAM), index=False, encoding="utf-8-sig")
281
+ Gsmed = np.median(Gs, axis=0)
282
+ si2 = np.unravel_index(np.argmax(Gsmed), Gsmed.shape)
283
+ ssim_common = (STR[si2[0]], SMO[si2[1]], float(Gsmed[si2]))
284
+
285
+ # ---------- two-layer structure: EMA-wise aggregate ----------
286
+ ema_profile = {str(SMO[b]): float(np.median(Gmed[1:, b])) for b in range(11)}
287
+ str_profile = {str(STR[a]): float(np.median(Gmed[a, :])) for a in range(11)}
288
+
289
+ summary = dict(
290
+ family=FAM, common=common, common_restricted=common_restricted, stats=stats,
291
+ best_prediction_vs_reuse=bp_stats, own_best_vs_reuse=own_stats, ssim_common=ssim_common,
292
+ ssim_agree_exact=int(((ssdf.d_strength.abs() < 1e-9) & (ssdf.d_smoothing.abs() < 1e-9)).sum()),
293
+ n_local_minima_median_surface=len(lm_med), n_local_minima_mean_surface=len(lm_mean),
294
+ n_local_minima_median_surface_low_half=len(lm_med_low),
295
+ minima_median_surface=[(STR[a], SMO[b], float(v)) for a, b, v in sorted(lm_med, key=lambda t: t[2])],
296
+ minima_mean_surface=[(STR[a], SMO[b], float(v)) for a, b, v in sorted(lm_mean, key=lambda t: t[2])],
297
+ median_surface_neighbors=med_nb,
298
+ top5_median_cells=topk(Gmed), top5_mean_cells=topk(Gmean),
299
+ median_surface_reuse_row=float(Gmed[0, 0]), mean_surface_reuse_row=float(Gmean[0, 0]),
300
+ opt_strength=dict(min=float(opt.best_strength.min()), max=float(opt.best_strength.max()),
301
+ q1=float(opt.best_strength.quantile(.25)), q3=float(opt.best_strength.quantile(.75)),
302
+ median=float(opt.best_strength.median())),
303
+ opt_smoothing=dict(min=float(opt.best_smoothing.min()), max=float(opt.best_smoothing.max()),
304
+ q1=float(opt.best_smoothing.quantile(.25)), q3=float(opt.best_smoothing.quantile(.75)),
305
+ median=float(opt.best_smoothing.median())),
306
+ unimodal_counts={int(k): int(v) for k, v in uni.n_local_minima.value_counts().items()},
307
+ unimodal_counts_low_half={int(k): int(v) for k, v in uni.n_local_minima_low_damage_half.value_counts().items()},
308
+ loss_summary={k: dict(median=float(loss[loss.criterion == k].loss_vs_own_best.median()),
309
+ max=float(loss[loss.criterion == k].loss_vs_own_best.max()),
310
+ median_pct_anchor=float(loss[loss.criterion == k].loss_pct_anchor.median()),
311
+ max_pct_anchor=float(loss[loss.criterion == k].loss_pct_anchor.max()))
312
+ for k in ("median", "mean")},
313
+ reuse_stats=dict(median=float(np.median(list(reuse.values()))),
314
+ min=float(min(reuse.values())), max=float(max(reuse.values()))),
315
+ curvature=dict(median_of_mean_abs=float(curvdf.mean_abs_neighbor_delta.median()),
316
+ max_of_mean_abs=float(curvdf.mean_abs_neighbor_delta.max()),
317
+ median_range_pct_anchor=float(curvdf.range_pct_anchor.median())),
318
+ ema_profile_median_surface=ema_profile, strength_profile_median_surface=str_profile,
319
+ n_conditions_reuse_unbeatable=int((opt.best_strength == 0.0).sum()))
320
+ ALL[FAM] = summary
321
+ with open(os.path.join(TAB, "summary_%s.json" % FAM), "w", encoding="utf-8") as f:
322
+ json.dump(summary, f, indent=2, ensure_ascii=False, default=str)
323
+ print("=" * 70); print(FAM)
324
+ print(json.dumps(summary, indent=2, ensure_ascii=False, default=str))
325
+ print("\n--- per-condition optima ---"); print(opt.to_string())
326
+ print("\n--- best prediction (str>=0.1) vs reuse ---"); print(bp.to_string())
327
+ print("\n--- unimodality ---"); print(uni[["Condition", "n_local_minima", "n_local_minima_low_damage_half"]].to_string())
328
+ print("\n--- median surface ---")
329
+ print(pd.DataFrame(Gmed, index=STR, columns=SMO).round(4).to_string())
330
+ print("\n--- SSIM vs LPIPS optima ---"); print(ssdf.to_string())
331
+ print("\n--- curvature ---"); print(curvdf.round(4).to_string())
332
+
333
+ with open(os.path.join(TAB, "summary_ALL-families.json"), "w", encoding="utf-8") as f:
334
+ json.dump(ALL, f, indent=2, ensure_ascii=False, default=str)
335
+ print("\nDONE")
analysis/stage5-families/run.log ADDED
@@ -0,0 +1,926 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ======================================================================
2
+ ERSDE-Simple
3
+ {
4
+ "family": "ERSDE-Simple",
5
+ "common": {
6
+ "median": [
7
+ 0.1,
8
+ 0.0,
9
+ 0.313459
10
+ ],
11
+ "mean": [
12
+ 0.0,
13
+ 0.0,
14
+ 0.32377713333333336
15
+ ]
16
+ },
17
+ "common_restricted": {
18
+ "median": [
19
+ 0.1,
20
+ 0.0,
21
+ 0.313459
22
+ ],
23
+ "mean": [
24
+ 0.1,
25
+ 0.3,
26
+ 0.3329523999999999
27
+ ]
28
+ },
29
+ "stats": {
30
+ "median": {
31
+ "point": [
32
+ 0.1,
33
+ 0.0
34
+ ],
35
+ "median_improvement": -0.004917999999999978,
36
+ "min_improvement": -0.08158299999999996,
37
+ "max_improvement": 0.012102000000000002,
38
+ "median_pct_anchor": -4.064462809917337,
39
+ "wilcoxon_stat": 37.0,
40
+ "wilcoxon_p": 0.207763671875,
41
+ "n_improved": 6,
42
+ "n_worse": 9,
43
+ "by_prompt": {
44
+ "Prompt001-schoolgirl": -0.0007900000000000129,
45
+ "Prompt002-android": -0.027158000000000015,
46
+ "Prompt003-woman": -0.004917999999999978,
47
+ "Prompt004-shop": -0.009969000000000006,
48
+ "Prompt005-inkwash": 0.0043330000000000035
49
+ },
50
+ "by_seed": {
51
+ "5193": -0.006027000000000005,
52
+ "6111": -0.027158000000000015,
53
+ "9676": 0.007409999999999972
54
+ }
55
+ },
56
+ "mean": {
57
+ "point": [
58
+ 0.0,
59
+ 0.0
60
+ ],
61
+ "median_improvement": 0.0,
62
+ "min_improvement": 0.0,
63
+ "max_improvement": 0.0,
64
+ "median_pct_anchor": 0.0,
65
+ "wilcoxon_stat": 0.0,
66
+ "wilcoxon_p": NaN,
67
+ "n_improved": 0,
68
+ "n_worse": 15,
69
+ "by_prompt": {
70
+ "Prompt001-schoolgirl": 0.0,
71
+ "Prompt002-android": 0.0,
72
+ "Prompt003-woman": 0.0,
73
+ "Prompt004-shop": 0.0,
74
+ "Prompt005-inkwash": 0.0
75
+ },
76
+ "by_seed": {
77
+ "5193": 0.0,
78
+ "6111": 0.0,
79
+ "9676": 0.0
80
+ }
81
+ },
82
+ "median_restricted": {
83
+ "point": [
84
+ 0.1,
85
+ 0.0
86
+ ],
87
+ "median_improvement": -0.004917999999999978,
88
+ "min_improvement": -0.08158299999999996,
89
+ "max_improvement": 0.012102000000000002,
90
+ "median_pct_anchor": -4.064462809917337,
91
+ "wilcoxon_stat": 37.0,
92
+ "wilcoxon_p": 0.207763671875,
93
+ "n_improved": 6,
94
+ "n_worse": 9,
95
+ "by_prompt": {
96
+ "Prompt001-schoolgirl": -0.0007900000000000129,
97
+ "Prompt002-android": -0.027158000000000015,
98
+ "Prompt003-woman": -0.004917999999999978,
99
+ "Prompt004-shop": -0.009969000000000006,
100
+ "Prompt005-inkwash": 0.0043330000000000035
101
+ },
102
+ "by_seed": {
103
+ "5193": -0.006027000000000005,
104
+ "6111": -0.027158000000000015,
105
+ "9676": 0.007409999999999972
106
+ }
107
+ },
108
+ "mean_restricted": {
109
+ "point": [
110
+ 0.1,
111
+ 0.3
112
+ ],
113
+ "median_improvement": 0.0006999999999999784,
114
+ "min_improvement": -0.09985199999999994,
115
+ "max_improvement": 0.01750299999999999,
116
+ "median_pct_anchor": 0.5785123966941971,
117
+ "wilcoxon_stat": 54.0,
118
+ "wilcoxon_p": 0.76153564453125,
119
+ "n_improved": 8,
120
+ "n_worse": 7,
121
+ "by_prompt": {
122
+ "Prompt001-schoolgirl": 0.0041200000000000125,
123
+ "Prompt002-android": 0.0044319999999999915,
124
+ "Prompt003-woman": -0.0018320000000000003,
125
+ "Prompt004-shop": 0.0006999999999999784,
126
+ "Prompt005-inkwash": 0.0023120000000000085
127
+ },
128
+ "by_seed": {
129
+ "5193": 0.0023120000000000085,
130
+ "6111": -0.023474999999999968,
131
+ "9676": 0.005861000000000005
132
+ }
133
+ }
134
+ },
135
+ "best_prediction_vs_reuse": {
136
+ "median": 0.008681999999999968,
137
+ "min": -0.08158299999999996,
138
+ "max": 0.05197499999999999,
139
+ "median_pct_anchor": 7.175206611570221,
140
+ "wilcoxon_p": 0.359130859375,
141
+ "n_helps": 11,
142
+ "n_hurts": 4,
143
+ "by_prompt": {
144
+ "Prompt001-schoolgirl": 0.008681999999999968,
145
+ "Prompt002-android": 0.02703099999999997,
146
+ "Prompt003-woman": 0.003361000000000003,
147
+ "Prompt004-shop": 0.010055000000000036,
148
+ "Prompt005-inkwash": 0.013811000000000018
149
+ },
150
+ "by_seed": {
151
+ "5193": 0.02154299999999998,
152
+ "6111": -0.023474999999999968,
153
+ "9676": 0.013811000000000018
154
+ }
155
+ },
156
+ "own_best_vs_reuse": {
157
+ "median": 0.008681999999999968,
158
+ "min": 0.0,
159
+ "max": 0.05197499999999999,
160
+ "wilcoxon_p": 0.0033456181158508813,
161
+ "by_prompt": {
162
+ "Prompt001-schoolgirl": 0.008681999999999968,
163
+ "Prompt002-android": 0.02703099999999997,
164
+ "Prompt003-woman": 0.003361000000000003,
165
+ "Prompt004-shop": 0.010055000000000036,
166
+ "Prompt005-inkwash": 0.013811000000000018
167
+ },
168
+ "by_seed": {
169
+ "5193": 0.02154299999999998,
170
+ "6111": 0.0,
171
+ "9676": 0.013811000000000018
172
+ }
173
+ },
174
+ "ssim_common": [
175
+ 0.1,
176
+ 0.5,
177
+ 0.735741
178
+ ],
179
+ "ssim_agree_exact": 7,
180
+ "n_local_minima_median_surface": 4,
181
+ "n_local_minima_mean_surface": 3,
182
+ "n_local_minima_median_surface_low_half": 3,
183
+ "minima_median_surface": [
184
+ [
185
+ 0.1,
186
+ 0.0,
187
+ 0.313459
188
+ ],
189
+ [
190
+ 0.1,
191
+ 0.4,
192
+ 0.314361
193
+ ],
194
+ [
195
+ 0.6,
196
+ 0.4,
197
+ 0.377386
198
+ ],
199
+ [
200
+ 1.0,
201
+ 0.99,
202
+ 0.877416
203
+ ]
204
+ ],
205
+ "minima_mean_surface": [
206
+ [
207
+ 0.1,
208
+ 0.3,
209
+ 0.3329523999999999
210
+ ],
211
+ [
212
+ 0.1,
213
+ 0.1,
214
+ 0.3368154666666667
215
+ ],
216
+ [
217
+ 1.0,
218
+ 0.99,
219
+ 0.8568986666666666
220
+ ]
221
+ ],
222
+ "median_surface_neighbors": {
223
+ "s0.0_e0.0": 0.010055000000000036,
224
+ "s0.2_e0.0": 0.0023900000000000032,
225
+ "s0.1_e0.1": 0.002817999999999987
226
+ },
227
+ "top5_median_cells": [
228
+ [
229
+ 0.313459,
230
+ 0.1,
231
+ 0.0
232
+ ],
233
+ [
234
+ 0.314361,
235
+ 0.1,
236
+ 0.4
237
+ ],
238
+ [
239
+ 0.3145,
240
+ 0.2,
241
+ 0.1
242
+ ],
243
+ [
244
+ 0.315849,
245
+ 0.2,
246
+ 0.0
247
+ ],
248
+ [
249
+ 0.316277,
250
+ 0.1,
251
+ 0.1
252
+ ]
253
+ ],
254
+ "top5_mean_cells": [
255
+ [
256
+ 0.32377713333333336,
257
+ 0.0,
258
+ 0.0
259
+ ],
260
+ [
261
+ 0.32377713333333336,
262
+ 0.0,
263
+ 0.1
264
+ ],
265
+ [
266
+ 0.32377713333333336,
267
+ 0.0,
268
+ 0.2
269
+ ],
270
+ [
271
+ 0.32377713333333336,
272
+ 0.0,
273
+ 0.3
274
+ ],
275
+ [
276
+ 0.32377713333333336,
277
+ 0.0,
278
+ 0.4
279
+ ]
280
+ ],
281
+ "median_surface_reuse_row": 0.323514,
282
+ "mean_surface_reuse_row": 0.32377713333333336,
283
+ "opt_strength": {
284
+ "min": 0.0,
285
+ "max": 0.8,
286
+ "q1": 0.05,
287
+ "q3": 0.2,
288
+ "median": 0.1
289
+ },
290
+ "opt_smoothing": {
291
+ "min": 0.0,
292
+ "max": 0.5,
293
+ "q1": 0.0,
294
+ "q3": 0.4,
295
+ "median": 0.1
296
+ },
297
+ "unimodal_counts": {
298
+ "2": 6,
299
+ "3": 3,
300
+ "6": 2,
301
+ "4": 2,
302
+ "7": 1,
303
+ "5": 1
304
+ },
305
+ "unimodal_counts_low_half": {
306
+ "2": 5,
307
+ "1": 4,
308
+ "6": 2,
309
+ "5": 2,
310
+ "3": 1,
311
+ "4": 1
312
+ },
313
+ "loss_summary": {
314
+ "median": {
315
+ "median": 0.020405000000000006,
316
+ "max": 0.10408,
317
+ "median_pct_anchor": 16.86363636363637,
318
+ "max_pct_anchor": 86.01652892561985
319
+ },
320
+ "mean": {
321
+ "median": 0.008681999999999968,
322
+ "max": 0.05197499999999999,
323
+ "median_pct_anchor": 7.175206611570221,
324
+ "max_pct_anchor": 42.95454545454545
325
+ }
326
+ },
327
+ "reuse_stats": {
328
+ "median": 0.323514,
329
+ "min": 0.16046,
330
+ "max": 0.504483
331
+ },
332
+ "curvature": {
333
+ "median_of_mean_abs": 0.005258000000000013,
334
+ "max_of_mean_abs": 0.04979300000000001,
335
+ "median_range_pct_anchor": 10.830578512396722
336
+ },
337
+ "ema_profile_median_surface": {
338
+ "0.0": 0.4102455,
339
+ "0.1": 0.40275099999999997,
340
+ "0.2": 0.39505599999999996,
341
+ "0.3": 0.3930055,
342
+ "0.4": 0.3800735,
343
+ "0.5": 0.3923375,
344
+ "0.6": 0.430079,
345
+ "0.7": 0.547435,
346
+ "0.8": 0.6677615,
347
+ "0.9": 0.8550845,
348
+ "0.99": 0.8781954999999999
349
+ },
350
+ "strength_profile_median_surface": {
351
+ "0.0": 0.323514,
352
+ "0.1": 0.318385,
353
+ "0.2": 0.340133,
354
+ "0.3": 0.37769,
355
+ "0.4": 0.389693,
356
+ "0.5": 0.405798,
357
+ "0.6": 0.414693,
358
+ "0.7": 0.423736,
359
+ "0.8": 0.439799,
360
+ "0.9": 0.461622,
361
+ "1.0": 0.495764
362
+ },
363
+ "n_conditions_reuse_unbeatable": 4
364
+ }
365
+
366
+ --- per-condition optima ---
367
+ Condition prompt seed best_strength best_smoothing best_LPIPS reuse_LPIPS improvement_vs_reuse improvement_pct_anchor
368
+ 0 ERSDE-Simple_Prompt001-schoolgirl-5193 Prompt001-schoolgirl 5193 0.1 0.4 0.297233 0.305915 0.008682 7.175207
369
+ 1 ERSDE-Simple_Prompt001-schoolgirl-6111 Prompt001-schoolgirl 6111 0.0 0.0 0.424783 0.424783 0.000000 0.000000
370
+ 2 ERSDE-Simple_Prompt001-schoolgirl-9676 Prompt001-schoolgirl 9676 0.6 0.4 0.377386 0.429361 0.051975 42.954545
371
+ 3 ERSDE-Simple_Prompt002-android-5193 Prompt002-android 5193 0.2 0.5 0.304188 0.331219 0.027031 22.339669
372
+ 4 ERSDE-Simple_Prompt002-android-6111 Prompt002-android 6111 0.0 0.0 0.333236 0.333236 0.000000 0.000000
373
+ 5 ERSDE-Simple_Prompt002-android-9676 Prompt002-android 9676 0.6 0.1 0.237991 0.284118 0.046127 38.121488
374
+ 6 ERSDE-Simple_Prompt003-woman-5193 Prompt003-woman 5193 0.2 0.4 0.155648 0.160460 0.004812 3.976860
375
+ 7 ERSDE-Simple_Prompt003-woman-6111 Prompt003-woman 6111 0.8 0.1 0.438640 0.439541 0.000901 0.744628
376
+ 8 ERSDE-Simple_Prompt003-woman-9676 Prompt003-woman 9676 0.1 0.0 0.194427 0.197788 0.003361 2.777686
377
+ 9 ERSDE-Simple_Prompt004-shop-5193 Prompt004-shop 5193 0.2 0.5 0.356122 0.377665 0.021543 17.804132
378
+ 10 ERSDE-Simple_Prompt004-shop-6111 Prompt004-shop 6111 0.0 0.0 0.504483 0.504483 0.000000 0.000000
379
+ 11 ERSDE-Simple_Prompt004-shop-9676 Prompt004-shop 9676 0.1 0.0 0.313459 0.323514 0.010055 8.309917
380
+ 12 ERSDE-Simple_Prompt005-inkwash-5193 Prompt005-inkwash 5193 0.2 0.5 0.186543 0.211281 0.024738 20.444628
381
+ 13 ERSDE-Simple_Prompt005-inkwash-6111 Prompt005-inkwash 6111 0.0 0.0 0.276156 0.276156 0.000000 0.000000
382
+ 14 ERSDE-Simple_Prompt005-inkwash-9676 Prompt005-inkwash 9676 0.1 0.1 0.243326 0.257137 0.013811 11.414050
383
+
384
+ --- best prediction (str>=0.1) vs reuse ---
385
+ Condition prompt seed reuse_LPIPS best_pred_strength best_pred_smoothing best_pred_LPIPS delta_vs_reuse delta_pct_anchor prediction_helps
386
+ 0 ERSDE-Simple_Prompt001-schoolgirl-5193 Prompt001-schoolgirl 5193 0.305915 0.1 0.4 0.297233 0.008682 7.175207 True
387
+ 1 ERSDE-Simple_Prompt001-schoolgirl-6111 Prompt001-schoolgirl 6111 0.424783 0.1 0.0 0.439057 -0.014274 -11.796694 False
388
+ 2 ERSDE-Simple_Prompt001-schoolgirl-9676 Prompt001-schoolgirl 9676 0.429361 0.6 0.4 0.377386 0.051975 42.954545 True
389
+ 3 ERSDE-Simple_Prompt002-android-5193 Prompt002-android 5193 0.331219 0.2 0.5 0.304188 0.027031 22.339669 True
390
+ 4 ERSDE-Simple_Prompt002-android-6111 Prompt002-android 6111 0.333236 0.1 0.0 0.360394 -0.027158 -22.444628 False
391
+ 5 ERSDE-Simple_Prompt002-android-9676 Prompt002-android 9676 0.284118 0.6 0.1 0.237991 0.046127 38.121488 True
392
+ 6 ERSDE-Simple_Prompt003-woman-5193 Prompt003-woman 5193 0.160460 0.2 0.4 0.155648 0.004812 3.976860 True
393
+ 7 ERSDE-Simple_Prompt003-woman-6111 Prompt003-woman 6111 0.439541 0.8 0.1 0.438640 0.000901 0.744628 True
394
+ 8 ERSDE-Simple_Prompt003-woman-9676 Prompt003-woman 9676 0.197788 0.1 0.0 0.194427 0.003361 2.777686 True
395
+ 9 ERSDE-Simple_Prompt004-shop-5193 Prompt004-shop 5193 0.377665 0.2 0.5 0.356122 0.021543 17.804132 True
396
+ 10 ERSDE-Simple_Prompt004-shop-6111 Prompt004-shop 6111 0.504483 0.1 0.0 0.586066 -0.081583 -67.423967 False
397
+ 11 ERSDE-Simple_Prompt004-shop-9676 Prompt004-shop 9676 0.323514 0.1 0.0 0.313459 0.010055 8.309917 True
398
+ 12 ERSDE-Simple_Prompt005-inkwash-5193 Prompt005-inkwash 5193 0.211281 0.2 0.5 0.186543 0.024738 20.444628 True
399
+ 13 ERSDE-Simple_Prompt005-inkwash-6111 Prompt005-inkwash 6111 0.276156 0.1 0.3 0.299631 -0.023475 -19.400826 False
400
+ 14 ERSDE-Simple_Prompt005-inkwash-9676 Prompt005-inkwash 9676 0.257137 0.1 0.1 0.243326 0.013811 11.414050 True
401
+
402
+ --- unimodality ---
403
+ Condition n_local_minima n_local_minima_low_damage_half
404
+ 0 ERSDE-Simple_Prompt001-schoolgirl-5193 6 6
405
+ 1 ERSDE-Simple_Prompt001-schoolgirl-6111 2 1
406
+ 2 ERSDE-Simple_Prompt001-schoolgirl-9676 5 5
407
+ 3 ERSDE-Simple_Prompt002-android-5193 7 6
408
+ 4 ERSDE-Simple_Prompt002-android-6111 2 1
409
+ 5 ERSDE-Simple_Prompt002-android-9676 3 2
410
+ 6 ERSDE-Simple_Prompt003-woman-5193 4 3
411
+ 7 ERSDE-Simple_Prompt003-woman-6111 4 4
412
+ 8 ERSDE-Simple_Prompt003-woman-9676 2 2
413
+ 9 ERSDE-Simple_Prompt004-shop-5193 6 5
414
+ 10 ERSDE-Simple_Prompt004-shop-6111 2 1
415
+ 11 ERSDE-Simple_Prompt004-shop-9676 3 2
416
+ 12 ERSDE-Simple_Prompt005-inkwash-5193 2 2
417
+ 13 ERSDE-Simple_Prompt005-inkwash-6111 2 1
418
+ 14 ERSDE-Simple_Prompt005-inkwash-9676 3 2
419
+
420
+ --- median surface ---
421
+ 0.00 0.10 0.20 0.30 0.40 0.50 0.60 0.70 0.80 0.90 0.99
422
+ 0.0 0.3235 0.3235 0.3235 0.3235 0.3235 0.3235 0.3235 0.3235 0.3235 0.3235 0.3235
423
+ 0.1 0.3135 0.3163 0.3184 0.3177 0.3144 0.3168 0.3202 0.3408 0.3886 0.4663 0.7025
424
+ 0.2 0.3158 0.3145 0.3206 0.3263 0.3401 0.3364 0.3809 0.4125 0.4810 0.6460 0.8170
425
+ 0.3 0.3275 0.3489 0.3619 0.3777 0.3660 0.3730 0.4051 0.4304 0.4943 0.7385 0.8565
426
+ 0.4 0.3868 0.3897 0.3891 0.3712 0.3685 0.3893 0.4099 0.4932 0.5544 0.8184 0.8759
427
+ 0.5 0.4058 0.3982 0.3929 0.3923 0.3828 0.3890 0.4158 0.5128 0.6382 0.8496 0.8836
428
+ 0.6 0.4147 0.4073 0.3972 0.3938 0.3774 0.3954 0.4444 0.5821 0.6973 0.8605 0.8852
429
+ 0.7 0.4237 0.4176 0.4062 0.4005 0.3933 0.4082 0.4829 0.6086 0.7524 0.8663 0.8828
430
+ 0.8 0.4398 0.4168 0.4044 0.4015 0.4023 0.4143 0.5106 0.6329 0.8135 0.8809 0.8805
431
+ 0.9 0.4417 0.4303 0.4150 0.4125 0.4164 0.4616 0.5524 0.6739 0.8351 0.8844 0.8790
432
+ 1.0 0.4434 0.4424 0.4236 0.4183 0.4464 0.4958 0.5848 0.7085 0.8542 0.8845 0.8774
433
+
434
+ --- SSIM vs LPIPS optima ---
435
+ Condition ssim_peak_strength ssim_peak_smoothing ssim_peak lpips_bottom_strength lpips_bottom_smoothing d_strength d_smoothing
436
+ 0 ERSDE-Simple_Prompt001-schoolgirl-5193 0.1 0.6 0.770072 0.1 0.4 0.0 0.2
437
+ 1 ERSDE-Simple_Prompt001-schoolgirl-6111 0.0 0.0 0.647326 0.0 0.0 0.0 0.0
438
+ 2 ERSDE-Simple_Prompt001-schoolgirl-9676 0.6 0.4 0.732172 0.6 0.4 0.0 0.0
439
+ 3 ERSDE-Simple_Prompt002-android-5193 0.1 0.7 0.751116 0.2 0.5 -0.1 0.2
440
+ 4 ERSDE-Simple_Prompt002-android-6111 0.0 0.0 0.733333 0.0 0.0 0.0 0.0
441
+ 5 ERSDE-Simple_Prompt002-android-9676 0.6 0.1 0.765157 0.6 0.1 0.0 0.0
442
+ 6 ERSDE-Simple_Prompt003-woman-5193 0.1 0.0 0.919054 0.2 0.4 -0.1 -0.4
443
+ 7 ERSDE-Simple_Prompt003-woman-6111 0.5 0.0 0.722273 0.8 0.1 -0.3 -0.1
444
+ 8 ERSDE-Simple_Prompt003-woman-9676 0.1 0.0 0.918260 0.1 0.0 0.0 0.0
445
+ 9 ERSDE-Simple_Prompt004-shop-5193 0.2 0.7 0.663236 0.2 0.5 0.0 0.2
446
+ 10 ERSDE-Simple_Prompt004-shop-6111 0.0 0.0 0.614867 0.0 0.0 0.0 0.0
447
+ 11 ERSDE-Simple_Prompt004-shop-9676 0.0 0.0 0.672762 0.1 0.0 -0.1 0.0
448
+ 12 ERSDE-Simple_Prompt005-inkwash-5193 0.3 0.0 0.794313 0.2 0.5 0.1 -0.5
449
+ 13 ERSDE-Simple_Prompt005-inkwash-6111 0.0 0.0 0.786036 0.0 0.0 0.0 0.0
450
+ 14 ERSDE-Simple_Prompt005-inkwash-9676 0.1 0.2 0.753666 0.1 0.1 0.0 0.1
451
+
452
+ --- curvature ---
453
+ Condition LPIPS_at_common max_neighbor_delta min_neighbor_delta mean_abs_neighbor_delta range_pct_anchor
454
+ 0 ERSDE-Simple_Prompt001-schoolgirl-5193 0.3067 0.0074 -0.0057 0.0046 10.8157
455
+ 1 ERSDE-Simple_Prompt001-schoolgirl-6111 0.4391 0.0180 -0.0143 0.0114 26.6521
456
+ 2 ERSDE-Simple_Prompt001-schoolgirl-9676 0.4220 0.0074 -0.0040 0.0050 9.4413
457
+ 3 ERSDE-Simple_Prompt002-android-5193 0.4083 -0.0008 -0.0770 0.0285 62.9785
458
+ 4 ERSDE-Simple_Prompt002-android-6111 0.3604 0.0389 -0.0272 0.0222 54.6107
459
+ 5 ERSDE-Simple_Prompt002-android-9676 0.2720 0.0121 -0.0097 0.0079 18.0000
460
+ 6 ERSDE-Simple_Prompt003-woman-5193 0.1665 0.0021 -0.0060 0.0034 6.7058
461
+ 7 ERSDE-Simple_Prompt003-woman-6111 0.4445 0.0022 -0.0049 0.0027 5.8702
462
+ 8 ERSDE-Simple_Prompt003-woman-9676 0.1944 0.0046 0.0019 0.0033 2.2132
463
+ 9 ERSDE-Simple_Prompt004-shop-5193 0.3876 0.0031 -0.0100 0.0065 10.8306
464
+ 10 ERSDE-Simple_Prompt004-shop-6111 0.5861 0.0632 -0.0816 0.0498 119.6174
465
+ 11 ERSDE-Simple_Prompt004-shop-9676 0.3135 0.0101 0.0001 0.0043 8.2331
466
+ 12 ERSDE-Simple_Prompt005-inkwash-5193 0.2069 0.0043 -0.0042 0.0036 7.0331
467
+ 13 ERSDE-Simple_Prompt005-inkwash-6111 0.3075 0.0084 -0.0313 0.0142 32.8041
468
+ 14 ERSDE-Simple_Prompt005-inkwash-9676 0.2510 0.0062 -0.0077 0.0053 11.4140
469
+ ======================================================================
470
+ Euler-Beta
471
+ {
472
+ "family": "Euler-Beta",
473
+ "common": {
474
+ "median": [
475
+ 0.3,
476
+ 0.1,
477
+ 0.250345
478
+ ],
479
+ "mean": [
480
+ 0.6,
481
+ 0.1,
482
+ 0.24866366666666673
483
+ ]
484
+ },
485
+ "common_restricted": {
486
+ "median": [
487
+ 0.3,
488
+ 0.1,
489
+ 0.250345
490
+ ],
491
+ "mean": [
492
+ 0.6,
493
+ 0.1,
494
+ 0.24866366666666673
495
+ ]
496
+ },
497
+ "stats": {
498
+ "median": {
499
+ "point": [
500
+ 0.3,
501
+ 0.1
502
+ ],
503
+ "median_improvement": 0.027129999999999987,
504
+ "min_improvement": -0.036507999999999985,
505
+ "max_improvement": 0.07270100000000002,
506
+ "median_pct_anchor": 22.421487603305774,
507
+ "wilcoxon_stat": 18.0,
508
+ "wilcoxon_p": 0.01507568359375,
509
+ "n_improved": 13,
510
+ "n_worse": 2,
511
+ "by_prompt": {
512
+ "Prompt001-schoolgirl": 0.07035000000000002,
513
+ "Prompt002-android": 0.03243600000000002,
514
+ "Prompt003-woman": 0.04086600000000001,
515
+ "Prompt004-shop": 0.019498000000000015,
516
+ "Prompt005-inkwash": 0.012865999999999989
517
+ },
518
+ "by_seed": {
519
+ "5193": 0.014325000000000004,
520
+ "6111": 0.03243600000000002,
521
+ "9676": 0.019498000000000015
522
+ }
523
+ },
524
+ "mean": {
525
+ "point": [
526
+ 0.6,
527
+ 0.1
528
+ ],
529
+ "median_improvement": 0.03487100000000004,
530
+ "min_improvement": -0.07802999999999996,
531
+ "max_improvement": 0.10211100000000004,
532
+ "median_pct_anchor": 28.819008264462845,
533
+ "wilcoxon_stat": 22.0,
534
+ "wilcoxon_p": 0.0301513671875,
535
+ "n_improved": 12,
536
+ "n_worse": 3,
537
+ "by_prompt": {
538
+ "Prompt001-schoolgirl": 0.077036,
539
+ "Prompt002-android": 0.048068,
540
+ "Prompt003-woman": 0.063614,
541
+ "Prompt004-shop": 0.02020199999999997,
542
+ "Prompt005-inkwash": -0.023415999999999992
543
+ },
544
+ "by_seed": {
545
+ "5193": 0.03487100000000004,
546
+ "6111": 0.048068,
547
+ "9676": 0.004047000000000023
548
+ }
549
+ },
550
+ "median_restricted": {
551
+ "point": [
552
+ 0.3,
553
+ 0.1
554
+ ],
555
+ "median_improvement": 0.027129999999999987,
556
+ "min_improvement": -0.036507999999999985,
557
+ "max_improvement": 0.07270100000000002,
558
+ "median_pct_anchor": 22.421487603305774,
559
+ "wilcoxon_stat": 18.0,
560
+ "wilcoxon_p": 0.01507568359375,
561
+ "n_improved": 13,
562
+ "n_worse": 2,
563
+ "by_prompt": {
564
+ "Prompt001-schoolgirl": 0.07035000000000002,
565
+ "Prompt002-android": 0.03243600000000002,
566
+ "Prompt003-woman": 0.04086600000000001,
567
+ "Prompt004-shop": 0.019498000000000015,
568
+ "Prompt005-inkwash": 0.012865999999999989
569
+ },
570
+ "by_seed": {
571
+ "5193": 0.014325000000000004,
572
+ "6111": 0.03243600000000002,
573
+ "9676": 0.019498000000000015
574
+ }
575
+ },
576
+ "mean_restricted": {
577
+ "point": [
578
+ 0.6,
579
+ 0.1
580
+ ],
581
+ "median_improvement": 0.03487100000000004,
582
+ "min_improvement": -0.07802999999999996,
583
+ "max_improvement": 0.10211100000000004,
584
+ "median_pct_anchor": 28.819008264462845,
585
+ "wilcoxon_stat": 22.0,
586
+ "wilcoxon_p": 0.0301513671875,
587
+ "n_improved": 12,
588
+ "n_worse": 3,
589
+ "by_prompt": {
590
+ "Prompt001-schoolgirl": 0.077036,
591
+ "Prompt002-android": 0.048068,
592
+ "Prompt003-woman": 0.063614,
593
+ "Prompt004-shop": 0.02020199999999997,
594
+ "Prompt005-inkwash": -0.023415999999999992
595
+ },
596
+ "by_seed": {
597
+ "5193": 0.03487100000000004,
598
+ "6111": 0.048068,
599
+ "9676": 0.004047000000000023
600
+ }
601
+ }
602
+ },
603
+ "best_prediction_vs_reuse": {
604
+ "median": 0.042718000000000034,
605
+ "min": -0.003938999999999998,
606
+ "max": 0.15287,
607
+ "median_pct_anchor": 35.304132231404985,
608
+ "wilcoxon_p": 0.0001220703125,
609
+ "n_helps": 14,
610
+ "n_hurts": 1,
611
+ "by_prompt": {
612
+ "Prompt001-schoolgirl": 0.09323999999999999,
613
+ "Prompt002-android": 0.05135299999999998,
614
+ "Prompt003-woman": 0.06426199999999999,
615
+ "Prompt004-shop": 0.03190499999999999,
616
+ "Prompt005-inkwash": 0.012865999999999989
617
+ },
618
+ "by_seed": {
619
+ "5193": 0.042718000000000034,
620
+ "6111": 0.05135299999999998,
621
+ "9676": 0.019969999999999988
622
+ }
623
+ },
624
+ "own_best_vs_reuse": {
625
+ "median": 0.042718000000000034,
626
+ "min": 0.0,
627
+ "max": 0.15287,
628
+ "wilcoxon_p": 0.0009815397525216685,
629
+ "by_prompt": {
630
+ "Prompt001-schoolgirl": 0.09323999999999999,
631
+ "Prompt002-android": 0.05135299999999998,
632
+ "Prompt003-woman": 0.06426199999999999,
633
+ "Prompt004-shop": 0.03190499999999999,
634
+ "Prompt005-inkwash": 0.012865999999999989
635
+ },
636
+ "by_seed": {
637
+ "5193": 0.042718000000000034,
638
+ "6111": 0.05135299999999998,
639
+ "9676": 0.019969999999999988
640
+ }
641
+ },
642
+ "ssim_common": [
643
+ 0.1,
644
+ 0.0,
645
+ 0.786009
646
+ ],
647
+ "ssim_agree_exact": 5,
648
+ "n_local_minima_median_surface": 3,
649
+ "n_local_minima_mean_surface": 1,
650
+ "n_local_minima_median_surface_low_half": 3,
651
+ "minima_median_surface": [
652
+ [
653
+ 0.3,
654
+ 0.1,
655
+ 0.250345
656
+ ],
657
+ [
658
+ 0.7,
659
+ 0.2,
660
+ 0.257376
661
+ ],
662
+ [
663
+ 0.1,
664
+ 0.5,
665
+ 0.26926
666
+ ]
667
+ ],
668
+ "minima_mean_surface": [
669
+ [
670
+ 0.6,
671
+ 0.1,
672
+ 0.24866366666666673
673
+ ]
674
+ ],
675
+ "median_surface_neighbors": {
676
+ "s0.2_e0.1": 0.007581000000000004,
677
+ "s0.4_e0.1": 0.006869000000000014,
678
+ "s0.3_e0.0": 0.007911000000000001,
679
+ "s0.3_e0.2": 0.004785000000000039
680
+ },
681
+ "top5_median_cells": [
682
+ [
683
+ 0.250345,
684
+ 0.3,
685
+ 0.1
686
+ ],
687
+ [
688
+ 0.254853,
689
+ 0.4,
690
+ 0.2
691
+ ],
692
+ [
693
+ 0.25513,
694
+ 0.3,
695
+ 0.2
696
+ ],
697
+ [
698
+ 0.256827,
699
+ 0.4,
700
+ 0.0
701
+ ],
702
+ [
703
+ 0.257214,
704
+ 0.4,
705
+ 0.1
706
+ ]
707
+ ],
708
+ "top5_mean_cells": [
709
+ [
710
+ 0.24866366666666673,
711
+ 0.6,
712
+ 0.1
713
+ ],
714
+ [
715
+ 0.25032566666666667,
716
+ 0.7,
717
+ 0.2
718
+ ],
719
+ [
720
+ 0.2503452666666667,
721
+ 0.5,
722
+ 0.1
723
+ ],
724
+ [
725
+ 0.25062286666666667,
726
+ 0.4,
727
+ 0.2
728
+ ],
729
+ [
730
+ 0.2515322,
731
+ 0.6,
732
+ 0.2
733
+ ]
734
+ ],
735
+ "median_surface_reuse_row": 0.286158,
736
+ "mean_surface_reuse_row": 0.2815976666666667,
737
+ "opt_strength": {
738
+ "min": 0.0,
739
+ "max": 1.0,
740
+ "q1": 0.3,
741
+ "q3": 0.7,
742
+ "median": 0.6
743
+ },
744
+ "opt_smoothing": {
745
+ "min": 0.0,
746
+ "max": 0.7,
747
+ "q1": 0.0,
748
+ "q3": 0.2,
749
+ "median": 0.1
750
+ },
751
+ "unimodal_counts": {
752
+ "3": 3,
753
+ "5": 3,
754
+ "4": 2,
755
+ "2": 2,
756
+ "1": 1,
757
+ "7": 1,
758
+ "14": 1,
759
+ "9": 1,
760
+ "10": 1
761
+ },
762
+ "unimodal_counts_low_half": {
763
+ "1": 4,
764
+ "2": 4,
765
+ "4": 3,
766
+ "3": 3,
767
+ "5": 1
768
+ },
769
+ "loss_summary": {
770
+ "median": {
771
+ "median": 0.02857699999999999,
772
+ "max": 0.101322,
773
+ "median_pct_anchor": 23.617355371900818,
774
+ "max_pct_anchor": 83.73719008264463
775
+ },
776
+ "mean": {
777
+ "median": 0.015450999999999993,
778
+ "max": 0.07802999999999996,
779
+ "median_pct_anchor": 12.7694214876033,
780
+ "max_pct_anchor": 64.4876033057851
781
+ }
782
+ },
783
+ "reuse_stats": {
784
+ "median": 0.286158,
785
+ "min": 0.181535,
786
+ "max": 0.398704
787
+ },
788
+ "curvature": {
789
+ "median_of_mean_abs": 0.006505250000000004,
790
+ "max_of_mean_abs": 0.023558499999999996,
791
+ "median_range_pct_anchor": 11.095041322314067
792
+ },
793
+ "ema_profile_median_surface": {
794
+ "0.0": 0.271027,
795
+ "0.1": 0.27001600000000003,
796
+ "0.2": 0.267112,
797
+ "0.3": 0.27561800000000003,
798
+ "0.4": 0.304351,
799
+ "0.5": 0.337778,
800
+ "0.6": 0.4256415,
801
+ "0.7": 0.543118,
802
+ "0.8": 0.7034305,
803
+ "0.9": 0.737447,
804
+ "0.99": 0.758555
805
+ },
806
+ "strength_profile_median_surface": {
807
+ "0.0": 0.286158,
808
+ "0.1": 0.270201,
809
+ "0.2": 0.278747,
810
+ "0.3": 0.292742,
811
+ "0.4": 0.32731,
812
+ "0.5": 0.334754,
813
+ "0.6": 0.340802,
814
+ "0.7": 0.368209,
815
+ "0.8": 0.407567,
816
+ "0.9": 0.406592,
817
+ "1.0": 0.418887
818
+ },
819
+ "n_conditions_reuse_unbeatable": 1
820
+ }
821
+
822
+ --- per-condition optima ---
823
+ Condition prompt seed best_strength best_smoothing best_LPIPS reuse_LPIPS improvement_vs_reuse improvement_pct_anchor
824
+ 0 Euler-Beta_Prompt001-schoolgirl-5193 Prompt001-schoolgirl 5193 0.7 0.2 0.308964 0.343670 0.034706 28.682645
825
+ 1 Euler-Beta_Prompt001-schoolgirl-6111 Prompt001-schoolgirl 6111 0.4 0.4 0.190400 0.343270 0.152870 126.338843
826
+ 2 Euler-Beta_Prompt001-schoolgirl-9676 Prompt001-schoolgirl 9676 0.7 0.0 0.305464 0.398704 0.093240 77.057851
827
+ 3 Euler-Beta_Prompt002-android-5193 Prompt002-android 5193 1.0 0.0 0.133345 0.286158 0.152813 126.291736
828
+ 4 Euler-Beta_Prompt002-android-6111 Prompt002-android 6111 0.6 0.3 0.316939 0.368292 0.051353 42.440496
829
+ 5 Euler-Beta_Prompt002-android-9676 Prompt002-android 9676 0.1 0.7 0.345424 0.365394 0.019970 16.504132
830
+ 6 Euler-Beta_Prompt003-woman-5193 Prompt003-woman 5193 0.9 0.0 0.077788 0.181535 0.103747 85.741322
831
+ 7 Euler-Beta_Prompt003-woman-6111 Prompt003-woman 6111 0.7 0.0 0.145931 0.210193 0.064262 53.109091
832
+ 8 Euler-Beta_Prompt003-woman-9676 Prompt003-woman 9676 0.6 0.1 0.128754 0.192368 0.063614 52.573554
833
+ 9 Euler-Beta_Prompt004-shop-5193 Prompt004-shop 5193 0.7 0.2 0.257376 0.300094 0.042718 35.304132
834
+ 10 Euler-Beta_Prompt004-shop-6111 Prompt004-shop 6111 0.3 0.2 0.226953 0.258858 0.031905 26.367769
835
+ 11 Euler-Beta_Prompt004-shop-9676 Prompt004-shop 9676 0.3 0.1 0.250345 0.269843 0.019498 16.114050
836
+ 12 Euler-Beta_Prompt005-inkwash-5193 Prompt005-inkwash 5193 0.9 0.0 0.158499 0.199467 0.040968 33.857851
837
+ 13 Euler-Beta_Prompt005-inkwash-6111 Prompt005-inkwash 6111 0.3 0.1 0.279459 0.292325 0.012866 10.633058
838
+ 14 Euler-Beta_Prompt005-inkwash-9676 Prompt005-inkwash 9676 0.0 0.0 0.213794 0.213794 0.000000 0.000000
839
+
840
+ --- best prediction (str>=0.1) vs reuse ---
841
+ Condition prompt seed reuse_LPIPS best_pred_strength best_pred_smoothing best_pred_LPIPS delta_vs_reuse delta_pct_anchor prediction_helps
842
+ 0 Euler-Beta_Prompt001-schoolgirl-5193 Prompt001-schoolgirl 5193 0.343670 0.7 0.2 0.308964 0.034706 28.682645 True
843
+ 1 Euler-Beta_Prompt001-schoolgirl-6111 Prompt001-schoolgirl 6111 0.343270 0.4 0.4 0.190400 0.152870 126.338843 True
844
+ 2 Euler-Beta_Prompt001-schoolgirl-9676 Prompt001-schoolgirl 9676 0.398704 0.7 0.0 0.305464 0.093240 77.057851 True
845
+ 3 Euler-Beta_Prompt002-android-5193 Prompt002-android 5193 0.286158 1.0 0.0 0.133345 0.152813 126.291736 True
846
+ 4 Euler-Beta_Prompt002-android-6111 Prompt002-android 6111 0.368292 0.6 0.3 0.316939 0.051353 42.440496 True
847
+ 5 Euler-Beta_Prompt002-android-9676 Prompt002-android 9676 0.365394 0.1 0.7 0.345424 0.019970 16.504132 True
848
+ 6 Euler-Beta_Prompt003-woman-5193 Prompt003-woman 5193 0.181535 0.9 0.0 0.077788 0.103747 85.741322 True
849
+ 7 Euler-Beta_Prompt003-woman-6111 Prompt003-woman 6111 0.210193 0.7 0.0 0.145931 0.064262 53.109091 True
850
+ 8 Euler-Beta_Prompt003-woman-9676 Prompt003-woman 9676 0.192368 0.6 0.1 0.128754 0.063614 52.573554 True
851
+ 9 Euler-Beta_Prompt004-shop-5193 Prompt004-shop 5193 0.300094 0.7 0.2 0.257376 0.042718 35.304132 True
852
+ 10 Euler-Beta_Prompt004-shop-6111 Prompt004-shop 6111 0.258858 0.3 0.2 0.226953 0.031905 26.367769 True
853
+ 11 Euler-Beta_Prompt004-shop-9676 Prompt004-shop 9676 0.269843 0.3 0.1 0.250345 0.019498 16.114050 True
854
+ 12 Euler-Beta_Prompt005-inkwash-5193 Prompt005-inkwash 5193 0.199467 0.9 0.0 0.158499 0.040968 33.857851 True
855
+ 13 Euler-Beta_Prompt005-inkwash-6111 Prompt005-inkwash 6111 0.292325 0.3 0.1 0.279459 0.012866 10.633058 True
856
+ 14 Euler-Beta_Prompt005-inkwash-9676 Prompt005-inkwash 9676 0.213794 0.1 0.0 0.217733 -0.003939 -3.255372 False
857
+
858
+ --- unimodality ---
859
+ Condition n_local_minima n_local_minima_low_damage_half
860
+ 0 Euler-Beta_Prompt001-schoolgirl-5193 4 4
861
+ 1 Euler-Beta_Prompt001-schoolgirl-6111 3 3
862
+ 2 Euler-Beta_Prompt001-schoolgirl-9676 5 4
863
+ 3 Euler-Beta_Prompt002-android-5193 2 1
864
+ 4 Euler-Beta_Prompt002-android-6111 3 3
865
+ 5 Euler-Beta_Prompt002-android-9676 5 4
866
+ 6 Euler-Beta_Prompt003-woman-5193 4 1
867
+ 7 Euler-Beta_Prompt003-woman-6111 1 1
868
+ 8 Euler-Beta_Prompt003-woman-9676 2 2
869
+ 9 Euler-Beta_Prompt004-shop-5193 7 5
870
+ 10 Euler-Beta_Prompt004-shop-6111 5 3
871
+ 11 Euler-Beta_Prompt004-shop-9676 3 1
872
+ 12 Euler-Beta_Prompt005-inkwash-5193 14 2
873
+ 13 Euler-Beta_Prompt005-inkwash-6111 9 2
874
+ 14 Euler-Beta_Prompt005-inkwash-9676 10 2
875
+
876
+ --- median surface ---
877
+ 0.00 0.10 0.20 0.30 0.40 0.50 0.60 0.70 0.80 0.90 0.99
878
+ 0.0 0.2862 0.2862 0.2862 0.2862 0.2862 0.2862 0.2862 0.2862 0.2862 0.2862 0.2862
879
+ 0.1 0.2678 0.2700 0.2693 0.2665 0.2702 0.2693 0.2782 0.3094 0.3552 0.4561 0.6715
880
+ 0.2 0.2598 0.2579 0.2649 0.2599 0.2711 0.2787 0.3101 0.3525 0.4515 0.6777 0.7390
881
+ 0.3 0.2583 0.2503 0.2551 0.2587 0.2636 0.2927 0.3410 0.4045 0.5687 0.7148 0.7350
882
+ 0.4 0.2568 0.2572 0.2549 0.2635 0.2713 0.3273 0.3507 0.4539 0.6479 0.7409 0.7463
883
+ 0.5 0.2594 0.2700 0.2584 0.2638 0.2899 0.3348 0.4087 0.5080 0.6989 0.7336 0.7707
884
+ 0.6 0.2742 0.2652 0.2753 0.2848 0.3188 0.3408 0.4426 0.5782 0.7274 0.7340 0.7756
885
+ 0.7 0.2942 0.2898 0.2574 0.3077 0.3281 0.3682 0.4757 0.6524 0.7079 0.7409 0.7756
886
+ 0.8 0.3177 0.3112 0.2820 0.3246 0.3360 0.4076 0.5210 0.7021 0.7395 0.7439 0.7705
887
+ 0.9 0.3264 0.3172 0.3246 0.3245 0.3519 0.4066 0.5686 0.6888 0.7377 0.7436 0.7614
888
+ 1.0 0.3233 0.3277 0.3300 0.3345 0.3934 0.4189 0.6220 0.6802 0.7369 0.7576 0.7557
889
+
890
+ --- SSIM vs LPIPS optima ---
891
+ Condition ssim_peak_strength ssim_peak_smoothing ssim_peak lpips_bottom_strength lpips_bottom_smoothing d_strength d_smoothing
892
+ 0 Euler-Beta_Prompt001-schoolgirl-5193 0.5 0.0 0.794703 0.7 0.2 -0.2 -0.2
893
+ 1 Euler-Beta_Prompt001-schoolgirl-6111 0.4 0.4 0.891826 0.4 0.4 0.0 0.0
894
+ 2 Euler-Beta_Prompt001-schoolgirl-9676 0.4 0.0 0.768327 0.7 0.0 -0.3 0.0
895
+ 3 Euler-Beta_Prompt002-android-5193 1.0 0.2 0.862044 1.0 0.0 0.0 0.2
896
+ 4 Euler-Beta_Prompt002-android-6111 0.6 0.3 0.623154 0.6 0.3 0.0 0.0
897
+ 5 Euler-Beta_Prompt002-android-9676 0.1 0.7 0.637746 0.1 0.7 0.0 0.0
898
+ 6 Euler-Beta_Prompt003-woman-5193 0.8 0.1 0.970607 0.9 0.0 -0.1 0.1
899
+ 7 Euler-Beta_Prompt003-woman-6111 0.6 0.2 0.951576 0.7 0.0 -0.1 0.2
900
+ 8 Euler-Beta_Prompt003-woman-9676 0.7 0.3 0.930316 0.6 0.1 0.1 0.2
901
+ 9 Euler-Beta_Prompt004-shop-5193 0.4 0.2 0.750001 0.7 0.2 -0.3 0.0
902
+ 10 Euler-Beta_Prompt004-shop-6111 0.3 0.2 0.803315 0.3 0.2 0.0 0.0
903
+ 11 Euler-Beta_Prompt004-shop-9676 0.3 0.1 0.744654 0.3 0.1 0.0 0.0
904
+ 12 Euler-Beta_Prompt005-inkwash-5193 0.7 0.1 0.874141 0.9 0.0 -0.2 0.1
905
+ 13 Euler-Beta_Prompt005-inkwash-6111 0.3 0.0 0.762206 0.3 0.1 0.0 -0.1
906
+ 14 Euler-Beta_Prompt005-inkwash-9676 0.2 0.0 0.800308 0.0 0.0 0.2 0.0
907
+
908
+ --- curvature ---
909
+ Condition LPIPS_at_common max_neighbor_delta min_neighbor_delta mean_abs_neighbor_delta range_pct_anchor
910
+ 0 Euler-Beta_Prompt001-schoolgirl-5193 0.3428 -0.0044 -0.0091 0.0070 3.9231
911
+ 1 Euler-Beta_Prompt001-schoolgirl-6111 0.2729 0.0460 -0.0130 0.0236 48.7810
912
+ 2 Euler-Beta_Prompt001-schoolgirl-9676 0.3260 0.0211 0.0077 0.0120 11.0950
913
+ 3 Euler-Beta_Prompt002-android-5193 0.2347 0.0160 -0.0190 0.0094 28.9620
914
+ 4 Euler-Beta_Prompt002-android-6111 0.3359 0.0015 -0.0095 0.0058 9.1430
915
+ 5 Euler-Beta_Prompt002-android-9676 0.4019 0.0032 -0.0098 0.0043 10.7215
916
+ 6 Euler-Beta_Prompt003-woman-5193 0.1352 0.0116 -0.0130 0.0065 20.2851
917
+ 7 Euler-Beta_Prompt003-woman-6111 0.1745 0.0120 -0.0025 0.0053 12.0000
918
+ 8 Euler-Beta_Prompt003-woman-9676 0.1515 0.0133 -0.0164 0.0091 24.6140
919
+ 9 Euler-Beta_Prompt004-shop-5193 0.2878 0.0279 -0.0105 0.0158 31.8017
920
+ 10 Euler-Beta_Prompt004-shop-6111 0.2317 0.0032 -0.0048 0.0027 6.5669
921
+ 11 Euler-Beta_Prompt004-shop-9676 0.2503 0.0079 0.0042 0.0065 3.0314
922
+ 12 Euler-Beta_Prompt005-inkwash-5193 0.1851 0.0015 -0.0087 0.0057 8.4041
923
+ 13 Euler-Beta_Prompt005-inkwash-6111 0.2795 0.0065 0.0029 0.0054 3.0190
924
+ 14 Euler-Beta_Prompt005-inkwash-9676 0.2481 0.0091 -0.0242 0.0156 27.5471
925
+
926
+ DONE
analysis/stage5-families/scatter/make_scatter.py ADDED
@@ -0,0 +1,209 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ HareSkip Stage5-Families 散布図生成スクリプト(ERSDE-Simple / Euler-Beta)
3
+
4
+ 走査①の analysis-stage5-scan1/scatter/make_scatter.py と同一仕様。
5
+ 異なる点は y軸レンジのみ:
6
+ 走査①のレンジ(LPIPS 0.255〜0.993 / SSIM-win7 0.000〜0.881)では本データがはみ出す
7
+ (LPIPS 最大 1.043、最小 0.078 / SSIM 最大 0.971)ため、
8
+ 3系(ERSDE-Beta / ERSDE-Simple / Euler-Beta)を通した**全系共通の新レンジ**に統一する:
9
+ LPIPS-VGG : 0.058 〜 1.063
10
+ SSIM (win7) : 0.000 〜 0.991
11
+ ※走査①の図は既存ファイル変更禁止のため再描画していない。3系を並べて見る際は
12
+ 本スクリプトの UNIFIED_* を走査①CSVにも適用して描き直す必要がある(別途)。
13
+
14
+ 入力: Judge-results/Stage5-Families_20260907-235041/merged-results.csv
15
+ 出力: analysis-stage5-families/scatter/ 配下に
16
+ - scatter-lpips_<条件名>.png x30
17
+ - scatter-ssim_<条件名>.png x30
18
+ - sheet-lpips_<系名>.png / sheet-ssim_<系名>.png (各5x3一覧、系ごと)
19
+
20
+ 再実行可能(このスクリプト自身と入力CSV以外のファイルは変更しない)。
21
+ """
22
+ import re
23
+ import pathlib
24
+
25
+ import pandas as pd
26
+ import matplotlib
27
+ matplotlib.use("Agg")
28
+ import matplotlib.pyplot as plt
29
+ from matplotlib.lines import Line2D
30
+ from matplotlib.cm import ScalarMappable
31
+ from matplotlib.colors import Normalize
32
+
33
+ BASE = pathlib.Path(__file__).resolve().parent
34
+ CSV_PATH = BASE.parent.parent / "Judge-results" / "Stage5-Families_20260907-235041" / "merged-results.csv"
35
+ OUT_DIR = BASE
36
+
37
+ LPIPS_COL = "LPIPS - VGG"
38
+ SSIM_COL = "SSIM - win size 7 (skimage)"
39
+
40
+ LPIPS_ANCHOR = 0.121 # 参考の損傷スケールアンカー
41
+
42
+ # 3系共通の統一 y 軸レンジ
43
+ UNIFIED_LPIPS_RANGE = (0.058, 1.063)
44
+ UNIFIED_SSIM_RANGE = (0.000, 0.991)
45
+
46
+ FNAME_RE = re.compile(r"str-(\d+)_ema-(\d+)\.png")
47
+
48
+
49
+ def parse_filename(fname):
50
+ if fname == "reuse.png":
51
+ return None, None
52
+ m = FNAME_RE.match(fname)
53
+ if not m:
54
+ return None, None
55
+ str_code, ema_code = m.group(1), m.group(2)
56
+ strength = int(str_code) / 10.0
57
+ if ema_code == "099":
58
+ ema = 0.99
59
+ else:
60
+ ema = int(ema_code) / 10.0
61
+ return strength, ema
62
+
63
+
64
+ def ema_color(ema, ema_min=0.0, ema_max=0.99):
65
+ # EMA=0.0 -> 黒 #000000, EMA=0.99 -> #cccccc の線形グラデーション
66
+ t = (ema - ema_min) / (ema_max - ema_min)
67
+ g = 0x00 + t * (0xcc - 0x00)
68
+ v = g / 255.0
69
+ return (v, v, v)
70
+
71
+
72
+ def load_data():
73
+ df = pd.read_csv(CSV_PATH)
74
+ strengths, emas = zip(*df["File name"].map(parse_filename))
75
+ df = df.copy()
76
+ df["strength"] = strengths
77
+ df["ema"] = emas
78
+ df["family"] = df["Condition"].str.split("_").str[0]
79
+ return df
80
+
81
+
82
+ def plot_condition(ax, sub, value_col, y_label, y_range, ema_levels):
83
+ reuse_row = sub[sub["File name"] == "reuse.png"]
84
+ reuse_val = reuse_row[value_col].iloc[0] if len(reuse_row) else None
85
+
86
+ grid = sub[sub["File name"] != "reuse.png"]
87
+
88
+ # 同一EMA水準の点を細い同色線で結ぶ(strength昇順)
89
+ for ema in ema_levels:
90
+ line_sub = grid[grid["ema"] == ema].sort_values("strength")
91
+ if line_sub.empty:
92
+ continue
93
+ color = ema_color(ema)
94
+ ax.plot(
95
+ line_sub["strength"], line_sub[value_col],
96
+ color=color, linewidth=0.8, alpha=0.9, zorder=2,
97
+ )
98
+ ax.scatter(
99
+ line_sub["strength"], line_sub[value_col],
100
+ color=color, s=26, edgecolors="white", linewidths=0.4, zorder=3,
101
+ )
102
+
103
+ # Reuse基準(strength=0の実測1点): 赤い点線の水平線+ラベル
104
+ if reuse_val is not None:
105
+ ax.axhline(reuse_val, color="red", linestyle="--", linewidth=1.0, zorder=1)
106
+ ax.text(
107
+ 0.02, reuse_val, f"Reuse={reuse_val:.3f} ",
108
+ color="red", fontsize=8, va="bottom", ha="left",
109
+ transform=ax.get_yaxis_transform(),
110
+ )
111
+
112
+ # LPIPS版のみ: 参考の損傷スケールアンカー
113
+ if value_col == LPIPS_COL:
114
+ ax.axhline(LPIPS_ANCHOR, color="gray", linestyle=":", linewidth=0.8, zorder=1)
115
+ ax.text(
116
+ 0.02, LPIPS_ANCHOR, f"anchor={LPIPS_ANCHOR}",
117
+ color="gray", fontsize=7, va="bottom", ha="left",
118
+ transform=ax.get_yaxis_transform(),
119
+ )
120
+
121
+ ax.set_xlabel("prediction strength")
122
+ ax.set_ylabel(y_label)
123
+ ax.set_xlim(0.0, 1.05)
124
+ ax.set_xticks([i / 10 for i in range(1, 11)])
125
+ ax.set_ylim(*y_range)
126
+ ax.grid(True, linewidth=0.4, alpha=0.4)
127
+
128
+
129
+ def add_colorbar(fig, ax, ema_min=0.0, ema_max=0.99):
130
+ sm = ScalarMappable(
131
+ cmap=matplotlib.colors.LinearSegmentedColormap.from_list(
132
+ "ema_gray", [(0, 0, 0), (0xcc / 255, 0xcc / 255, 0xcc / 255)]
133
+ ),
134
+ norm=Normalize(vmin=ema_min, vmax=ema_max),
135
+ )
136
+ sm.set_array([])
137
+ cbar = fig.colorbar(sm, ax=ax, fraction=0.05, pad=0.03)
138
+ cbar.set_label("EMA smoothing (0.0=black / 0.99=light gray)")
139
+
140
+
141
+ def make_individual_plots(df, value_col, y_label, y_range, fname_prefix, ema_levels):
142
+ conditions = sorted(df["Condition"].unique())
143
+ for cond in conditions:
144
+ sub = df[df["Condition"] == cond]
145
+ fig, ax = plt.subplots(figsize=(7, 5.2))
146
+ plot_condition(ax, sub, value_col, y_label, y_range, ema_levels)
147
+ ax.set_title(cond, fontsize=10)
148
+ add_colorbar(fig, ax, min(ema_levels), max(ema_levels))
149
+ fig.tight_layout()
150
+ fig.savefig(OUT_DIR / f"{fname_prefix}_{cond}.png", dpi=150)
151
+ plt.close(fig)
152
+ return conditions
153
+
154
+
155
+ def make_sheet(df, value_col, y_label, y_range, conditions, sheet_name, ema_levels, family):
156
+ fig, axes = plt.subplots(3, 5, figsize=(24, 13.5))
157
+ for ax, cond in zip(axes.flat, conditions):
158
+ sub = df[df["Condition"] == cond]
159
+ plot_condition(ax, sub, value_col, y_label, y_range, ema_levels)
160
+ ax.set_title(cond, fontsize=8)
161
+ ax.tick_params(labelsize=7)
162
+ ax.set_xlabel("")
163
+ ax.set_ylabel("")
164
+
165
+ for ax in axes.flat[len(conditions):]:
166
+ ax.axis("off")
167
+
168
+ fig.suptitle(f"Stage5-Families [{family}]: {y_label} vs strength (grid=EMA)", fontsize=14)
169
+
170
+ legend_handles = [
171
+ Line2D([0], [0], marker="o", color=ema_color(e), linestyle="-", markersize=6,
172
+ label=f"EMA={e:.2f}" if e != 0.99 else "EMA=0.99")
173
+ for e in ema_levels
174
+ ]
175
+ fig.legend(handles=legend_handles, loc="lower center", ncol=len(ema_levels), fontsize=7,
176
+ bbox_to_anchor=(0.5, -0.02))
177
+
178
+ fig.tight_layout(rect=[0, 0.03, 1, 0.97])
179
+ out_path = OUT_DIR / sheet_name
180
+ fig.savefig(out_path, dpi=110)
181
+ plt.close(fig)
182
+ return out_path
183
+
184
+
185
+ def main():
186
+ df = load_data()
187
+ ema_levels = sorted(df["ema"].dropna().unique())
188
+
189
+ print(f"LPIPS observed: {df[LPIPS_COL].min():.4f} .. {df[LPIPS_COL].max():.4f}")
190
+ print(f"SSIM observed: {df[SSIM_COL].min():.4f} .. {df[SSIM_COL].max():.4f}")
191
+ print(f"LPIPS range used (unified): {UNIFIED_LPIPS_RANGE}")
192
+ print(f"SSIM range used (unified): {UNIFIED_SSIM_RANGE}")
193
+
194
+ conditions = make_individual_plots(
195
+ df, LPIPS_COL, "LPIPS-VGG", UNIFIED_LPIPS_RANGE, "scatter-lpips", ema_levels)
196
+ make_individual_plots(
197
+ df, SSIM_COL, "SSIM (win7)", UNIFIED_SSIM_RANGE, "scatter-ssim", ema_levels)
198
+
199
+ for family in sorted(df["family"].unique()):
200
+ fam_conds = [c for c in conditions if c.startswith(family + "_")]
201
+ p1 = make_sheet(df, LPIPS_COL, "LPIPS-VGG", UNIFIED_LPIPS_RANGE, fam_conds,
202
+ f"sheet-lpips_{family}.png", ema_levels, family)
203
+ p2 = make_sheet(df, SSIM_COL, "SSIM (win7)", UNIFIED_SSIM_RANGE, fam_conds,
204
+ f"sheet-ssim_{family}.png", ema_levels, family)
205
+ print(f"{family}: {len(fam_conds)} conditions -> {p1.name}, {p2.name}")
206
+
207
+
208
+ if __name__ == "__main__":
209
+ main()
analysis/stage5-families/scatter/scatter-lpips_ERSDE-Simple_Prompt001-schoolgirl-5193.png ADDED

Git LFS Details

  • SHA256: 11483586d2a8c33c9d08edb9f7284ddc91c852c5d24eab8f225407fab1cd0dab
  • Pointer size: 130 Bytes
  • Size of remote file: 81.8 kB
analysis/stage5-families/scatter/scatter-lpips_ERSDE-Simple_Prompt001-schoolgirl-6111.png ADDED

Git LFS Details

  • SHA256: 88806bf2ab9372128d62e503ceef0a1193a4f676ff9f9d74ff0c03201834be00
  • Pointer size: 130 Bytes
  • Size of remote file: 93.5 kB
analysis/stage5-families/scatter/scatter-lpips_ERSDE-Simple_Prompt001-schoolgirl-9676.png ADDED

Git LFS Details

  • SHA256: dd8fe4fffa8a29b85fc3adf2bbebca55e84ded792f8cfe9e049d8fbd7770dada
  • Pointer size: 130 Bytes
  • Size of remote file: 76.7 kB
analysis/stage5-families/scatter/scatter-lpips_ERSDE-Simple_Prompt002-android-5193.png ADDED

Git LFS Details

  • SHA256: 38321ab6795e55ff483f4d820173e651be0ff5a63095e231e2b9185d43098754
  • Pointer size: 130 Bytes
  • Size of remote file: 82.4 kB
analysis/stage5-families/scatter/scatter-lpips_ERSDE-Simple_Prompt002-android-6111.png ADDED

Git LFS Details

  • SHA256: da71d5e2d9782cf023b6b5dd7cc91683cb92ae543bfce462796d8b233e79551d
  • Pointer size: 131 Bytes
  • Size of remote file: 105 kB
analysis/stage5-families/scatter/scatter-lpips_ERSDE-Simple_Prompt002-android-9676.png ADDED

Git LFS Details

  • SHA256: f287b472342f2aaa76d8fb5fb2e0bfbbc00b26d774ee177cc51c181e2a1a6b08
  • Pointer size: 130 Bytes
  • Size of remote file: 87.1 kB
analysis/stage5-families/scatter/scatter-lpips_ERSDE-Simple_Prompt003-woman-5193.png ADDED

Git LFS Details

  • SHA256: 7a958421c7835c869263754ca55841181d02d1c6541ff610b1eb39bbae24b387
  • Pointer size: 130 Bytes
  • Size of remote file: 86.1 kB
analysis/stage5-families/scatter/scatter-lpips_ERSDE-Simple_Prompt003-woman-6111.png ADDED

Git LFS Details

  • SHA256: a2795a055173153d0ebf8ced7724a0e79e0d3521da60a35f6a7af8aa6a9d862f
  • Pointer size: 130 Bytes
  • Size of remote file: 71.2 kB
analysis/stage5-families/scatter/scatter-lpips_ERSDE-Simple_Prompt003-woman-9676.png ADDED

Git LFS Details

  • SHA256: f264fe6515358c42c7811c2882f731716f4f61eb8fb17f243322b28c8ddd477f
  • Pointer size: 130 Bytes
  • Size of remote file: 85.7 kB
analysis/stage5-families/scatter/scatter-lpips_ERSDE-Simple_Prompt004-shop-5193.png ADDED

Git LFS Details

  • SHA256: 9f002845a60cef691c682e5444b9f9a57e29d8b3390839de34a8d1f196e9c7fb
  • Pointer size: 130 Bytes
  • Size of remote file: 86.7 kB
analysis/stage5-families/scatter/scatter-lpips_ERSDE-Simple_Prompt004-shop-6111.png ADDED

Git LFS Details

  • SHA256: 3d395e6655b948be122a0520ecbdd4a65ce6adec1864b4f94c3bdcf07b3d8264
  • Pointer size: 130 Bytes
  • Size of remote file: 86.1 kB
analysis/stage5-families/scatter/scatter-lpips_ERSDE-Simple_Prompt004-shop-9676.png ADDED

Git LFS Details

  • SHA256: 09cc9f29c75715d859e115e81a0eec6c36935ba70b752bcd85697235c17792c1
  • Pointer size: 130 Bytes
  • Size of remote file: 92 kB
analysis/stage5-families/scatter/scatter-lpips_ERSDE-Simple_Prompt005-inkwash-5193.png ADDED

Git LFS Details

  • SHA256: a9ab45a00741042ed17484eaaa35300d9236c9ff7e570582bb15fd3f8d67057d
  • Pointer size: 130 Bytes
  • Size of remote file: 87.8 kB
analysis/stage5-families/scatter/scatter-lpips_ERSDE-Simple_Prompt005-inkwash-6111.png ADDED

Git LFS Details

  • SHA256: bd717a878f955c121a471433b84c1d3ddd3e7619610a2614805d07b88cb2727c
  • Pointer size: 131 Bytes
  • Size of remote file: 105 kB
analysis/stage5-families/scatter/scatter-lpips_ERSDE-Simple_Prompt005-inkwash-9676.png ADDED

Git LFS Details

  • SHA256: e8935e62ad3ba4f7bd686bdda9d3b51fd988f7c7d4008e885c445a8bd0ed7f13
  • Pointer size: 130 Bytes
  • Size of remote file: 91 kB
analysis/stage5-families/scatter/scatter-lpips_Euler-Beta_Prompt001-schoolgirl-5193.png ADDED

Git LFS Details

  • SHA256: 438b514234f4980749aa1c2c38bc6017a1631ae19d605a0359b2a4c2dc34978f
  • Pointer size: 130 Bytes
  • Size of remote file: 76.5 kB
analysis/stage5-families/scatter/scatter-lpips_Euler-Beta_Prompt001-schoolgirl-6111.png ADDED

Git LFS Details

  • SHA256: a230b420ef209adab6a5f8b02f017fa174a5ab10dfa4e724d99d0f373a41efd3
  • Pointer size: 130 Bytes
  • Size of remote file: 85.8 kB
analysis/stage5-families/scatter/scatter-lpips_Euler-Beta_Prompt001-schoolgirl-9676.png ADDED

Git LFS Details

  • SHA256: 940b7be689e81f990e84ee1407eb68811bb68f4887fee376553d2244b0677688
  • Pointer size: 130 Bytes
  • Size of remote file: 82.7 kB
analysis/stage5-families/scatter/scatter-lpips_Euler-Beta_Prompt002-android-5193.png ADDED

Git LFS Details

  • SHA256: d57030f96c32706ed392c31e70fdc76f57074d05a72eeb7e548f412e9b2a8e21
  • Pointer size: 130 Bytes
  • Size of remote file: 84 kB
analysis/stage5-families/scatter/scatter-lpips_Euler-Beta_Prompt002-android-6111.png ADDED

Git LFS Details

  • SHA256: 78497417cff922ce0c164b345fbe2d45028177c177bc3784481c0de30e5ae9d9
  • Pointer size: 130 Bytes
  • Size of remote file: 88.9 kB
analysis/stage5-families/scatter/scatter-lpips_Euler-Beta_Prompt002-android-9676.png ADDED

Git LFS Details

  • SHA256: b503d2f7065d7ab9f671377f30c760a409f8dcaf7f484eac674af899d9441fa8
  • Pointer size: 130 Bytes
  • Size of remote file: 84.5 kB
analysis/stage5-families/scatter/scatter-lpips_Euler-Beta_Prompt003-woman-5193.png ADDED

Git LFS Details

  • SHA256: c8433de85785f97926cbf364028c00019c9ba4ef037fce700bc2779e0128ae89
  • Pointer size: 130 Bytes
  • Size of remote file: 78.9 kB
analysis/stage5-families/scatter/scatter-lpips_Euler-Beta_Prompt003-woman-6111.png ADDED

Git LFS Details

  • SHA256: 0b8ff964ce3ec501ff0fb7871f2d621fdc11dd765012698543c12d1f5a66cb9b
  • Pointer size: 130 Bytes
  • Size of remote file: 83.4 kB
analysis/stage5-families/scatter/scatter-lpips_Euler-Beta_Prompt003-woman-9676.png ADDED

Git LFS Details

  • SHA256: e6052b0ee49a61d3658da5d26f66c60ffb17d8f52c6ee534afe5a250e975fdc3
  • Pointer size: 130 Bytes
  • Size of remote file: 79.2 kB
analysis/stage5-families/scatter/scatter-lpips_Euler-Beta_Prompt004-shop-5193.png ADDED

Git LFS Details

  • SHA256: fa4437422a648f8d377e58236db6921a7c7e545d15c7ae18e87356e2247b2d82
  • Pointer size: 130 Bytes
  • Size of remote file: 93.3 kB
analysis/stage5-families/scatter/scatter-lpips_Euler-Beta_Prompt004-shop-6111.png ADDED

Git LFS Details

  • SHA256: 33348bf74b2c66f0c117405f8982ca23e0b2e5e95ad81dab4e749fbb86f4484e
  • Pointer size: 130 Bytes
  • Size of remote file: 86.2 kB
analysis/stage5-families/scatter/scatter-lpips_Euler-Beta_Prompt004-shop-9676.png ADDED

Git LFS Details

  • SHA256: 8f03460810a911269104657a0d2e20ca2a89380fb352023a866cdcffbe463173
  • Pointer size: 130 Bytes
  • Size of remote file: 89.7 kB
analysis/stage5-families/scatter/scatter-lpips_Euler-Beta_Prompt005-inkwash-5193.png ADDED

Git LFS Details

  • SHA256: f8619def9bb82ea759b116a315353b8c948e5f6c54cd314800d40bd2f52e58fb
  • Pointer size: 130 Bytes
  • Size of remote file: 81.7 kB
analysis/stage5-families/scatter/scatter-lpips_Euler-Beta_Prompt005-inkwash-6111.png ADDED

Git LFS Details

  • SHA256: a3ea6d3922d63f5cd01536ee3f55970486a1f4016664bf1ecea3c3c41194cb92
  • Pointer size: 130 Bytes
  • Size of remote file: 84.7 kB
analysis/stage5-families/scatter/scatter-lpips_Euler-Beta_Prompt005-inkwash-9676.png ADDED

Git LFS Details

  • SHA256: 91075250315857be919ef67f9e845d116221f9a30f02b0edeff205232f5875f4
  • Pointer size: 130 Bytes
  • Size of remote file: 84.7 kB
analysis/stage5-families/scatter/scatter-ssim_ERSDE-Simple_Prompt001-schoolgirl-5193.png ADDED

Git LFS Details

  • SHA256: 6e506129fe6676ea8228fdd130a4c58ffb73d7f6e3e750a3dc8ebac80310a0b0
  • Pointer size: 130 Bytes
  • Size of remote file: 83.6 kB
analysis/stage5-families/scatter/scatter-ssim_ERSDE-Simple_Prompt001-schoolgirl-6111.png ADDED

Git LFS Details

  • SHA256: 68cdb0e9661225134ca86e8f8a6a527d4690fd7ab36780d06a0bd50fdefa9405
  • Pointer size: 130 Bytes
  • Size of remote file: 82.2 kB
analysis/stage5-families/scatter/scatter-ssim_ERSDE-Simple_Prompt001-schoolgirl-9676.png ADDED

Git LFS Details

  • SHA256: 4fdc35ff8a3c72ad7b883d8b23f50b7b8ae17963977d47785052284ceb0cb37b
  • Pointer size: 130 Bytes
  • Size of remote file: 75.7 kB
analysis/stage5-families/scatter/scatter-ssim_ERSDE-Simple_Prompt002-android-5193.png ADDED

Git LFS Details

  • SHA256: 12681ca022cae0138edfda587e777b37b52a4b16711d89827423a2be18b0b10f
  • Pointer size: 130 Bytes
  • Size of remote file: 75.9 kB
analysis/stage5-families/scatter/scatter-ssim_ERSDE-Simple_Prompt002-android-6111.png ADDED

Git LFS Details

  • SHA256: 0fed81b4f0dfefee3bc738cdae2a7b0d6ea16a503861764c86a376e26e1e382c
  • Pointer size: 130 Bytes
  • Size of remote file: 91.1 kB
analysis/stage5-families/scatter/scatter-ssim_ERSDE-Simple_Prompt002-android-9676.png ADDED

Git LFS Details

  • SHA256: 424665cf8a5466edac771cac0c25723bc7edc933df87610a4ea74bf0f81eb4f3
  • Pointer size: 130 Bytes
  • Size of remote file: 81.1 kB
analysis/stage5-families/scatter/scatter-ssim_ERSDE-Simple_Prompt003-woman-5193.png ADDED

Git LFS Details

  • SHA256: ee2315e703d54f6156064d30a6a3d924bd16f58884fde583a72c74641c74d7a1
  • Pointer size: 130 Bytes
  • Size of remote file: 84.3 kB
analysis/stage5-families/scatter/scatter-ssim_ERSDE-Simple_Prompt003-woman-6111.png ADDED

Git LFS Details

  • SHA256: d717553d3c9e4b70ea24344e57428c0159e7a72f0aef76d445b348ccab759658
  • Pointer size: 130 Bytes
  • Size of remote file: 82.2 kB
analysis/stage5-families/scatter/scatter-ssim_ERSDE-Simple_Prompt003-woman-9676.png ADDED

Git LFS Details

  • SHA256: 19bb659b76bf014b1fab12facbfc098777dbcfe077cad3abea512c73bb0074e2
  • Pointer size: 130 Bytes
  • Size of remote file: 78.4 kB
analysis/stage5-families/scatter/scatter-ssim_ERSDE-Simple_Prompt004-shop-5193.png ADDED

Git LFS Details

  • SHA256: 3e20a7284a0ca38b06d851d0b878a0fbdc6ba8d67476006a1bb7e48fc2c156c6
  • Pointer size: 130 Bytes
  • Size of remote file: 82 kB
analysis/stage5-families/scatter/scatter-ssim_ERSDE-Simple_Prompt004-shop-6111.png ADDED

Git LFS Details

  • SHA256: 1ffce26d66bb6fb1066ce1d6ba3a52795e48ac6f538f829c251f011e12e9f052
  • Pointer size: 130 Bytes
  • Size of remote file: 76 kB
analysis/stage5-families/scatter/scatter-ssim_ERSDE-Simple_Prompt004-shop-9676.png ADDED

Git LFS Details

  • SHA256: 356de2910a40637d2fa8e0067c4115deee5a73a104707ce665390473ef93be18
  • Pointer size: 130 Bytes
  • Size of remote file: 85.9 kB
analysis/stage5-families/scatter/scatter-ssim_ERSDE-Simple_Prompt005-inkwash-5193.png ADDED

Git LFS Details

  • SHA256: 8568ea95dcae948b04487d4181621a93b3c03e8a029dde53bc99ffabbbac30f7
  • Pointer size: 130 Bytes
  • Size of remote file: 87.4 kB
analysis/stage5-families/scatter/scatter-ssim_ERSDE-Simple_Prompt005-inkwash-6111.png ADDED

Git LFS Details

  • SHA256: 95385898bcb3a01a76b38e78b5d3fd5f8978458db84b0f0fe3d27990e5c58963
  • Pointer size: 130 Bytes
  • Size of remote file: 91.2 kB
analysis/stage5-families/scatter/scatter-ssim_ERSDE-Simple_Prompt005-inkwash-9676.png ADDED

Git LFS Details

  • SHA256: 6a009e5ac648c83dc504ca42a699777c5d6a2e06e1948a41048b2c09197c770a
  • Pointer size: 130 Bytes
  • Size of remote file: 80 kB
analysis/stage5-families/scatter/scatter-ssim_Euler-Beta_Prompt001-schoolgirl-5193.png ADDED

Git LFS Details

  • SHA256: 835b2553ec3a7b00e684df94e9a0be25c15c6a1cb0c441837deff7c0e0e2fcde
  • Pointer size: 130 Bytes
  • Size of remote file: 74 kB