Caesar AI Atlas

Positional Encoding

Caesar AI Atlas Definition

Positional encoding adds information about token order or position to token representations in a sequence. Transformer models use it because attention mechanisms do not inherently encode sequence order.

Other Definitions

Positional Encoding Source

A technique to add information about the position of a token in a sequence to the token's embedding. Transformer models use positional encoding to better understand the relationship between different parts of the sequence. A common implementation of positional encoding uses a sinusoidal function. (Specifically, the frequency and amplitude of the sinusoidal function are determined by the position of the token in the sequence.) This technique enables a Transformer model to learn to attend to different parts of the sequence based on their position.

Related Terms