Spiking sequence machines and transformers
Attention may just be similarity based memory lookup, wearing a different hat
The question. My 2007 spiking machine and the 2017 transformer were built for completely different reasons, one from neuroscience and one from engineering. Why do they end up doing the same thing?
What it shows. Both perform the same five jobs: encoding, holding context, associative retrieval, storage, and readout. The shared move underneath is comparing high dimensional vectors by similarity, the cosine or dot product. I also work out a "Phase Latency Isomorphism": the sine and cosine position signal a transformer uses and the spike timing a neuron uses are just two coordinate systems for the same ordered quantity, and the dot product in attention does not care which one you feed it, up to a single scale factor.
The experiment. When I squash the position signal until positions stop being distinguishable, a copy task stops converging. A plain learned rank based position does as well as the sinusoid, sometimes better. So the sine waves are not the magic. What matters is that positions stay far enough apart under the similarity lookup.
Why it matters. If attention is a special case of similarity based retrieval, and position encoding is really about keeping order distinguishable rather than about any particular formula, then the design space for both is much wider than it looks.
Not just theory. Spiking versions of this memory have already been shown to match conventional ones in capacity, across several neuron models, in Ajwani, Lalan, Sen Bhattacharya, and Bose (2021), which built a spiking Sparse Distributed Memory on the Nengo framework. So the retrieval mechanism at the heart of the comparison is a working system, not a thought experiment.