exp: headroom check for the regime setup
Requirement 2 holds (grp_k0 beats rp_only 2.9x on steady, all seeds). Requirements 1 and 3 fail, both for setup reasons rather than A1 reasons. Measured the domain's information ceilings by least squares rather than tuning against them. The regime oracle's own ceiling is 1.18e-05, which sits on requirement 1's tolerance boundary before any training loss; the trained models land 3-4x above even that. Ruled out omega (5/10/20), noise (16x lower floor moves nothing), sigma, training length (40k), and the missing type-pair edge channel. Every condition converges to ~1.5e-05 regardless of the information it is given: the error is optimiser tracking lag against a target that switches every 40-80 steps, not missing information. An oracle cannot help a model that is not yet using what it has. rp_flag's 4x rec@0 spike is an untrained input spike, not a leak: the change flag column gets gradient on ~1.5% of steps and so perturbs every message at the exact step rec@0 measures. Zero-initialising the oracle columns of W_feat removes it, makes rp_flag a valid null, and makes grp_regime exactly equal to grp_k0. Recommended in the report, not adopted here - it moves every oracle condition off what Task 6 was reviewed under. Only source change: omega is now a run() parameter, default 10.0 unchanged, so prior runs reproduce exactly. No default in particles.py or regime.py changed; ../ailed untouched. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KZEvqjtoW5JZYyeUGNp9Ui
This commit is contained in:
2 files changed
+336
-3
No files matched your search
@@ -61,7 +61,7 @@ def _metrics(losses: list[float], switched: list[bool], arousals: list[float], w
|
||||
|
||||
|
||||
def run(name: str, seed: int, steps: int, window: int = 20, bptt: int = 20,
|
||||
lr: float = 1e-3, hidden: int = 32, kappa: float = 4.0) -> dict:
|
||||
lr: float = 1e-3, hidden: int = 32, kappa: float = 4.0, omega: float = 10.0) -> dict:
|
||||
spec = dict(CONDITIONS[name])
|
||||
if spec["kappa"] == KAPPA_FLAG:
|
||||
spec["kappa"] = kappa
|
||||
@@ -75,7 +75,7 @@ def run(name: str, seed: int, steps: int, window: int = 20, bptt: int = 20,
|
||||
world = ParticleWorld(wcfg)
|
||||
ctx_dim = wcfg.n_regimes if spec["ctx"] == "regime" else 2
|
||||
org = Organism(attr_dim=world.attr_dim, coord_dim=2, target_dim=2, context_dim=ctx_dim,
|
||||
hidden_dim=hidden, kappa=spec["kappa"], memory=spec["memory"])
|
||||
hidden_dim=hidden, omega=omega, kappa=spec["kappa"], memory=spec["memory"])
|
||||
opt = torch.optim.Adam(org.parameters(), lr=lr)
|
||||
acfg = AffectConfig()
|
||||
affect = Affect()
|
||||
@@ -124,12 +124,13 @@ def main() -> None:
|
||||
ap.add_argument("--steps", type=int, default=20000)
|
||||
ap.add_argument("--window", type=int, default=20)
|
||||
ap.add_argument("--kappa", type=float, default=4.0)
|
||||
ap.add_argument("--omega", type=float, default=10.0)
|
||||
ap.add_argument("--out", default="results/run.json")
|
||||
a = ap.parse_args()
|
||||
results = []
|
||||
for name in a.conditions.split(","):
|
||||
for seed in (int(s) for s in a.seeds.split(",")):
|
||||
r = run(name, seed, a.steps, window=a.window, kappa=a.kappa)
|
||||
r = run(name, seed, a.steps, window=a.window, kappa=a.kappa, omega=a.omega)
|
||||
print(f"{name:<18} seed={seed} steady={r['steady']:.5f} rec@0={r['recovery'][0]:.5f}", flush=True)
|
||||
results.append(r)
|
||||
Path(a.out).parent.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
Reference in new issue
Block a user