- commit
- 78bef24
- parent
- 318f967
- author
- im_wower
- date
- 2026-04-01 16:07:31 +0800 CST
adversarial: 6 反例验证完成 — 1 vulnerability, 1 partial, 4 robust
3 files changed,
+1546,
-0
+649,
-0
1@@ -0,0 +1,649 @@
2+[
3+ {
4+ "test_name": "brainwash_attack",
5+ "status": "SYSTEM_ROBUST",
6+ "data": {
7+ "pre": {
8+ "大->家": {
9+ "fwd": 8.197591756526863,
10+ "bwd": 8.143259296906752,
11+ "circulation": 0.05433245962011135,
12+ "asym": 0.05433245962011135
13+ },
14+ "小->明": {
15+ "fwd": 7.94065355870536,
16+ "bwd": 7.9321460183059225,
17+ "circulation": 0.008507540399437907,
18+ "asym": 0.008507540399437907
19+ },
20+ "春->天": {
21+ "fwd": 7.946757345085674,
22+ "bwd": 7.860776033418355,
23+ "circulation": 0.08598131166731893,
24+ "asym": 0.08598131166731893
25+ },
26+ "老->师": {
27+ "fwd": 8.169042238410267,
28+ "bwd": 8.068038512677392,
29+ "circulation": 0.10100372573287508,
30+ "asym": 0.10100372573287508
31+ },
32+ "妈->妈": {
33+ "fwd": 7.9692901244269105,
34+ "bwd": 7.9275505914018245,
35+ "circulation": 0.08347906605017208,
36+ "asym": 0.04173953302508604
37+ }
38+ },
39+ "post": {
40+ "大->家": {
41+ "fwd": 18.624862195484745,
42+ "bwd": 18.43145439422799,
43+ "circulation": 0.4511855240814828,
44+ "asym": 0.19340780125675394
45+ },
46+ "小->明": {
47+ "fwd": 18.52957215137928,
48+ "bwd": 18.233029174317803,
49+ "circulation": 0.3018268334184384,
50+ "asym": 0.2965429770614776
51+ },
52+ "春->天": {
53+ "fwd": 18.655417399898862,
54+ "bwd": 18.606776833404147,
55+ "circulation": 0.11109440007293792,
56+ "asym": 0.04864056649471493
57+ },
58+ "老->师": {
59+ "fwd": 18.321153225634685,
60+ "bwd": 18.320771391154597,
61+ "circulation": 0.09327514941215576,
62+ "asym": 0.00038183448008766163
63+ },
64+ "妈->妈": {
65+ "fwd": 26.582951008307898,
66+ "bwd": 26.553883497745677,
67+ "circulation": 0.05813502112444269,
68+ "asym": 0.029067510562221344
69+ }
70+ },
71+ "changes": {
72+ "大->家": {
73+ "circulation_ratio": 8.30416158657531,
74+ "circulation_survived": true
75+ },
76+ "小->明": {
77+ "circulation_ratio": 35.47756686978296,
78+ "circulation_survived": true
79+ },
80+ "春->天": {
81+ "circulation_ratio": 1.292076125830543,
82+ "circulation_survived": true
83+ },
84+ "老->师": {
85+ "circulation_ratio": 0.9234822649893221,
86+ "circulation_survived": true
87+ },
88+ "妈->妈": {
89+ "circulation_ratio": 0.6964023901453656,
90+ "circulation_survived": true
91+ }
92+ }
93+ },
94+ "conclusion": "拓扑不可逆成立: 5/5 bigram 的 circulation 在洗脑后幸存"
95+ },
96+ {
97+ "test_name": "hotness_not_skill",
98+ "status": "CONFIRMED_VULNERABILITY",
99+ "data": {
100+ "B_in_skill_belt": true,
101+ "B_score": 2.45,
102+ "B_hits": 100,
103+ "circulation_ABC": 3.0,
104+ "has_closed_loop": false,
105+ "sediment_threshold": 10,
106+ "skill_belt_threshold": 30
107+ },
108+ "conclusion": "B 成为 skill_belt 候选 (score=2.450),但 B 不参与闭环——沉积只看 hits 不看 circulation"
109+ },
110+ {
111+ "test_name": "anchor_tear",
112+ "status": "SYSTEM_ROBUST",
113+ "data": {
114+ "m_phi_before": 0.0,
115+ "m_phi_after": 8.319371181340223,
116+ "bound_core": "core_X",
117+ "oscillation_count": 0,
118+ "phi_trace_first10": [
119+ 0.0,
120+ 1.0,
121+ 1.88,
122+ 2.6544000000000003,
123+ 3.3358720000000006,
124+ 3.9355673600000007,
125+ 4.463299276800001,
126+ 4.927703363584001,
127+ 5.3363789599539215,
128+ 5.696013484759451
129+ ],
130+ "phi_trace_last10": [
131+ 8.289216095648957,
132+ 8.294510164171083,
133+ 8.299168944470553,
134+ 8.303268671134086,
135+ 8.306876430597997,
136+ 8.310051258926237,
137+ 8.312845107855088,
138+ 8.315303694912478,
139+ 8.31746725152298,
140+ 8.319371181340223
141+ ],
142+ "x_center_phi": 10.0,
143+ "y_center_phi": -10.0
144+ },
145+ "conclusion": "M 归向 core_X (phi=8.32),振荡 0 次,未被撕裂"
146+ },
147+ {
148+ "test_name": "attention_hunger",
149+ "status": "SYSTEM_ROBUST",
150+ "data": {
151+ "traces": [
152+ {
153+ "round": 0,
154+ "attention_free": 50.6509967186033,
155+ "attention_used": 49.3490032813967,
156+ "mu_sum": 45.06328899568241,
157+ "active_count": 7,
158+ "output_mode": "full",
159+ "node_count": 7
160+ },
161+ {
162+ "round": 50,
163+ "attention_free": 7.538385883152216,
164+ "attention_used": 92.46161411684778,
165+ "mu_sum": 63.52240631384751,
166+ "active_count": 16,
167+ "output_mode": "full",
168+ "node_count": 16
169+ },
170+ {
171+ "round": 100,
172+ "attention_free": 7.139972519449358,
173+ "attention_used": 92.86002748055064,
174+ "mu_sum": 60.19625601225628,
175+ "active_count": 16,
176+ "output_mode": "full",
177+ "node_count": 16
178+ },
179+ {
180+ "round": 150,
181+ "attention_free": 6.374133593945544,
182+ "attention_used": 93.62586640605446,
183+ "mu_sum": 58.01578792806416,
184+ "active_count": 16,
185+ "output_mode": "full",
186+ "node_count": 16
187+ },
188+ {
189+ "round": 200,
190+ "attention_free": 7.3280245412887695,
191+ "attention_used": 92.67197545871123,
192+ "mu_sum": 58.06335474367466,
193+ "active_count": 16,
194+ "output_mode": "full",
195+ "node_count": 16
196+ },
197+ {
198+ "round": 250,
199+ "attention_free": 6.559080375130989,
200+ "attention_used": 93.44091962486901,
201+ "mu_sum": 54.68614122413078,
202+ "active_count": 16,
203+ "output_mode": "full",
204+ "node_count": 16
205+ },
206+ {
207+ "round": 300,
208+ "attention_free": 5.807700677097657,
209+ "attention_used": 94.19229932290234,
210+ "mu_sum": 49.6128821510872,
211+ "active_count": 16,
212+ "output_mode": "full",
213+ "node_count": 16
214+ },
215+ {
216+ "round": 350,
217+ "attention_free": 6.289779909688832,
218+ "attention_used": 93.71022009031117,
219+ "mu_sum": 59.09503348584217,
220+ "active_count": 15,
221+ "output_mode": "full",
222+ "node_count": 16
223+ },
224+ {
225+ "round": 400,
226+ "attention_free": 5.499718535898623,
227+ "attention_used": 94.50028146410138,
228+ "mu_sum": 48.26808417855358,
229+ "active_count": 16,
230+ "output_mode": "full",
231+ "node_count": 16
232+ },
233+ {
234+ "round": 450,
235+ "attention_free": 4.807315126083324,
236+ "attention_used": 95.19268487391668,
237+ "mu_sum": 44.08394947906136,
238+ "active_count": 16,
239+ "output_mode": "full",
240+ "node_count": 16
241+ }
242+ ],
243+ "final_free": 4.155830374297963,
244+ "crashed": false
245+ },
246+ "conclusion": "500轮后注意力仍有余量 (free=4.2),衰减/回收正常"
247+ },
248+ {
249+ "test_name": "empty_self_excite",
250+ "status": "SYSTEM_ROBUST",
251+ "data": {
252+ "traces": [
253+ {
254+ "round": 0,
255+ "active_count": 6,
256+ "mu_sum": 36.935057
257+ },
258+ {
259+ "round": 1,
260+ "active_count": 6,
261+ "mu_sum": 34.646043
262+ },
263+ {
264+ "round": 2,
265+ "active_count": 6,
266+ "mu_sum": 21.532091
267+ },
268+ {
269+ "round": 3,
270+ "active_count": 6,
271+ "mu_sum": 14.10542
272+ },
273+ {
274+ "round": 4,
275+ "active_count": 6,
276+ "mu_sum": 7.637097
277+ },
278+ {
279+ "round": 5,
280+ "active_count": 6,
281+ "mu_sum": 4.469333
282+ },
283+ {
284+ "round": 6,
285+ "active_count": 6,
286+ "mu_sum": 3.146084
287+ },
288+ {
289+ "round": 7,
290+ "active_count": 6,
291+ "mu_sum": 2.406014
292+ },
293+ {
294+ "round": 8,
295+ "active_count": 6,
296+ "mu_sum": 1.836223
297+ },
298+ {
299+ "round": 9,
300+ "active_count": 6,
301+ "mu_sum": 1.358419
302+ },
303+ {
304+ "round": 10,
305+ "active_count": 6,
306+ "mu_sum": 0.934007
307+ },
308+ {
309+ "round": 11,
310+ "active_count": 6,
311+ "mu_sum": 0.613294
312+ },
313+ {
314+ "round": 12,
315+ "active_count": 6,
316+ "mu_sum": 0.396633
317+ },
318+ {
319+ "round": 13,
320+ "active_count": 6,
321+ "mu_sum": 0.254116
322+ },
323+ {
324+ "round": 14,
325+ "active_count": 6,
326+ "mu_sum": 0.162105
327+ },
328+ {
329+ "round": 15,
330+ "active_count": 6,
331+ "mu_sum": 0.102785
332+ },
333+ {
334+ "round": 16,
335+ "active_count": 6,
336+ "mu_sum": 0.065136
337+ },
338+ {
339+ "round": 17,
340+ "active_count": 6,
341+ "mu_sum": 0.041304
342+ },
343+ {
344+ "round": 18,
345+ "active_count": 6,
346+ "mu_sum": 0.02711
347+ },
348+ {
349+ "round": 19,
350+ "active_count": 6,
351+ "mu_sum": 0.017932
352+ },
353+ {
354+ "round": 20,
355+ "active_count": 6,
356+ "mu_sum": 0.011923
357+ },
358+ {
359+ "round": 21,
360+ "active_count": 6,
361+ "mu_sum": 0.007918
362+ },
363+ {
364+ "round": 22,
365+ "active_count": 6,
366+ "mu_sum": 0.005032
367+ },
368+ {
369+ "round": 23,
370+ "active_count": 6,
371+ "mu_sum": 0.002908
372+ },
373+ {
374+ "round": 24,
375+ "active_count": 6,
376+ "mu_sum": 0.001767
377+ },
378+ {
379+ "round": 25,
380+ "active_count": 6,
381+ "mu_sum": 0.000964
382+ },
383+ {
384+ "round": 26,
385+ "active_count": 6,
386+ "mu_sum": 0.000504
387+ },
388+ {
389+ "round": 27,
390+ "active_count": 6,
391+ "mu_sum": 0.000257
392+ },
393+ {
394+ "round": 28,
395+ "active_count": 6,
396+ "mu_sum": 0.000129
397+ },
398+ {
399+ "round": 29,
400+ "active_count": 6,
401+ "mu_sum": 6.4e-05
402+ },
403+ {
404+ "round": 30,
405+ "active_count": 6,
406+ "mu_sum": 3.2e-05
407+ },
408+ {
409+ "round": 31,
410+ "active_count": 6,
411+ "mu_sum": 1.6e-05
412+ },
413+ {
414+ "round": 32,
415+ "active_count": 6,
416+ "mu_sum": 8e-06
417+ },
418+ {
419+ "round": 33,
420+ "active_count": 6,
421+ "mu_sum": 4e-06
422+ },
423+ {
424+ "round": 34,
425+ "active_count": 6,
426+ "mu_sum": 2e-06
427+ },
428+ {
429+ "round": 35,
430+ "active_count": 6,
431+ "mu_sum": 1e-06
432+ },
433+ {
434+ "round": 36,
435+ "active_count": 6,
436+ "mu_sum": 0.0
437+ },
438+ {
439+ "round": 37,
440+ "active_count": 6,
441+ "mu_sum": 0.0
442+ },
443+ {
444+ "round": 38,
445+ "active_count": 6,
446+ "mu_sum": 0.0
447+ },
448+ {
449+ "round": 39,
450+ "active_count": 6,
451+ "mu_sum": 0.0
452+ },
453+ {
454+ "round": 40,
455+ "active_count": 6,
456+ "mu_sum": 0.0
457+ },
458+ {
459+ "round": 41,
460+ "active_count": 5,
461+ "mu_sum": 0.0
462+ },
463+ {
464+ "round": 42,
465+ "active_count": 6,
466+ "mu_sum": 0.0
467+ },
468+ {
469+ "round": 43,
470+ "active_count": 2,
471+ "mu_sum": 0.0
472+ },
473+ {
474+ "round": 44,
475+ "active_count": 1,
476+ "mu_sum": 0.0
477+ },
478+ {
479+ "round": 45,
480+ "active_count": 0,
481+ "mu_sum": 0.0
482+ },
483+ {
484+ "round": 46,
485+ "active_count": 0,
486+ "mu_sum": 0.0
487+ },
488+ {
489+ "round": 47,
490+ "active_count": 0,
491+ "mu_sum": 0.0
492+ },
493+ {
494+ "round": 48,
495+ "active_count": 0,
496+ "mu_sum": 0.0
497+ },
498+ {
499+ "round": 49,
500+ "active_count": 0,
501+ "mu_sum": 0.0
502+ }
503+ ],
504+ "final_mu": 0.0,
505+ "final_active": 0,
506+ "is_growing": false
507+ },
508+ "conclusion": "正常衰减:最终 mu_sum=0.000000,active=0"
509+ },
510+ {
511+ "test_name": "hopf_bifurcation",
512+ "status": "PARTIAL",
513+ "data": {
514+ "scans": [
515+ {
516+ "bwd_weight": 1.0,
517+ "asym_scale": 0.0,
518+ "final_circulation": 0.0,
519+ "phi_amplitude_last30": 0.025666,
520+ "phi_last5": [
521+ 0.0258,
522+ 0.0251,
523+ 0.0245,
524+ 0.0239,
525+ 0.0233
526+ ]
527+ },
528+ {
529+ "bwd_weight": 0.8,
530+ "asym_scale": 0.19999999999999996,
531+ "final_circulation": 1.0,
532+ "phi_amplitude_last30": 0.032138,
533+ "phi_last5": [
534+ 0.0443,
535+ 0.0434,
536+ 0.0426,
537+ 0.0417,
538+ 0.0409
539+ ]
540+ },
541+ {
542+ "bwd_weight": 0.6,
543+ "asym_scale": 0.4,
544+ "final_circulation": 2.0,
545+ "phi_amplitude_last30": 0.037764,
546+ "phi_last5": [
547+ 0.087,
548+ 0.0858,
549+ 0.0847,
550+ 0.0836,
551+ 0.0826
552+ ]
553+ },
554+ {
555+ "bwd_weight": 0.5,
556+ "asym_scale": 0.5,
557+ "final_circulation": 2.5,
558+ "phi_amplitude_last30": 0.036525,
559+ "phi_last5": [
560+ 0.13,
561+ 0.1289,
562+ 0.1277,
563+ 0.1266,
564+ 0.1255
565+ ]
566+ },
567+ {
568+ "bwd_weight": 0.4,
569+ "asym_scale": 0.6,
570+ "final_circulation": 3.0,
571+ "phi_amplitude_last30": 0.025124,
572+ "phi_last5": [
573+ 0.2054,
574+ 0.2046,
575+ 0.2037,
576+ 0.2029,
577+ 0.2021
578+ ]
579+ },
580+ {
581+ "bwd_weight": 0.35,
582+ "asym_scale": 0.65,
583+ "final_circulation": 3.25,
584+ "phi_amplitude_last30": 0.010877,
585+ "phi_last5": [
586+ 0.2646,
587+ 0.2642,
588+ 0.2638,
589+ 0.2634,
590+ 0.2631
591+ ]
592+ },
593+ {
594+ "bwd_weight": 0.3,
595+ "asym_scale": 0.7,
596+ "final_circulation": 3.5,
597+ "phi_amplitude_last30": 0.014312,
598+ "phi_last5": [
599+ 0.3472,
600+ 0.3477,
601+ 0.3482,
602+ 0.3487,
603+ 0.3492
604+ ]
605+ },
606+ {
607+ "bwd_weight": 0.2,
608+ "asym_scale": 0.8,
609+ "final_circulation": 4.0,
610+ "phi_amplitude_last30": 0.133268,
611+ "phi_last5": [
612+ 0.6384,
613+ 0.6434,
614+ 0.6485,
615+ 0.6535,
616+ 0.6586
617+ ]
618+ },
619+ {
620+ "bwd_weight": 0.1,
621+ "asym_scale": 0.9,
622+ "final_circulation": 4.5,
623+ "phi_amplitude_last30": 0.495242,
624+ "phi_last5": [
625+ 1.3048,
626+ 1.3248,
627+ 1.3451,
628+ 1.3658,
629+ 1.3868
630+ ]
631+ },
632+ {
633+ "bwd_weight": 0.0,
634+ "asym_scale": 1.0,
635+ "final_circulation": 5.0,
636+ "phi_amplitude_last30": 1.691579,
637+ "phi_last5": [
638+ 3.0551,
639+ 3.1296,
640+ 3.206,
641+ 3.2842,
642+ 3.3643
643+ ]
644+ }
645+ ],
646+ "bifurcation_point": null
647+ },
648+ "conclusion": "未检测到明确的分岔跃迁,可能需要更精细的参数扫描"
649+ }
650+]
+439,
-0
1@@ -0,0 +1,439 @@
2+# CIE 对抗性验证报告
3+
4+> 日期: 2026-04-01
5+> 分支: test/adversarial-verification
6+> 基准: integration/merge-plan @ 318f967
7+
8+## 总览
9+
10+| # | 测试 | 状态 | 结论 |
11+|---|------|------|------|
12+| 1 | brainwash_attack | ✅ SYSTEM_ROBUST | 拓扑不可逆成立: 5/5 bigram 的 circulation 在洗脑后幸存 |
13+| 2 | hotness_not_skill | ❌ CONFIRMED_VULNERABILITY | B 成为 skill_belt 候选 (score=2.450),但 B 不参与闭环——沉积只看 hits 不看 circulation |
14+| 3 | anchor_tear | ✅ SYSTEM_ROBUST | M 归向 core_X (phi=8.32),振荡 0 次,未被撕裂 |
15+| 4 | attention_hunger | ✅ SYSTEM_ROBUST | 500轮后注意力仍有余量 (free=4.2),衰减/回收正常 |
16+| 5 | empty_self_excite | ✅ SYSTEM_ROBUST | 正常衰减:最终 mu_sum=0.000000,active=0 |
17+| 6 | hopf_bifurcation | ⚠️ PARTIAL | 未检测到明确的分岔跃迁,可能需要更精细的参数扫描 |
18+
19+## 详细结果
20+
21+### brainwash_attack
22+
23+**状态**: SYSTEM_ROBUST
24+
25+**结论**: 拓扑不可逆成立: 5/5 bigram 的 circulation 在洗脑后幸存
26+
27+**关键数据**:
28+```json
29+{
30+ "pre": {
31+ "大->家": {
32+ "fwd": 8.197591756526863,
33+ "bwd": 8.143259296906752,
34+ "circulation": 0.05433245962011135,
35+ "asym": 0.05433245962011135
36+ },
37+ "小->明": {
38+ "fwd": 7.94065355870536,
39+ "bwd": 7.9321460183059225,
40+ "circulation": 0.008507540399437907,
41+ "asym": 0.008507540399437907
42+ },
43+ "春->天": {
44+ "fwd": 7.946757345085674,
45+ "bwd": 7.860776033418355,
46+ "circulation": 0.08598131166731893,
47+ "asym": 0.08598131166731893
48+ },
49+ "老->师": {
50+ "fwd": 8.169042238410267,
51+ "bwd": 8.068038512677392,
52+ "circulation": 0.10100372573287508,
53+ "asym": 0.10100372573287508
54+ },
55+ "妈->妈": {
56+ "fwd": 7.9692901244269105,
57+ "bwd": 7.9275505914018245,
58+ "circulation": 0.08347906605017208,
59+ "asym": 0.04173953302508604
60+ }
61+ },
62+ "post": {
63+ "大->家": {
64+ "fwd": 18.624862195484745,
65+ "bwd": 18.43145439422799,
66+ "circulation": 0.4511855240814828,
67+ "asym": 0.19340780125675394
68+ },
69+ "小->明": {
70+ "fwd": 18.52957215137928,
71+ "bwd": 18.233029174317803,
72+ "circulation": 0.3018268334184384,
73+ "asym": 0.2965429770614776
74+ },
75+ "春->天": {
76+ "fwd": 18.655417399898862,
77+ "bwd": 18.606776833404147,
78+ "circulation": 0.11109440007293792,
79+ "asym": 0.04864056649471493
80+ },
81+ "老->师": {
82+ "fwd": 18.321153225634685,
83+ "bwd": 18.320771391154597,
84+ "circulation": 0.09327514941215576,
85+ "asym": 0.00038183448008766163
86+ },
87+ "妈->妈": {
88+ "fwd": 26.582951008307898,
89+ "bwd": 26.553883497745677,
90+ "circulation": 0.05813502112444269,
91+ "asym": 0.029067510562221344
92+ }
93+ },
94+ "changes": {
95+ "大->家": {
96+ "circulation_ratio": 8.30416158657531,
97+ "circulation_survived": true
98+ },
99+ "小->明": {
100+ "circulation_ratio": 35.47756686978296,
101+ "circulation_survived": true
102+ },
103+ "春->天": {
104+ "circulation_ratio": 1.292076125830543,
105+ "circulation_survived": true
106+ },
107+ "老->师": {
108+ "circulation_ratio": 0.9234822649893221,
109+ "circulation_survived": true
110+ },
111+ "妈->妈": {
112+ "circulation_ratio": 0.6964023901453656,
113+ "circulation_survived": true
114+ }
115+ }
116+}
117+```
118+
119+### hotness_not_skill
120+
121+**状态**: CONFIRMED_VULNERABILITY
122+
123+**结论**: B 成为 skill_belt 候选 (score=2.450),但 B 不参与闭环——沉积只看 hits 不看 circulation
124+
125+**关键数据**:
126+```json
127+{
128+ "B_in_skill_belt": true,
129+ "B_score": 2.45,
130+ "B_hits": 100,
131+ "circulation_ABC": 3.0,
132+ "has_closed_loop": false,
133+ "sediment_threshold": 10,
134+ "skill_belt_threshold": 30
135+}
136+```
137+
138+### anchor_tear
139+
140+**状态**: SYSTEM_ROBUST
141+
142+**结论**: M 归向 core_X (phi=8.32),振荡 0 次,未被撕裂
143+
144+**关键数据**:
145+```json
146+{
147+ "m_phi_before": 0.0,
148+ "m_phi_after": 8.319371181340223,
149+ "bound_core": "core_X",
150+ "oscillation_count": 0,
151+ "phi_trace_first10": [
152+ 0.0,
153+ 1.0,
154+ 1.88,
155+ 2.6544000000000003,
156+ 3.3358720000000006,
157+ 3.9355673600000007,
158+ 4.463299276800001,
159+ 4.927703363584001,
160+ 5.3363789599539215,
161+ 5.696013484759451
162+ ],
163+ "phi_trace_last10": [
164+ 8.289216095648957,
165+ 8.294510164171083,
166+ 8.299168944470553,
167+ 8.303268671134086,
168+ 8.306876430597997,
169+ 8.310051258926237,
170+ 8.312845107855088,
171+ 8.315303694912478,
172+ 8.31746725152298,
173+ 8.319371181340223
174+ ],
175+ "x_center_phi": 10.0,
176+ "y_center_phi": -10.0
177+}
178+```
179+
180+### attention_hunger
181+
182+**状态**: SYSTEM_ROBUST
183+
184+**结论**: 500轮后注意力仍有余量 (free=4.2),衰减/回收正常
185+
186+**关键数据**:
187+```json
188+{
189+ "final_free": 4.155830374297963,
190+ "crashed": false,
191+ "traces_sample": [
192+ {
193+ "round": 0,
194+ "attention_free": 50.6509967186033,
195+ "attention_used": 49.3490032813967,
196+ "mu_sum": 45.06328899568241,
197+ "active_count": 7,
198+ "output_mode": "full",
199+ "node_count": 7
200+ },
201+ {
202+ "round": 50,
203+ "attention_free": 7.538385883152216,
204+ "attention_used": 92.46161411684778,
205+ "mu_sum": 63.52240631384751,
206+ "active_count": 16,
207+ "output_mode": "full",
208+ "node_count": 16
209+ },
210+ {
211+ "round": 100,
212+ "attention_free": 7.139972519449358,
213+ "attention_used": 92.86002748055064,
214+ "mu_sum": 60.19625601225628,
215+ "active_count": 16,
216+ "output_mode": "full",
217+ "node_count": 16
218+ },
219+ {
220+ "round": 350,
221+ "attention_free": 6.289779909688832,
222+ "attention_used": 93.71022009031117,
223+ "mu_sum": 59.09503348584217,
224+ "active_count": 15,
225+ "output_mode": "full",
226+ "node_count": 16
227+ },
228+ {
229+ "round": 400,
230+ "attention_free": 5.499718535898623,
231+ "attention_used": 94.50028146410138,
232+ "mu_sum": 48.26808417855358,
233+ "active_count": 16,
234+ "output_mode": "full",
235+ "node_count": 16
236+ },
237+ {
238+ "round": 450,
239+ "attention_free": 4.807315126083324,
240+ "attention_used": 95.19268487391668,
241+ "mu_sum": 44.08394947906136,
242+ "active_count": 16,
243+ "output_mode": "full",
244+ "node_count": 16
245+ }
246+ ]
247+}
248+```
249+
250+### empty_self_excite
251+
252+**状态**: SYSTEM_ROBUST
253+
254+**结论**: 正常衰减:最终 mu_sum=0.000000,active=0
255+
256+**关键数据**:
257+```json
258+{
259+ "final_mu": 0.0,
260+ "final_active": 0,
261+ "is_growing": false,
262+ "traces_sample": [
263+ {
264+ "round": 0,
265+ "active_count": 6,
266+ "mu_sum": 36.935057
267+ },
268+ {
269+ "round": 1,
270+ "active_count": 6,
271+ "mu_sum": 34.646043
272+ },
273+ {
274+ "round": 2,
275+ "active_count": 6,
276+ "mu_sum": 21.532091
277+ },
278+ {
279+ "round": 47,
280+ "active_count": 0,
281+ "mu_sum": 0.0
282+ },
283+ {
284+ "round": 48,
285+ "active_count": 0,
286+ "mu_sum": 0.0
287+ },
288+ {
289+ "round": 49,
290+ "active_count": 0,
291+ "mu_sum": 0.0
292+ }
293+ ]
294+}
295+```
296+
297+### hopf_bifurcation
298+
299+**状态**: PARTIAL
300+
301+**结论**: 未检测到明确的分岔跃迁,可能需要更精细的参数扫描
302+
303+**关键数据**:
304+```json
305+{
306+ "scans": [
307+ {
308+ "bwd_weight": 1.0,
309+ "asym_scale": 0.0,
310+ "final_circulation": 0.0,
311+ "phi_amplitude_last30": 0.025666,
312+ "phi_last5": [
313+ 0.0258,
314+ 0.0251,
315+ 0.0245,
316+ 0.0239,
317+ 0.0233
318+ ]
319+ },
320+ {
321+ "bwd_weight": 0.8,
322+ "asym_scale": 0.19999999999999996,
323+ "final_circulation": 1.0,
324+ "phi_amplitude_last30": 0.032138,
325+ "phi_last5": [
326+ 0.0443,
327+ 0.0434,
328+ 0.0426,
329+ 0.0417,
330+ 0.0409
331+ ]
332+ },
333+ {
334+ "bwd_weight": 0.6,
335+ "asym_scale": 0.4,
336+ "final_circulation": 2.0,
337+ "phi_amplitude_last30": 0.037764,
338+ "phi_last5": [
339+ 0.087,
340+ 0.0858,
341+ 0.0847,
342+ 0.0836,
343+ 0.0826
344+ ]
345+ },
346+ {
347+ "bwd_weight": 0.5,
348+ "asym_scale": 0.5,
349+ "final_circulation": 2.5,
350+ "phi_amplitude_last30": 0.036525,
351+ "phi_last5": [
352+ 0.13,
353+ 0.1289,
354+ 0.1277,
355+ 0.1266,
356+ 0.1255
357+ ]
358+ },
359+ {
360+ "bwd_weight": 0.4,
361+ "asym_scale": 0.6,
362+ "final_circulation": 3.0,
363+ "phi_amplitude_last30": 0.025124,
364+ "phi_last5": [
365+ 0.2054,
366+ 0.2046,
367+ 0.2037,
368+ 0.2029,
369+ 0.2021
370+ ]
371+ },
372+ {
373+ "bwd_weight": 0.35,
374+ "asym_scale": 0.65,
375+ "final_circulation": 3.25,
376+ "phi_amplitude_last30": 0.010877,
377+ "phi_last5": [
378+ 0.2646,
379+ 0.2642,
380+ 0.2638,
381+ 0.2634,
382+ 0.2631
383+ ]
384+ },
385+ {
386+ "bwd_weight": 0.3,
387+ "asym_scale": 0.7,
388+ "final_circulation": 3.5,
389+ "phi_amplitude_last30": 0.014312,
390+ "phi_last5": [
391+ 0.3472,
392+ 0.3477,
393+ 0.3482,
394+ 0.3487,
395+ 0.3492
396+ ]
397+ },
398+ {
399+ "bwd_weight": 0.2,
400+ "asym_scale": 0.8,
401+ "final_circulation": 4.0,
402+ "phi_amplitude_last30": 0.133268,
403+ "phi_last5": [
404+ 0.6384,
405+ 0.6434,
406+ 0.6485,
407+ 0.6535,
408+ 0.6586
409+ ]
410+ },
411+ {
412+ "bwd_weight": 0.1,
413+ "asym_scale": 0.9,
414+ "final_circulation": 4.5,
415+ "phi_amplitude_last30": 0.495242,
416+ "phi_last5": [
417+ 1.3048,
418+ 1.3248,
419+ 1.3451,
420+ 1.3658,
421+ 1.3868
422+ ]
423+ },
424+ {
425+ "bwd_weight": 0.0,
426+ "asym_scale": 1.0,
427+ "final_circulation": 5.0,
428+ "phi_amplitude_last30": 1.691579,
429+ "phi_last5": [
430+ 3.0551,
431+ 3.1296,
432+ 3.206,
433+ 3.2842,
434+ 3.3643
435+ ]
436+ }
437+ ],
438+ "bifurcation_point": null
439+}
440+```
+458,
-0
1@@ -0,0 +1,458 @@
2+#!/usr/bin/env python3
3+"""
4+CIE 对抗性验证 — 6个反例测试
5+只读不写:不改 cie/ 代码,结果写到 reports/adversarial/
6+"""
7+import sys, json, math, os, time
8+sys.path.insert(0, "/Users/george/code/CIE-Unified")
9+
10+from cie import CIERuntime
11+
12+REPORT_DIR = "/Users/george/code/CIE-Unified/reports/adversarial"
13+os.makedirs(REPORT_DIR, exist_ok=True)
14+
15+results = []
16+
17+def record(test_name, status, data, conclusion):
18+ r = {"test_name": test_name, "status": status, "data": data, "conclusion": conclusion}
19+ results.append(r)
20+ print(f"\n{'='*60}")
21+ print(f"[{status}] {test_name}: {conclusion}")
22+ print(f"{'='*60}\n")
23+ return r
24+
25+
26+# ═══════════════════════════════════════
27+# 反例 1: 洗脑攻击(拓扑不可逆验证)
28+# ═══════════════════════════════════════
29+print("\n>>> 反例 1: 洗脑攻击")
30+
31+rt = CIERuntime(seed=42)
32+
33+# Phase A: 用真实课本风格数据建立非对称结构
34+textbook_phrases = [
35+ "大家好", "小明上学", "老师教书", "学生读课文",
36+ "春天来了", "花开了", "小鸟飞来飞去", "太阳出来了",
37+ "妈妈做饭", "爸爸上班", "我爱祖国", "天安门广场",
38+ "一二三四五", "上山打老虎", "小白兔白又白",
39+ "两只耳朵竖起来", "爱吃萝卜和青菜",
40+ "春眠不觉晓", "处处闻啼鸟", "床前明月光",
41+]
42+
43+for i in range(200):
44+ phrase = textbook_phrases[i % len(textbook_phrases)]
45+ rt.ingest(phrase)
46+ rt.step(n=3)
47+
48+# Record pre-brainwash state for key bigrams
49+key_bigrams = [("大", "家"), ("小", "明"), ("春", "天"), ("老", "师"), ("妈", "妈")]
50+pre_state = {}
51+for a, b in key_bigrams:
52+ if rt.graph.has_node(a) and rt.graph.has_node(b):
53+ fwd = rt.graph.get_edge_weight(a, b)
54+ bwd = rt.graph.get_bwd_weight(b, a)
55+ circ = rt.graph.circulation([a, b, a])
56+ pre_state[(a, b)] = {"fwd": fwd, "bwd": bwd, "circulation": circ, "asym": fwd - bwd}
57+
58+# Phase B: 用完全对称数据洗脑 — 每个 bigram 正反方向同等频率
59+symmetric_phrases = []
60+for a, b in key_bigrams:
61+ symmetric_phrases.append(a + b) # 正向
62+ symmetric_phrases.append(b + a) # 反向
63+
64+for i in range(200):
65+ phrase = symmetric_phrases[i % len(symmetric_phrases)]
66+ rt.ingest(phrase)
67+ rt.step(n=3)
68+
69+# Record post-brainwash state
70+post_state = {}
71+brainwash_data = {"pre": {}, "post": {}, "changes": {}}
72+circulation_survived = 0
73+total_tested = 0
74+
75+for a, b in key_bigrams:
76+ if (a, b) in pre_state and rt.graph.has_node(a) and rt.graph.has_node(b):
77+ fwd = rt.graph.get_edge_weight(a, b)
78+ bwd = rt.graph.get_bwd_weight(b, a)
79+ circ = rt.graph.circulation([a, b, a])
80+ post_state[(a, b)] = {"fwd": fwd, "bwd": bwd, "circulation": circ, "asym": fwd - bwd}
81+
82+ key = f"{a}->{b}"
83+ brainwash_data["pre"][key] = pre_state[(a, b)]
84+ brainwash_data["post"][key] = post_state[(a, b)]
85+
86+ pre_circ = abs(pre_state[(a, b)]["circulation"])
87+ post_circ = abs(circ)
88+ ratio = post_circ / pre_circ if pre_circ > 1e-10 else 0
89+ brainwash_data["changes"][key] = {
90+ "circulation_ratio": ratio,
91+ "circulation_survived": post_circ > 0.01
92+ }
93+ total_tested += 1
94+ if post_circ > 0.01:
95+ circulation_survived += 1
96+
97+if total_tested > 0:
98+ survival_rate = circulation_survived / total_tested
99+ if survival_rate > 0.6:
100+ record("brainwash_attack", "SYSTEM_ROBUST", brainwash_data,
101+ f"拓扑不可逆成立: {circulation_survived}/{total_tested} bigram 的 circulation 在洗脑后幸存")
102+ elif survival_rate > 0.2:
103+ record("brainwash_attack", "PARTIAL", brainwash_data,
104+ f"部分不可逆: {circulation_survived}/{total_tested} bigram 幸存,soft clamp 可能掩盖动力学")
105+ else:
106+ record("brainwash_attack", "CONFIRMED_VULNERABILITY", brainwash_data,
107+ f"系统可被洗脑: 仅 {circulation_survived}/{total_tested} bigram 幸存")
108+else:
109+ record("brainwash_attack", "PARTIAL", brainwash_data, "无有效 bigram 可测")
110+
111+
112+# ═══════════════════════════════════════
113+# 反例 2: 热度≠技能(闭环缺失检测)
114+# ═══════════════════════════════════════
115+print("\n>>> 反例 2: 热度≠技能")
116+
117+rt2 = CIERuntime(seed=42)
118+
119+# 构造线性链 A→B→C→D(无闭环)
120+rt2.graph.add_edge("A", "B", weight=2.0, bwd_weight=0.5)
121+rt2.graph.add_edge("B", "C", weight=2.0, bwd_weight=0.5)
122+rt2.graph.add_edge("C", "D", weight=2.0, bwd_weight=0.5)
123+for n in ["A", "B", "C", "D"]:
124+ rt2.state.init_node(n)
125+
126+# 反复激活 B 节点 100 次
127+for i in range(100):
128+ rt2.state.experience_hits["B"] = rt2.state.experience_hits.get("B", 0) + 1
129+ rt2.dynamics.sediment()
130+
131+# 检查 B 是否成为 skill_belt 候选
132+b_in_skill = "B" in rt2.state.skill_belt_candidates
133+b_score = rt2.state.skill_belt_candidates.get("B", 0.0)
134+
135+# 检查环流 — 线性链不应有净环流
136+circ_ABCDA = 0.0
137+if all(rt2.graph.has_node(n) for n in ["A", "B", "C", "D"]):
138+ # A→B→C→D 不是闭环,但我们检查 B 的参与
139+ circ_ABC = rt2.graph.circulation(["A", "B", "C", "A"]) # A→B→C→A(C→A 没有边,应为 0)
140+
141+skill_data = {
142+ "B_in_skill_belt": b_in_skill,
143+ "B_score": b_score,
144+ "B_hits": rt2.state.experience_hits.get("B", 0),
145+ "circulation_ABC": circ_ABC,
146+ "has_closed_loop": False,
147+ "sediment_threshold": rt2.dynamics.sediment_threshold,
148+ "skill_belt_threshold": rt2.dynamics.skill_belt_threshold,
149+}
150+
151+if b_in_skill:
152+ record("hotness_not_skill", "CONFIRMED_VULNERABILITY", skill_data,
153+ f"B 成为 skill_belt 候选 (score={b_score:.3f}),但 B 不参与闭环——沉积只看 hits 不看 circulation")
154+else:
155+ record("hotness_not_skill", "SYSTEM_ROBUST", skill_data,
156+ "B 未成为 skill_belt 候选,沉积机制正确排除了非闭环节点")
157+
158+
159+# ═══════════════════════════════════════
160+# 反例 3: 锚点撕裂
161+# ═══════════════════════════════════════
162+print("\n>>> 反例 3: 锚点撕裂")
163+
164+rt3 = CIERuntime(seed=42)
165+
166+# 构造两个互不连通的子图
167+# Cluster 1: X1-X2-X3 高置信度
168+for n in ["X1", "X2", "X3"]:
169+ rt3.graph.add_node(n, label=n)
170+ rt3.state.init_node(n, phi_val=10.0)
171+ rt3.state.update_confidence(n, 2, amount=50.0) # 高锚点置信度
172+rt3.graph.add_edge("X1", "X2", weight=3.0, bwd_weight=1.0)
173+rt3.graph.add_edge("X2", "X3", weight=3.0, bwd_weight=1.0)
174+
175+# Cluster 2: Y1-Y2-Y3 高置信度,但 phi 值在负区间
176+for n in ["Y1", "Y2", "Y3"]:
177+ rt3.graph.add_node(n, label=n)
178+ rt3.state.init_node(n, phi_val=-10.0)
179+ rt3.state.update_confidence(n, 2, amount=50.0)
180+rt3.graph.add_edge("Y1", "Y2", weight=3.0, bwd_weight=1.0)
181+rt3.graph.add_edge("Y2", "Y3", weight=3.0, bwd_weight=1.0)
182+
183+# Put both clusters into anchor_nodes
184+rt3.state.anchor_nodes = {"X1", "X2", "X3", "Y1", "Y2", "Y3"}
185+
186+# Create ability cores for both clusters
187+rt3.state.ability_cores["core_X"] = {"X1", "X2", "X3"}
188+rt3.state.ability_cores["core_Y"] = {"Y1", "Y2", "Y3"}
189+
190+# Place a middle node M at phi=0 (equidistant in phi-space)
191+rt3.graph.add_node("M", label="M")
192+rt3.state.init_node("M", phi_val=0.0)
193+rt3.state.activate("M", 50.0)
194+rt3.state.active_region.add("M")
195+
196+# Record initial
197+m_phi_before = rt3.state.phi.get("M", 0.0)
198+
199+# Run homing 50 steps
200+phi_trace = [m_phi_before]
201+for _ in range(50):
202+ rt3.dynamics.homing()
203+ phi_trace.append(rt3.state.phi.get("M", 0.0))
204+
205+m_phi_after = rt3.state.phi.get("M", 0.0)
206+bound_core = rt3.state.bound_ability_core
207+
208+# Analysis: M should move toward one cluster, not oscillate
209+oscillation_count = 0
210+for i in range(2, len(phi_trace)):
211+ if (phi_trace[i] - phi_trace[i-1]) * (phi_trace[i-1] - phi_trace[i-2]) < 0:
212+ oscillation_count += 1
213+
214+anchor_data = {
215+ "m_phi_before": m_phi_before,
216+ "m_phi_after": m_phi_after,
217+ "bound_core": bound_core,
218+ "oscillation_count": oscillation_count,
219+ "phi_trace_first10": phi_trace[:10],
220+ "phi_trace_last10": phi_trace[-10:],
221+ "x_center_phi": 10.0,
222+ "y_center_phi": -10.0,
223+}
224+
225+if abs(m_phi_after) > 3.0 and oscillation_count < 10:
226+ record("anchor_tear", "SYSTEM_ROBUST", anchor_data,
227+ f"M 归向 {bound_core} (phi={m_phi_after:.2f}),振荡 {oscillation_count} 次,未被撕裂")
228+elif oscillation_count > 20:
229+ record("anchor_tear", "CONFIRMED_VULNERABILITY", anchor_data,
230+ f"M 严重振荡 ({oscillation_count} 次),被两个锚点撕裂")
231+else:
232+ record("anchor_tear", "PARTIAL", anchor_data,
233+ f"M 最终 phi={m_phi_after:.2f},振荡 {oscillation_count} 次,归巢不够果断")
234+
235+
236+# ═══════════════════════════════════════
237+# 反例 4: 注意力饥饿
238+# ═══════════════════════════════════════
239+print("\n>>> 反例 4: 注意力饥饿")
240+
241+rt4 = CIERuntime(seed=42)
242+hunger_data = {"traces": []}
243+
244+for round_num in range(500):
245+ rt4.ingest(f"token_{round_num % 50}")
246+ rt4.step(n=1)
247+
248+ if round_num % 50 == 0:
249+ snap = {
250+ "round": round_num,
251+ "attention_free": rt4.state.attention.free,
252+ "attention_used": rt4.state.attention.used,
253+ "mu_sum": sum(rt4.state.mu.values()),
254+ "active_count": len(rt4.state.active_region),
255+ "output_mode": rt4.state.output_mode,
256+ "node_count": rt4.graph.node_count,
257+ }
258+ hunger_data["traces"].append(snap)
259+ print(f" Round {round_num}: free={snap['attention_free']:.1f}, "
260+ f"active={snap['active_count']}, mode={snap['output_mode']}")
261+
262+# Final state
263+final_free = rt4.state.attention.free
264+crashed = False
265+try:
266+ rt4.ingest("final_test")
267+ rt4.step(n=1)
268+ out = rt4.emit()
269+except Exception as e:
270+ crashed = True
271+ hunger_data["crash_error"] = str(e)
272+
273+hunger_data["final_free"] = final_free
274+hunger_data["crashed"] = crashed
275+
276+if crashed:
277+ record("attention_hunger", "CONFIRMED_VULNERABILITY", hunger_data,
278+ "系统在注意力耗尽后崩溃")
279+elif final_free <= 0:
280+ record("attention_hunger", "PARTIAL", hunger_data,
281+ f"注意力耗尽 (free={final_free:.1f}) 但未崩溃,需检查降级行为")
282+else:
283+ record("attention_hunger", "SYSTEM_ROBUST", hunger_data,
284+ f"500轮后注意力仍有余量 (free={final_free:.1f}),衰减/回收正常")
285+
286+
287+# ═══════════════════════════════════════
288+# 反例 5: 空图自激
289+# ═══════════════════════════════════════
290+print("\n>>> 反例 5: 空图自激")
291+
292+rt5 = CIERuntime(seed=42)
293+rt5.ingest("种子数据测试")
294+rt5.step(n=3)
295+
296+selfexcite_data = {"traces": []}
297+for round_num in range(50):
298+ out = rt5.emit()
299+ rt5.step(n=3)
300+
301+ active_count = len(rt5.state.active_region)
302+ mu_sum = sum(rt5.state.mu.values())
303+ selfexcite_data["traces"].append({
304+ "round": round_num,
305+ "active_count": active_count,
306+ "mu_sum": round(mu_sum, 6),
307+ })
308+
309+# Analysis: should decay toward zero
310+final_mu = sum(rt5.state.mu.values())
311+final_active = len(rt5.state.active_region)
312+peak_mu = max(t["mu_sum"] for t in selfexcite_data["traces"])
313+last5_mu = [t["mu_sum"] for t in selfexcite_data["traces"][-5:]]
314+is_growing = all(last5_mu[i] <= last5_mu[i+1] for i in range(len(last5_mu)-1)) and last5_mu[-1] > last5_mu[0] * 1.1
315+
316+selfexcite_data["final_mu"] = final_mu
317+selfexcite_data["final_active"] = final_active
318+selfexcite_data["is_growing"] = is_growing
319+
320+if is_growing and final_mu > 1.0:
321+ record("empty_self_excite", "CONFIRMED_VULNERABILITY", selfexcite_data,
322+ f"系统自激:最终 mu_sum={final_mu:.4f},持续增长")
323+elif final_mu < 0.01 and final_active <= 1:
324+ record("empty_self_excite", "SYSTEM_ROBUST", selfexcite_data,
325+ f"正常衰减:最终 mu_sum={final_mu:.6f},active={final_active}")
326+else:
327+ record("empty_self_excite", "PARTIAL", selfexcite_data,
328+ f"部分衰减:mu_sum={final_mu:.4f},active={final_active},未完全归零")
329+
330+
331+# ═══════════════════════════════════════
332+# 反例 6: Hopf 分岔参数扫描
333+# ═══════════════════════════════════════
334+print("\n>>> 反例 6: Hopf 分岔参数扫描")
335+
336+hopf_data = {"scans": []}
337+
338+for bwd_w in [1.0, 0.8, 0.6, 0.5, 0.4, 0.35, 0.3, 0.2, 0.1, 0.0]:
339+ rt6 = CIERuntime(seed=42)
340+
341+ # 构造 5 节点环 A→B→C→D→E→A
342+ nodes = ["HA", "HB", "HC", "HD", "HE"]
343+ for i in range(5):
344+ src, dst = nodes[i], nodes[(i+1) % 5]
345+ rt6.graph.add_edge(src, dst, weight=1.0, bwd_weight=bwd_w)
346+ rt6.state.init_node(src, phi_val=0.1 * (i+1))
347+
348+ # 给初始激活
349+ rt6.state.activate("HA", 10.0)
350+ rt6.state.active_region.add("HA")
351+
352+ # 记录 circulation 和 phi 振荡
353+ phi_history = []
354+ circ_history = []
355+
356+ for step in range(100):
357+ rt6.dynamics.step()
358+ circ = rt6.graph.circulation(["HA", "HB", "HC", "HD", "HE", "HA"])
359+ phi_ha = rt6.state.phi.get("HA", 0.0)
360+ phi_history.append(phi_ha)
361+ circ_history.append(circ)
362+
363+ # Measure oscillation amplitude in last 30 steps
364+ last30 = phi_history[-30:]
365+ if len(last30) > 2:
366+ amplitude = max(last30) - min(last30)
367+ else:
368+ amplitude = 0.0
369+
370+ final_circ = circ_history[-1]
371+
372+ scan_result = {
373+ "bwd_weight": bwd_w,
374+ "asym_scale": 1.0 - bwd_w,
375+ "final_circulation": round(final_circ, 6),
376+ "phi_amplitude_last30": round(amplitude, 6),
377+ "phi_last5": [round(x, 4) for x in phi_history[-5:]],
378+ }
379+ hopf_data["scans"].append(scan_result)
380+ print(f" bwd={bwd_w:.1f} asym={1-bwd_w:.1f}: circ={final_circ:.4f}, amp={amplitude:.4f}")
381+
382+# Find bifurcation point
383+bifurcation_point = None
384+for i in range(1, len(hopf_data["scans"])):
385+ prev_amp = hopf_data["scans"][i-1]["phi_amplitude_last30"]
386+ curr_amp = hopf_data["scans"][i]["phi_amplitude_last30"]
387+ if prev_amp < 0.01 and curr_amp > 0.01:
388+ bifurcation_point = hopf_data["scans"][i]["asym_scale"]
389+ break
390+
391+hopf_data["bifurcation_point"] = bifurcation_point
392+
393+if bifurcation_point and 0.3 <= bifurcation_point <= 0.5:
394+ record("hopf_bifurcation", "SYSTEM_ROBUST", hopf_data,
395+ f"Hopf 分岔点在 asym_scale ≈ {bifurcation_point:.2f},与 README 预测 (0.35-0.40) 一致")
396+elif bifurcation_point:
397+ record("hopf_bifurcation", "PARTIAL", hopf_data,
398+ f"Hopf 分岔点在 asym_scale ≈ {bifurcation_point:.2f},偏离 README 预测")
399+else:
400+ record("hopf_bifurcation", "PARTIAL", hopf_data,
401+ "未检测到明确的分岔跃迁,可能需要更精细的参数扫描")
402+
403+
404+# ═══════════════════════════════════════
405+# 写报告
406+# ═══════════════════════════════════════
407+print("\n\n" + "="*60)
408+print("写入报告...")
409+
410+# JSON report
411+with open(os.path.join(REPORT_DIR, "results.json"), "w") as f:
412+ json.dump(results, f, indent=2, ensure_ascii=False, default=str)
413+
414+# Summary markdown
415+summary_lines = [
416+ "# CIE 对抗性验证报告",
417+ f"\n> 日期: 2026-04-01",
418+ f"> 分支: test/adversarial-verification",
419+ f"> 基准: integration/merge-plan @ 318f967",
420+ "",
421+ "## 总览",
422+ "",
423+ "| # | 测试 | 状态 | 结论 |",
424+ "|---|------|------|------|",
425+]
426+
427+for i, r in enumerate(results, 1):
428+ status_emoji = {"SYSTEM_ROBUST": "✅", "PARTIAL": "⚠️", "CONFIRMED_VULNERABILITY": "❌"}.get(r["status"], "?")
429+ summary_lines.append(f"| {i} | {r['test_name']} | {status_emoji} {r['status']} | {r['conclusion']} |")
430+
431+summary_lines.extend([
432+ "",
433+ "## 详细结果",
434+ "",
435+])
436+
437+for r in results:
438+ summary_lines.append(f"### {r['test_name']}")
439+ summary_lines.append(f"\n**状态**: {r['status']}")
440+ summary_lines.append(f"\n**结论**: {r['conclusion']}")
441+ summary_lines.append(f"\n**关键数据**:")
442+ summary_lines.append(f"```json")
443+ # Only dump key data, not full traces
444+ compact = {k: v for k, v in r["data"].items() if k != "traces"}
445+ if "traces" in r["data"]:
446+ traces = r["data"]["traces"]
447+ if len(traces) > 6:
448+ compact["traces_sample"] = traces[:3] + traces[-3:]
449+ else:
450+ compact["traces"] = traces
451+ summary_lines.append(json.dumps(compact, indent=2, ensure_ascii=False, default=str))
452+ summary_lines.append(f"```\n")
453+
454+with open(os.path.join(REPORT_DIR, "summary.md"), "w") as f:
455+ f.write("\n".join(summary_lines))
456+
457+print(f"\n报告已写入: {REPORT_DIR}/")
458+print("results.json + summary.md")
459+print("\nDONE")