self-attention-permutation-invariant-needs-positional-encoding

IN premiseentries/2026/06/21/wiki-Transformer_deep_learning_architecture.md

Created 2026-06-21T09:50:10+00:00

Self-attention is permutation-invariant; without positional encodings or learned positional embeddings, token order does not affect the output.

Summary

Self-attention, the core computation in transformer models, treats its input as an unordered set, so on its own it cannot tell the difference between "the dog bit the man" and "the man bit the dog." This is why every practical transformer must layer in separate positional signals; without them, all word-order information is lost and the model becomes blind to grammar and sequence.

Dependents

These beliefs depend on this one: