← Lab
shiftgauge
confirmedshipPython · PyTorchModel behavior & reasoningJuly 22, 2026
the question
What is the exact row-sum law of Softpick attention, and why does its stabilization need the -e^{-m} term rather than subtract-the-max?
what came out
Softpick's row sum is exactly r=P/(P+N) in [0,1], zero iff max logit<=0, matched to 3e-16. Unlike shift-invariant softmax, softpick reads the absolute logit level, so its row sum sweeps monotonically 0 to 1 under a constant shift. Stabilization needs -e^{-m} because the gauge is multiplicative in e^m; naive subtract-max collapses +800 logits to 0.
method & receipts
- Result: confirmed
- Reproducible — one script re-runs the whole thing from scratch.
- Tested — a correctness/benchmark suite ships alongside the code.
→ read the code and re-run it
github.com/v-code01/shiftgauge