← Lab
popcountmem
mixedshipPython · PyTorchModel behavior & reasoningJuly 23, 2026
the question
Are Log-Linear Attention's addressable memory slots at query t exactly log(t) as the paper implies, and is its recency bias absolute?
what came out
Slots at t are exactly popcount(t), not the floor(log2 t)+1 bound. Each slot is a rank-d state resolving tokens only up to bucket size d, and the newest token's fidelity collapses to the linear-attention floor at every multiple of the smallest power of two above d. Within-query recency ordering holds; the absolute claim fails.
method & receipts
- Result: mixed
- Tested — a correctness/benchmark suite ships alongside the code.
→ read the code and re-run it
github.com/v-code01/popcountmem