Sublinear-expander sparse attention / report_bench_2026-09-02T221114.md

✓✓ Beats tuned baseline

Raw ⬇ ZIP

Стенд-проверка (stage-2) · промт оператора:

(универсальный)

Ответ агента:

{ "worked": true, "confidence": 8, "verdict": "Implemented degree-8 random-regular sparse self-attention as a matched replacement for dense attention in bench transformer_tiny on the structurally appropriate sequence forecast track. Across 8 paired seeds, sparse attention achieved lower test MSE (0.45355 vs 0.49059), delta -0.03704, 6/8 wins, and permutation p=0.0371, so the harness verdict is idea better (significant). The trained-model mechanism signature also confirmed observed effective external neighborhood growth exceeded the predicted lower bound, but no wall-clock speedup was tested.", "metrics": { "baseline": "Dense transformer_tiny, best lr=0.0015: mean test MSE 0.4905936755, std 0.0441091729.", "idea": "Degree-8 sparse transformer_tiny, same training budget and best lr=0.0015: mean test MSE 0.4535499774, std 0.0413430523; paired delta -0.0370436981, 6/8 wins, permutation p=0.0371." }, "bench_report": { "bench_version": 1, "track": "sequence", "model": "transformer_tiny", "metric_direction": "lower is better", "n_seeds": 8, "baseline": { "best_cfg": { "lr": 0.0015, "weight_decay": 0.0 }, "sweep": [ { "cfg": { "lr": 0.0015, "weight_decay": 0.0 }, "mean": 0.4665476158261299 }, { "cfg": { "lr": 0.003, "weight_decay": 0.0 }, "mean": 0.5620733425021172 }, { "cfg": { "lr": 0.006, "weight_decay": 0.0 }, "mean": 0.7826127856969833 } ], "full": { "mean": 0.49059367552399635, "std": 0.04410917289223254, "per_seed": [ 0.48194122314453125, 0.3973492383956909, 0.45901283621788025, 0.5278871655464172, 0.5207730531692505, 0.5048635601997375, 0.5477240085601807, 0.48519831895828247 ], "n": 8 } }, "idea": { "mean": 0.45354997739195824, "std": 0.04134305230649254, "per_seed": [ 0.4908949136734009, 0.4102044701576233, 0.41042274236679077, 0.45752525329589844, 0.5030049085617065, 0.4005453288555145, 0.5101773142814636, 0.4456248879432678 ], "n": 8 }, "comparison": { "delta_mean": -0.037043698132038116, "idea_wins": 6, "n_pairs": 8, "per_seed_diffs": [ 0.008953690528869629, 0.012855231761932373, -0.04859009385108948, -0.0703619122505188, -0.017768144607543945, -0.10431823134422302, -0.03754669427871704, -0.03957343101501465 ], "p_value": 0.0371, "mde": 0.03277215061861597, "mde_rel_pct": 6.680100509573933, "verdict": "idea better (significant)", "system_worked": true }, "mechanism_signature": { "subset_size": 4, "k": 2, "epsilon": 1.0, "predicted_external_ratio": 0.3114874714694258, "observed_effective_external_ratio": 4.25, "predicted_growth_factor": 1.3114874714694258, "observed_growth_factor": 5.25, "confirmed": true }, "implementation": { "degree": 8, "epochs": 10, "n_train": 400, "n_test": 200, "matched_lr_grid": [ 0.0015, 0.003, 0.006 ] }, "structural_match": "sequence-level multi-token forecast; sparse self-attention is the sole architectural intervention" }, "how_to_run": "/home/maxwelhelp/main/bin/python3 bench_stage2.py", "files": [ "bench_stage2.py", "bench_report.json" ], "limitations": "The benchmark used the harness sequence subset with 400 training and 200 test examples for 10 epochs, not a large language corpus or long-context workload. Sparse attention was implemented with PyTorch gather/index operations; memory and wall-clock FLOP/speed advantages were not measured, and the mechanism signature was measured on one trained model and one subset size.", "system_verdict": "worked", "practical_verdict": "helps", "mechanism_ok": 1, "system_judged": true }