夜雨聆风学习资料网

ARTICLE · 1083750

AI能否学会说“我不知道”,有关AI模型结构自生长的继续探索

AI能否学会说“我不知道”,有关AI模型结构自生长的继续探索

让AI自己挑算盘之后:它学会了说"我不知道"

引子:上一篇文章留下的问题

上一篇文章的结尾,我们做了一次"五把算盘盲选":给AI五把不同的算盘,关进各自独立的房间训练,然后在不接触任何真正考题的前提下,让它自己选哪把最好。

结果是漂亮的——它8次全部选中了唯一能解新题的共享生成元。

但那篇文章的结尾,我们留了一句话:

AI能选对,但理由和"会算"完全无关。

我们当时指的是:它选共享生成元不是因为"算得准",而是因为它用了"能不能算出没见过的加数"这个判据,而不是"训练集上表现好不好"。

从那以后,我们又跑了大约五轮实验。答案比预期更丰富——AI不仅学会了自己挑算盘,还学会了一件事:什么时候该说"我不知道"。

这一篇要讲三个故事:一次戏剧性的一步解锁、一种全新的弃权能力、和一个关于"能不能"与"算不算"的深刻区分。

---

第一段:一次两元素的交换,从完全失败到完全成功

先讲最震撼的一组数据。

我们做了一个随机的考试安排:14个加数训练,14个加数留作考题。这个排列看起来没什么特别——训练集里包含了好几个"单位"(5、13、15、27),从群论上讲,信息是完全足够的。

但训练之后:

指标 结果

训练集上的表现 0.116(几乎全错)

留出加数上的表现 0.031(瞎猜)

共享生成元完全没学会。 而且——这是最诡异的地方——8次独立实验,数字精确到小数点后三位完全一样。

不是"有时失败",是"确定性地失败"。

然后我们做了一个极小的修改:把训练集里的"27号加数"换成"1号加数"。其他的完全不变——训练集大小一样,单位数量一样,留出加数一样。

结果:

指标 结果

训练集上的表现 1.000

留出加数上的表现 1.000

从完全失败到完全成功,8次实验全部一致。

为什么这个变化这么重要

用数学语言说:27号加数对应的是"C的27次自乘",1号加数对应的是"C的1次自乘"。

· 看到 C²⁷ 就像看到"我做了27次同样的动作"——你知道这个结果,但不知道每一次动作是什么。

· 看到 C¹ 就像看到"我做了一次动作"——这个动作就是规则本身。

打个比方:你给一个人一串数字 3, 6, 9, 12,他能推出"每次加3";但你给他 81, 243, 729,他只能猜"每次乘以某个数",而这个"某个数"可以是3,也可以是-3,也可以是一个复数。

C¹ 是规则的直接见证,C²⁷ 只是规则的一个远房亲戚。

---

第二段:一次更根本的验证——从正确位置出发就不会滑走

但这还不能完全说服人。有人会说:也许换了训练集之后,题目变简单了?

所以我们做了另一个独立的实验。

不改变训练集,只改变起始位置。

我们让AI从两个位置出发:

· 从随机位置出发(默认做法):训练集表现 0.116,留出加数 0.031,完全失败。

· 从正确规则的位置出发:训练集表现 1.000,留出加数 1.000,完全成功。

8次实验,全部一致。

这意味着什么

如果从正确位置出发也会滑走(退化到失败),那说明这个任务本身有问题——目标函数找不到正确解。

但从正确位置出发能保持成功,说明:

正确规则是这个任务的稳定最优解。它不是不存在,而是从普通位置出发的梯度下降无法到达它。

用地理打个比方:目的地确实存在,而且从目的地出发不会迷路。问题在于——从普通起点出发,你走着走着就走进了一个错的盆地,再也出不来。

两个独立实验,一个从"信息路径"、一个从"起点路径",都指向同一个结论:

失败不是"信息不够",是"走不到"。

---

第三段:一个新能力——AI学会了说"我不知道"

现在讲这一系列实验里最反直觉的一个发现。

在上面那个"完全失败"的场景里,我们做了一件关键的事:不是只看AI选了什么,而是看它选择之前的状态。

AI的判断标准是:先看"藏起来的两个加数"上哪个算盘表现最好。如果最好的那个都低于某个阈值——那就拒绝作答。

结果是:在那个完全失败的场景里,8次实验,8次都触发了拒答。

而且——这最重要——拒答是对的。

因为在那个场景里,五把算盘没有一个能真正解决问题。如果AI强行选一个(比如共享生成元),它在真正的考题上会完全失败。拒绝作答,是唯一正确的行为。

为什么这比"选对"更重要

很多AI系统被设计成"必须给出答案"——哪怕是在它完全不懂的情况下。这会导致自信的错误。

我们这一系列实验第一次证明:

一个系统可以在"能选对"之外,还具备"知道自己选不对"的能力。

这在认知科学里有个名字——元认知。它不仅知道自己知道什么,还知道自己不知道什么。

---

第四段:一个重要的区分——"不知道"有两种

但故事到这里还没有结束。我们继续测试,发现了更微妙的东西。

有两种不同的"不知道"。

第一种:"这个问题本来就没答案"

我们设计了一个特殊的考试:训练集只给"偶数加数",考题只考"奇数加数"。

这在数学上有一个精确的性质:即使AI完全理解了规则,它也无法唯一确定"奇数加数"该怎么做。因为存在两个不同的规则,它们在所有偶数加数上表现完全一样,但在奇数加数上完全不同。

这不是AI笨,这是题目本身没有唯一答案。

第二种:"这个问题有答案,但AI走不到"

就是第一段讲的那个随机考试。从信息上讲,答案唯一。但AI从普通起点出发,走不到那个答案。

这个区分为什么重要

我们现在的AI系统通常只有一个概念:"我算不出来"。但"算不出来"至少有两种:

· 问题没答案(信息不够)

· 答案存在但走不到(优化障碍)

打个比方:

· 第一种像问一个盲人"这幅画是什么颜色"——不是他不够聪明,是他没有获取信息的通道。

· 第二种像把一个人放在没有路的森林里,告诉他目的地在哪里——信息他有,但走不到。

一个真正聪明的系统应该能区分这两种情况。 因为在第一种情况下,你应该停止尝试——再怎么努力也没用;在第二种情况下,你应该换一条路——也许换一种训练方式、换一个起点、加一点引导就能到。

---

第五段:我们给AI装了一个"代数探测器"

为了区分这两种"不知道",我们做了一件可能改变游戏规则的事:在训练开始前,先算一遍"信息够不够"。

具体说:给定训练集里包含哪些加数,我们能解析地判断出——规则能不能被唯一确定。

· 如果训练集里的加数足够"丰富"(数学上叫"生成整个群"),答案是能。

· 如果训练集只覆盖了"半个群"(比如只给偶数),答案是不能。

这个判断不需要训练,只需要一次代数计算。

一个惊人的验证

我们做了一个更精细的测试:让训练集只覆盖"每个加数的四分之一"(比如只给0、4、8、12、16、20、24)。

然后我们提前算出来,如果AI真的学到了规则,它在训练集上的表现应该是 0.42,在考题上应该是 0.25。

训练完之后:

· 训练集上的表现:0.400(预测 0.42,误差 0.02)

· 考题上的表现:0.250(预测 0.25,误差 0.00)

两个数字都精确命中。

这意味着什么

我们第一次可以在训练开始前,用纯代数的方法预测出AI的训练结果。这不是"训练后看结果",而是"训练前算答案"。

这就像在物理实验里,先算好理论值,再看实验结果是否吻合。

---

第六段:三个轴的统一图景

把这一系列实验串起来,我们的研究从"能不能学到结构"推进到了三个不同的问题:

轴 问题 例子

可辨识性 信息够不够? 偶奇考试:不够

可达性 即使信息够,能走到吗? 随机考试:走不到

可利用性 走到了,能用起来吗? 桥冻结:用不起来

一个更完整的图景

我们最初的实验都是"能不能学到"这个单一问题。但现在我们看到:

\text{结构能力} = \text{可辨识性} \times \text{可达性} \times \text{可利用性}

三个条件缺一不可。

· 光有可辨识性,可达性为零 → 学习失败(随机考试)

· 光有可达性,可辨识性为零 → 学习失败(偶奇考试)

· 可辨识性、可达性都有,可利用性为零 → 结构存在但用不上(桥冻结)

这个框架不是我们编出来的——它是从五轮实验的数据里"长出来"的。

---

结语:从"会不会"到"该不该"

回顾这个系列:

· 第一篇文章:换个珠子,AI突然会拨了——形状比大小重要

· 第二篇文章:不是所有"泛化"都是"学会"——分清两种泛化

· 第三篇文章:给AI做盲测——代数不变量是真判据

· 第四篇文章:AI在没见过的考卷上考100分——它真的懂规则了

· 第五篇文章:让AI自己挑算盘——它能选对,但理由和会算无关

这一篇:AI学会了说"我不知道"——而且能区分两种不同的不知道。

从"能不能"到"该不该"

这是这一系列最深刻的变化。

最初的探索是能力问题:AI能不能学到结构?

现在的探索变成认知问题:AI能不能知道自己学了什么、没学什么、以及知道为什么没学到?

一个能选对算盘的AI已经很有用。

一个能区分"我不懂"和"我走不到"的AI——那是一种全新的智能形态。

下一步

我们接下来要做的是:

1. 系统性地绘制"可达性地图"——从多远的地方开始,AI才能走到正确的结构?

2. 把"代数探测器"整合进决策系统——让AI在训练前就知道"该不该尝试"。

3. 测试其他数学结构——Z₂₈只是一个特殊例子,我们想知道这是不是更普遍的现象。

目标不是让AI更聪明,而是让它更诚实——诚实地知道自己知道什么、不知道什么、以及为什么不知道。

而这条路,我们才刚刚起步。#!/usr/bin/env python3

# -*- coding: utf-8 -*-

"""

Smart Density / Structural Growth v8.04 (UNIFIED)

MERGE MANIFEST (this file = v8.03 scientific breadth + v8.02-B decision

rule, with the five fixes from the cross-review):

[FIX-1 SPLIT] 'random' is THE canonical v8.00 split: default_rng(1234)

+ 0-forcing (train [0,3,5,6,7,13,...], hold [1,2,4,8,...]) --

sandbox-verified to reproduce the v8.00 log exactly. v8.02-B's

RandomState(1234) variant is a DIFFERENT split (different hold set);

it is NEVER used here. Cross-script comparisons must check this

first. Also carries random_anchor (27<->1) + gcd4/gcd7 from v8.03.

[FIX-2 DECISION] the v8.02-B DECISION rule is now the MAINLINE:

decision := NO-CLAIM if max_inner(pool) < 0.5 (strict, pre-reg.)

:= rank-1(J) otherwise.

rank-1 is ALWAYS stored and reported; historical fields

(selection_success, transfer_success, picks) remain RANK-1-based and

byte-compatible with v8.01/v8.03 records. NEW fields, NEW names:

decision / decision_is_noclaim / decision_correct (NO-CLAIM counts

as correct iff the would-be pick would NOT transfer). v8.03's flaw

(abstain as a diagnostic while selection_success used argmax) is

owned and fixed here.

[FIX-3 VERIFY] verify_tf_vectorization (7 configs incl. the frozen

path v8.02-B refactored) is MANDATORY before any training stage.

The project has a real history of vectorization bugs.

[FIX-4 SENTINEL] dynamic canary RESTORED (v8.00 semantics): true

table + NOISE-scrambled hold rows + LEARNABLE table, trained under

the blind protocol. Sandbox-verified: hold-row gradients are

EXACTLY zero under a clean protocol -> the canary is alive and

silent; it responds only to a breach. v8.02-B's freeze made it a

dead instrument under the same name. The sentinel now travels

with every NEW base (Stage M) as check S1.

[FIX-5 CHECKSUM] the frozen v8.01 16-selection record is embedded

compactly WITH a sha256 checksum (C1) -- dual-truth-source risk

now detectable.

PRE-REGISTERED PREDICTIONS (38 total = 32 carried + 6 new; the count is

PRINTED at the end of every session -- state it in any writeup):

CARRIED (v8.00/v8.01/v8.02-A/v8.03; frozen record must still pass):

P1 contig P(J rank-1 = Gen) >= 7/8 P2 P(ID_ONLY=Gen) <= 2/8

P3 contig P(rank-1 transfers) >= 7/8 P4 evenodd select>=6/8,

transfer<=2/8 (split-hostile) P5 structure-first (l15 jsonl)

P6 POOL-5: J->Gen>=7/8, params->ShiftOnly>=7/8, params-transfer<=1/8

(NOT a claim vs train-MDL -- see P10/P8) P7 evenodd POOL-5 fail>=7/8

REG v7.21-r2 regression (l15 jsonl) L0 reselect reproduces picks

L4a-d,f,g random-split L2 ranges G1a-c init ladder (shift/rand/long)

G2a-e anchor unlock G3 gcd4/gcd7 coset signatures

L5a-d multi-base replication P8 gen-free: J NO-CLAIM>=7/8,

train_MDL->LowRank>=7/8, its transfer<=1/8 P9 lambda=0.05 stability

P10 J rank-1 == train_MDL rank-1 = 16/16 (the Z_28 isomorphism ceiling)

NEW (v8.04, registered in this header BEFORE any run):

D1 evenodd Gen parity: fid_even_in >= 0.85 AND fid_odd_in <= 0.15

(exact prediction: 1.000 / 0.083 -- row 0 free from C^0=I; the

I-axis (unvisited inputs) and O-axis (visited coset) separate)

D2 random Gen parity: |fid_even_in - fid_odd_in| <= 0.15 (no coset

confinement; random's failure is formation, not distribution)

D3 random DECISION: P(decision = NO-CLAIM) >= 6/8 AND

P(decision_correct) >= 7/8 -- the abstention's first live test

as a DECISION; the random failure becomes a CORRECT refusal

D4 record hygiene: decision != rank-1 only when NO-CLAIM;

stored decision == recomputed decision (lab vs training path)

S1 dynamic sentinel alarm = 0 at every new base (Stage M)

C1 frozen-record checksum matches

POSTERIOR OBSERVATION (registered as a NOTE, not a criterion change):

a parity-aware abstention (odd_in < 0.5 -> NO-CLAIM) would ALSO have

caught evenodd (inner exactly 0.500 sits on the strict threshold);

recorded as a candidate v8.05 criterion. The pre-registered strict

threshold is NOT changed here.

HONEST SCOPE: Z_28 prefix-sum family only; d-ladder trades

identifiability against supervise cardinality (|d*Z_28| = 28/d);

odd-supervise splits are impossible (position parity); init=shift is a

diagnostic arm (optimum stability, never a formation success); L2 =

SELECTION among FIXED families (no labels, no OOD in the criterion) --

NOT invention (L3+); geometry cells are measurements, never selections.

Usage:

python v8_04_unified.py # full (~2.5 h GPU)

python v8_04_unified.py --stage lab # post-hoc only (~30 s)

python v8_04_unified.py --stage random # L4+D2+D3 (~20 min)

python v8_04_unified.py --stage anchor # G2 (~20 min)

python v8_04_unified.py --stage geometry --do-long # G1+G3 (~45 min)

python v8_04_unified.py --stage multibase # L5+S1 (~1.5 h)

python v8_04_unified.py --resume # continue

"""

from __future__ import annotations

import argparse

import copy

import hashlib

import json

import math

import random

import sys

import time

from dataclasses import asdict, dataclass

from pathlib import Path

from typing import Dict, List, Optional, Sequence, Tuple

import numpy as np

import torch

import torch.nn as nn

import torch.nn.functional as F

sys.argv = [a for a in sys.argv if not a.startswith("-f")]

try:

torch.backends.mha.set_fastpath_enabled(False)

except Exception:

pass

_TF_VEC_ENABLED = True

EDITION = "v8.04"

PARENTS = ("v8.00 L1.5", "v8.01 L2-DIRECT", "v8.02-A lab", "v8.02-B decision",

"v8.03 reachability")

V_DEFAULT = 28

LAMBDA_MDL_DEFAULT = 0.05

ABSTAIN_THRESHOLD = 0.5 # strict <; pre-registered v8.00; DO NOT CHANGE

HELD_OUT_TRANSFER = 0.5

NO_CLAIM = "NO-CLAIM"

FAMILY_ORDER = ("Table", "LowRank", "Generator", "Affine", "ShiftOnly")

FAMILY_PARAMS = {"Table": 21952, "LowRank": 3248, "Generator": 784,

"Affine": 1568, "ShiftOnly": 28}

POOL4 = ("Table", "LowRank", "Generator", "Affine")

POOL5 = FAMILY_ORDER

CRITERIA = ("J", "train_MDL", "params_only", "ID_ONLY")

LAMBDA_SCAN = (0.0, 0.01, 0.05, 0.2, 1.0, 5.0)

# =============================================================================

# 0. Frozen v8.01 record (compact; checksummed) -- fallback for --stage lab

# tuples per family in FAMILY_ORDER: (inner, fidS, id_gain, fidH, formation)

# source: v8.01 L2-DIRECT console, fingerprint d282beecfac21b96

# =============================================================================

_FROZEN_TUPLES = {

("contiguous", 0): [(0.054,1.000,0.9636,0.036,0),(0.036,1.000,0.9634,0.041,0),(1.000,1.000,0.9562,1.000,1),(0.000,0.155,0.0070,0.000,0),(0.000,0.083,0.0025,0.000,0)],

("contiguous", 1): [(0.018,1.000,0.9632,0.046,0),(0.054,1.000,0.9635,0.031,0),(1.000,1.000,0.9557,1.000,1),(0.000,0.158,0.0084,0.000,0),(0.000,0.083,0.0023,0.000,0)],

("contiguous", 2): [(0.036,1.000,0.9632,0.051,0),(0.018,1.000,0.9634,0.036,0),(1.000,1.000,0.9561,1.000,1),(0.000,0.161,0.0057,0.000,0),(0.000,0.083,0.0025,0.000,0)],

("contiguous", 3): [(0.107,1.000,0.9633,0.041,0),(0.036,1.000,0.9633,0.046,0),(1.000,1.000,0.9555,1.000,1),(0.000,0.161,0.0066,0.000,0),(0.000,0.083,0.0017,0.000,0)],

("contiguous", 4): [(0.054,1.000,0.9635,0.031,0),(0.000,1.000,0.9632,0.028,0),(1.000,1.000,0.9561,1.000,1),(0.000,0.146,0.0077,0.000,0),(0.000,0.083,0.0015,0.000,0)],

("contiguous", 5): [(0.036,1.000,0.9635,0.036,0),(0.018,1.000,0.9633,0.026,0),(1.000,1.000,0.9556,1.000,1),(0.000,0.143,0.0079,0.000,0),(0.000,0.083,0.0031,0.000,0)],

("contiguous", 6): [(0.089,1.000,0.9633,0.048,0),(0.054,1.000,0.9633,0.026,0),(1.000,1.000,0.9561,1.000,1),(0.000,0.158,0.0070,0.000,0),(0.000,0.083,0.0020,0.000,0)],

("contiguous", 7): [(0.018,1.000,0.9633,0.018,0),(0.054,1.000,0.9633,0.033,0),(1.000,1.000,0.9558,1.000,1),(0.000,0.158,0.0073,0.000,0),(0.000,0.083,0.0038,0.000,0)],

("evenodd", 0): [(0.036,0.512,0.9601,0.046,0),(0.054,0.500,0.9601,0.033,0),(0.500,0.542,0.0781,0.031,0),(0.000,0.045,0.0340,0.000,0),(0.000,0.083,0.0327,0.000,0)],

("evenodd", 1): [(0.036,0.518,0.9601,0.036,0),(0.018,0.500,0.9601,0.036,0),(0.500,0.542,0.0774,0.066,0),(0.000,0.048,0.0338,0.000,0),(0.000,0.083,0.0330,0.000,0)],

("evenodd", 2): [(0.036,0.533,0.9601,0.048,0),(0.054,0.500,0.9600,0.043,0),(0.500,0.542,0.0785,0.054,0),(0.000,0.048,0.0323,0.000,0),(0.000,0.083,0.0315,0.000,0)],

("evenodd", 3): [(0.036,0.509,0.9601,0.051,0),(0.036,0.500,0.9601,0.043,0),(0.500,0.542,0.0773,0.020,0),(0.000,0.045,0.0316,0.000,0),(0.000,0.083,0.0334,0.000,0)],

("evenodd", 4): [(0.018,0.515,0.9600,0.036,0),(0.036,0.500,0.9600,0.038,0),(0.500,0.542,0.0770,0.031,0),(0.000,0.045,0.0322,0.000,0),(0.000,0.083,0.0331,0.000,0)],

("evenodd", 5): [(0.071,0.518,0.9600,0.036,0),(0.071,0.500,0.9601,0.020,0),(0.500,0.542,0.0762,0.023,0),(0.000,0.048,0.0339,0.000,0),(0.000,0.083,0.0326,0.000,0)],

("evenodd", 6): [(0.071,0.518,0.9600,0.028,0),(0.018,0.500,0.9601,0.043,0),(0.500,0.542,0.0773,0.059,0),(0.000,0.048,0.0336,0.000,0),(0.000,0.083,0.0328,0.000,0)],

("evenodd", 7): [(0.018,0.509,0.9600,0.020,0),(0.036,0.500,0.9601,0.036,0),(0.500,0.542,0.0762,0.020,0),(0.000,0.051,0.0331,0.000,0),(0.000,0.083,0.0326,0.000,0)],

}

FROZEN_CHECKSUM = "dfdf561eeb166595" # sha256[:16] of the canonical dump

def frozen_record_ok() -> bool:

blob = json.dumps({str(k): v for k, v in sorted(_FROZEN_TUPLES.items())},

sort_keys=True)

return hashlib.sha256(blob.encode()).hexdigest()[:16] == FROZEN_CHECKSUM

def _frozen_records() -> List[dict]:

out = []

for (split, seed), rows in sorted(_FROZEN_TUPLES.items()):

fams = {}

for name, (inner, fids, idg, fidh, form) in zip(FAMILY_ORDER, rows):

fams[name] = {"family": name, "operator_params": FAMILY_PARAMS[name],

"inner_completion": float(inner),

"fid_supervise": float(fids), "id_gain": float(idg),

"fidH_true": float(fidh), "formation": int(form)}

out.append({"base_seed": 42, "growth_seed": seed, "split": split,

"families": fams, "source": "frozen_v8.01"})

return out

# =============================================================================

# 1. Selection core (numpy only; the DECISION rule -- v8.02-B, extended)

# =============================================================================

def _f(x, default=float("nan")):

try:

return float(x)

except (TypeError, ValueError):

return default

def score_family(rec: dict, kind: str, lam: float, V: int = V_DEFAULT) -> float:

n = int(rec.get("operator_params",

FAMILY_PARAMS.get(rec.get("family", "?"), 0))) / float(V * V)

if kind == "J":

return _f(rec.get("inner_completion")) - lam * n

if kind == "train_MDL":

return _f(rec.get("fid_supervise")) - lam * n

if kind == "params_only":

return -n

if kind == "ID_ONLY":

return _f(rec.get("id_gain"), -1e9)

raise ValueError(kind)

def rank1(fams: Dict[str, dict], pool: Sequence[str], kind: str, lam: float,

V: int = V_DEFAULT) -> str:

pool = [f for f in pool if f in fams]

return max(pool, key=lambda f: (score_family(fams[f], kind, lam, V),

-int(fams[f]["operator_params"])))

def decide(fams: Dict[str, dict], pool: Sequence[str], kind: str, lam: float,

V: int = V_DEFAULT, thr: float = ABSTAIN_THRESHOLD) -> dict:

"""THE DECISION (v8.02-B core, mainline in v8.04):

decision := NO-CLAIM if max inner < thr (strict) else rank-1.

rank-1 always computed & reported; decision_correct evaluated against

fidH when present (NO-CLAIM is correct iff the would-be pick would NOT

transfer). Historical fields elsewhere remain rank-1-based."""

pool = [f for f in pool if f in fams

and fams[f].get("inner_completion") is not None]

if not pool:

return {"rank1": None, "decision": NO_CLAIM, "abstain": True,

"decision_is_noclaim": True, "decision_correct": False,

"rank1_transfers": False, "best_inner": float("nan"),

"margin": float("nan"), "scores": {},

"selected_fidH": float("nan"), "rank1_fidH": float("nan"),

"criterion": kind, "lambda_mdl": lam, "pool": []}

best_inner = max(_f(fams[f].get("inner_completion")) for f in pool)

r1 = rank1(fams, pool, kind, lam, V)

