# Эксперимент: Neighborhood-separator attention (#1384) { "worked": true, "confidence": 7, "verdict": "Built a readable neighborhood-separator attention MVP with symmetric top-r affinity graphs, greedy triangle-based closed-neighborhood separators, anti-adjacent component checks, and masked attention. The structural math check passed exactly: residual components were anti-adjacent and the implemented mask matched the stated component-plus-N[X] formula. On a planted community graph, separator attention reduced allowed attention pairs by 42.6% (1.74x estimated attention speedup) with MSE 0.0194 versus dense, while fixed local attention was much sparser but had MSE 0.3298; on random affinity graphs the separator mask became dense and provided no speedup, so the effect is conditional on graph structure rather than universal.", "metrics": { "baseline": "Dense: 16,384 allowed pairs, relative cost 1.000, MSE 0.0. Fixed local radius-2: 634 pairs, relative cost 0.0387, 25.84x estimated pair-count speedup, MSE 0.3286 on random and 0.3298 on planted graphs.", "idea": "Random graph: 16,384 pairs, no speedup, MSE 0.0, mean 1 residual component. Planted community graph: 9,402 pairs, relative cost 0.5739, 1.74x estimated speedup, MSE 0.0194, mean 6 residual components, mean separator size 2." }, "how_to_run": "/home/maxwelhelp/main/bin/python3 experiment.py", "files": [ "experiment.py", "results.json" ], "limitations": "This is a single-layer NumPy attention approximation experiment, not a trained Transformer or long-range-copy/WikiText evaluation. It uses a bounded triangle surrogate rather than exact long-cycle/theta induced-minor detection, estimates compute from allowed pair counts rather than measuring wall-clock GPU throughput, and does not directly measure KV-cache memory or separator refresh frequency." }