First-Spike Laplacian Attention / report.md

Mechanism confirmed, baseline not beaten

Raw ⬇ ZIP

Эксперимент: First-Spike Laplacian Attention (#863)

{ "worked": true, "confidence": 9, "verdict": "Built First-Spike Laplacian attention with differentiable per-head positive bandwidths, L1 latency distances, stable softmax normalization, and value aggregation in laplacian_attention.py. The mechanism checks matched theory: log affinity ratios had maximum error 8.9e-16, the two-key probability transition crossed 0.5 at zero distance gap with kernel-level error 3.4e-9, and entropy increased monotonically with sigma toward log(N); forward normalization and gradients were finite. In the toy retrieval comparison, Laplacian attention achieved better MSE and substantially better top-1 retrieval at low-to-moderate noise, but this is not evidence of CIFAR or wall-clock superiority.", "metrics": { "baseline": "Scaled dot-product attention: retrieval top-1/MSE at noise 0.03, 0.10, 0.20, 0.35 = 0.0547/0.007728, 0.0156/0.007728, 0.0313/0.007732, 0.0859/0.007734.", "idea": "First-Spike Laplacian attention: retrieval top-1/MSE at noise 0.03, 0.10, 0.20, 0.35 = 1.0000/0.007647, 0.9609/0.007672, 0.5234/0.007697, 0.1406/0.007718. For B=1,N=M=128,C=8, counted Q-K channel multiplications were 131072 for dot-product versus 0 for Laplacian, replaced by 131072 subtract/absolute operations." }, "how_to_run": "/home/maxwelhelp/main/bin/python3 experiment.py && /home/maxwelhelp/main/bin/python3 verify_module.py", "files": [ "experiment.py", "laplacian_attention.py", "verify_module.py" ], "limitations": "Only a synthetic latency-code retrieval task was tested; no spiking ViT, CIFAR accuracy, learned bandwidth training study, CUDA benchmark, wall-clock latency, or hardware energy measurement was performed. The operation comparison counts arithmetic categories but does not establish actual runtime or energy savings." }