# Эксперимент: Gated Local-Global Graph Attention (#1041) { "worked": true, "confidence": 8, "verdict": "Built a PyTorch gated local-global attention MVP with edge-list local softmax, ELU+1 linear attention, and a learned node gate. The mathematical checks confirmed masked local attention and linear-kernel reassociation to below 2.4e-7 error, while the operation proxy ratio grew from 2.67x at N=64 to 21.33x at N=512 with observed log-log slope 1.00, matching the predicted linear-in-N scaling for fixed degree. The hybrid reached lower synthetic mixed-task MSE than the dense baseline (2.26e-5 vs 6.53e-2), but it was slower in this small unoptimized implementation at every tested size, so the speedup claim was not observed.", "metrics": { "baseline": "Dense attention: synthetic MSE 0.065324; latency N=64/128/256/512: 0.328/0.619/0.502/0.345 ms", "idea": "Hybrid attention: synthetic MSE 0.0000226; latency N=64/128/256/512: 1.934/1.809/1.460/1.956 ms; operation-proxy ratio dense/hybrid grows 2.67x to 21.33x" }, "how_to_run": "/home/maxwelhelp/main/bin/python3 run_experiment.py", "files": [ "gated_attention.py", "run_experiment.py", "results.json" ], "limitations": "Only a single-head toy synthetic task was tested; no Cora, ogbn-arxiv, multi-head transformer block, validation split, gate-value specialization analysis, backward-pass benchmark, memory measurement, or optimized sparse GPU kernel was included. Timing was dominated by Python/PyTorch edge-list overhead and does not validate production-scale speedups." }