abstain = bool(best_inner < thr)

decision = NO_CLAIM if abstain else r1

r1_fidh = _f(fams[r1].get("fidH_true"), 0.0)

r1_tr = bool(r1_fidh > HELD_OUT_TRANSFER)

if decision == NO_CLAIM:

dc, d_fidh = (not r1_tr), float("nan")

else:

dc, d_fidh = r1_tr, r1_fidh

scores = {f: score_family(fams[f], kind, lam, V) for f in pool}

ordered = sorted(pool, key=lambda f: (scores[f],

-int(fams[f]["operator_params"])),

reverse=True)

margin = (scores[ordered[0]] - scores[ordered[1]]

if len(ordered) >= 2 else float("nan"))

return {"rank1": r1, "decision": decision, "abstain": abstain,

"decision_is_noclaim": decision == NO_CLAIM,

"decision_correct": bool(dc), "best_inner": best_inner,

"margin": float(margin), "scores": scores,

"selected_fidH": float(d_fidh), "rank1_fidH": r1_fidh,

"rank1_transfers": r1_tr, "criterion": kind, "lambda_mdl": lam,

"pool": list(pool)}

# =============================================================================

# 2. Test registry (multiplicity disclosure -- the review's final point)

# =============================================================================

_TEST_REGISTRY: List[dict] = []

def _reg(pid: str, ok: bool, prov: str, detail: str = "") -> bool:

_TEST_REGISTRY.append({"id": pid, "pass": bool(ok), "prov": prov,

"detail": detail})

return bool(ok)

def check(pid, text, ok, prov="v8.04", detail=""):

print(f" {pid:<6} {text}")

print(f" -> {'PASS' if ok else 'FAIL'}" + (f" {detail}" if detail else ""))

return _reg(pid, ok, prov, detail)

def print_test_count():

n = len(_TEST_REGISTRY)

carried = sum(1 for t in _TEST_REGISTRY if t["prov"] != "v8.04")

new = n - carried

fails = [t["id"] for t in _TEST_REGISTRY if not t["pass"]]

print("\n" + "=" * 100)

print("TEST REGISTRY (multiplicity disclosure)")

print("=" * 100)

print(f" total registered checks evaluated: {n} "

f"(carried {carried} from {', '.join(PARENTS[:3])}...; new v8.04: {new})")

print(f" failures: {fails if fails else 'none'}")

print(" MULTIPLICITY: with N pre-registered checks, report this total in")

print(" any writeup; do not present per-check PASS rates without the count.")

return n, fails

# =============================================================================

# 3. Splits (FIX-1: canonical random; v8.03 ladder retained)

# =============================================================================

SPLIT_NAMES = ("contiguous", "random", "random_anchor", "evenodd", "gcd4", "gcd7")

def split_addends(split: str, V: int = V_DEFAULT

) -> Tuple[List[int], List[int], List[int], List[int]]:

"""(train, hold, inner, supervise). inner(2) reserved from every loss.

[FIX-1] random = THE canonical v8.00 split: default_rng(1234) + 0-forcing

(reproduces the v8.00 log train [0,3,5,6,7,13,...] / hold [1,2,4,8,...];

sandbox-verified). v8.02-B's RandomState(1234) variant is a DIFFERENT

split and is never used here.

d = gcd(supervise): 1 (contig/random/anchor: k unique) | 2 evenodd |

4 gcd4 | 7 gcd7. random_anchor = random with 27<->1 (C^-1 out, C in;

unit count 4 and d=1 invariant; min supervised power 5->1)."""

if split == "contiguous":

n = V // 2

train, hold = list(range(n)), list(range(n, V))

inner = [n - 2, n - 1]

elif split == "evenodd":

train = [a for a in range(V) if a % 2 == 0]

hold = [a for a in range(V) if a % 2 == 1]

inner = [V - 4, V - 2]

elif split == "random":

rng = np.random.default_rng(1234)

