Transformers and Cortical Waves: Encoders for Pulling In Context Across
  Time
Lyle Muller Patricia S. Churchland Terrence J. Sejnowski
The capabilities of transformer networks such as ChatGPT and other Large
Language Models (LLMs) have captured the world's attention. The crucial
computational mechanism underlying their performance relies on transforming a
complete input sequence - for example, all the words in a sentence into a long
"encoding vector" - that allows transformers to learn long-range temporal
dependencies in naturalistic sequences. Specifically, "self-attention" applied
to this encoding vector enhances temporal context in transformers by computing
associations between pairs of words in the input sequence. We suggest that
waves of neural activity, traveling across single cortical regions or across
multiple regions at the whole-brain scale, could implement a similar encoding
principle. By encapsulating recent input history into a single spatial pattern
at each moment in time, cortical waves may enable temporal context to be
extracted from sequences of sensory inputs, the same computational principle
used in transformers.