tr = sorted(int(x) for x in rng.choice(V, size=V // 2, replace=False))

if 0 not in tr:

tr = sorted((set(tr) - {tr[0]}) | {0})

hold = [a for a in range(V) if a not in set(tr)]

rng2 = np.random.default_rng(4321)

cand = [a for a in tr if a != 0]

pick = rng2.choice(len(cand), size=2, replace=False)

inner = sorted(cand[int(i)] for i in pick)

train = tr

elif split == "random_anchor":

rng = np.random.default_rng(1234)

tr = sorted(int(x) for x in rng.choice(V, size=V // 2, replace=False))

if 0 not in tr:

tr = sorted((set(tr) - {tr[0]}) | {0})

rng2 = np.random.default_rng(4321)

cand = [a for a in tr if a != 0]

pick = rng2.choice(len(cand), size=2, replace=False)

inner = sorted(cand[int(i)] for i in pick)

assert 27 in tr and 1 not in tr, "anchor swap preconditions"

train = sorted((set(tr) - {27}) | {1})

hold = [a for a in range(V) if a not in set(train)]

elif split == "gcd4":

train = [a for a in range(V) if a % 4 == 0]

hold = [a for a in range(V) if a not in set(train)]

inner = [20, 24]

elif split == "gcd7":

train = [0, 7, 14, 21]

hold = [a for a in range(V) if a not in set(train)]

inner = [14, 21]

else:

raise ValueError(f"unknown split {split!r}; available {SPLIT_NAMES}")

supervise = [a for a in train if a not in set(inner)]

assert 0 in supervise and set(inner) <= set(train) and not (set(train) & set(hold))

return train, hold, inner, supervise

def split_units_report(kind: str, V: int = V_DEFAULT) -> None:

train, hold, inner, supervise = split_addends(kind, V)

d = math.gcd(*supervise) if supervise else 0

units = [a for a in supervise if a > 0 and math.gcd(a, V) == 1]

print(f" split={kind:14s} train={train[:7]}... hold={hold[:4]}... "

f"d={d} units={units} inner={inner}")

# =============================================================================

# 4. Torch stack (config/fingerprint identical -> reuses v8.01 artifacts)

# =============================================================================

def set_seed(seed: int) -> None:

random.seed(seed)

np.random.seed(seed)

torch.manual_seed(seed)

if torch.cuda.is_available():

torch.cuda.manual_seed_all(seed)

def stable_json(obj) -> str:

return json.dumps(obj, sort_keys=True, ensure_ascii=True, separators=(",", ":"))

_PHASE_A_FIELDS = (

"vocab_size", "seq_len", "d_model", "nhead", "num_layers", "d_ff", "dropout",

"phase_a_max_steps", "phase_a_target_acc", "phase_a_eval_every",

"batch_size", "lr_base", "weight_decay", "base_mode",

)

def config_fingerprint(cfg: "Config") -> str:

payload = {k: asdict(cfg)[k] for k in _PHASE_A_FIELDS}

return hashlib.sha256(stable_json(payload).encode("utf-8")).hexdigest()[:16]

@dataclass

class Config:

vocab_size: int = 28

seq_len: int = 32

d_model: int = 128

nhead: int = 4

num_layers: int = 4

d_ff: int = 256

dropout: float = 0.0

phase_a_max_steps: int = 8000

phase_a_target_acc: float = 0.90

phase_a_eval_every: int = 200

base_mode: str = "a"

phase_ab_warm_steps: int = 400

phase_ab_lr_scale: float = 0.2

phase_ab_ceb_scale: float = 0.3

growth_steps: int = 2500

batch_size: int = 64

eval_batch_size: int = 256

lr_base: float = 2e-3

lr_growth: float = 3e-3

weight_decay: float = 0.0

growth_layer: int = 3

state_alpha: float = 0.10

retention_lambda: float = 0.3

retention_kl_temperature: float = 1.0

step_lambda: float = 1.0

group_lambda: float = 1.0

cycle_lambda: float = 0.1

cycle_every: int = 10

tf_anneal_frac: float = 0.7

min_capability_gain: float = 0.02

max_a_drop: float = 0.05

causal_drop: float = 0.01

identity_fid: float = 0.90

identity_unroll: float = 0.50

heldout_identity: float = 0.50

composition_identity: float = 0.50

recovery_identity: float = 0.50

leak_heldout_max: float = 0.08

strict_capability_floor: float = 0.80

strict_heldout_identity: float = 0.90

suffix_start: int = 2

suffix4_start: int = 4

state_noise_eps: float = 0.25

state_lag_k: int = 4

tshuf_seeds: Tuple[int, ...] = (17, 18, 19)

group_probe_pairs: int = 256

composition_trials: int = 4

eval_batches: int = 8

canary_batches: int = 4

ckpt_eval_batches: int = 2

checkpoints: Tuple[int, ...] = (1, 200, 800, 2500)

traj_every: int = 250

lowrank_r: int = 4

lambda_mdl: float = 0.05

l2_cycle_lambda: float = 0.0

l2_group_lambda: float = 0.0

device: str = "cuda" if torch.cuda.is_available() else "cpu"

output_dir: str = "./smart_density_v8_l2"

def addend_from_z(z: torch.Tensor, V: int) -> torch.Tensor:

T = z.shape[1]

t1 = torch.arange(1, T + 1, device=z.device, dtype=z.dtype).unsqueeze(0)

return ((z * t1) % V).long()

def apply_linear_map(M: torch.Tensor, s: torch.Tensor) -> torch.Tensor:

return torch.matmul(M, s.unsqueeze(-1)).squeeze(-1)

def cyclic_shift(s: torch.Tensor, addend: torch.Tensor, V: int) -> torch.Tensor:

idx = (torch.arange(V, device=s.device) - addend.unsqueeze(-1)) % V

return torch.gather(s, -1, idx)

def true_permutation_table(V: int, device, scale: float = 8.0) -> torch.Tensor:

tab = torch.full((V, V, V), -scale, device=device)

inn = torch.arange(V, device=device)

add = torch.arange(V, device=device)

out = (inn.unsqueeze(0) + add.unsqueeze(1)) % V

tab[add.unsqueeze(1).expand(V, V), out, inn.unsqueeze(0).expand(V, V)] = scale

return tab

def true_shift1_logits(V: int, device, scale: float = 8.0) -> torch.Tensor:

logits = torch.full((V, V), -scale, device=device)

inn = torch.arange(V, device=device)

logits[(inn + 1) % V, inn] = scale

return logits

def construct_true_shift_batch(addend_batch: torch.Tensor, V: int) -> torch.Tensor:

n = addend_batch.shape[0]

device = addend_batch.device

M = torch.zeros((n, V, V), device=device)

inn = torch.arange(V, device=device)

out = (inn.unsqueeze(0) + addend_batch.unsqueeze(1)) % V

b_idx = torch.arange(n, device=device).unsqueeze(1).expand(n, V)

M[b_idx, out, inn.unsqueeze(0).expand(n, V)] = 1.0

return M

class PrefixDataset:

def __init__(self, cfg: Config, seed: int):

self.cfg = cfg

self.seed = seed

self._valid_cache: Dict[Tuple[int, ...], List[torch.Tensor]] = {}

def _device(self):

return torch.device(self.cfg.device)

def sample(self, batch_size: int, generator=None):

V, T = self.cfg.vocab_size, self.cfg.seq_len

z = torch.randint(0, V, (batch_size, T), generator=generator,

device=self._device())

A = torch.cumsum(z, dim=1) % V

idx = torch.arange(1, T + 1, device=z.device, dtype=z.dtype).unsqueeze(0)

B = torch.cumsum(z * idx, dim=1) % V

return z, A.long(), B.long()

def _valid_z_by_t(self, allowed_addends: Sequence[int]) -> List[torch.Tensor]:

key = tuple(sorted(int(a) for a in allowed_addends))

if key in self._valid_cache:

return self._valid_cache[key]

V, T = self.cfg.vocab_size, self.cfg.seq_len

device = self._device()

allowed = torch.zeros(V, device=device, dtype=torch.bool)

allowed[torch.tensor(list(key), device=device, dtype=torch.long)] = True

all_z = torch.arange(V, device=device, dtype=torch.long)

out = []

for t in range(T):

valid = all_z[allowed[((t + 1) * all_z) % V]]

if valid.numel() == 0:

raise ValueError(f"no valid z at t={t} for {key}")

out.append(valid)

self._valid_cache[key] = out

return out

def sample_conditioned(self, batch_size, allowed_addends, generator=None):

V, T = self.cfg.vocab_size, self.cfg.seq_len

device = self._device()

valids = self._valid_z_by_t(allowed_addends)

z = torch.empty((batch_size, T), device=device, dtype=torch.long)

for t in range(T):

valid = valids[t]

pick = torch.randint(valid.numel(), (batch_size,), generator=generator,

device=device)

z[:, t] = valid[pick]

idx = torch.arange(1, T + 1, device=device, dtype=torch.long)

A = torch.cumsum(z, dim=1) % V

B = torch.cumsum(z * idx.unsqueeze(0), dim=1) % V

return z, A.long(), B.long()

def fixed_batches(self, n_batches, batch_size, offset=100000):

g = torch.Generator(device=self._device())

g.manual_seed(self.seed * 1_000_003 + offset)

return [(z.detach(), A.detach(), B.detach())

for z, A, B in (self.sample(batch_size, g) for _ in range(n_batches))]

def fixed_batches_conditioned(self, n_batches, batch_size, allowed, offset):

g = torch.Generator(device=self._device())

g.manual_seed(self.seed * 1_000_003 + offset)

return [(z.detach(), A.detach(), B.detach())

for z, A, B in (self.sample_conditioned(batch_size, allowed, g)

for _ in range(n_batches))]

class BHeadBridge(nn.Module):

def __init__(self, base_head_b: nn.Linear, train_adapter: bool = True):

super().__init__()

self.register_buffer("base_weight", base_head_b.weight.detach().clone())

if base_head_b.bias is None:

self.register_buffer("base_bias", None)

else:

self.register_buffer("base_bias", base_head_b.bias.detach().clone())

self.adapter = nn.Linear(base_head_b.in_features, base_head_b.out_features)

nn.init.zeros_(self.adapter.weight)

nn.init.zeros_(self.adapter.bias)

for p in self.adapter.parameters():

p.requires_grad_(train_adapter)

def forward(self, h):

return F.linear(h, self.base_weight, self.base_bias) + self.adapter(h)

class TinyCausalTransformer(nn.Module):

def __init__(self, cfg: Config):

super().__init__()

self.cfg = cfg

self.tok_emb = nn.Embedding(cfg.vocab_size, cfg.d_model)

self.pos_emb = nn.Parameter(torch.randn(1, cfg.seq_len, cfg.d_model) * 0.02)

self.layers = nn.ModuleList([

nn.TransformerEncoderLayer(

d_model=cfg.d_model, nhead=cfg.nhead, dim_feedforward=cfg.d_ff,

dropout=cfg.dropout, activation="gelu", batch_first=True,

norm_first=True) for _ in range(cfg.num_layers)])

self.final_norm = nn.LayerNorm(cfg.d_model)

self.head_a = nn.Linear(cfg.d_model, cfg.vocab_size)

self.head_b = nn.Linear(cfg.d_model, cfg.vocab_size)

mask = torch.full((cfg.seq_len, cfg.seq_len), float("-inf"))

self.register_buffer("causal_mask", torch.triu(mask, 1), persistent=False)

def encode(self, z, adapters=None, B=None, **side_kw):

h = self.tok_emb(z) + self.pos_emb[:, : z.shape[1], :]

aux = None

for i, layer in enumerate(self.layers):

h = layer(h, src_mask=self.causal_mask[: z.shape[1], : z.shape[1]])

if adapters is not None and i == adapters.target_layer \

and adapters.sidecar is not None:

h, aux = adapters.sidecar(h, z, B=B, **side_kw)

return self.final_norm(h), aux

def forward(self, z, adapters=None, B=None, **side_kw):

h, aux = self.encode(z, adapters=adapters, B=B, **side_kw)

return self.head_a(h), self.head_b(h), h, aux

class Injector(nn.Module):

def __init__(self, d_model, V, alpha):

super().__init__()

self.alpha = alpha

self.P = nn.Parameter(torch.randn(d_model, V) * 0.02)

self.gate = nn.Parameter(torch.tensor(-2.0))

def forward(self, h, S):

g = torch.sigmoid(self.gate).reshape(1, 1, 1)

return h + self.alpha * g * torch.matmul(S, self.P.t())

class BaseSidecar(nn.Module):

def learned_update(self) -> bool:

return True

def _zero_state(n, V, device, dtype):

s = torch.zeros(n, V, device=device, dtype=dtype)

s[:, 0] = 1.0

return s

def _tf_prev(B: torch.Tensor, V: int, dtype) -> torch.Tensor:

n, T = B.shape

prev_idx = torch.cat([torch.zeros(n, 1, dtype=torch.long, device=B.device),

B[:, :-1]], dim=1)

return F.one_hot(prev_idx, V).to(dtype)

def _run_tf_batched(self, h, z, B, a, state_noise_eps, step_fn, frozen_hard=False):

"""[FIX-3 path] explicit frozen branch (v8.02-B's refactor, now VERIFIED:

sandbox equivalence vs the softmax(log(.)) roundtrip = 2.4e-07)."""

add_all = a.long() if a is not None else addend_from_z(z, self.V)

prev = _tf_prev(B, self.V, h.dtype)

if frozen_hard:

S = cyclic_shift(prev, add_all, self.V)

Lgt = torch.log(S.clamp_min(1e-8))

else:

Lgt = step_fn(prev, add_all)

S = torch.softmax(Lgt, dim=-1)

if state_noise_eps > 0:

noise = torch.rand_like(S)

S = (1.0 - state_noise_eps) * S + state_noise_eps * noise

S = S / S.sum(-1, keepdim=True).clamp_min(1e-8)

h = self.inject(h, S)

return h, {"state": S, "logits": Lgt, "prev": prev, "addend": add_all}

def _run_loop(self, h, z, B, a, teacher_force, tf_prob, reset, no_recurrence,

inject_swap, inject_time_shuffle, tshuf_seed, internal_swap,

state_lag, state_noise_eps, step_fn, frozen_hard=False):

n, T, _ = h.shape

dtype, V = h.dtype, self.V

add_all = a.long() if a is not None else addend_from_z(z, V)

s = _zero_state(n, V, h.device, dtype)

perm_b = None

if internal_swap and n > 1:

gp = torch.Generator(device=h.device)

gp.manual_seed(23)

perm_b = torch.randperm(n, generator=gp, device=h.device)

lag = int(state_lag or 0)

hist: List[torch.Tensor] = []

logits_t, states, prevs = [], [], []

for t in range(T):

if reset:

s = _zero_state(n, V, h.device, dtype)

if teacher_force:

s = _zero_state(n, V, h.device, dtype) if t == 0 \

else F.one_hot(B[:, t - 1], V).to(dtype)

elif tf_prob > 0.0 and self.training and B is not None and t > 0:

true_prev = F.one_hot(B[:, t - 1], V).to(dtype)

mask = (torch.rand(n, 1, device=h.device) < tf_prob).to(dtype)

s = mask * true_prev + (1.0 - mask) * s

if perm_b is not None and t > 0 and not teacher_force:

s = s[perm_b]

if lag > 0 and not teacher_force:

s = hist[t - lag] if t >= lag else _zero_state(n, V, h.device, dtype)

prevs.append(s)

add_t = add_all[:, t]

if frozen_hard and not teacher_force and tf_prob <= 0.0:

nxt = cyclic_shift(s, add_t, V)

logits = torch.log(nxt.clamp_min(1e-8))

s = nxt

else:

src = _zero_state(n, V, h.device, dtype) if no_recurrence else s

logits = step_fn(src, add_t)

s = torch.softmax(logits, dim=-1)

logits_t.append(logits)

states.append(s)

hist.append(s)

S = torch.stack(states, 1)

Prev = torch.stack(prevs, 1)

if inject_swap and n > 1:

gp = torch.Generator(device=h.device)

gp.manual_seed(23)

S = S[torch.randperm(n, generator=gp, device=h.device)]

if inject_time_shuffle:

rng = torch.Generator(device=h.device)

rng.manual_seed(tshuf_seed)

for b_idx in range(n):

p = torch.randperm(T, generator=rng, device=h.device)

S[b_idx] = S[b_idx, p]

if state_noise_eps > 0:

noise = torch.rand_like(S)

S = (1.0 - state_noise_eps) * S + state_noise_eps * noise

S = S / S.sum(-1, keepdim=True).clamp_min(1e-8)

Lgt = torch.stack(logits_t, 1)

h = self.inject(h, S)

return h, {"state": S, "logits": Lgt, "prev": Prev, "addend": add_all}

_FWD = dict(teacher_force=False, tf_prob=0.0, reset=False, no_recurrence=False,

inject_swap=False, inject_time_shuffle=False, tshuf_seed=17,

internal_swap=False, state_lag=0, state_noise_eps=0.0)

def _dispatch_forward(self, h, z, B, a, kw, step_fn, frozen_hard=False):

p = {**_FWD, **kw}

probes = (p["reset"] or p["no_recurrence"] or p["inject_swap"]

or p["inject_time_shuffle"] or p["internal_swap"]

or bool(p["state_lag"]) or p["tf_prob"] > 0.0)

if _TF_VEC_ENABLED and p["teacher_force"] and B is not None and not probes:

return _run_tf_batched(self, h, z, B, a, p["state_noise_eps"], step_fn,

frozen_hard=frozen_hard)

return _run_loop(self, h, z, B, a, p["teacher_force"], p["tf_prob"], p["reset"],

p["no_recurrence"], p["inject_swap"], p["inject_time_shuffle"],

p["tshuf_seed"], p["internal_swap"], p["state_lag"],

p["state_noise_eps"], step_fn, frozen_hard=frozen_hard)

class AddTableSidecar(BaseSidecar):

"""[FIX-4] 'true' + scramble = DYNAMIC canary (v8.00 semantics restored):

noise-scrambled hold rows on a LEARNABLE table. Sandbox-verified:

hold-row gradients are EXACTLY zero under the blind protocol -- the

canary is alive and silent, and responds only to a protocol breach."""

def __init__(self, d_model, V, T, alpha, mode="learn",

scramble_heldout: Optional[List[int]] = None):

super().__init__()

self.V = V

self.mode = mode

self.inject = Injector(d_model, V, alpha)

if mode == "frozen":

self.table = None

elif mode == "true":

tab = true_permutation_table(V, torch.device("cpu"), 8.0)

if scramble_heldout:

for a in scramble_heldout:

tab[int(a)] = 0.05 * torch.randn(V, V)

self.table = nn.Parameter(tab)

else:

self.table = nn.Parameter(0.05 * torch.randn(V, V, V))

def step_logits(self, s, addend):

if self.table is None:

return torch.log(cyclic_shift(s, addend, self.V).clamp_min(1e-8))

return apply_linear_map(self.table[addend], s)

def forward(self, h, z, B=None, a=None, **kw):

return _dispatch_forward(self, h, z, B, a, kw, self.step_logits,

frozen_hard=(self.table is None))

def learned_update(self) -> bool:

return self.mode != "frozen"

class GeneratorSidecar(BaseSidecar):

def __init__(self, d_model, V, alpha, init="id"):

super().__init__()

self.V = V

self.inject = Injector(d_model, V, alpha)

if init == "shift":

logits = true_shift1_logits(V, torch.device("cpu"), 8.0)

elif init == "id":

logits = 1.5 * torch.eye(V) + 0.05 * torch.randn(V, V)

else:

logits = 0.05 * torch.randn(V, V)

self.C_logits = nn.Parameter(logits)

self._P_cache: Optional[torch.Tensor] = None

def stochastic_C(self):

return torch.softmax(self.C_logits, dim=0)

def hard_C(self) -> torch.Tensor:

C = self.stochastic_C()

return F.one_hot(C.argmax(dim=0), self.V).float().t()

def all_powers(self) -> torch.Tensor:

C = self.stochastic_C()

I = torch.eye(self.V, device=C.device, dtype=C.dtype)

tabs = [I]

cur = I

for _ in range(self.V - 1):

cur = cur @ C

tabs.append(cur)

return torch.stack(tabs, 0)

def step_logits(self, s, addend):

P = self._P_cache if self._P_cache is not None else self.all_powers()

return torch.log(apply_linear_map(P[addend.long()], s).clamp_min(1e-8))

def cyclic_loss(self):

M = self.stochastic_C()

Mv = torch.linalg.matrix_power(M, self.V)

I = torch.eye(self.V, device=M.device, dtype=M.dtype)

return ((Mv - I) ** 2).mean()

def forward(self, h, z, B=None, a=None, **kw):

self._P_cache = self.all_powers()

try:

return _dispatch_forward(self, h, z, B, a, kw, self.step_logits)

finally:

self._P_cache = None

class LowRankSidecar(BaseSidecar):

def __init__(self, d_model, V, r, alpha):

super().__init__()

self.V, self.r = V, r

self.inject = Injector(d_model, V, alpha)

self.U = nn.Parameter(0.05 * torch.randn(V, V, r))

self.W = nn.Parameter(0.05 * torch.randn(r, V))

self._T: Optional[torch.Tensor] = None

def full_logits(self) -> torch.Tensor:

return torch.einsum("aor,ri->aoi", self.U, self.W)

def step_logits(self, s, addend):

T = self._T if self._T is not None else self.full_logits()

return apply_linear_map(T[addend], s)

def forward(self, h, z, B=None, a=None, **kw):

self._T = self.full_logits()

try:

return _dispatch_forward(self, h, z, B, a, kw, self.step_logits)

finally:

self._T = None

class AffineRNN(BaseSidecar):

def __init__(self, d_model, V, T, alpha):

super().__init__()

self.V = V

self.W = nn.Parameter(torch.eye(V) * 0.4 + 0.02 * torch.randn(V, V))

self.U = nn.Parameter(0.02 * torch.randn(V, V))

self.inject = Injector(d_model, V, alpha)

def step_logits(self, s, addend):

aoh = F.one_hot(addend, self.V).to(s.dtype)

return s.matmul(self.W.t()) + aoh.matmul(self.U.t())

def forward(self, h, z, B=None, a=None, **kw):

return _dispatch_forward(self, h, z, B, a, kw, self.step_logits)

class ShiftOnlySidecar(BaseSidecar):

def __init__(self, d_model, V, alpha):

super().__init__()

self.V = V

self.inject = Injector(d_model, V, alpha)

self.k_logits = nn.Parameter(torch.zeros(V))

shifts = torch.zeros(V, V, V)

inn = torch.arange(V)

for k in range(V):

shifts[k, (inn + k) % V, inn] = 1.0

self.register_buffer("shifts", shifts, persistent=False)

self._M: Optional[torch.Tensor] = None

def soft_M(self) -> torch.Tensor:

pi = torch.softmax(self.k_logits, dim=0)

return torch.einsum("k,koi->oi", pi, self.shifts)

def step_logits(self, s, addend):

M = self._M if self._M is not None else self.soft_M()

return torch.log(apply_linear_map(M, s).clamp_min(1e-8))

def forward(self, h, z, B=None, a=None, **kw):

self._M = self.soft_M()

try:

return _dispatch_forward(self, h, z, B, a, kw, self.step_logits)

finally:

self._M = None

@torch.no_grad()

def verify_tf_vectorization(cfg: Config) -> bool:

"""[FIX-3] MANDATORY before any training (7 configs, incl. the frozen

path v8.02-B refactored). The project has a real vectorization-bug

history; this is the seatbelt."""

global _TF_VEC_ENABLED

V, dev = cfg.vocab_size, torch.device(cfg.device)

g = torch.Generator(device=dev)

g.manual_seed(12345)

z, _, B = PrefixDataset(cfg, 42).sample(4, g)

cases = [

("AddTable.learn", AddTableSidecar(cfg.d_model, V, cfg.seq_len, 0.1, "learn")),

("AddTable.true", AddTableSidecar(cfg.d_model, V, cfg.seq_len, 0.1, "true")),

("AddTable.frozen", AddTableSidecar(cfg.d_model, V, cfg.seq_len, 0.1, "frozen")),

("Generator", GeneratorSidecar(cfg.d_model, V, 0.1, "id")),

("LowRank.r%d" % cfg.lowrank_r, LowRankSidecar(cfg.d_model, V, cfg.lowrank_r, 0.1)),

("Affine", AffineRNN(cfg.d_model, V, cfg.seq_len, 0.1)),

("ShiftOnly", ShiftOnlySidecar(cfg.d_model, V, 0.1)),

]

ok_all = True

for name, side in cases:

side = side.to(dev).eval()

h = torch.randn(4, cfg.seq_len, cfg.d_model, device=dev) * 0.5

_TF_VEC_ENABLED = True

_, a_fast = side(h.clone(), z, B=B, teacher_force=True)

_TF_VEC_ENABLED = False

_, a_loop = side(h.clone(), z, B=B, teacher_force=True)

_TF_VEC_ENABLED = True

d = (a_fast["logits"] - a_loop["logits"]).abs().max().item()

ok = d < 1e-4

ok_all &= ok

print(f" verify[{name:15s}] max|dlogits|={d:.2e} -> {'OK' if ok else 'FAIL'}")

assert ok, f"TF vectorization mismatch for {name}"

return ok_all

@dataclass

class ArmSpec:

sidecar_kind: str

recipe: str = "tf"

protocol: str = "blind"

step_lambda: float = 1.0

group_lambda: float = 0.0

bridge_mode: str = "joint"

is_calibration: bool = False

gen_init: str = "id"

scramble_heldout: bool = False

L2_FAMILY_KIND = {"Table": "perm_learn", "LowRank": "lowrank",

"Generator": "generator", "Affine": "affine",

"ShiftOnly": "shift_only", "Sentinel": "perm_true_scr"}

def operator_param_count(sidecar) -> int:

if isinstance(sidecar, AddTableSidecar):

return int(sidecar.table.numel()) if sidecar.table is not None else 0

if isinstance(sidecar, LowRankSidecar):

return int(sidecar.U.numel() + sidecar.W.numel())

if isinstance(sidecar, GeneratorSidecar):

return int(sidecar.C_logits.numel())

if isinstance(sidecar, AffineRNN):

return int(sidecar.W.numel() + sidecar.U.numel())

if isinstance(sidecar, ShiftOnlySidecar):

return int(sidecar.k_logits.numel())

return 0

class GrowthStack(nn.Module):

def __init__(self, cfg: Config, spec: ArmSpec, scramble_rows=None):

super().__init__()

self.target_layer = cfg.growth_layer

self.spec = spec

V, T, D, a = cfg.vocab_size, cfg.seq_len, cfg.d_model, cfg.state_alpha

k = spec.sidecar_kind

if k == "none":

self.sidecar = None

elif k == "perm_true_scr":

self.sidecar = AddTableSidecar(D, V, T, a, "true",

scramble_heldout=scramble_rows)

elif k == "perm_learn":

self.sidecar = AddTableSidecar(D, V, T, a, "learn")

elif k == "generator":

self.sidecar = GeneratorSidecar(D, V, a, init=spec.gen_init)

elif k == "lowrank":

self.sidecar = LowRankSidecar(D, V, cfg.lowrank_r, a)

elif k == "affine":

self.sidecar = AffineRNN(D, V, T, a)

elif k == "shift_only":

self.sidecar = ShiftOnlySidecar(D, V, a)

else:

raise ValueError(k)

self.b_bridge = None

def learned_update(self) -> bool:

return self.sidecar is not None and self.sidecar.learned_update()

def clone_frozen_base(base):

m = copy.deepcopy(base)

for p in m.parameters():

p.requires_grad_(False)

return m

def attach_growth(model, stack: GrowthStack):

bridge = BHeadBridge(model.head_b, train_adapter=True)

model.head_b = bridge

stack.b_bridge = bridge

def train_base(cfg, seed, dataset, ckpt_path: Path):

fp = config_fingerprint(cfg)

if ckpt_path.exists():

blob = torch.load(ckpt_path, map_location=cfg.device, weights_only=False)

if blob.get("fingerprint") == fp:

model = TinyCausalTransformer(cfg).to(cfg.device)

model.load_state_dict(blob["state"])

print(f" loaded base {ckpt_path} A_acc={blob.get('A_acc', float('nan')):.4f}")

return model

ckpt_path = ckpt_path.with_name(ckpt_path.stem + f"_fp{fp[:8]}.pt")

print(f" [HARDEN] fingerprint mismatch -> fresh base to {ckpt_path.name} "

f"(existing file NOT clobbered)")

set_seed(seed)

model = TinyCausalTransformer(cfg).to(cfg.device)

model.train()

opt = torch.optim.AdamW(model.parameters(), lr=cfg.lr_base,

weight_decay=cfg.weight_decay)

g = torch.Generator(device=cfg.device)

g.manual_seed(seed * 1009 + 7)

best_acc, best_state, best_step = -1.0, None, 0

hold = dataset.fixed_batches(2, cfg.eval_batch_size, offset=999)

V = cfg.vocab_size

for step in range(1, cfg.phase_a_max_steps + 1):

z, A, _ = dataset.sample(cfg.batch_size, g)

la, _, _, _ = model(z)

loss = F.cross_entropy(la.reshape(-1, V), A.reshape(-1))

opt.zero_grad(set_to_none=True)

loss.backward()

torch.nn.utils.clip_grad_norm_(model.parameters(), 1.0)

opt.step()

if step % cfg.phase_a_eval_every == 0 or step == cfg.phase_a_max_steps:

model.eval()

m = eval_model(model, hold, cfg)

print(f" Phase-A step {step}: A_acc={m['A_acc']:.4f}")

if m["A_acc"] > best_acc:

best_acc, best_step = m["A_acc"], step

best_state = copy.deepcopy(model.state_dict())

model.train()

if m["A_acc"] >= cfg.phase_a_target_acc:

print(f" Phase-A hit target at step {step}")

break

if best_state is not None:

model.load_state_dict(best_state)

if cfg.base_mode == "ab":

for pg in opt.param_groups:

pg["lr"] = cfg.lr_base * cfg.phase_ab_lr_scale

for _s in range(1, cfg.phase_ab_warm_steps + 1):

z, A, B = dataset.sample(cfg.batch_size, g)

la, lb, _, _ = model(z)

loss = (F.cross_entropy(la.reshape(-1, V), A.reshape(-1))

+ cfg.phase_ab_ceb_scale

* F.cross_entropy(lb.reshape(-1, V), B.reshape(-1)))

opt.zero_grad(set_to_none=True)

loss.backward()

torch.nn.utils.clip_grad_norm_(model.parameters(), 1.0)

opt.step()

ckpt_path.parent.mkdir(parents=True, exist_ok=True)

torch.save({"state": model.state_dict(), "A_acc": best_acc, "seed": seed,

"fingerprint": fp, "config": asdict(cfg)}, ckpt_path)

print(f" saved {ckpt_path} best_step={best_step}")

return model

def _mean(xs):

return float(np.mean(xs)) if xs else float("nan")

@torch.no_grad()

def eval_model(model, batches, cfg, adapters=None, **side_kw):

model.eval()

V = cfg.vocab_size

acc_a, acc_b, pos_b, trans = [], [], [], []

for z, A, B in batches:

tf = bool(side_kw.get("teacher_force", False)) or (side_kw.get("tf_prob", 0.0) > 0)

la, lb, _, aux = model(z, adapters=adapters, B=(B if tf else None), **side_kw)

pa, pb = la.argmax(-1), lb.argmax(-1)

acc_a.append((pa == A).float().mean().item())

acc_b.append((pb == B).float().mean().item())

pos_b.append((pb == B).float().mean(0).cpu().numpy())

if aux is not None and aux.get("logits") is not None:

pred = aux["logits"].argmax(-1)

trans.append((pred == B).float().mean().item())

pos = np.mean(np.stack(pos_b), axis=0) if pos_b else np.zeros(cfg.seq_len)

return {"A_acc": _mean(acc_a), "B_acc": _mean(acc_b),

"B_suffix2": float(np.mean(pos[cfg.suffix_start:])),

"trans_acc": _mean(trans)}

def batched_transition_matrix(sidecar, addend, V, device):

n = addend.shape[0]

eye = torch.eye(V, device=device)

eye_rep = eye.unsqueeze(0).expand(n, V, V).reshape(n * V, V)

add_rep = addend.unsqueeze(1).expand(n, V).reshape(n * V)

logits = sidecar.step_logits(eye_rep, add_rep)

probs = torch.softmax(logits, dim=-1)

return probs.view(n, V, V).transpose(1, 2)

@torch.no_grad()

def reconstruct_effective_table(sidecar, V, device):

if sidecar is None or not hasattr(sidecar, "step_logits"):

return None

if isinstance(sidecar, GeneratorSidecar):

return sidecar.all_powers().detach()

return batched_transition_matrix(sidecar, torch.arange(V, device=device), V, device)

def table_fidelity(sidecar, V, device, addends=None) -> float:

tab = reconstruct_effective_table(sidecar, V, device)

if tab is None:

return float("nan")

pred = tab.argmax(dim=1)

inn = torch.arange(V, device=tab.device)

rows = list(range(V)) if addends is None else [int(a) for a in addends]

idx = torch.tensor(rows, device=tab.device, dtype=torch.long)

target = (inn.unsqueeze(0) + idx.unsqueeze(1)) % V

return float((pred[idx] == target).float().mean().item())

def table_fidelity_by_input_parity(sidecar, V, device, addends) -> dict:

"""[D1/D2 instrument] row fidelity on EVEN vs ODD INPUTS for the given

rows -- separates the O-axis (visited coset, learned) from the

distribution axis (unvisited inputs, unknown)."""

tab = reconstruct_effective_table(sidecar, V, device)

if tab is None:

return {"fid_even_in": float("nan"), "fid_odd_in": float("nan")}

pred = tab.argmax(dim=1)

inn = torch.arange(V, device=tab.device)

rows = torch.tensor([int(a) for a in addends], device=tab.device,

dtype=torch.long)

target = (inn.unsqueeze(0) + rows.unsqueeze(1)) % V

hit = (pred[rows] == target)

even_in = (inn % 2 == 0)

return {"fid_even_in": float(hit[:, even_in].float().mean().item()),

"fid_odd_in": float(hit[:, ~even_in].float().mean().item())}

@torch.no_grad()

def composition_eval(sidecar, V, device, train_add_list, hold_add_list,

trials_per_c=4):

tab = reconstruct_effective_table(sidecar, V, device)

if tab is None:

return float("nan"), float("nan")

def test(cs):

rng = np.random.default_rng(777)

ok, tot = 0, 0

inn = torch.arange(V, device=device)

for c in cs:

pairs = [(a, b) for a in train_add_list for b in train_add_list

if (a + b) % V == c]

if not pairs:

continue

true_out = (inn + c) % V

for _ in range(trials_per_c):

a, b = pairs[int(rng.integers(0, len(pairs)))]

M = tab[int(a)] @ tab[int(b)]

ok += float((M.argmax(dim=0) == true_out).float().sum().item())

tot += V

return ok / max(tot, 1)

return test(list(hold_add_list)), test(list(train_add_list))

def generator_diagnostics(sidecar, V, device) -> Dict[str, float]:

if not isinstance(sidecar, GeneratorSidecar):

return {}

with torch.no_grad():

C_soft = sidecar.stochastic_C().detach()

I = torch.eye(V, device=C_soft.device, dtype=C_soft.dtype)

Cv_soft = torch.linalg.matrix_power(C_soft, V)

C_hard = sidecar.hard_C().detach()

Cv_hard = torch.linalg.matrix_power(C_hard, V)

order = V

cur = C_hard.clone()

for k in range(1, V + 1):

if torch.allclose(cur, I, atol=0.5):

order = k

break

cur = cur @ C_hard

rows = C_soft.clamp_min(1e-12)

return {"gen_cycle_err_soft": float(torch.norm(Cv_soft - I, p="fro").item()),

"gen_cycle_err_hard": float(torch.norm(Cv_hard - I, p="fro").item()),

"gen_order_hard": float(order),

"gen_is_identity": float(C_soft.diagonal().mean().item()),

"gen_row_entropy": float(-(rows * rows.log()).sum(dim=1).mean().item()),

"gen_logV": float(math.log(V))}

def generator_formation_flag(gen_diag, V, fid_train=float("nan")) -> bool:

if not gen_diag or "gen_order_hard" not in gen_diag:

return False

ok = bool(gen_diag["gen_cycle_err_hard"] < 0.5

and abs(gen_diag["gen_order_hard"] - V) < 0.5

and gen_diag["gen_is_identity"] < 0.25

and gen_diag["gen_row_entropy"] < 0.7 * gen_diag["gen_logV"])

if not math.isnan(fid_train):

ok = ok and fid_train > 0.90

return ok

def kl_retention(student_a, teacher_a, T: float):

V = student_a.shape[-1]

log_p = F.log_softmax(student_a.reshape(-1, V) / T, dim=-1)

q = F.softmax(teacher_a.reshape(-1, V) / T, dim=-1)

return F.kl_div(log_p, q, reduction="batchmean") * (T * T)

# =============================================================================

# 5. L2 family training (+ gen_init, parity fields) + selection + geometry

# + dynamic sentinel

# =============================================================================

_BASE_SUP_CACHE: Dict[Tuple, dict] = {}

def cached_base_sup_id(base_model, cfg, base_seed, eval_sup, supervise):

key = (config_fingerprint(cfg), base_seed, cfg.base_mode,

tuple(sorted(supervise)))

if key not in _BASE_SUP_CACHE:

_BASE_SUP_CACHE[key] = eval_model(base_model, eval_sup, cfg)

return _BASE_SUP_CACHE[key]

def train_l2_family(base_model, cfg, base_seed, growth_seed, dataset, split,

family, eval_full, eval_sup, supervise, inner, hold_add_list,

gen_init: str = "id", scramble_rows=None):

V = cfg.vocab_size

set_seed(growth_seed + 30_000 + base_seed * 101)

model = clone_frozen_base(base_model)

spec = ArmSpec(L2_FAMILY_KIND[family], recipe="tf", protocol="blind",

step_lambda=1.0, gen_init=gen_init)

adapters = GrowthStack(cfg, spec, scramble_rows=scramble_rows)

attach_growth(model, adapters)

model = model.to(cfg.device)

adapters = adapters.to(cfg.device)

for p in model.parameters():

p.requires_grad_(False)

for p in adapters.parameters():

p.requires_grad_(True)

for p in model.head_a.parameters():

p.requires_grad_(False)

trainables = [p for p in adapters.parameters() if p.requires_grad]

if not trainables:

raise RuntimeError(f"family {family}: no trainable params")

sid = adapters.sidecar

n_params = operator_param_count(sid)

base_sup_id = cached_base_sup_id(base_model, cfg, base_seed, eval_sup, supervise)

opt = torch.optim.AdamW(trainables, lr=cfg.lr_growth,

weight_decay=cfg.weight_decay)

g = torch.Generator(device=cfg.device)

g.manual_seed(growth_seed * 4001 + 13 + base_seed * 89)

history: List[dict] = []

t0 = time.time()

traj_steps = set()

if cfg.traj_every and cfg.traj_every > 0:

traj_steps = set(range(cfg.traj_every, cfg.growth_steps + 1, cfg.traj_every))

ckpts = sorted({c for c in cfg.checkpoints if 1 <= c <= cfg.growth_steps}

| traj_steps)

for step in range(1, cfg.growth_steps + 1):

z, A, B = dataset.sample_conditioned(cfg.batch_size, supervise, g)

model.train()

la, lb, _, aux = model(z, adapters=adapters, B=B, teacher_force=True)

ce_b = F.cross_entropy(lb.reshape(-1, V), B.reshape(-1))

with torch.no_grad():

ta, _, _, _ = base_model(z)

loss = ce_b + cfg.retention_lambda * kl_retention(

la, ta, cfg.retention_kl_temperature)

if spec.step_lambda > 0 and aux is not None and aux.get("logits") is not None:

loss = loss + spec.step_lambda * F.cross_entropy(

aux["logits"].reshape(-1, V), B.reshape(-1))

if (cfg.l2_cycle_lambda > 0 and isinstance(sid, GeneratorSidecar)

and step % cfg.cycle_every == 0):

loss = loss + cfg.l2_cycle_lambda * sid.cyclic_loss()

opt.zero_grad(set_to_none=True)

loss.backward()

torch.nn.utils.clip_grad_norm_(trainables, 1.0)

opt.step()

if step in ckpts:

ck = {"step": step,

"fidS": table_fidelity(sid, V, cfg.device, supervise),

"fid_inner": table_fidelity(sid, V, cfg.device, inner)}

history.append(ck)

idm = eval_model(model, eval_sup, cfg, adapters)

id_gain = idm["B_suffix2"] - base_sup_id["B_suffix2"]

rec = {"base_seed": base_seed, "growth_seed": growth_seed, "split": split,

"family": family, "operator_params": n_params,

"gen_init": gen_init, "growth_steps_used": cfg.growth_steps,

"fid_supervise": table_fidelity(sid, V, cfg.device, supervise),

"inner_completion": table_fidelity(sid, V, cfg.device, inner),

"id_gain": float(id_gain), "history": history,

"elapsed_sec": time.time() - t0}

rec.update(table_fidelity_by_input_parity(sid, V, cfg.device, supervise))

if isinstance(sid, GeneratorSidecar):

gd = generator_diagnostics(sid, V, cfg.device)

rec.update(gd)

rec["formation"] = int(generator_formation_flag(gd, V, rec["fid_supervise"]))

else:

rec["formation"] = 0

return rec, model, adapters

def run_l2_selection(base_model, cfg, base_seed, growth_seed, dataset, split,

eval_full, train_add_list, hold_add_list, inner_list,

families):

"""Stage A trains; Stage B DECIDES (printed strictly BEFORE any heldout

measurement -- the DECISION itself never sees fidH); Stage C verifies

and evaluates decision_correct post hoc. Historical fields stay

rank-1-based (byte-compatible); decision fields are NEW names."""

supervise = [a for a in train_add_list if a not in set(inner_list)]

eval_sup = dataset.fixed_batches_conditioned(

cfg.eval_batches, cfg.eval_batch_size, supervise, offset=555)

fams: Dict[str, dict] = {}

holders: Dict[str, tuple] = {}

V = cfg.vocab_size

for fam in families:

rec, model, adapters = train_l2_family(

base_model, cfg, base_seed, growth_seed, dataset, split, fam,

eval_full, eval_sup, supervise, inner_list, hold_add_list)

fams[fam] = rec

holders[fam] = (model, adapters)

print(f" [L2 family {fam:9s}] inner={rec['inner_completion']:.3f} "

f"fidS={rec['fid_supervise']:.3f} id_gain={rec['id_gain']:+.4f} "

f"params={rec['operator_params']:6d} "

f"even_in={rec.get('fid_even_in', float('nan')):.3f} "

f"odd_in={rec.get('fid_odd_in', float('nan')):.3f} "

f"form={rec.get('formation', 0)} [{rec['elapsed_sec']:.0f}s]")

trained = list(families)

pool4 = [f for f in POOL4 if f in fams]

use_pool4 = (len(pool4) == 4 and len(trained) > len(pool4))

primary = pool4 if use_pool4 else trained

# ---- Stage B: the DECISION, computed and printed BEFORE any heldout ----

pre = decide(fams, primary, "J", cfg.lambda_mdl, V)

print(f" DECISION[{'POOL-4' if use_pool4 else 'RUN'}] (pre-heldout): "

f"rank-1={pre['rank1']} -> decision={pre['decision']} "

f"abstain={int(pre['abstain'])} (best inner {pre['best_inner']:.3f} "

f"vs thr {ABSTAIN_THRESHOLD}, strict)")

pre5 = decide(fams, trained, "J", cfg.lambda_mdl, V)

if use_pool4:

print(f" DECISION[POOL-5 ext] (pre-heldout): rank-1={pre5['rank1']} "

f"-> decision={pre5['decision']} abstain={int(pre5['abstain'])}")

# ---- Stage C: first and only touch of the true heldout ----

for fam in trained:

sid = holders[fam][1].sidecar

fams[fam]["fidH_true"] = table_fidelity(sid, V, cfg.device, hold_add_list)

ch, _ = composition_eval(sid, V, cfg.device, supervise, hold_add_list,

cfg.composition_trials)

fams[fam]["compH_true"] = ch

print(" Stage-C heldout touch (first): "

+ " ".join(f"{f}={fams[f]['fidH_true']:.3f}" for f in trained))

post = decide(fams, primary, "J", cfg.lambda_mdl, V)

post5 = decide(fams, trained, "J", cfg.lambda_mdl, V)

assert pre["decision"] == post["decision"], "decision must not depend on fidH"

rec = {"base_seed": base_seed, "growth_seed": growth_seed, "split": split,

"families": fams, "pool4_used": use_pool4,

"picks": {"STRUCT_MDL": post["rank1"],

"DECISION": post["decision"],

"ID_ONLY": decide(fams, trained, "ID_ONLY",

cfg.lambda_mdl, V)["rank1"],

"MDL_ONLY": decide(fams, trained, "params_only",

cfg.lambda_mdl, V)["rank1"],

"train_MDL": decide(fams, trained, "train_MDL",

cfg.lambda_mdl, V)["rank1"]},

"abstained": post["abstain"], "selected": post["rank1"],

"selected_fidH": post["rank1_fidH"],

"selection_success": bool(post["rank1"] == "Generator"),

"transfer_success": bool(post["rank1_transfers"]),

"decision": post["decision"],

"decision_is_noclaim": bool(post["decision_is_noclaim"]),

"decision_correct": bool(post["decision_correct"]),

"id_only_transfer": bool(fams[decide(fams, trained, "ID_ONLY",

cfg.lambda_mdl, V)["rank1"]]

["fidH_true"] > cfg.heldout_identity),

"split_hostile": bool(split == "evenodd" and post["rank1"] == "Generator"

and not post["rank1_transfers"]),

"J_margin": post["margin"]}

if use_pool4:

rec["pool5"] = {"pool": list(trained),

"picks": {"STRUCT_MDL": post5["rank1"],

"DECISION": post5["decision"],

"MDL_ONLY": decide(fams, trained, "params_only",

cfg.lambda_mdl, V)["rank1"]},

"selected": post5["rank1"],

"selected_fidH": post5["rank1_fidH"],

"selection_success": bool(post5["rank1"] == "Generator"),

"transfer_success": bool(post5["rank1_transfers"]),

"mdl_only_pick_is_shift": bool(

decide(fams, trained, "params_only",

cfg.lambda_mdl, V)["rank1"] == "ShiftOnly"),

"mdl_only_transfer": bool(

fams[decide(fams, trained, "params_only",

cfg.lambda_mdl, V)["rank1"]]["fidH_true"]

> cfg.heldout_identity),

"split_hostile": bool(

split == "evenodd" and post5["rank1"] == "Generator"

and not post5["rank1_transfers"]),

"J_margin": post5["margin"]}

return rec

def run_geometry_cell(base_model, cfg, base_seed, dataset, split, family,

gen_init, growth_seeds, eval_full, geo_done, geo_jf):

V = cfg.vocab_size

train_add, hold_add, inner, supervise = split_addends(split, V)

eval_sup = dataset.fixed_batches_conditioned(

cfg.eval_batches, cfg.eval_batch_size, supervise, offset=555)

for gs in growth_seeds:

key = (base_seed, gs, split, family, gen_init, cfg.growth_steps)

if key in geo_done:

print(f" [geo {split:13s} | {family:9s} | init={gen_init:5s} "

f"| steps={cfg.growth_steps:5d} | seed {gs}] SKIP (resume)")

continue

print(f" [geo {split:13s} | {family:9s} | init={gen_init:5s} "

f"| steps={cfg.growth_steps:5d} | seed {gs}]")

rec, _m, adapters = train_l2_family(

base_model, cfg, base_seed, gs, dataset, split, family,

eval_full, eval_sup, supervise, inner, hold_add, gen_init=gen_init)

rec["fidH_true"] = table_fidelity(adapters.sidecar, V, cfg.device, hold_add)

rec["cell"] = f"{split}|{family}|init={gen_init}|steps={cfg.growth_steps}"

geo_done.add(key)

append_jsonl(geo_jf, rec)

print(f" fidS={rec['fid_supervise']:.3f} inner={rec['inner_completion']:.3f} "

f"fidH={rec['fidH_true']:.3f} form={rec.get('formation', 0)} "

f"[{rec['elapsed_sec']:.0f}s]")

def run_sentinel(base_model, cfg, base_seed, dataset, split, growth_seed,

eval_full, sentinel_done, sentinel_jf):

"""[FIX-4] dynamic canary (v8.00 semantics RESTORED): true table with

noise-scrambled hold rows on a LEARNABLE table, trained under the blind

protocol. alarm = fidH(hold) > leak threshold after training. A clean

protocol leaves hold-row gradients exactly zero (sandbox-verified), so

any alarm is a REAL breach."""

V = cfg.vocab_size

train_add, hold_add, inner, supervise = split_addends(split, V)

key = (base_seed, growth_seed, split)

if key in sentinel_done:

print(f" [sentinel | {split} | seed {growth_seed}] SKIP (resume)")

return

print(f" [sentinel | {split} | seed {growth_seed}] dynamic canary")

eval_sup = dataset.fixed_batches_conditioned(

cfg.eval_batches, cfg.eval_batch_size, supervise, offset=555)

rec, _m, adapters = train_l2_family(

base_model, cfg, base_seed, growth_seed, dataset, split, "Sentinel",

eval_full, eval_sup, supervise, inner, hold_add,

scramble_rows=hold_add)

rec["fidH_true"] = table_fidelity(adapters.sidecar, V, cfg.device, hold_add)

rec["alarm"] = bool(rec["fidH_true"] > cfg.leak_heldout_max)

rec["cell"] = f"sentinel|{split}"

sentinel_done.add(key)

append_jsonl(sentinel_jf, rec)

print(f" scrambled-row fidH={rec['fidH_true']:.3f} "

f"(thr {cfg.leak_heldout_max}) alarm={int(rec['alarm'])}")

# =============================================================================

# 6. IO

# =============================================================================

def clean_for_json(obj):

if isinstance(obj, dict):

return {k: clean_for_json(v) for k, v in obj.items()

if not isinstance(v, torch.Tensor)}

if isinstance(obj, (list, tuple)):

return [clean_for_json(x) for x in obj]

if isinstance(obj, torch.Tensor):

return obj.item() if obj.numel() == 1 else obj.tolist()

if isinstance(obj, np.ndarray):

return obj.tolist()

if isinstance(obj, (np.floating, np.integer, np.bool_)):

return obj.item()

return obj

def append_jsonl(path: Path, rec: dict):

with path.open("a", encoding="utf-8") as f:

f.write(json.dumps(clean_for_json(rec), sort_keys=True,

ensure_ascii=True) + "\n")

def load_partial_jsonl(path: Path, key_fields: Tuple[str, ...]):

rows_by_key: Dict[Tuple, dict] = {}

if not path.exists():

return set(), []

with path.open("r", encoding="utf-8") as f:

for line in f:

line = line.strip()

if not line:

continue

try:

r = json.loads(line)

except Exception:

continue

rows_by_key[tuple(r.get(k) for k in key_fields)] = r

return set(rows_by_key.keys()), list(rows_by_key.values())

def load_l2_records(outdir: Path) -> List[dict]:

rows_by_key: Dict[Tuple, dict] = {}

for p in sorted(outdir.glob("v8_l2_selection_partial_*.jsonl")):

with p.open("r", encoding="utf-8") as f:

for line in f:

line = line.strip()

if not line:

continue

try:

r = json.loads(line)

except Exception:

continue

if "families" not in r or "split" not in r:

continue

rows_by_key[(r.get("base_seed"), r.get("growth_seed"),

r.get("split"))] = r

return list(rows_by_key.values())

def load_geo_records(outdir: Path) -> List[dict]:

rows_by_key: Dict[Tuple, dict] = {}

for p in sorted(outdir.glob("v8_geometry_partial_*.jsonl")):

with p.open("r", encoding="utf-8") as f:

for line in f:

line = line.strip()

if not line:

continue

try:

r = json.loads(line)

except Exception:

continue

rows_by_key[(r.get("base_seed"), r.get("growth_seed"),

r.get("split"), r.get("family"),

r.get("gen_init"),

r.get("growth_steps_used"))] = r

return list(rows_by_key.values())

def load_sentinel_records(outdir: Path) -> List[dict]:

out = []

for p in sorted(outdir.glob("v8_sentinel_partial_*.jsonl")):

with p.open("r", encoding="utf-8") as f:

for line in f:

line = line.strip()

if not line:

continue

try:

out.append(json.loads(line))

except Exception:

continue

return out

def load_all_l15_rows(outdir: Path) -> List[dict]:

rows_by_key: Dict[Tuple, dict] = {}

for p in sorted(outdir.glob("v8_l15_partial_*.jsonl")):

with p.open("r", encoding="utf-8") as f:

for line in f:

line = line.strip()

if not line:

continue

try:

r = json.loads(line)

except Exception:

continue

rows_by_key[(r.get("base_seed"), r.get("growth_seed"),

r.get("split"), r.get("arm"))] = r

return list(rows_by_key.values())

# =============================================================================

# 7. Checks (all routed through the registry)

# =============================================================================

def _grp(sel_rows, split, base=None):

out = [r for r in sel_rows if r.get("split") == split]

if base is not None:

out = [r for r in out if r.get("base_seed") == base]

return out

def _fm(grp, field, fam=None):

vals = []

for r in grp:

src = r["families"][fam] if fam else r

v = _f(src.get(field))

if not math.isnan(v):

vals.append(v)

return float(np.mean(vals)) if vals else float("nan")

def check_carried_P(sel_rows):

print("\n" + "=" * 100)

print("CARRIED P1-P7 (rank-1 semantics, byte-compatible)")

print("=" * 100)

cont, eo = _grp(sel_rows, "contiguous"), _grp(sel_rows, "evenodd")

if cont:

p1 = float(np.mean([float(r["selection_success"]) for r in cont]))

p2 = float(np.mean([1.0 if r["picks"].get("ID_ONLY") == "Generator" else 0.0

for r in cont]))

p3 = float(np.mean([float(r["transfer_success"]) for r in cont]))

check("P1", f"contig P(rank-1=Gen)={p1:.2f} (>=7/8, n={len(cont)})",

p1 >= 0.875, "v8.00")

check("P2", f"contig P(ID_ONLY=Gen)={p2:.2f} (<=2/8)", p2 <= 0.25, "v8.00")

check("P3", f"contig P(rank-1 transfers)={p3:.2f} (>=7/8)",

p3 >= 0.875, "v8.00")

else:

print(" P1/P2/P3 n/a")

if eo:

p4a = float(np.mean([float(r["selection_success"]) for r in eo]))

p4b = float(np.mean([float(r["transfer_success"]) for r in eo]))

check("P4", f"evenodd select={p4a:.2f} (>=6/8) AND transfer={p4b:.2f} (<=2/8)",

(p4a >= 0.75) and (p4b <= 0.25), "v8.00",

"split-hostile: algebraic sq-root x even-coset (dual mechanism)")

else:

print(" P4 n/a")

r5 = [r for r in sel_rows if r.get("pool5")]

c5, e5 = [r for r in r5 if r["split"] == "contiguous"], \

[r for r in r5 if r["split"] == "evenodd"]

if c5:

p6a = float(np.mean([float(r["pool5"]["selection_success"]) for r in c5]))

p6b = float(np.mean([float(r["pool5"]["mdl_only_pick_is_shift"]) for r in c5]))

p6c = float(np.mean([float(r["pool5"]["mdl_only_transfer"]) for r in c5]))

check("P6", f"POOL-5: J->Gen={p6a:.2f}, params->ShiftOnly={p6b:.2f}, "

f"params-transfer={p6c:.2f}",

(p6a >= 0.875) and (p6b >= 0.875) and (p6c <= 0.125), "v8.00",

"params-only fooled; NOT a claim vs train-MDL (see P10/P8)")

if e5:

p7 = float(np.mean([1.0 - float(r["pool5"]["transfer_success"]) for r in e5]))

check("P7", f"evenodd POOL-5 P(fail to transfer)={p7:.2f} (>=7/8)",

p7 >= 0.875, "v8.00")

def check_L4_random(sel_rows):

print("\n" + "=" * 100)

print("STAGE R: random-split L2 (L4 + D3 -- the DECISION's first live test)")

print("=" * 100)

grp = _grp(sel_rows, "random")

if not grp:

print(" n/a (run --stage random)")

return

n = len(grp)

gi, gf, gh = (_fm(grp, "inner_completion", "Generator"),

_fm(grp, "fid_supervise", "Generator"),

_fm(grp, "fidH_true", "Generator"))

tf, th = _fm(grp, "fid_supervise", "Table"), _fm(grp, "fidH_true", "Table")

sel = float(np.mean([float(r["selection_success"]) for r in grp]))

tr = float(np.mean([float(r["transfer_success"]) for r in grp]))

idg = float(np.mean([1.0 if r["picks"].get("ID_ONLY") == "Generator" else 0.0

for r in grp]))

print(f" n={n}: rank1(Gen)={sel:.2f} transfer={tr:.2f} | Gen inner={gi:.3f} "

f"fidS={gf:.3f} fidH={gh:.3f} | Table fidS={tf:.3f} fidH={th:.3f}")

check("L4a", f"Gen inner in [0.20,0.50]: {gi:.3f}", 0.20 <= gi <= 0.50, "v8.03")

check("L4b", f"Gen fidS in [0.30,0.50]: {gf:.3f}", 0.30 <= gf <= 0.50, "v8.03")

check("L4c", f"select >= 6/8: {sel:.2f}", sel >= 0.75, "v8.03")

check("L4d", f"transfer <= 2/8: {tr:.2f}", tr <= 0.25, "v8.03")

check("L4f", f"Table fidS>=.95 & fidH<=.10: {tf:.3f}/{th:.3f}",

(tf >= 0.95) and (th <= 0.10), "v8.03")

check("L4g", f"ID_ONLY != Gen: {idg:.2f}", idg <= 0.25, "v8.03")

# D3: the DECISION

nocl = [r for r in grp if r.get("decision") == NO_CLAIM]

pnc = len(nocl) / n

dcor = float(np.mean([float(r.get("decision_correct", 0.0)) for r in grp]))

check("D3", f"P(decision=NO-CLAIM)={pnc:.2f} (>=6/8) AND "

f"P(decision_correct)={dcor:.2f} (>=7/8)",

(pnc >= 0.75) and (dcor >= 0.875), "v8.04",

"the abstention's unique value becomes BEHAVIORALLY correct: the "

"system refuses exactly when the would-be pick would not transfer")

def check_G2_anchor(sel_rows):

print("\n" + "=" * 100)

print("STAGE R2: random_anchor L2 (27<->1 minimal intervention)")

print("=" * 100)

grp = _grp(sel_rows, "random_anchor")

if not grp:

print(" n/a (run --stage anchor)")

return

n = len(grp)

fs = [float(r["families"]["Generator"].get("fid_supervise", 0.0)) for r in grp]

inr = [float(r["families"]["Generator"].get("inner_completion", 0.0)) for r in grp]

th = [float(r["families"]["Table"].get("fidH_true", 1.0)) for r in grp]

sel = float(np.mean([float(r["selection_success"]) for r in grp]))

tr = float(np.mean([float(r["transfer_success"]) for r in grp]))

a = sum(1 for v in fs if v >= 0.90) / n

b = sum(1 for v in inr if v >= 0.90) / n

print(f" n={n}: select={sel:.2f} transfer={tr:.2f} | Gen fidS>=.9 in {a:.2f}, "

f"inner>=.9 in {b:.2f} | Table fidH={np.mean(th):.3f}")

check("G2a", f"Gen fidS >= 0.90 in >= 7/8: {a:.2f}", a >= 0.875, "v8.03")

check("G2b", f"Gen inner >= 0.90 in >= 7/8: {b:.2f}", b >= 0.875, "v8.03")

check("G2c", f"transfer >= 7/8: {tr:.2f}", tr >= 0.875, "v8.03")

check("G2d", f"select Gen = 8/8: {sel:.2f}", sel >= 0.999, "v8.03")

check("G2e", f"Table fidH <= 0.10: {np.mean(th):.3f}",

bool(th) and float(np.mean(th)) <= 0.10, "v8.03")

def check_geometry(geo_rows, sel_rows, long_steps=10000):

print("\n" + "=" * 100)

print("GEOMETRY (G1 init ladder + G3 identifiability ladder)")

print("=" * 100)

def geo(split, family, gen_init, steps=None):

return [r for r in geo_rows if r.get("split") == split

and r.get("family") == family and r.get("gen_init") == gen_init

and (steps is None or r.get("growth_steps_used") == steps)]

sh = geo("random", "Generator", "shift")

if sh:

fs = _fm(sh, "fid_supervise"); fi = _fm(sh, "inner_completion")

fh = _fm(sh, "fidH_true")

check("G1a", f"init=shift (n={len(sh)}): fidS={fs:.3f} inner={fi:.3f} "

f"fidH={fh:.3f} (all >0.99)",

(fs > 0.99) and (fi > 0.99) and (fh > 0.99), "v8.03",

"true generator is a STABLE optimum -> id-init failure is "

"REACHABILITY, not objective (diagnostic arm)")

else:

print(" G1a n/a")

id_rows = [r["families"]["Generator"] for r in _grp(sel_rows, "random")

if "Generator" in r.get("families", {})

and r["families"]["Generator"].get("gen_init", "id") == "id"]

rd = geo("random", "Generator", "rand")

if rd and id_rows:

fs_r, in_r = _fm(rd, "fid_supervise"), _fm(rd, "inner_completion")

fs_i = float(np.mean([_f(r.get("fid_supervise")) for r in id_rows

if not math.isnan(_f(r.get("fid_supervise")))]))

check("G1b", f"init=rand (n={len(rd)}): fidS={fs_r:.3f} (id {fs_i:.3f}) "

f"inner={in_r:.3f}",

(fs_r <= fs_i + 0.10) and (0.0 <= in_r <= 0.35), "v8.03")

else:

print(" G1b n/a")

lg = geo("random", "Generator", "id", steps=long_steps)

if lg:

fs = _fm(lg, "fid_supervise")

print(f" G1c init=id @ {long_steps} (n={len(lg)}): fidS={fs:.3f} "

f"inner={_fm(lg, 'inner_completion'):.3f} "

f"fidH={_fm(lg, 'fidH_true'):.3f}")

check("G1c", f"fidS in [0.45,0.85] (speed vs barrier): {fs:.3f}",

0.45 <= fs <= 0.85, "v8.03",

"out-of-range is equally informative (1.0=speed-limited; "

"<=id@2500=hard barrier)")

else:

print(" G1c n/a (run --stage geometry --do-long)")

for split, (tlo, thi, glo, ghi) in (("gcd4", (0.20, 0.36, 0.33, 0.50)),

("gcd7", (0.10, 0.25, 0.45, 0.68))):

g, t = geo(split, "Generator", "id"), geo(split, "Table", "id")

if g and t:

gs_, ts_ = _fm(g, "fid_supervise"), _fm(t, "fid_supervise")

gh, th = _fm(g, "fidH_true"), _fm(t, "fidH_true")

check(f"G3{split}", f"Gen fidS={gs_:.3f}[{glo},{ghi}] "

f"Table fidS={ts_:.3f}[{tlo},{thi}] fidH={gh:.3f}/{th:.3f}",

(glo <= gs_ <= ghi) and (tlo <= ts_ <= thi)

and (gh <= 0.10) and (th <= 0.10), "v8.03",

"identity-row asymmetry: C^0=I free for Gen (retro-explains "

"v8.01's 0.517/0.542)")

else:

print(f" G3 {split} n/a")

def check_multibase(sel_rows):

print("\n" + "=" * 100)

print("STAGE M: multi-base replication (L5)")

print("=" * 100)

bases = sorted({r.get("base_seed") for r in sel_rows

if r.get("base_seed") is not None})

if len(bases) < 2:

print(" n/a (single base; run --stage multibase)")

return

for split in ("contiguous", "evenodd"):

per = {b: (sum(float(r["selection_success"])

for r in _grp(sel_rows, split, b)),

len(_grp(sel_rows, split, b)))

for b in bases if _grp(sel_rows, split, b)}

if not per:

continue

tot_ok = sum(v[0] for v in per.values())

tot_n = sum(v[1] for v in per.values())

print(f" {split:11s}: " + " ".join(f"base{b}={int(o)}/{n}"

for b, (o, n) in sorted(per.items()))

+ f" | combined {int(tot_ok)}/{tot_n}")

if split == "contiguous":

trr = float(np.mean([float(r["transfer_success"])

for r in _grp(sel_rows, split)]))

check("L5b", f"combined select >= 17/20: {tot_ok / tot_n:.2f}",

tot_ok / tot_n >= 0.85, "v8.03")

check("L5c", f"combined transfer: {trr:.2f}", trr >= 0.85, "v8.03")

else:

check("L5d", f"combined select >= 17/20: {tot_ok / tot_n:.2f}",

tot_ok / tot_n >= 0.85, "v8.03")

for b in bases:

if b == 42:

continue

grp = _grp(sel_rows, "contiguous", b)

if grp:

ok = sum(float(r["selection_success"]) for r in grp)

check("L5a", f"base {b}: {int(ok)}/{len(grp)} (>=3/4)",

ok >= 0.75 * len(grp), "v8.03")

def check_D_parity(sel_rows):

print("\n" + "=" * 100)

print("D1/D2 PARITY SIGNATURES (I-axis vs O-axis separation, new v8.04)")

print("=" * 100)

eo = [r["families"]["Generator"] for r in _grp(sel_rows, "evenodd")

if "fid_even_in" in r.get("families", {}).get("Generator", {})]

if eo:

ev, od = _fm([{"x": r} for r in eo], "x", "fid_even_in") \

if False else float(np.mean([_f(r.get("fid_even_in")) for r in eo

if not math.isnan(_f(r.get("fid_even_in")))])), \

float(np.mean([_f(r.get("fid_odd_in")) for r in eo

if not math.isnan(_f(r.get("fid_odd_in")))]))

check("D1", f"evenodd Gen parity: even_in={ev:.3f} (>=0.85) "

f"odd_in={od:.3f} (<=0.15)",

(ev >= 0.85) and (od <= 0.15), "v8.04",

"exact prediction 1.000/0.083; the visited coset is learned "

"(O), the unvisited inputs are not (distribution)")

else:

print(" D1 n/a (no parity fields on evenodd records yet)")

ra = [r["families"]["Generator"] for r in _grp(sel_rows, "random")

if "fid_even_in" in r.get("families", {}).get("Generator", {})]

if ra:

ev = float(np.mean([_f(r.get("fid_even_in")) for r in ra

if not math.isnan(_f(r.get("fid_even_in")))]))

od = float(np.mean([_f(r.get("fid_odd_in")) for r in ra

if not math.isnan(_f(r.get("fid_odd_in")))]))

check("D2", f"random Gen |even_in-odd_in| = {abs(ev - od):.3f} (<=0.15)",

abs(ev - od) <= 0.15, "v8.04",

"no coset confinement: random's failure is FORMATION, not "

"distribution (distinct from evenodd)")

else:

print(" D2 n/a (run --stage random)")

def check_sentinel(sent_rows):

print("\n" + "=" * 100)

print("S1 DYNAMIC SENTINEL (canary travels with new bases)")

print("=" * 100)

if not sent_rows:

print(" n/a (run --stage multibase)")

return

alarms = [r for r in sent_rows if r.get("alarm")]

for r in sent_rows:

print(f" base {r.get('base_seed')} | {r.get('split'):11s}: "

f"scrambled fidH={_f(r.get('fidH_true')):.3f} "

f"alarm={int(bool(r.get('alarm')))}")

check("S1", f"alarm count = 0 over {len(sent_rows)} canaries",

len(alarms) == 0, "v8.04",

"learnable table + zero hold-row grads under a clean protocol; "

"any alarm is a REAL breach")

def check_p5_and_regression(l15_rows):

print("\n" + "=" * 100)

print("P5 + REGRESSION (from the v8.00 l15 jsonl, if present)")

print("=" * 100)

rows5 = [r for r in l15_rows if r.get("split") == "contiguous"

and r.get("arm") == "Gen_TF_blind"]

valid, ordered = 0, 0

for r in rows5:

h = r.get("history") or []

s_f = min((c["step"] for c in h if c.get("fidH", 0.0) > 0.9), default=None)

s_b = min((c["step"] for c in h if c.get("B_suffix2", 0.0) > 0.5), default=None)

if s_f is not None and s_b is not None:

valid += 1

ordered += int(s_f < s_b)

if valid >= 4:

check("P5", f"fidH>0.9 precedes B>0.5 in {ordered}/{valid}",

ordered > valid / 2, "v8.00")

else:

print(f" P5 n/a (valid seeds = {valid} < 4; l15 jsonl provenance)")

cont = [r for r in l15_rows if r.get("split") == "contiguous"]

if not cont:

print(" REG n/a (no contiguous l15 rows)")

return

refs = {"Gen_TF_blind": 0.8393, "Gen_SS_blind": 0.9631, "Table_TF_blind": 0.0078}

ok_all = True

for arm, ref in refs.items():

grp = [r for r in cont if r.get("arm") == arm]

if grp:

m = float(np.mean([r["B_suffix2_gain_full"] for r in grp]))

ok_all &= abs(m - ref) < 0.05

print(f" {arm:16s} gain={m:+.4f} vs v7.21-r2 {ref:+.4f} -> "

f"{'OK' if abs(m - ref) < 0.05 else 'DRIFT'}")

check("REG", "v7.21-r2 regression (3 gains, tolerance 0.05)", ok_all, "v8.00")

def lab_report(sel_rows, lam=LAMBDA_MDL_DEFAULT):

print("\n" + "=" * 100)

print("SELECTION LAB (post-hoc 0'; zero training; DECISION recomputed)")

print("=" * 100)

check("C1", "frozen-record checksum", frozen_record_ok(), "v8.04")

n_ok = n_tot = 0

for r in sel_rows:

fams = r.get("families", {})

pool = sorted(fams.keys())

if not pool:

continue

pick = rank1(fams, pool, "J", lam)

n_tot += 1

n_ok += int(pick == r.get("selected") or pick == r.get("picks", {}).get(

"STRUCT_MDL"))

if n_tot:

check("L0", f"reselect reproduces rank-1: {n_ok}/{n_tot}",

n_ok == n_tot, "v8.02-A")

# P10 isomorphism

n_same = sum(1 for r in sel_rows

if rank1(r["families"], sorted(r["families"]), "J", lam)

== rank1(r["families"], sorted(r["families"]), "train_MDL", lam))

if n_tot:

check("P10", f"J rank-1 == train_MDL rank-1: {n_same}/{n_tot}",

n_same == n_tot, "v8.02-B",

"the Z_28 isomorphism ceiling: min description of supervise IS "

"the generator here; completion's unique role is P8/D3")

# P8 generator-free

cont = _grp(sel_rows, "contiguous")

if cont:

ng = [f for f in sorted(cont[0]["families"]) if f != "Generator"]

ab = 0

tm_p, tm_tr = {}, 0

for r in cont:

dJ = decide(r["families"], ng, "J", lam)

ab += int(dJ["decision_is_noclaim"])

dT = decide(r["families"], ng, "train_MDL", lam)

tm_p[dT["rank1"]] = tm_p.get(dT["rank1"], 0) + 1

tm_tr += int(dT["rank1_transfers"])

n = len(cont)

maj = max(tm_p, key=tm_p.get) if tm_p else "n/a"

check("P8", f"gen-free: J NO-CLAIM={ab}/{n}, train_MDL->{maj}, "

f"its transfer={tm_tr}/{n}",

(ab / n >= 0.875) and (tm_tr / n <= 0.125)

and (tm_p.get("LowRank", 0) / n >= 0.875), "v8.02-B",

"completion's unique value = refusal")

# P9 lambda scan

print("\n P9 lambda scan (contiguous POOL-5, J rank-1 histogram):")

p9_ok = True

for L in LAMBDA_SCAN:

hist = {}

for r in cont:

p = rank1(r["families"], sorted(r["families"]), "J", L)

hist[p] = hist.get(p, 0) + 1

mark = ""

if abs(L - 0.05) < 1e-12:

p9_ok = p9_ok and (hist.get("Generator", 0) == len(cont))

mark = " <- original lambda, must be Gen n/n"

print(f" lambda={L:<5} {hist}{mark}")

check("P9", "lambda=0.05 stability (Gen n/n)", p9_ok, "v8.02-B")

# D4 hygiene

n_h = n_d = 0

for r in sel_rows:

if "decision" not in r:

continue

n_d += 1

ok = (r["decision"] == NO_CLAIM

or r["decision"] == r.get("picks", {}).get("STRUCT_MDL",

r.get("selected")))

ok = ok and (r.get("selection_success")

== (r.get("picks", {}).get("STRUCT_MDL",

r.get("selected")) == "Generator"))

n_h += int(ok)

if n_d:

check("D4", f"record hygiene (decision/rank-1/selection_success): "

f"{n_h}/{n_d}", n_h == n_d, "v8.04",

"new fields, new names; historical semantics untouched")

# lambda-flip + posterior note

eo = [r for r in _grp(sel_rows, "evenodd")

if "Generator" in r.get("families", {})

and "ShiftOnly" in r.get("families", {})]

if eo:

ig = _fm(eo, "inner_completion", "Generator")

flip = ig / (1 - 28 / 784.0)

print(f"\n lambda-flip (evenodd): Gen inner={ig:.3f} -> flips to the "

f"28-param decoy at lambda > {flip:.3f}")

print(" POSTERIOR NOTE (registered, NOT a criterion change): a "

"parity-aware abstention (odd_in < 0.5 -> NO-CLAIM) would ALSO "

"have caught evenodd (inner sits exactly on 0.500). Candidate "

"v8.05 criterion; the pre-registered strict threshold stands.")

def verdict_synthesis(sel_rows, geo_rows):

print("\n" + "=" * 100)

print("VERDICT SYNTHESIS (measured)")

print("=" * 100)

dmap = {"contiguous": 1, "random": 1, "random_anchor": 1, "evenodd": 2,

"gcd4": 4, "gcd7": 7}

for sp in ("contiguous", "random", "random_anchor", "evenodd"):

grp = _grp(sel_rows, sp)

if grp and "Generator" in grp[0].get("families", {}):

fh = _fm(grp, "fidH_true", "Generator")

dec = grp[0].get("decision", "?")

dcs = float(np.mean([float(r.get("decision_correct", 0.0))

for r in grp]))

print(f" {sp:14s} d={dmap[sp]} Gen fidH={fh:6.3f} "

f"decision={dec:9s} decision_correct={dcs:.2f}")

for sp in ("gcd4", "gcd7"):

g = [r for r in geo_rows if r.get("split") == sp

and r.get("family") == "Generator" and r.get("gen_init", "id") == "id"]

if g:

print(f" {sp:14s} d={dmap[sp]} Gen fidH={_fm(g, 'fidH_true'):6.3f} "

f"(I-axis: d-fold ambiguity + coset)")

print("\n Honest scope: Z_28 prefix-sum family only; d-ladder cardinality")

print(" confound; odd-supervise impossible (position parity); init=shift is")

print(" a diagnostic arm; L2 = SELECTION among FIXED families; L3+ untouched.")

# =============================================================================

# 8. CLI + main

# =============================================================================

def parse_args():

p = argparse.ArgumentParser(

description=f"Smart Density {EDITION} (UNIFIED: v8.03 breadth + "

f"v8.02-B DECISION)")

p.add_argument("--stage", type=str, default="all",

choices=["all", "random", "anchor", "geometry", "multibase",

"lab"])

p.add_argument("--l2-families", type=str, default=",".join(FAMILY_ORDER))

p.add_argument("--lambda-mdl", type=float, default=LAMBDA_MDL_DEFAULT)

p.add_argument("--lowrank-r", type=int, default=4)

p.add_argument("--l2-cycle-lambda", type=float, default=0.0)

p.add_argument("--l2-group-lambda", type=float, default=0.0)

p.add_argument("--traj-every", type=int, default=250)

p.add_argument("--do-long", action="store_true")

p.add_argument("--long-steps", type=int, default=10000)

p.add_argument("--multibase-seeds", type=str, default="43,123,2026")

p.add_argument("--multibase-growth-seeds", type=str, default="0,1,2,3")

p.add_argument("--quick", action="store_true")

p.add_argument("--resume", action="store_true")

p.add_argument("--run-tag", type=str, default=None)

p.add_argument("--no-tf-vec", action="store_true")

p.add_argument("--no-verify", action="store_true",

help="skip the MANDATORY TF verification (not recommended)")

p.add_argument("--base-seeds", type=str, default="42")

p.add_argument("--growth-seeds", type=str, default="0,1,2,3,4,5,6,7")

p.add_argument("--growth-steps", type=int, default=None)

p.add_argument("--batch-size", type=int, default=None)

p.add_argument("--device", type=str, default=None)

p.add_argument("--output-dir", type=str, default="./smart_density_v8_l2")

p.add_argument("--base-mode", type=str, default="a", choices=["a", "ab"])

return p.parse_known_args()[0]

def main():

global _TF_VEC_ENABLED

args = parse_args()

_TF_VEC_ENABLED = not getattr(args, "no_tf_vec", False)

cfg = Config(output_dir=args.output_dir, base_mode=args.base_mode)

cfg.lambda_mdl = args.lambda_mdl

cfg.lowrank_r = args.lowrank_r

cfg.l2_cycle_lambda = args.l2_cycle_lambda

cfg.l2_group_lambda = args.l2_group_lambda

cfg.traj_every = args.traj_every

STAGES = ("random", "anchor", "geometry", "multibase")

if args.stage == "all":

active = {s: True for s in STAGES}

elif args.stage == "lab":

active = {s: False for s in STAGES}

else:

active = {s: (s == args.stage) for s in STAGES}

if args.quick:

cfg.phase_a_max_steps = 400

cfg.phase_a_eval_every = 200

cfg.phase_a_target_acc = 0.35

cfg.growth_steps = 60

cfg.batch_size = 32

cfg.eval_batch_size = 64

cfg.eval_batches = 2

cfg.checkpoints = (1, 60)

cfg.traj_every = 0

active = {"random": True, "anchor": False, "geometry": True,

"multibase": False}

if args.growth_steps is not None:

cfg.growth_steps = args.growth_steps

cfg.checkpoints = tuple(c for c in cfg.checkpoints

if c <= cfg.growth_steps) or (cfg.growth_steps,)

if args.batch_size is not None:

cfg.batch_size = args.batch_size

if args.device is not None:

cfg.device = args.device

base_seeds = [int(x) for x in args.base_seeds.split(",") if x.strip()]

growth_seeds = [int(x) for x in args.growth_seeds.split(",") if x.strip()]

mb_seeds = [int(x) for x in args.multibase_seeds.split(",") if x.strip()]

mb_growth = [int(x) for x in args.multibase_growth_seeds.split(",") if x.strip()]

if args.quick:

base_seeds = base_seeds[:1]

growth_seeds = growth_seeds[:2]

mb_seeds = []

families = [x.strip() for x in args.l2_families.split(",") if x.strip()]

for f in families:

if f not in FAMILY_ORDER:

raise ValueError(f"Unknown family {f!r}")

outdir = Path(cfg.output_dir)

outdir.mkdir(parents=True, exist_ok=True)

fp = config_fingerprint(cfg)

V = cfg.vocab_size

tag = args.run_tag or f"{cfg.base_mode}_fp{fp[:8]}"

l2_jf = outdir / f"v8_l2_selection_partial_{tag}.jsonl"

geo_jf = outdir / f"v8_geometry_partial_{tag}.jsonl"

sent_jf = outdir / f"v8_sentinel_partial_{tag}.jsonl"

sel_done = {(r.get("base_seed"), r.get("growth_seed"), r.get("split"))

for r in load_l2_records(outdir)}

geo_keys, _ = load_partial_jsonl(

geo_jf, ("base_seed", "growth_seed", "split", "family", "gen_init",

"growth_steps_used"))

for p in sorted(outdir.glob("v8_geometry_partial_*.jsonl")):

k, _ = load_partial_jsonl(p, ("base_seed", "growth_seed", "split",

"family", "gen_init", "growth_steps_used"))

geo_keys |= k

sent_keys = {(r.get("base_seed"), r.get("growth_seed"), r.get("split"))

for r in load_sentinel_records(outdir)}

l15_rows = load_all_l15_rows(outdir)

cells: List[Tuple[str, str, str]] = []

if active["geometry"]:

cells = [("random", "Generator", "shift"), ("random", "Generator", "rand")]

if args.do_long:

cells.append(("random", "Generator", "id@long"))

for sp in ("gcd4", "gcd7"):

cells += [(sp, "Generator", "id"), (sp, "Table", "id")]

if args.quick:

cells = [("random", "Generator", "shift")]

plan = {"random": 0, "anchor": 0, "geometry": 0, "multibase": 0}

if active["random"]:

plan["random"] = sum(1 for b in base_seeds for gs in growth_seeds

if (b, gs, "random") not in sel_done) * len(families)

if active["anchor"]:

plan["anchor"] = sum(1 for b in base_seeds for gs in growth_seeds

if (b, gs, "random_anchor") not in sel_done) * len(families)

if active["geometry"]:

for sp, fam, init in cells:

steps = args.long_steps if init == "id@long" else cfg.growth_steps

ini = "id" if init == "id@long" else init

plan["geometry"] += sum(1 for gs in growth_seeds

if (base_seeds[0], gs, sp, fam, ini, steps)

not in geo_keys)

if active["multibase"] and mb_seeds:

for b in mb_seeds:

for sp in ("contiguous", "evenodd"):

plan["multibase"] += sum(

1 for gs in mb_growth if (b, gs, sp) not in sel_done) * len(families)

plan["multibase"] += sum(

1 for gs in mb_growth[:1]

if (b, gs, "contiguous") not in sent_keys) * 2

print("=" * 112)

print(f"Smart Density {EDITION} (UNIFIED | pre-registered | test-count disclosed)")

print(f"device={cfg.device} fingerprint={fp} base_mode={cfg.base_mode} "

f"tf_vec={'ON' if _TF_VEC_ENABLED else 'OFF'} stage={args.stage}")

print(f"families={families} lambda={cfg.lambda_mdl} "

f"DECISION := NO-CLAIM if max inner < {ABSTAIN_THRESHOLD} (strict)")

print(f"resume={args.resume} loaded: {len(sel_done)} selection keys, "

f"{len(geo_keys)} geometry keys, {len(sent_keys)} sentinels, "

f"{len(l15_rows)} l15 rows")

print("STAGE PLAN (READ THIS LINE before walking away; 0 = complete/absent):")

print(f" R random={plan['random']} | R2 anchor={plan['anchor']} | "

f"G geometry={plan['geometry']} | M multibase={plan['multibase']}")

print("=" * 112)

print("38 registered checks = 32 carried (P1-P7, REG, P5, L0, L4a-d/f/g,")

print("G1-G3, L5, P8-P10) + 6 new v8.04 (D1-D4, S1, C1); the total is")

print("printed at session end. Honest scope: Z_28 only; d-ladder")

print("cardinality confound; odd-supervise impossible; L2 = selection.")

if args.quick:

print("[note] --quick is a PIPELINE check only; do not read the numbers.")

if not l15_rows:

print("[note] no l15 jsonl in the output dir: P5/REG report n/a.")

if any(active.values()) and not args.no_verify:

print("\n[S1-seatbelt] MANDATORY TF vectorization verification "

"(7 configs incl. the refactored frozen path) ...")

verify_tf_vectorization(cfg)

t_start = time.time()

def run_split(base_model, dataset, base_seed, split, seeds, eval_full):

train_add, hold_add, inner, supervise = split_addends(split, V)

print(f"\n[STAGE {split}] supervise={supervise} inner={inner} "

f"hold={hold_add[:4]}...")

for gs in seeds:

key = (base_seed, gs, split)

if args.resume and key in sel_done:

print(f" [L2 {split} | seed {gs}] SKIP (resume)")

continue

print(f" [L2 selection | split={split} | seed {gs}]")

rec = run_l2_selection(base_model, cfg, base_seed, gs, dataset, split,

eval_full, train_add, hold_add, inner, families)

sel_done.add(key)

append_jsonl(l2_jf, rec)

print(f" VERDICT: rank-1={rec['picks']['STRUCT_MDL']} "

f"DECISION={rec['decision']} "

f"decision_correct={int(rec['decision_correct'])} | "

f"rank1_transfer={'PASS' if rec['transfer_success'] else 'FAIL'}"

f"{' [SPLIT-HOSTILE]' if rec['split_hostile'] else ''}"

f"{' [FIRST LIVE NO-CLAIM]' if rec['decision_is_noclaim'] else ''}")

if any(active[s] for s in ("random", "anchor", "geometry")):

for base_seed in base_seeds:

dataset = PrefixDataset(cfg, base_seed)

ckpt = outdir / f"base_seed{base_seed}_{cfg.base_mode}.pt"

if args.quick:

ckpt = outdir / f"base_seed{base_seed}_{cfg.base_mode}_quick.pt"

print(f"\n[base {base_seed} | mode {cfg.base_mode}] ...")

base_model = train_base(cfg, base_seed, dataset, ckpt)

eval_full = dataset.fixed_batches(cfg.eval_batches,

cfg.eval_batch_size, offset=111)

if active["random"]:

run_split(base_model, dataset, base_seed, "random",

growth_seeds, eval_full)

if active["anchor"]:

run_split(base_model, dataset, base_seed, "random_anchor",

growth_seeds, eval_full)

if active["geometry"]:

for sp, fam, init in cells:

if init == "id@long":

cfg_cell = copy.deepcopy(cfg)

cfg_cell.growth_steps = args.long_steps

cfg_cell.checkpoints = (1, 200, 800, 2500, 5000, 7500,

args.long_steps)

run_geometry_cell(base_model, cfg_cell, base_seed, dataset,

sp, fam, "id", growth_seeds, eval_full,

geo_keys, geo_jf)

else:

run_geometry_cell(base_model, cfg, base_seed, dataset, sp,

fam, init, growth_seeds, eval_full,

geo_keys, geo_jf)

if active["multibase"]:

for mb in mb_seeds:

dataset = PrefixDataset(cfg, mb)

ckpt = outdir / f"base_seed{mb}_{cfg.base_mode}.pt"

print(f"\n[multibase {mb} | mode {cfg.base_mode}] ...")

base_model = train_base(cfg, mb, dataset, ckpt)

eval_full = dataset.fixed_batches(cfg.eval_batches,

cfg.eval_batch_size, offset=111)

for split in ("contiguous", "evenodd"):

run_split(base_model, dataset, mb, split, mb_growth, eval_full)

run_sentinel(base_model, cfg, mb, dataset, "contiguous",

mb_growth[0], eval_full, sent_keys, sent_jf)

run_sentinel(base_model, cfg, mb, dataset, "evenodd",

mb_growth[0], eval_full, sent_keys, sent_jf)

# ---------------- post-hoc over the COMBINED record ----------------

sel_rows = load_l2_records(outdir)

if not sel_rows:

sel_rows = _frozen_records()

print("\n[lab] no jsonl records found; using the checksummed frozen "

"v8.01 record")

geo_rows = load_geo_records(outdir)

sent_rows = load_sentinel_records(outdir)

for s in SPLIT_NAMES:

split_units_report(s, V)

check_carried_P(sel_rows)

check_L4_random(sel_rows)

check_G2_anchor(sel_rows)

check_geometry(geo_rows, sel_rows, long_steps=args.long_steps)

check_multibase(sel_rows)

check_D_parity(sel_rows)

check_sentinel(sent_rows)

check_p5_and_regression(l15_rows)

lab_report(sel_rows, lam=cfg.lambda_mdl)

verdict_synthesis(sel_rows, geo_rows)

print_test_count()

detail = {"config": clean_for_json(asdict(cfg)), "fingerprint": fp,

"edition": EDITION, "parents": list(PARENTS),

"active_stages": active, "l2_families": families,

"run_tag": tag, "frozen_checksum_ok": frozen_record_ok(),

"l2_selections": clean_for_json(sel_rows),

"geometry_cells": clean_for_json(geo_rows),

"sentinels": clean_for_json(sent_rows),

"l15_reused": clean_for_json(l15_rows),

"test_registry": list(_TEST_REGISTRY),

"total_wallclock_sec": time.time() - t_start}

with (outdir / "v8_results.json").open("w", encoding="utf-8") as f:

json.dump(detail, f, ensure_ascii=False, indent=2)

print(f"\ntotal wallclock: {(time.time() - t_start) / 60:.1f} min")

print(f"saved {outdir}/v8_results.json (partials kept for resume)")

print("\nRUN:")

print(" python v8_04_unified.py --stage lab # post-hoc (~30 s)")

print(" python v8_04_unified.py --stage random # L4+D2+D3 (~20 min)")

print(" python v8_04_unified.py --stage anchor # G2 (~20 min)")

print(" python v8_04_unified.py --stage geometry --do-long # G1+G3")

print(" python v8_04_unified.py --stage multibase # L5+S1 (~1.5 h)")

print(" python v8_04_unified.py --resume # continue")

if __name__ == "__main__":

main()

Smart Density v8.04 (UNIFIED | pre-registered | test-count disclosed)

device=cuda fingerprint=d282beecfac21b96 base_mode=a tf_vec=ON stage=all

families=['Table', 'LowRank', 'Generator', 'Affine', 'ShiftOnly'] lambda=0.05 DECISION := NO-CLAIM if max inner < 0.5 (strict)

resume=False loaded: 0 selection keys, 0 geometry keys, 0 sentinels, 0 l15 rows

STAGE PLAN (READ THIS LINE before walking away; 0 = complete/absent):

R random=40 | R2 anchor=40 | G geometry=48 | M multibase=126

================================================================================================================

38 registered checks = 32 carried (P1-P7, REG, P5, L0, L4a-d/f/g,

G1-G3, L5, P8-P10) + 6 new v8.04 (D1-D4, S1, C1); the total is

printed at session end. Honest scope: Z_28 only; d-ladder

cardinality confound; odd-supervise impossible; L2 = selection.

[note] no l15 jsonl in the output dir: P5/REG report n/a.

[S1-seatbelt] MANDATORY TF vectorization verification (7 configs incl. the refactored frozen path) ...

verify[AddTable.learn ] max|dlogits|=0.00e+00 -> OK

verify[AddTable.true ] max|dlogits|=0.00e+00 -> OK

verify[AddTable.frozen] max|dlogits|=0.00e+00 -> OK

verify[Generator ] max|dlogits|=0.00e+00 -> OK

verify[LowRank.r4 ] max|dlogits|=0.00e+00 -> OK

verify[Affine ] max|dlogits|=0.00e+00 -> OK

verify[ShiftOnly ] max|dlogits|=0.00e+00 -> OK

[base 42 | mode a] ...

Phase-A step 200: A_acc=0.0681

Phase-A step 400: A_acc=0.0773

Phase-A step 600: A_acc=0.0946

Phase-A step 800: A_acc=0.1084

Phase-A step 1000: A_acc=0.1126

Phase-A step 1200: A_acc=0.1234

Phase-A step 1400: A_acc=0.1455

Phase-A step 1600: A_acc=0.1757

Phase-A step 1800: A_acc=0.2576

Phase-A step 2000: A_acc=0.3422

Phase-A step 2200: A_acc=0.4590

Phase-A step 2400: A_acc=0.5005

Phase-A step 2600: A_acc=0.6238

Phase-A step 2800: A_acc=0.6481

Phase-A step 3000: A_acc=0.6825

Phase-A step 3200: A_acc=0.6224

Phase-A step 3400: A_acc=0.7358

Phase-A step 3600: A_acc=0.7111

Phase-A step 3800: A_acc=0.7198

Phase-A step 4000: A_acc=0.7693

Phase-A step 4200: A_acc=0.5864

Phase-A step 4400: A_acc=0.7462

Phase-A step 4600: A_acc=0.6702

Phase-A step 4800: A_acc=0.7621

Phase-A step 5000: A_acc=0.8337

Phase-A step 5200: A_acc=0.7537

Phase-A step 5400: A_acc=0.8409

Phase-A step 5600: A_acc=0.6319

Phase-A step 5800: A_acc=0.9275

Phase-A hit target at step 5800

saved smart_density_v8_l2/base_seed42_a.pt best_step=5800

[STAGE random] supervise=[0, 5, 6, 7, 13, 14, 15, 16, 18, 21, 22, 27] inner=[3, 25] hold=[1, 2, 4, 8]...

[L2 selection | split=random | seed 0]

[L2 family Table ] inner=0.054 fidS=1.000 id_gain=+0.9634 params= 21952 even_in=1.000 odd_in=1.000 form=0 [26s]

[L2 family LowRank ] inner=0.018 fidS=1.000 id_gain=+0.9634 params= 3248 even_in=1.000 odd_in=1.000 form=0 [28s]

[L2 family Generator] inner=0.036 fidS=0.116 id_gain=+0.0024 params= 784 even_in=0.113 odd_in=0.119 form=0 [33s]

[L2 family Affine ] inner=0.000 fidS=0.190 id_gain=+0.0033 params= 1568 even_in=0.232 odd_in=0.149 form=0 [26s]

[L2 family ShiftOnly] inner=0.000 fidS=0.083 id_gain=+0.0010 params= 28 even_in=0.083 odd_in=0.083 form=0 [26s]

DECISION[POOL-4] (pre-heldout): rank-1=Generator -> decision=NO-CLAIM abstain=1 (best inner 0.054 vs thr 0.5, strict)

DECISION[POOL-5 ext] (pre-heldout): rank-1=ShiftOnly -> decision=NO-CLAIM abstain=1

Stage-C heldout touch (first): Table=0.048 LowRank=0.061 Generator=0.031 Affine=0.000 ShiftOnly=0.000

VERDICT: rank-1=Generator DECISION=NO-CLAIM decision_correct=1 | rank1_transfer=FAIL [FIRST LIVE NO-CLAIM]

[L2 selection | split=random | seed 1]

[L2 family Table ] inner=0.018 fidS=1.000 id_gain=+0.9635 params= 21952 even_in=1.000 odd_in=1.000 form=0 [26s]

[L2 family LowRank ] inner=0.000 fidS=1.000 id_gain=+0.9634 params= 3248 even_in=1.000 odd_in=1.000 form=0 [27s]

[L2 family Generator] inner=0.036 fidS=0.116 id_gain=+0.0015 params= 784 even_in=0.113 odd_in=0.119 form=0 [32s]

[L2 family Affine ] inner=0.000 fidS=0.205 id_gain=+0.0031 params= 1568 even_in=0.250 odd_in=0.161 form=0 [25s]

[L2 family ShiftOnly] inner=0.000 fidS=0.083 id_gain=+0.0016 params= 28 even_in=0.083 odd_in=0.083 form=0 [26s]

DECISION[POOL-4] (pre-heldout): rank-1=Generator -> decision=NO-CLAIM abstain=1 (best inner 0.036 vs thr 0.5, strict)

DECISION[POOL-5 ext] (pre-heldout): rank-1=ShiftOnly -> decision=NO-CLAIM abstain=1

Stage-C heldout touch (first): Table=0.041 LowRank=0.028 Generator=0.031 Affine=0.000 ShiftOnly=0.000

VERDICT: rank-1=Generator DECISION=NO-CLAIM decision_correct=1 | rank1_transfer=FAIL [FIRST LIVE NO-CLAIM]

[L2 selection | split=random | seed 2]

[L2 family Table ] inner=0.018 fidS=1.000 id_gain=+0.9635 params= 21952 even_in=1.000 odd_in=1.000 form=0 [25s]

[L2 family LowRank ] inner=0.036 fidS=1.000 id_gain=+0.9635 params= 3248 even_in=1.000 odd_in=1.000 form=0 [26s]

[L2 family Generator] inner=0.036 fidS=0.116 id_gain=+0.0023 params= 784 even_in=0.113 odd_in=0.119 form=0 [32s]

[L2 family Affine ] inner=0.000 fidS=0.202 id_gain=+0.0032 params= 1568 even_in=0.256 odd_in=0.149 form=0 [25s]

[L2 family ShiftOnly] inner=0.000 fidS=0.083 id_gain=+0.0010 params= 28 even_in=0.083 odd_in=0.083 form=0 [26s]

DECISION[POOL-4] (pre-heldout): rank-1=Generator -> decision=NO-CLAIM abstain=1 (best inner 0.036 vs thr 0.5, strict)

DECISION[POOL-5 ext] (pre-heldout): rank-1=ShiftOnly -> decision=NO-CLAIM abstain=1

Stage-C heldout touch (first): Table=0.046 LowRank=0.033 Generator=0.031 Affine=0.000 ShiftOnly=0.000

VERDICT: rank-1=Generator DECISION=NO-CLAIM decision_correct=1 | rank1_transfer=FAIL [FIRST LIVE NO-CLAIM]

[L2 selection | split=random | seed 3]

[L2 family Table ] inner=0.071 fidS=1.000 id_gain=+0.9635 params= 21952 even_in=1.000 odd_in=1.000 form=0 [26s]

[L2 family LowRank ] inner=0.036 fidS=1.000 id_gain=+0.9633 params= 3248 even_in=1.000 odd_in=1.000 form=0 [26s]

[L2 family Generator] inner=0.036 fidS=0.116 id_gain=+0.0010 params= 784 even_in=0.119 odd_in=0.113 form=0 [32s]

[L2 family Affine ] inner=0.000 fidS=0.196 id_gain=+0.0025 params= 1568 even_in=0.238 odd_in=0.155 form=0 [25s]

[L2 family ShiftOnly] inner=0.000 fidS=0.083 id_gain=+0.0014 params= 28 even_in=0.083 odd_in=0.083 form=0 [26s]

DECISION[POOL-4] (pre-heldout): rank-1=Generator -> decision=NO-CLAIM abstain=1 (best inner 0.071 vs thr 0.5, strict)

DECISION[POOL-5 ext] (pre-heldout): rank-1=ShiftOnly -> decision=NO-CLAIM abstain=1

Stage-C heldout touch (first): Table=0.036 LowRank=0.043 Generator=0.031 Affine=0.000 ShiftOnly=0.000

VERDICT: rank-1=Generator DECISION=NO-CLAIM decision_correct=1 | rank1_transfer=FAIL [FIRST LIVE NO-CLAIM]

[L2 selection | split=random | seed 4]

[L2 family Table ] inner=0.071 fidS=1.000 id_gain=+0.9634 params= 21952 even_in=1.000 odd_in=1.000 form=0 [25s]

[L2 family LowRank ] inner=0.018 fidS=1.000 id_gain=+0.9636 params= 3248 even_in=1.000 odd_in=1.000 form=0 [26s]

[L2 family Generator] inner=0.036 fidS=0.116 id_gain=+0.0015 params= 784 even_in=0.119 odd_in=0.113 form=0 [33s]

[L2 family Affine ] inner=0.000 fidS=0.199 id_gain=+0.0022 params= 1568 even_in=0.244 odd_in=0.155 form=0 [25s]

[L2 family ShiftOnly] inner=0.000 fidS=0.083 id_gain=+0.0021 params= 28 even_in=0.083 odd_in=0.083 form=0 [26s]

DECISION[POOL-4] (pre-heldout): rank-1=Generator -> decision=NO-CLAIM abstain=1 (best inner 0.071 vs thr 0.5, strict)

DECISION[POOL-5 ext] (pre-heldout): rank-1=ShiftOnly -> decision=NO-CLAIM abstain=1

Stage-C heldout touch (first): Table=0.018 LowRank=0.023 Generator=0.031 Affine=0.000 ShiftOnly=0.000

VERDICT: rank-1=Generator DECISION=NO-CLAIM decision_correct=1 | rank1_transfer=FAIL [FIRST LIVE NO-CLAIM]

[L2 selection | split=random | seed 5]

[L2 family Table ] inner=0.036 fidS=1.000 id_gain=+0.9637 params= 21952 even_in=1.000 odd_in=1.000 form=0 [26s]

[L2 family LowRank ] inner=0.036 fidS=1.000 id_gain=+0.9634 params= 3248 even_in=1.000 odd_in=1.000 form=0 [26s]

[L2 family Generator] inner=0.036 fidS=0.116 id_gain=+0.0015 params= 784 even_in=0.113 odd_in=0.119 form=0 [33s]

[L2 family Affine ] inner=0.000 fidS=0.199 id_gain=+0.0023 params= 1568 even_in=0.238 odd_in=0.161 form=0 [26s]

[L2 family ShiftOnly] inner=0.000 fidS=0.083 id_gain=+0.0013 params= 28 even_in=0.083 odd_in=0.083 form=0 [27s]

DECISION[POOL-4] (pre-heldout): rank-1=Generator -> decision=NO-CLAIM abstain=1 (best inner 0.036 vs thr 0.5, strict)

DECISION[POOL-5 ext] (pre-heldout): rank-1=ShiftOnly -> decision=NO-CLAIM abstain=1

Stage-C heldout touch (first): Table=0.038 LowRank=0.038 Generator=0.031 Affine=0.000 ShiftOnly=0.000

VERDICT: rank-1=Generator DECISION=NO-CLAIM decision_correct=1 | rank1_transfer=FAIL [FIRST LIVE NO-CLAIM]

[L2 selection | split=random | seed 6]

[L2 family Table ] inner=0.018 fidS=1.000 id_gain=+0.9634 params= 21952 even_in=1.000 odd_in=1.000 form=0 [26s]

[L2 family LowRank ] inner=0.054 fidS=1.000 id_gain=+0.9636 params= 3248 even_in=1.000 odd_in=1.000 form=0 [27s]

[L2 family Generator] inner=0.036 fidS=0.116 id_gain=+0.0018 params= 784 even_in=0.113 odd_in=0.119 form=0 [34s]

[L2 family Affine ] inner=0.000 fidS=0.202 id_gain=+0.0028 params= 1568 even_in=0.250 odd_in=0.155 form=0 [26s]

[L2 family ShiftOnly] inner=0.000 fidS=0.083 id_gain=+0.0001 params= 28 even_in=0.083 odd_in=0.083 form=0 [26s]

DECISION[POOL-4] (pre-heldout): rank-1=Generator -> decision=NO-CLAIM abstain=1 (best inner 0.054 vs thr 0.5, strict)

DECISION[POOL-5 ext] (pre-heldout): rank-1=ShiftOnly -> decision=NO-CLAIM abstain=1

Stage-C heldout touch (first): Table=0.048 LowRank=0.028 Generator=0.031 Affine=0.000 ShiftOnly=0.000

VERDICT: rank-1=Generator DECISION=NO-CLAIM decision_correct=1 | rank1_transfer=FAIL [FIRST LIVE NO-CLAIM]

[L2 selection | split=random | seed 7]

[L2 family Table ] inner=0.018 fidS=1.000 id_gain=+0.9636 params= 21952 even_in=1.000 odd_in=1.000 form=0 [26s]

[L2 family LowRank ] inner=0.000 fidS=1.000 id_gain=+0.9635 params= 3248 even_in=1.000 odd_in=1.000 form=0 [26s]

[L2 family Generator] inner=0.036 fidS=0.116 id_gain=+0.0030 params= 784 even_in=0.119 odd_in=0.113 form=0 [33s]

[L2 family Affine ] inner=0.000 fidS=0.202 id_gain=+0.0033 params= 1568 even_in=0.244 odd_in=0.161 form=0 [25s]

[L2 family ShiftOnly] inner=0.000 fidS=0.083 id_gain=+0.0023 params= 28 even_in=0.083 odd_in=0.083 form=0 [26s]

DECISION[POOL-4] (pre-heldout): rank-1=Generator -> decision=NO-CLAIM abstain=1 (best inner 0.036 vs thr 0.5, strict)

DECISION[POOL-5 ext] (pre-heldout): rank-1=ShiftOnly -> decision=NO-CLAIM abstain=1

Stage-C heldout touch (first): Table=0.015 LowRank=0.031 Generator=0.031 Affine=0.000 ShiftOnly=0.000

VERDICT: rank-1=Generator DECISION=NO-CLAIM decision_correct=1 | rank1_transfer=FAIL [FIRST LIVE NO-CLAIM]

[STAGE random_anchor] supervise=[0, 1, 5, 6, 7, 13, 14, 15, 16, 18, 21, 22] inner=[3, 25] hold=[2, 4, 8, 9]...

[L2 selection | split=random_anchor | seed 0]

[L2 family Table ] inner=0.054 fidS=1.000 id_gain=+0.9638 params= 21952 even_in=1.000 odd_in=1.000 form=0 [26s]

[L2 family LowRank ] inner=0.036 fidS=1.000 id_gain=+0.9638 params= 3248 even_in=1.000 odd_in=1.000 form=0 [27s]

[L2 family Generator] inner=1.000 fidS=1.000 id_gain=+0.9560 params= 784 even_in=1.000 odd_in=1.000 form=1 [33s]

[L2 family Affine ] inner=0.000 fidS=0.176 id_gain=+0.0052 params= 1568 even_in=0.226 odd_in=0.125 form=0 [26s]

[L2 family ShiftOnly] inner=0.000 fidS=0.083 id_gain=+0.0037 params= 28 even_in=0.083 odd_in=0.083 form=0 [26s]

DECISION[POOL-4] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0 (best inner 1.000 vs thr 0.5, strict)

DECISION[POOL-5 ext] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0

Stage-C heldout touch (first): Table=0.048 LowRank=0.033 Generator=1.000 Affine=0.000 ShiftOnly=0.000

VERDICT: rank-1=Generator DECISION=Generator decision_correct=1 | rank1_transfer=PASS

[L2 selection | split=random_anchor | seed 1]

[L2 family Table ] inner=0.018 fidS=1.000 id_gain=+0.9639 params= 21952 even_in=1.000 odd_in=1.000 form=0 [26s]

[L2 family LowRank ] inner=0.071 fidS=1.000 id_gain=+0.9637 params= 3248 even_in=1.000 odd_in=1.000 form=0 [27s]

[L2 family Generator] inner=1.000 fidS=1.000 id_gain=+0.9556 params= 784 even_in=1.000 odd_in=1.000 form=1 [33s]

[L2 family Affine ] inner=0.000 fidS=0.179 id_gain=+0.0055 params= 1568 even_in=0.226 odd_in=0.131 form=0 [26s]

[L2 family ShiftOnly] inner=0.000 fidS=0.083 id_gain=+0.0029 params= 28 even_in=0.083 odd_in=0.083 form=0 [26s]

DECISION[POOL-4] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0 (best inner 1.000 vs thr 0.5, strict)

DECISION[POOL-5 ext] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0

Stage-C heldout touch (first): Table=0.043 LowRank=0.020 Generator=1.000 Affine=0.000 ShiftOnly=0.000

VERDICT: rank-1=Generator DECISION=Generator decision_correct=1 | rank1_transfer=PASS

[L2 selection | split=random_anchor | seed 2]

[L2 family Table ] inner=0.018 fidS=1.000 id_gain=+0.9638 params= 21952 even_in=1.000 odd_in=1.000 form=0 [26s]

[L2 family LowRank ] inner=0.054 fidS=1.000 id_gain=+0.9640 params= 3248 even_in=1.000 odd_in=1.000 form=0 [26s]

[L2 family Generator] inner=1.000 fidS=1.000 id_gain=+0.9558 params= 784 even_in=1.000 odd_in=1.000 form=1 [33s]

[L2 family Affine ] inner=0.000 fidS=0.185 id_gain=+0.0047 params= 1568 even_in=0.232 odd_in=0.137 form=0 [25s]

[L2 family ShiftOnly] inner=0.000 fidS=0.083 id_gain=+0.0021 params= 28 even_in=0.083 odd_in=0.083 form=0 [26s]

DECISION[POOL-4] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0 (best inner 1.000 vs thr 0.5, strict)

DECISION[POOL-5 ext] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0

Stage-C heldout touch (first): Table=0.041 LowRank=0.041 Generator=1.000 Affine=0.000 ShiftOnly=0.000

VERDICT: rank-1=Generator DECISION=Generator decision_correct=1 | rank1_transfer=PASS

[L2 selection | split=random_anchor | seed 3]

[L2 family Table ] inner=0.071 fidS=1.000 id_gain=+0.9638 params= 21952 even_in=1.000 odd_in=1.000 form=0 [25s]

[L2 family LowRank ] inner=0.036 fidS=1.000 id_gain=+0.9639 params= 3248 even_in=1.000 odd_in=1.000 form=0 [26s]

[L2 family Generator] inner=1.000 fidS=1.000 id_gain=+0.9541 params= 784 even_in=1.000 odd_in=1.000 form=1 [32s]

[L2 family Affine ] inner=0.000 fidS=0.179 id_gain=+0.0060 params= 1568 even_in=0.226 odd_in=0.131 form=0 [25s]

[L2 family ShiftOnly] inner=0.000 fidS=0.083 id_gain=+0.0034 params= 28 even_in=0.083 odd_in=0.083 form=0 [26s]

DECISION[POOL-4] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0 (best inner 1.000 vs thr 0.5, strict)

DECISION[POOL-5 ext] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0

Stage-C heldout touch (first): Table=0.038 LowRank=0.043 Generator=1.000 Affine=0.000 ShiftOnly=0.000

VERDICT: rank-1=Generator DECISION=Generator decision_correct=1 | rank1_transfer=PASS

[L2 selection | split=random_anchor | seed 4]

[L2 family Table ] inner=0.071 fidS=1.000 id_gain=+0.9639 params= 21952 even_in=1.000 odd_in=1.000 form=0 [25s]

[L2 family LowRank ] inner=0.018 fidS=1.000 id_gain=+0.9639 params= 3248 even_in=1.000 odd_in=1.000 form=0 [26s]

[L2 family Generator] inner=1.000 fidS=1.000 id_gain=+0.9556 params= 784 even_in=1.000 odd_in=1.000 form=1 [31s]

[L2 family Affine ] inner=0.000 fidS=0.185 id_gain=+0.0054 params= 1568 even_in=0.232 odd_in=0.137 form=0 [25s]

[L2 family ShiftOnly] inner=0.000 fidS=0.083 id_gain=+0.0022 params= 28 even_in=0.083 odd_in=0.083 form=0 [26s]

DECISION[POOL-4] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0 (best inner 1.000 vs thr 0.5, strict)

DECISION[POOL-5 ext] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0

Stage-C heldout touch (first): Table=0.013 LowRank=0.033 Generator=1.000 Affine=0.000 ShiftOnly=0.000

VERDICT: rank-1=Generator DECISION=Generator decision_correct=1 | rank1_transfer=PASS

[L2 selection | split=random_anchor | seed 5]

[L2 family Table ] inner=0.036 fidS=1.000 id_gain=+0.9638 params= 21952 even_in=1.000 odd_in=1.000 form=0 [25s]

[L2 family LowRank ] inner=0.000 fidS=1.000 id_gain=+0.9639 params= 3248 even_in=1.000 odd_in=1.000 form=0 [26s]

[L2 family Generator] inner=1.000 fidS=1.000 id_gain=+0.9550 params= 784 even_in=1.000 odd_in=1.000 form=1 [33s]

[L2 family Affine ] inner=0.000 fidS=0.188 id_gain=+0.0053 params= 1568 even_in=0.238 odd_in=0.137 form=0 [26s]

[L2 family ShiftOnly] inner=0.000 fidS=0.083 id_gain=+0.0024 params= 28 even_in=0.083 odd_in=0.083 form=0 [26s]

DECISION[POOL-4] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0 (best inner 1.000 vs thr 0.5, strict)

DECISION[POOL-5 ext] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0

Stage-C heldout touch (first): Table=0.031 LowRank=0.031 Generator=1.000 Affine=0.000 ShiftOnly=0.000

VERDICT: rank-1=Generator DECISION=Generator decision_correct=1 | rank1_transfer=PASS

[L2 selection | split=random_anchor | seed 6]

[L2 family Table ] inner=0.018 fidS=1.000 id_gain=+0.9638 params= 21952 even_in=1.000 odd_in=1.000 form=0 [26s]

[L2 family LowRank ] inner=0.036 fidS=1.000 id_gain=+0.9639 params= 3248 even_in=1.000 odd_in=1.000 form=0 [26s]

[L2 family Generator] inner=1.000 fidS=1.000 id_gain=+0.9542 params= 784 even_in=1.000 odd_in=1.000 form=1 [32s]

[L2 family Affine ] inner=0.000 fidS=0.179 id_gain=+0.0061 params= 1568 even_in=0.226 odd_in=0.131 form=0 [25s]

[L2 family ShiftOnly] inner=0.000 fidS=0.083 id_gain=+0.0026 params= 28 even_in=0.083 odd_in=0.083 form=0 [26s]

DECISION[POOL-4] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0 (best inner 1.000 vs thr 0.5, strict)

DECISION[POOL-5 ext] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0

Stage-C heldout touch (first): Table=0.048 LowRank=0.026 Generator=1.000 Affine=0.000 ShiftOnly=0.000

VERDICT: rank-1=Generator DECISION=Generator decision_correct=1 | rank1_transfer=PASS

[L2 selection | split=random_anchor | seed 7]

[L2 family Table ] inner=0.018 fidS=1.000 id_gain=+0.9638 params= 21952 even_in=1.000 odd_in=1.000 form=0 [25s]

[L2 family LowRank ] inner=0.036 fidS=1.000 id_gain=+0.9638 params= 3248 even_in=1.000 odd_in=1.000 form=0 [26s]

[L2 family Generator] inner=1.000 fidS=1.000 id_gain=+0.9546 params= 784 even_in=1.000 odd_in=1.000 form=1 [32s]

[L2 family Affine ] inner=0.000 fidS=0.179 id_gain=+0.0053 params= 1568 even_in=0.220 odd_in=0.137 form=0 [25s]

[L2 family ShiftOnly] inner=0.000 fidS=0.083 id_gain=+0.0026 params= 28 even_in=0.083 odd_in=0.083 form=0 [26s]

DECISION[POOL-4] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0 (best inner 1.000 vs thr 0.5, strict)

DECISION[POOL-5 ext] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0

Stage-C heldout touch (first): Table=0.015 LowRank=0.028 Generator=1.000 Affine=0.000 ShiftOnly=0.000

VERDICT: rank-1=Generator DECISION=Generator decision_correct=1 | rank1_transfer=PASS

[geo random | Generator | init=shift | steps= 2500 | seed 0]

fidS=1.000 inner=1.000 fidH=1.000 form=1 [32s]

[geo random | Generator | init=shift | steps= 2500 | seed 1]

fidS=1.000 inner=1.000 fidH=1.000 form=1 [31s]

[geo random | Generator | init=shift | steps= 2500 | seed 2]

fidS=1.000 inner=1.000 fidH=1.000 form=1 [32s]

[geo random | Generator | init=shift | steps= 2500 | seed 3]

fidS=1.000 inner=1.000 fidH=1.000 form=1 [31s]

[geo random | Generator | init=shift | steps= 2500 | seed 4]

fidS=1.000 inner=1.000 fidH=1.000 form=1 [32s]

[geo random | Generator | init=shift | steps= 2500 | seed 5]

fidS=1.000 inner=1.000 fidH=1.000 form=1 [32s]

[geo random | Generator | init=shift | steps= 2500 | seed 6]

fidS=1.000 inner=1.000 fidH=1.000 form=1 [31s]

[geo random | Generator | init=shift | steps= 2500 | seed 7]

fidS=1.000 inner=1.000 fidH=1.000 form=1 [32s]

[geo random | Generator | init=rand | steps= 2500 | seed 0]

fidS=0.116 inner=0.036 fidH=0.038 form=0 [31s]

[geo random | Generator | init=rand | steps= 2500 | seed 1]

fidS=0.116 inner=0.036 fidH=0.036 form=0 [32s]

[geo random | Generator | init=rand | steps= 2500 | seed 2]

fidS=0.116 inner=0.036 fidH=0.036 form=0 [32s]

[geo random | Generator | init=rand | steps= 2500 | seed 3]

fidS=0.116 inner=0.036 fidH=0.036 form=0 [31s]

[geo random | Generator | init=rand | steps= 2500 | seed 4]

fidS=0.116 inner=0.036 fidH=0.033 form=0 [32s]

[geo random | Generator | init=rand | steps= 2500 | seed 5]

fidS=0.116 inner=0.036 fidH=0.038 form=0 [31s]

[geo random | Generator | init=rand | steps= 2500 | seed 6]

fidS=0.116 inner=0.036 fidH=0.036 form=0 [32s]

[geo random | Generator | init=rand | steps= 2500 | seed 7]

fidS=0.116 inner=0.036 fidH=0.036 form=0 [33s]

[geo gcd4 | Generator | init=id | steps= 2500 | seed 0]

fidS=0.400 inner=0.250 fidH=0.031 form=0 [32s]

[geo gcd4 | Generator | init=id | steps= 2500 | seed 1]

fidS=0.400 inner=0.250 fidH=0.043 form=0 [34s]

[geo gcd4 | Generator | init=id | steps= 2500 | seed 2]

fidS=0.400 inner=0.250 fidH=0.037 form=0 [33s]

[geo gcd4 | Generator | init=id | steps= 2500 | seed 3]

fidS=0.400 inner=0.250 fidH=0.027 form=0 [32s]

[geo gcd4 | Generator | init=id | steps= 2500 | seed 4]

fidS=0.400 inner=0.250 fidH=0.041 form=0 [33s]

[geo gcd4 | Generator | init=id | steps= 2500 | seed 5]

fidS=0.400 inner=0.250 fidH=0.036 form=0 [32s]

[geo gcd4 | Generator | init=id | steps= 2500 | seed 6]

fidS=0.400 inner=0.250 fidH=0.034 form=0 [32s]

[geo gcd4 | Generator | init=id | steps= 2500 | seed 7]

fidS=0.400 inner=0.250 fidH=0.036 form=0 [33s]

[geo gcd4 | Table | init=id | steps= 2500 | seed 0]

fidS=0.279 inner=0.036 fidH=0.046 form=0 [25s]

[geo gcd4 | Table | init=id | steps= 2500 | seed 1]

fidS=0.271 inner=0.107 fidH=0.031 form=0 [25s]

[geo gcd4 | Table | init=id | steps= 2500 | seed 2]

fidS=0.271 inner=0.054 fidH=0.048 form=0 [25s]

[geo gcd4 | Table | init=id | steps= 2500 | seed 3]

fidS=0.257 inner=0.036 fidH=0.043 form=0 [25s]

[geo gcd4 | Table | init=id | steps= 2500 | seed 4]

fidS=0.271 inner=0.018 fidH=0.037 form=0 [25s]

[geo gcd4 | Table | init=id | steps= 2500 | seed 5]

fidS=0.271 inner=0.036 fidH=0.041 form=0 [26s]

[geo gcd4 | Table | init=id | steps= 2500 | seed 6]

fidS=0.293 inner=0.036 fidH=0.039 form=0 [26s]

[geo gcd4 | Table | init=id | steps= 2500 | seed 7]

fidS=0.264 inner=0.018 fidH=0.019 form=0 [25s]

[geo gcd7 | Generator | init=id | steps= 2500 | seed 0]

fidS=0.554 inner=0.054 fidH=0.034 form=0 [32s]

[geo gcd7 | Generator | init=id | steps= 2500 | seed 1]

fidS=0.554 inner=0.054 fidH=0.037 form=0 [32s]

[geo gcd7 | Generator | init=id | steps= 2500 | seed 2]

fidS=0.554 inner=0.054 fidH=0.036 form=0 [32s]

[geo gcd7 | Generator | init=id | steps= 2500 | seed 3]

fidS=0.554 inner=0.054 fidH=0.031 form=0 [32s]

[geo gcd7 | Generator | init=id | steps= 2500 | seed 4]

fidS=0.554 inner=0.054 fidH=0.036 form=0 [33s]

[geo gcd7 | Generator | init=id | steps= 2500 | seed 5]

fidS=0.554 inner=0.054 fidH=0.033 form=0 [32s]

[geo gcd7 | Generator | init=id | steps= 2500 | seed 6]

fidS=0.554 inner=0.054 fidH=0.034 form=0 [32s]

[geo gcd7 | Generator | init=id | steps= 2500 | seed 7]

fidS=0.554 inner=0.054 fidH=0.036 form=0 [32s]

[geo gcd7 | Table | init=id | steps= 2500 | seed 0]

fidS=0.196 inner=0.036 fidH=0.043 form=0 [25s]

[geo gcd7 | Table | init=id | steps= 2500 | seed 1]

fidS=0.179 inner=0.018 fidH=0.039 form=0 [27s]

[geo gcd7 | Table | init=id | steps= 2500 | seed 2]

fidS=0.161 inner=0.089 fidH=0.046 form=0 [27s]

[geo gcd7 | Table | init=id | steps= 2500 | seed 3]

fidS=0.143 inner=0.036 fidH=0.040 form=0 [26s]

[geo gcd7 | Table | init=id | steps= 2500 | seed 4]

fidS=0.161 inner=0.018 fidH=0.036 form=0 [25s]

[geo gcd7 | Table | init=id | steps= 2500 | seed 5]

fidS=0.179 inner=0.054 fidH=0.039 form=0 [25s]

[geo gcd7 | Table | init=id | steps= 2500 | seed 6]

fidS=0.161 inner=0.071 fidH=0.043 form=0 [25s]

[geo gcd7 | Table | init=id | steps= 2500 | seed 7]

fidS=0.196 inner=0.036 fidH=0.015 form=0 [26s]

[multibase 43 | mode a] ...

Phase-A step 200: A_acc=0.0712

Phase-A step 400: A_acc=0.0797

Phase-A step 600: A_acc=0.0989

Phase-A step 800: A_acc=0.1072

Phase-A step 1000: A_acc=0.1137

Phase-A step 1200: A_acc=0.1269

Phase-A step 1400: A_acc=0.1353

Phase-A step 1600: A_acc=0.1502

Phase-A step 1800: A_acc=0.1757

Phase-A step 2000: A_acc=0.2117

Phase-A step 2200: A_acc=0.3357

Phase-A step 2400: A_acc=0.3316

Phase-A step 2600: A_acc=0.3751

Phase-A step 2800: A_acc=0.5005

Phase-A step 3000: A_acc=0.5320

Phase-A step 3200: A_acc=0.5221

Phase-A step 3400: A_acc=0.4885

Phase-A step 3600: A_acc=0.6769

Phase-A step 3800: A_acc=0.5959

Phase-A step 4000: A_acc=0.5573

Phase-A step 4200: A_acc=0.7054

Phase-A step 4400: A_acc=0.5728

Phase-A step 4600: A_acc=0.7040

Phase-A step 4800: A_acc=0.6277

Phase-A step 5000: A_acc=0.6915

Phase-A step 5200: A_acc=0.4477

Phase-A step 5400: A_acc=0.7972

Phase-A step 5600: A_acc=0.8020

Phase-A step 5800: A_acc=0.8267

Phase-A step 6000: A_acc=0.8079

Phase-A step 6200: A_acc=0.8607

Phase-A step 6400: A_acc=0.8328

Phase-A step 6600: A_acc=0.8623

Phase-A step 6800: A_acc=0.8060

Phase-A step 7000: A_acc=0.9477

Phase-A hit target at step 7000

saved smart_density_v8_l2/base_seed43_a.pt best_step=7000

[STAGE contiguous] supervise=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] inner=[12, 13] hold=[14, 15, 16, 17]...

[L2 selection | split=contiguous | seed 0]

[L2 family Table ] inner=0.071 fidS=1.000 id_gain=+0.9630 params= 21952 even_in=1.000 odd_in=1.000 form=0 [26s]

[L2 family LowRank ] inner=0.000 fidS=1.000 id_gain=+0.9630 params= 3248 even_in=1.000 odd_in=1.000 form=0 [26s]

[L2 family Generator] inner=1.000 fidS=1.000 id_gain=+0.9558 params= 784 even_in=1.000 odd_in=1.000 form=1 [32s]

[L2 family Affine ] inner=0.000 fidS=0.173 id_gain=+0.0046 params= 1568 even_in=0.214 odd_in=0.131 form=0 [25s]

[L2 family ShiftOnly] inner=0.000 fidS=0.083 id_gain=+0.0057 params= 28 even_in=0.083 odd_in=0.083 form=0 [26s]

DECISION[POOL-4] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0 (best inner 1.000 vs thr 0.5, strict)

DECISION[POOL-5 ext] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0

Stage-C heldout touch (first): Table=0.048 LowRank=0.028 Generator=1.000 Affine=0.000 ShiftOnly=0.000

VERDICT: rank-1=Generator DECISION=Generator decision_correct=1 | rank1_transfer=PASS

[L2 selection | split=contiguous | seed 1]

[L2 family Table ] inner=0.054 fidS=1.000 id_gain=+0.9634 params= 21952 even_in=1.000 odd_in=1.000 form=0 [25s]

[L2 family LowRank ] inner=0.018 fidS=1.000 id_gain=+0.9629 params= 3248 even_in=1.000 odd_in=1.000 form=0 [27s]

[L2 family Generator] inner=1.000 fidS=1.000 id_gain=+0.9566 params= 784 even_in=1.000 odd_in=1.000 form=1 [32s]

[L2 family Affine ] inner=0.000 fidS=0.158 id_gain=+0.0046 params= 1568 even_in=0.190 odd_in=0.125 form=0 [25s]

[L2 family ShiftOnly] inner=0.000 fidS=0.083 id_gain=+0.0027 params= 28 even_in=0.083 odd_in=0.083 form=0 [26s]

DECISION[POOL-4] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0 (best inner 1.000 vs thr 0.5, strict)

DECISION[POOL-5 ext] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0

Stage-C heldout touch (first): Table=0.031 LowRank=0.046 Generator=1.000 Affine=0.000 ShiftOnly=0.000

VERDICT: rank-1=Generator DECISION=Generator decision_correct=1 | rank1_transfer=PASS

[L2 selection | split=contiguous | seed 2]

[L2 family Table ] inner=0.000 fidS=1.000 id_gain=+0.9631 params= 21952 even_in=1.000 odd_in=1.000 form=0 [25s]

[L2 family LowRank ] inner=0.018 fidS=1.000 id_gain=+0.9631 params= 3248 even_in=1.000 odd_in=1.000 form=0 [26s]

[L2 family Generator] inner=1.000 fidS=1.000 id_gain=+0.9560 params= 784 even_in=1.000 odd_in=1.000 form=1 [32s]

[L2 family Affine ] inner=0.000 fidS=0.176 id_gain=+0.0048 params= 1568 even_in=0.208 odd_in=0.143 form=0 [26s]

[L2 family ShiftOnly] inner=0.000 fidS=0.083 id_gain=+0.0031 params= 28 even_in=0.083 odd_in=0.083 form=0 [27s]

DECISION[POOL-4] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0 (best inner 1.000 vs thr 0.5, strict)

DECISION[POOL-5 ext] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0

Stage-C heldout touch (first): Table=0.033 LowRank=0.048 Generator=1.000 Affine=0.000 ShiftOnly=0.000

VERDICT: rank-1=Generator DECISION=Generator decision_correct=1 | rank1_transfer=PASS

[L2 selection | split=contiguous | seed 3]

[L2 family Table ] inner=0.071 fidS=1.000 id_gain=+0.9631 params= 21952 even_in=1.000 odd_in=1.000 form=0 [26s]

[L2 family LowRank ] inner=0.036 fidS=1.000 id_gain=+0.9629 params= 3248 even_in=1.000 odd_in=1.000 form=0 [27s]

[L2 family Generator] inner=1.000 fidS=1.000 id_gain=+0.9559 params= 784 even_in=1.000 odd_in=1.000 form=1 [35s]

[L2 family Affine ] inner=0.000 fidS=0.164 id_gain=+0.0048 params= 1568 even_in=0.185 odd_in=0.143 form=0 [26s]

[L2 family ShiftOnly] inner=0.000 fidS=0.083 id_gain=+0.0025 params= 28 even_in=0.083 odd_in=0.083 form=0 [27s]

DECISION[POOL-4] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0 (best inner 1.000 vs thr 0.5, strict)

DECISION[POOL-5 ext] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0

Stage-C heldout touch (first): Table=0.033 LowRank=0.026 Generator=1.000 Affine=0.000 ShiftOnly=0.000

VERDICT: rank-1=Generator DECISION=Generator decision_correct=1 | rank1_transfer=PASS

[STAGE evenodd] supervise=[0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22] inner=[24, 26] hold=[1, 3, 5, 7]...

[L2 selection | split=evenodd | seed 0]

[L2 family Table ] inner=0.054 fidS=0.527 id_gain=+0.9618 params= 21952 even_in=1.000 odd_in=0.054 form=0 [26s]

[L2 family LowRank ] inner=0.054 fidS=0.500 id_gain=+0.9617 params= 3248 even_in=1.000 odd_in=0.000 form=0 [27s]

[L2 family Generator] inner=0.500 fidS=0.542 id_gain=+0.0749 params= 784 even_in=1.000 odd_in=0.083 form=0 [32s]

[L2 family Affine ] inner=0.000 fidS=0.042 id_gain=+0.0330 params= 1568 even_in=0.083 odd_in=0.000 form=0 [26s]

[L2 family ShiftOnly] inner=0.000 fidS=0.083 id_gain=+0.0327 params= 28 even_in=0.083 odd_in=0.083 form=0 [27s]

DECISION[POOL-4] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0 (best inner 0.500 vs thr 0.5, strict)

DECISION[POOL-5 ext] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0

Stage-C heldout touch (first): Table=0.043 LowRank=0.051 Generator=0.028 Affine=0.000 ShiftOnly=0.000

VERDICT: rank-1=Generator DECISION=Generator decision_correct=0 | rank1_transfer=FAIL [SPLIT-HOSTILE]

[L2 selection | split=evenodd | seed 1]

[L2 family Table ] inner=0.018 fidS=0.518 id_gain=+0.9618 params= 21952 even_in=1.000 odd_in=0.036 form=0 [26s]

[L2 family LowRank ] inner=0.089 fidS=0.500 id_gain=+0.9619 params= 3248 even_in=1.000 odd_in=0.000 form=0 [27s]

[L2 family Generator] inner=0.500 fidS=0.542 id_gain=+0.0769 params= 784 even_in=1.000 odd_in=0.083 form=0 [32s]

[L2 family Affine ] inner=0.000 fidS=0.042 id_gain=+0.0347 params= 1568 even_in=0.083 odd_in=0.000 form=0 [25s]

[L2 family ShiftOnly] inner=0.000 fidS=0.083 id_gain=+0.0343 params= 28 even_in=0.083 odd_in=0.083 form=0 [26s]

DECISION[POOL-4] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0 (best inner 0.500 vs thr 0.5, strict)

DECISION[POOL-5 ext] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0

Stage-C heldout touch (first): Table=0.033 LowRank=0.038 Generator=0.051 Affine=0.000 ShiftOnly=0.000

VERDICT: rank-1=Generator DECISION=Generator decision_correct=0 | rank1_transfer=FAIL [SPLIT-HOSTILE]

[L2 selection | split=evenodd | seed 2]

[L2 family Table ] inner=0.071 fidS=0.524 id_gain=+0.9618 params= 21952 even_in=1.000 odd_in=0.048 form=0 [25s]

[L2 family LowRank ] inner=0.054 fidS=0.500 id_gain=+0.9616 params= 3248 even_in=1.000 odd_in=0.000 form=0 [26s]

[L2 family Generator] inner=0.500 fidS=0.542 id_gain=+0.0756 params= 784 even_in=1.000 odd_in=0.083 form=0 [32s]

[L2 family Affine ] inner=0.000 fidS=0.042 id_gain=+0.0330 params= 1568 even_in=0.083 odd_in=0.000 form=0 [25s]

[L2 family ShiftOnly] inner=0.000 fidS=0.083 id_gain=+0.0327 params= 28 even_in=0.083 odd_in=0.083 form=0 [26s]

DECISION[POOL-4] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0 (best inner 0.500 vs thr 0.5, strict)

DECISION[POOL-5 ext] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0

Stage-C heldout touch (first): Table=0.018 LowRank=0.031 Generator=0.018 Affine=0.000 ShiftOnly=0.000

VERDICT: rank-1=Generator DECISION=Generator decision_correct=0 | rank1_transfer=FAIL [SPLIT-HOSTILE]

[L2 selection | split=evenodd | seed 3]

[L2 family Table ] inner=0.054 fidS=0.524 id_gain=+0.9618 params= 21952 even_in=1.000 odd_in=0.048 form=0 [25s]

[L2 family LowRank ] inner=0.071 fidS=0.500 id_gain=+0.9618 params= 3248 even_in=1.000 odd_in=0.000 form=0 [25s]

[L2 family Generator] inner=0.500 fidS=0.542 id_gain=+0.0754 params= 784 even_in=1.000 odd_in=0.083 form=0 [32s]

[L2 family Affine ] inner=0.000 fidS=0.042 id_gain=+0.0314 params= 1568 even_in=0.083 odd_in=0.000 form=0 [25s]

[L2 family ShiftOnly] inner=0.000 fidS=0.083 id_gain=+0.0323 params= 28 even_in=0.083 odd_in=0.083 form=0 [26s]

DECISION[POOL-4] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0 (best inner 0.500 vs thr 0.5, strict)

DECISION[POOL-5 ext] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0

Stage-C heldout touch (first): Table=0.043 LowRank=0.031 Generator=0.031 Affine=0.000 ShiftOnly=0.000

VERDICT: rank-1=Generator DECISION=Generator decision_correct=0 | rank1_transfer=FAIL [SPLIT-HOSTILE]

[sentinel | contiguous | seed 0] dynamic canary

scrambled-row fidH=0.043 (thr 0.08) alarm=0

[sentinel | evenodd | seed 0] dynamic canary

scrambled-row fidH=0.038 (thr 0.08) alarm=0

[multibase 123 | mode a] ...

Phase-A step 200: A_acc=0.0703

Phase-A step 400: A_acc=0.0778

Phase-A step 600: A_acc=0.1033

Phase-A step 800: A_acc=0.1099

Phase-A step 1000: A_acc=0.1150

Phase-A step 1200: A_acc=0.1542

Phase-A step 1400: A_acc=0.2495

Phase-A step 1600: A_acc=0.3989

Phase-A step 1800: A_acc=0.4586

Phase-A step 2000: A_acc=0.5160

Phase-A step 2200: A_acc=0.6082

Phase-A step 2400: A_acc=0.6601

Phase-A step 2600: A_acc=0.5749

Phase-A step 2800: A_acc=0.7762

Phase-A step 3000: A_acc=0.7028

Phase-A step 3200: A_acc=0.5917

Phase-A step 3400: A_acc=0.6072

Phase-A step 3600: A_acc=0.6893

Phase-A step 3800: A_acc=0.7906

Phase-A step 4000: A_acc=0.9189

Phase-A hit target at step 4000

saved smart_density_v8_l2/base_seed123_a.pt best_step=4000

[STAGE contiguous] supervise=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] inner=[12, 13] hold=[14, 15, 16, 17]...

[L2 selection | split=contiguous | seed 0]

[L2 family Table ] inner=0.018 fidS=1.000 id_gain=+0.9650 params= 21952 even_in=1.000 odd_in=1.000 form=0 [25s]

[L2 family LowRank ] inner=0.054 fidS=1.000 id_gain=+0.9651 params= 3248 even_in=1.000 odd_in=1.000 form=0 [26s]

[L2 family Generator] inner=1.000 fidS=1.000 id_gain=+0.9610 params= 784 even_in=1.000 odd_in=1.000 form=1 [32s]

[L2 family Affine ] inner=0.000 fidS=0.152 id_gain=+0.0050 params= 1568 even_in=0.190 odd_in=0.113 form=0 [25s]

[L2 family ShiftOnly] inner=0.000 fidS=0.083 id_gain=+0.0038 params= 28 even_in=0.083 odd_in=0.083 form=0 [26s]

DECISION[POOL-4] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0 (best inner 1.000 vs thr 0.5, strict)

DECISION[POOL-5 ext] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0

Stage-C heldout touch (first): Table=0.036 LowRank=0.036 Generator=1.000 Affine=0.000 ShiftOnly=0.000

VERDICT: rank-1=Generator DECISION=Generator decision_correct=1 | rank1_transfer=PASS

[L2 selection | split=contiguous | seed 1]

[L2 family Table ] inner=0.107 fidS=1.000 id_gain=+0.9651 params= 21952 even_in=1.000 odd_in=1.000 form=0 [25s]

[L2 family LowRank ] inner=0.018 fidS=1.000 id_gain=+0.9651 params= 3248 even_in=1.000 odd_in=1.000 form=0 [26s]

[L2 family Generator] inner=1.000 fidS=1.000 id_gain=+0.9607 params= 784 even_in=1.000 odd_in=1.000 form=1 [31s]

[L2 family Affine ] inner=0.000 fidS=0.152 id_gain=+0.0058 params= 1568 even_in=0.185 odd_in=0.119 form=0 [25s]

[L2 family ShiftOnly] inner=0.000 fidS=0.083 id_gain=+0.0028 params= 28 even_in=0.083 odd_in=0.083 form=0 [26s]

DECISION[POOL-4] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0 (best inner 1.000 vs thr 0.5, strict)

DECISION[POOL-5 ext] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0

Stage-C heldout touch (first): Table=0.028 LowRank=0.038 Generator=1.000 Affine=0.000 ShiftOnly=0.000

VERDICT: rank-1=Generator DECISION=Generator decision_correct=1 | rank1_transfer=PASS

[L2 selection | split=contiguous | seed 2]

[L2 family Table ] inner=0.036 fidS=1.000 id_gain=+0.9651 params= 21952 even_in=1.000 odd_in=1.000 form=0 [25s]

[L2 family LowRank ] inner=0.036 fidS=1.000 id_gain=+0.9651 params= 3248 even_in=1.000 odd_in=1.000 form=0 [27s]

[L2 family Generator] inner=1.000 fidS=1.000 id_gain=+0.9606 params= 784 even_in=1.000 odd_in=1.000 form=1 [31s]

[L2 family Affine ] inner=0.000 fidS=0.152 id_gain=+0.0063 params= 1568 even_in=0.167 odd_in=0.137 form=0 [25s]

[L2 family ShiftOnly] inner=0.000 fidS=0.083 id_gain=+0.0036 params= 28 even_in=0.083 odd_in=0.083 form=0 [26s]

DECISION[POOL-4] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0 (best inner 1.000 vs thr 0.5, strict)

DECISION[POOL-5 ext] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0

Stage-C heldout touch (first): Table=0.026 LowRank=0.043 Generator=1.000 Affine=0.000 ShiftOnly=0.000

VERDICT: rank-1=Generator DECISION=Generator decision_correct=1 | rank1_transfer=PASS

[L2 selection | split=contiguous | seed 3]

[L2 family Table ] inner=0.054 fidS=1.000 id_gain=+0.9651 params= 21952 even_in=1.000 odd_in=1.000 form=0 [25s]

[L2 family LowRank ] inner=0.018 fidS=1.000 id_gain=+0.9650 params= 3248 even_in=1.000 odd_in=1.000 form=0 [26s]

[L2 family Generator] inner=1.000 fidS=1.000 id_gain=+0.9603 params= 784 even_in=1.000 odd_in=1.000 form=1 [31s]

[L2 family Affine ] inner=0.000 fidS=0.149 id_gain=+0.0056 params= 1568 even_in=0.173 odd_in=0.125 form=0 [25s]

[L2 family ShiftOnly] inner=0.000 fidS=0.083 id_gain=+0.0029 params= 28 even_in=0.083 odd_in=0.083 form=0 [25s]

DECISION[POOL-4] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0 (best inner 1.000 vs thr 0.5, strict)

DECISION[POOL-5 ext] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0

Stage-C heldout touch (first): Table=0.028 LowRank=0.031 Generator=1.000 Affine=0.000 ShiftOnly=0.000

VERDICT: rank-1=Generator DECISION=Generator decision_correct=1 | rank1_transfer=PASS

[STAGE evenodd] supervise=[0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22] inner=[24, 26] hold=[1, 3, 5, 7]...

[L2 selection | split=evenodd | seed 0]

[L2 family Table ] inner=0.071 fidS=0.518 id_gain=+0.9659 params= 21952 even_in=1.000 odd_in=0.036 form=0 [25s]

[L2 family LowRank ] inner=0.071 fidS=0.500 id_gain=+0.9659 params= 3248 even_in=1.000 odd_in=0.000 form=0 [26s]

[L2 family Generator] inner=0.500 fidS=0.542 id_gain=+0.0782 params= 784 even_in=1.000 odd_in=0.083 form=0 [32s]

[L2 family Affine ] inner=0.000 fidS=0.045 id_gain=+0.0357 params= 1568 even_in=0.089 odd_in=0.000 form=0 [25s]

[L2 family ShiftOnly] inner=0.000 fidS=0.083 id_gain=+0.0354 params= 28 even_in=0.083 odd_in=0.083 form=0 [26s]

DECISION[POOL-4] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0 (best inner 0.500 vs thr 0.5, strict)

DECISION[POOL-5 ext] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0

Stage-C heldout touch (first): Table=0.028 LowRank=0.043 Generator=0.038 Affine=0.000 ShiftOnly=0.000

VERDICT: rank-1=Generator DECISION=Generator decision_correct=0 | rank1_transfer=FAIL [SPLIT-HOSTILE]

[L2 selection | split=evenodd | seed 1]

[L2 family Table ] inner=0.054 fidS=0.515 id_gain=+0.9659 params= 21952 even_in=1.000 odd_in=0.030 form=0 [25s]

[L2 family LowRank ] inner=0.054 fidS=0.500 id_gain=+0.9659 params= 3248 even_in=1.000 odd_in=0.000 form=0 [26s]

[L2 family Generator] inner=0.500 fidS=0.542 id_gain=+0.0803 params= 784 even_in=1.000 odd_in=0.083 form=0 [32s]

[L2 family Affine ] inner=0.000 fidS=0.045 id_gain=+0.0362 params= 1568 even_in=0.089 odd_in=0.000 form=0 [25s]

[L2 family ShiftOnly] inner=0.000 fidS=0.083 id_gain=+0.0372 params= 28 even_in=0.083 odd_in=0.083 form=0 [26s]

DECISION[POOL-4] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0 (best inner 0.500 vs thr 0.5, strict)

DECISION[POOL-5 ext] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0

Stage-C heldout touch (first): Table=0.033 LowRank=0.033 Generator=0.038 Affine=0.000 ShiftOnly=0.000

VERDICT: rank-1=Generator DECISION=Generator decision_correct=0 | rank1_transfer=FAIL [SPLIT-HOSTILE]

[L2 selection | split=evenodd | seed 2]

[L2 family Table ] inner=0.018 fidS=0.521 id_gain=+0.9659 params= 21952 even_in=1.000 odd_in=0.042 form=0 [25s]

[L2 family LowRank ] inner=0.054 fidS=0.500 id_gain=+0.9659 params= 3248 even_in=1.000 odd_in=0.000 form=0 [26s]

[L2 family Generator] inner=0.500 fidS=0.542 id_gain=+0.0786 params= 784 even_in=1.000 odd_in=0.083 form=0 [32s]

[L2 family Affine ] inner=0.000 fidS=0.042 id_gain=+0.0354 params= 1568 even_in=0.083 odd_in=0.000 form=0 [25s]

[L2 family ShiftOnly] inner=0.000 fidS=0.083 id_gain=+0.0354 params= 28 even_in=0.083 odd_in=0.083 form=0 [26s]

DECISION[POOL-4] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0 (best inner 0.500 vs thr 0.5, strict)

DECISION[POOL-5 ext] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0

Stage-C heldout touch (first): Table=0.031 LowRank=0.028 Generator=0.020 Affine=0.000 ShiftOnly=0.000

VERDICT: rank-1=Generator DECISION=Generator decision_correct=0 | rank1_transfer=FAIL [SPLIT-HOSTILE]

[L2 selection | split=evenodd | seed 3]

[L2 family Table ] inner=0.000 fidS=0.527 id_gain=+0.9659 params= 21952 even_in=1.000 odd_in=0.054 form=0 [26s]

[L2 family LowRank ] inner=0.000 fidS=0.500 id_gain=+0.9659 params= 3248 even_in=1.000 odd_in=0.000 form=0 [26s]

[L2 family Generator] inner=0.500 fidS=0.542 id_gain=+0.0777 params= 784 even_in=1.000 odd_in=0.083 form=0 [32s]

[L2 family Affine ] inner=0.000 fidS=0.045 id_gain=+0.0343 params= 1568 even_in=0.089 odd_in=0.000 form=0 [25s]

[L2 family ShiftOnly] inner=0.000 fidS=0.083 id_gain=+0.0332 params= 28 even_in=0.083 odd_in=0.083 form=0 [26s]

DECISION[POOL-4] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0 (best inner 0.500 vs thr 0.5, strict)

DECISION[POOL-5 ext] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0

Stage-C heldout touch (first): Table=0.031 LowRank=0.026 Generator=0.051 Affine=0.000 ShiftOnly=0.000

VERDICT: rank-1=Generator DECISION=Generator decision_correct=0 | rank1_transfer=FAIL [SPLIT-HOSTILE]

[sentinel | contiguous | seed 0] dynamic canary

scrambled-row fidH=0.036 (thr 0.08) alarm=0

[sentinel | evenodd | seed 0] dynamic canary

scrambled-row fidH=0.051 (thr 0.08) alarm=0

[multibase 2026 | mode a] ...

Phase-A step 200: A_acc=0.0675

Phase-A step 400: A_acc=0.0726

Phase-A step 600: A_acc=0.0938

Phase-A step 800: A_acc=0.1057

Phase-A step 1000: A_acc=0.1204

Phase-A step 1200: A_acc=0.1473

Phase-A step 1400: A_acc=0.2092

Phase-A step 1600: A_acc=0.3249

Phase-A step 1800: A_acc=0.4829

Phase-A step 2000: A_acc=0.4660

Phase-A step 2200: A_acc=0.6427

Phase-A step 2400: A_acc=0.7057

Phase-A step 2600: A_acc=0.7580

Phase-A step 2800: A_acc=0.7675

Phase-A step 3000: A_acc=0.8033

Phase-A step 3200: A_acc=0.6631

Phase-A step 3400: A_acc=0.8282

Phase-A step 3600: A_acc=0.6953

Phase-A step 3800: A_acc=0.6360

Phase-A step 4000: A_acc=0.8713

Phase-A step 4200: A_acc=0.8716

Phase-A step 4400: A_acc=0.9039

Phase-A hit target at step 4400

saved smart_density_v8_l2/base_seed2026_a.pt best_step=4400

[STAGE contiguous] supervise=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] inner=[12, 13] hold=[14, 15, 16, 17]...

[L2 selection | split=contiguous | seed 0]

[L2 family Table ] inner=0.036 fidS=1.000 id_gain=+0.9651 params= 21952 even_in=1.000 odd_in=1.000 form=0 [27s]

[L2 family LowRank ] inner=0.054 fidS=1.000 id_gain=+0.9650 params= 3248 even_in=1.000 odd_in=1.000 form=0 [27s]

[L2 family Generator] inner=1.000 fidS=1.000 id_gain=+0.9595 params= 784 even_in=1.000 odd_in=1.000 form=1 [33s]

[L2 family Affine ] inner=0.000 fidS=0.173 id_gain=+0.0081 params= 1568 even_in=0.220 odd_in=0.125 form=0 [26s]

[L2 family ShiftOnly] inner=0.000 fidS=0.083 id_gain=+0.0033 params= 28 even_in=0.083 odd_in=0.083 form=0 [27s]

DECISION[POOL-4] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0 (best inner 1.000 vs thr 0.5, strict)

DECISION[POOL-5 ext] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0

Stage-C heldout touch (first): Table=0.026 LowRank=0.023 Generator=1.000 Affine=0.000 ShiftOnly=0.000

VERDICT: rank-1=Generator DECISION=Generator decision_correct=1 | rank1_transfer=PASS

[L2 selection | split=contiguous | seed 1]

[L2 family Table ] inner=0.054 fidS=1.000 id_gain=+0.9650 params= 21952 even_in=1.000 odd_in=1.000 form=0 [26s]

[L2 family LowRank ] inner=0.018 fidS=1.000 id_gain=+0.9650 params= 3248 even_in=1.000 odd_in=1.000 form=0 [27s]

[L2 family Generator] inner=1.000 fidS=1.000 id_gain=+0.9603 params= 784 even_in=1.000 odd_in=1.000 form=1 [33s]

[L2 family Affine ] inner=0.000 fidS=0.167 id_gain=+0.0088 params= 1568 even_in=0.196 odd_in=0.137 form=0 [26s]

[L2 family ShiftOnly] inner=0.000 fidS=0.083 id_gain=+0.0044 params= 28 even_in=0.083 odd_in=0.083 form=0 [27s]

DECISION[POOL-4] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0 (best inner 1.000 vs thr 0.5, strict)

DECISION[POOL-5 ext] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0

Stage-C heldout touch (first): Table=0.033 LowRank=0.031 Generator=1.000 Affine=0.000 ShiftOnly=0.000

VERDICT: rank-1=Generator DECISION=Generator decision_correct=1 | rank1_transfer=PASS

[L2 selection | split=contiguous | seed 2]

[L2 family Table ] inner=0.036 fidS=1.000 id_gain=+0.9650 params= 21952 even_in=1.000 odd_in=1.000 form=0 [26s]

[L2 family LowRank ] inner=0.018 fidS=1.000 id_gain=+0.9648 params= 3248 even_in=1.000 odd_in=1.000 form=0 [28s]

[L2 family Generator] inner=1.000 fidS=1.000 id_gain=+0.9600 params= 784 even_in=1.000 odd_in=1.000 form=1 [33s]

[L2 family Affine ] inner=0.000 fidS=0.161 id_gain=+0.0084 params= 1568 even_in=0.202 odd_in=0.119 form=0 [26s]

[L2 family ShiftOnly] inner=0.000 fidS=0.083 id_gain=+0.0031 params= 28 even_in=0.083 odd_in=0.083 form=0 [27s]

DECISION[POOL-4] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0 (best inner 1.000 vs thr 0.5, strict)

DECISION[POOL-5 ext] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0

Stage-C heldout touch (first): Table=0.041 LowRank=0.033 Generator=1.000 Affine=0.000 ShiftOnly=0.000

VERDICT: rank-1=Generator DECISION=Generator decision_correct=1 | rank1_transfer=PASS

[L2 selection | split=contiguous | seed 3]

[L2 family Table ] inner=0.089 fidS=1.000 id_gain=+0.9651 params= 21952 even_in=1.000 odd_in=1.000 form=0 [26s]

[L2 family LowRank ] inner=0.018 fidS=1.000 id_gain=+0.9651 params= 3248 even_in=1.000 odd_in=1.000 form=0 [27s]

[L2 family Generator] inner=1.000 fidS=1.000 id_gain=+0.9601 params= 784 even_in=1.000 odd_in=1.000 form=1 [35s]

[L2 family Affine ] inner=0.000 fidS=0.173 id_gain=+0.0080 params= 1568 even_in=0.202 odd_in=0.143 form=0 [27s]

[L2 family ShiftOnly] inner=0.000 fidS=0.083 id_gain=+0.0050 params= 28 even_in=0.083 odd_in=0.083 form=0 [27s]

DECISION[POOL-4] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0 (best inner 1.000 vs thr 0.5, strict)

DECISION[POOL-5 ext] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0

Stage-C heldout touch (first): Table=0.036 LowRank=0.038 Generator=1.000 Affine=0.000 ShiftOnly=0.000

VERDICT: rank-1=Generator DECISION=Generator decision_correct=1 | rank1_transfer=PASS

[STAGE evenodd] supervise=[0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22] inner=[24, 26] hold=[1, 3, 5, 7]...

[L2 selection | split=evenodd | seed 0]

[L2 family Table ] inner=0.018 fidS=0.509 id_gain=+0.9746 params= 21952 even_in=1.000 odd_in=0.018 form=0 [26s]

[L2 family LowRank ] inner=0.018 fidS=0.500 id_gain=+0.9746 params= 3248 even_in=1.000 odd_in=0.000 form=0 [27s]

[L2 family Generator] inner=0.500 fidS=0.542 id_gain=+0.0885 params= 784 even_in=1.000 odd_in=0.083 form=0 [33s]

[L2 family Affine ] inner=0.000 fidS=0.045 id_gain=+0.0450 params= 1568 even_in=0.089 odd_in=0.000 form=0 [26s]

[L2 family ShiftOnly] inner=0.000 fidS=0.083 id_gain=+0.0453 params= 28 even_in=0.083 odd_in=0.083 form=0 [26s]

DECISION[POOL-4] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0 (best inner 0.500 vs thr 0.5, strict)

DECISION[POOL-5 ext] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0

Stage-C heldout touch (first): Table=0.036 LowRank=0.031 Generator=0.020 Affine=0.000 ShiftOnly=0.000

VERDICT: rank-1=Generator DECISION=Generator decision_correct=0 | rank1_transfer=FAIL [SPLIT-HOSTILE]

[L2 selection | split=evenodd | seed 1]

[L2 family Table ] inner=0.000 fidS=0.530 id_gain=+0.9746 params= 21952 even_in=1.000 odd_in=0.060 form=0 [26s]

[L2 family LowRank ] inner=0.018 fidS=0.500 id_gain=+0.9747 params= 3248 even_in=1.000 odd_in=0.000 form=0 [27s]

[L2 family Generator] inner=0.500 fidS=0.542 id_gain=+0.0901 params= 784 even_in=1.000 odd_in=0.083 form=0 [32s]

[L2 family Affine ] inner=0.000 fidS=0.042 id_gain=+0.0453 params= 1568 even_in=0.083 odd_in=0.000 form=0 [26s]

[L2 family ShiftOnly] inner=0.000 fidS=0.083 id_gain=+0.0459 params= 28 even_in=0.083 odd_in=0.083 form=0 [27s]

DECISION[POOL-4] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0 (best inner 0.500 vs thr 0.5, strict)

DECISION[POOL-5 ext] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0

Stage-C heldout touch (first): Table=0.038 LowRank=0.028 Generator=0.036 Affine=0.000 ShiftOnly=0.000

VERDICT: rank-1=Generator DECISION=Generator decision_correct=0 | rank1_transfer=FAIL [SPLIT-HOSTILE]

[L2 selection | split=evenodd | seed 2]

[L2 family Table ] inner=0.054 fidS=0.521 id_gain=+0.9746 params= 21952 even_in=1.000 odd_in=0.042 form=0 [25s]

[L2 family LowRank ] inner=0.071 fidS=0.500 id_gain=+0.9746 params= 3248 even_in=1.000 odd_in=0.000 form=0 [26s]

[L2 family Generator] inner=0.500 fidS=0.542 id_gain=+0.0914 params= 784 even_in=1.000 odd_in=0.083 form=0 [31s]

[L2 family Affine ] inner=0.000 fidS=0.042 id_gain=+0.0437 params= 1568 even_in=0.083 odd_in=0.000 form=0 [25s]

[L2 family ShiftOnly] inner=0.000 fidS=0.083 id_gain=+0.0448 params= 28 even_in=0.083 odd_in=0.083 form=0 [26s]

DECISION[POOL-4] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0 (best inner 0.500 vs thr 0.5, strict)

DECISION[POOL-5 ext] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0

Stage-C heldout touch (first): Table=0.038 LowRank=0.043 Generator=0.033 Affine=0.000 ShiftOnly=0.000

VERDICT: rank-1=Generator DECISION=Generator decision_correct=0 | rank1_transfer=FAIL [SPLIT-HOSTILE]

[L2 selection | split=evenodd | seed 3]

[L2 family Table ] inner=0.036 fidS=0.521 id_gain=+0.9746 params= 21952 even_in=1.000 odd_in=0.042 form=0 [26s]

[L2 family LowRank ] inner=0.018 fidS=0.500 id_gain=+0.9746 params= 3248 even_in=1.000 odd_in=0.000 form=0 [27s]

[L2 family Generator] inner=0.500 fidS=0.542 id_gain=+0.0895 params= 784 even_in=1.000 odd_in=0.083 form=0 [32s]

[L2 family Affine ] inner=0.000 fidS=0.042 id_gain=+0.0443 params= 1568 even_in=0.083 odd_in=0.000 form=0 [25s]

[L2 family ShiftOnly] inner=0.000 fidS=0.083 id_gain=+0.0450 params= 28 even_in=0.083 odd_in=0.083 form=0 [25s]

DECISION[POOL-4] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0 (best inner 0.500 vs thr 0.5, strict)

DECISION[POOL-5 ext] (pre-heldout): rank-1=Generator -> decision=Generator abstain=0

Stage-C heldout touch (first): Table=0.038 LowRank=0.028 Generator=0.031 Affine=0.000 ShiftOnly=0.000

VERDICT: rank-1=Generator DECISION=Generator decision_correct=0 | rank1_transfer=FAIL [SPLIT-HOSTILE]

[sentinel | contiguous | seed 0] dynamic canary

scrambled-row fidH=0.026 (thr 0.08) alarm=0

[sentinel | evenodd | seed 0] dynamic canary

scrambled-row fidH=0.036 (thr 0.08) alarm=0

split=contiguous train=[0, 1, 2, 3, 4, 5, 6]... hold=[14, 15, 16, 17]... d=1 units=[1, 3, 5, 9, 11] inner=[12, 13]

split=random train=[0, 3, 5, 6, 7, 13, 14]... hold=[1, 2, 4, 8]... d=1 units=[5, 13, 15, 27] inner=[3, 25]

split=random_anchor train=[0, 1, 3, 5, 6, 7, 13]... hold=[2, 4, 8, 9]... d=1 units=[1, 5, 13, 15] inner=[3, 25]

split=evenodd train=[0, 2, 4, 6, 8, 10, 12]... hold=[1, 3, 5, 7]... d=2 units=[] inner=[24, 26]

split=gcd4 train=[0, 4, 8, 12, 16, 20, 24]... hold=[1, 2, 3, 5]... d=4 units=[] inner=[20, 24]

split=gcd7 train=[0, 7, 14, 21]... hold=[1, 2, 3, 4]... d=7 units=[] inner=[14, 21]

====================================================================================================

CARRIED P1-P7 (rank-1 semantics, byte-compatible)

====================================================================================================

P1 contig P(rank-1=Gen)=1.00 (>=7/8, n=12)

-> PASS

P2 contig P(ID_ONLY=Gen)=0.00 (<=2/8)

-> PASS

P3 contig P(rank-1 transfers)=1.00 (>=7/8)

-> PASS

P4 evenodd select=1.00 (>=6/8) AND transfer=0.00 (<=2/8)

-> PASS split-hostile: algebraic sq-root x even-coset (dual mechanism)

P6 POOL-5: J->Gen=1.00, params->ShiftOnly=1.00, params-transfer=0.00

-> PASS params-only fooled; NOT a claim vs train-MDL (see P10/P8)

P7 evenodd POOL-5 P(fail to transfer)=1.00 (>=7/8)

-> PASS

====================================================================================================

STAGE R: random-split L2 (L4 + D3 -- the DECISION's first live test)

====================================================================================================

n=8: rank1(Gen)=1.00 transfer=0.00 | Gen inner=0.036 fidS=0.116 fidH=0.031 | Table fidS=1.000 fidH=0.036

L4a Gen inner in [0.20,0.50]: 0.036

-> FAIL

L4b Gen fidS in [0.30,0.50]: 0.116

-> FAIL

L4c select >= 6/8: 1.00

-> PASS

L4d transfer <= 2/8: 0.00

-> PASS

L4f Table fidS>=.95 & fidH<=.10: 1.000/0.036

-> PASS

L4g ID_ONLY != Gen: 0.00

-> PASS

D3 P(decision=NO-CLAIM)=1.00 (>=6/8) AND P(decision_correct)=1.00 (>=7/8)

-> PASS the abstention's unique value becomes BEHAVIORALLY correct: the system refuses exactly when the would-be pick would not transfer

====================================================================================================

STAGE R2: random_anchor L2 (27<->1 minimal intervention)

====================================================================================================

n=8: select=1.00 transfer=1.00 | Gen fidS>=.9 in 1.00, inner>=.9 in 1.00 | Table fidH=0.035

G2a Gen fidS >= 0.90 in >= 7/8: 1.00

-> PASS

G2b Gen inner >= 0.90 in >= 7/8: 1.00

-> PASS

G2c transfer >= 7/8: 1.00

-> PASS

G2d select Gen = 8/8: 1.00

-> PASS

G2e Table fidH <= 0.10: 0.035

-> PASS

====================================================================================================

GEOMETRY (G1 init ladder + G3 identifiability ladder)

====================================================================================================

G1a init=shift (n=8): fidS=1.000 inner=1.000 fidH=1.000 (all >0.99)

-> PASS true generator is a STABLE optimum -> id-init failure is REACHABILITY, not objective (diagnostic arm)

G1b init=rand (n=8): fidS=0.116 (id 0.116) inner=0.036

-> PASS

G1c n/a (run --stage geometry --do-long)

G3gcd4 Gen fidS=0.400[0.33,0.5] Table fidS=0.272[0.2,0.36] fidH=0.036/0.038

-> PASS identity-row asymmetry: C^0=I free for Gen (retro-explains v8.01's 0.517/0.542)

G3gcd7 Gen fidS=0.554[0.45,0.68] Table fidS=0.172[0.1,0.25] fidH=0.035/0.038

-> PASS identity-row asymmetry: C^0=I free for Gen (retro-explains v8.01's 0.517/0.542)

====================================================================================================

STAGE M: multi-base replication (L5)

====================================================================================================

contiguous : base43=4/4 base123=4/4 base2026=4/4 | combined 12/12

L5b combined select >= 17/20: 1.00

-> PASS

L5c combined transfer: 1.00

-> PASS

evenodd : base43=4/4 base123=4/4 base2026=4/4 | combined 12/12

L5d combined select >= 17/20: 1.00

-> PASS

L5a base 43: 4/4 (>=3/4)

-> PASS

L5a base 123: 4/4 (>=3/4)

-> PASS

L5a base 2026: 4/4 (>=3/4)

-> PASS

====================================================================================================

D1/D2 PARITY SIGNATURES (I-axis vs O-axis separation, new v8.04)

====================================================================================================

D1 evenodd Gen parity: even_in=1.000 (>=0.85) odd_in=0.083 (<=0.15)

-> PASS exact prediction 1.000/0.083; the visited coset is learned (O), the unvisited inputs are not (distribution)

D2 random Gen |even_in-odd_in| = 0.001 (<=0.15)

-> PASS no coset confinement: random's failure is FORMATION, not distribution (distinct from evenodd)

====================================================================================================

S1 DYNAMIC SENTINEL (canary travels with new bases)

====================================================================================================

base 43 | contiguous : scrambled fidH=0.043 alarm=0

base 43 | evenodd : scrambled fidH=0.038 alarm=0

base 123 | contiguous : scrambled fidH=0.036 alarm=0

base 123 | evenodd : scrambled fidH=0.051 alarm=0

base 2026 | contiguous : scrambled fidH=0.026 alarm=0

base 2026 | evenodd : scrambled fidH=0.036 alarm=0

S1 alarm count = 0 over 6 canaries

-> PASS learnable table + zero hold-row grads under a clean protocol; any alarm is a REAL breach

====================================================================================================

P5 + REGRESSION (from the v8.00 l15 jsonl, if present)

====================================================================================================

P5 n/a (valid seeds = 0 < 4; l15 jsonl provenance)

REG n/a (no contiguous l15 rows)

====================================================================================================

SELECTION LAB (post-hoc 0'; zero training; DECISION recomputed)

====================================================================================================

C1 frozen-record checksum

-> PASS

L0 reselect reproduces rank-1: 32/40

-> FAIL

P10 J rank-1 == train_MDL rank-1: 32/40

-> FAIL the Z_28 isomorphism ceiling: min description of supervise IS the generator here; completion's unique role is P8/D3

P8 gen-free: J NO-CLAIM=12/12, train_MDL->LowRank, its transfer=0/12

-> PASS completion's unique value = refusal

P9 lambda scan (contiguous POOL-5, J rank-1 histogram):

lambda=0.0 {'Generator': 12}

lambda=0.01 {'Generator': 12}

lambda=0.05 {'Generator': 12} <- original lambda, must be Gen n/n

lambda=0.2 {'Generator': 12}

lambda=1.0 {'Generator': 12}

lambda=5.0 {'ShiftOnly': 12}

P9 lambda=0.05 stability (Gen n/n)

-> PASS

D4 record hygiene (decision/rank-1/selection_success): 40/40

-> PASS new fields, new names; historical semantics untouched

lambda-flip (evenodd): Gen inner=0.500 -> flips to the 28-param decoy at lambda > 0.519

POSTERIOR NOTE (registered, NOT a criterion change): a parity-aware abstention (odd_in < 0.5 -> NO-CLAIM) would ALSO have caught evenodd (inner sits exactly on 0.500). Candidate v8.05 criterion; the pre-registered strict threshold stands.

====================================================================================================

VERDICT SYNTHESIS (measured)

====================================================================================================

contiguous d=1 Gen fidH= 1.000 decision=Generator decision_correct=1.00

random d=1 Gen fidH= 0.031 decision=NO-CLAIM decision_correct=1.00

random_anchor d=1 Gen fidH= 1.000 decision=Generator decision_correct=1.00

evenodd d=2 Gen fidH= 0.033 decision=Generator decision_correct=0.00

gcd4 d=4 Gen fidH= 0.036 (I-axis: d-fold ambiguity + coset)

gcd7 d=7 Gen fidH= 0.035 (I-axis: d-fold ambiguity + coset)

Honest scope: Z_28 prefix-sum family only; d-ladder cardinality

confound; odd-supervise impossible (position parity); init=shift is

a diagnostic arm; L2 = SELECTION among FIXED families; L3+ untouched.

====================================================================================================

TEST REGISTRY (multiplicity disclosure)

====================================================================================================

total registered checks evaluated: 37 (carried 31 from v8.00 L1.5, v8.01 L2-DIRECT, v8.02-A lab...; new v8.04: 6)

failures: ['L4a', 'L4b', 'L0', 'P10']

MULTIPLICITY: with N pre-registered checks, report this total in

any writeup; do not present per-check PASS rates without the count.

total wallclock: 121.1 min

saved smart_density_v8_l2/v8_results.json (partials kept for resume)

RUN:

python v8_04_unified.py --stage lab # post-hoc (~30 s)

python v8_04_unified.py --stage random # L4+D2+D3 (~20 min)

python v8_04_unified.py --stage anchor # G2 (~20 min)

python v8_04_unified.py --stage geometry --do-long # G1+G3

python v8_04_unified.py --stage multibase # L5+S1 (~1.5 h)

python v8_04_unified.py --resume # continu

相关学习资料