[KongchangAI]
ConceptPositional Encoding / 位置嵌入

Positional Encoding

A mechanism in Transformer models that enables the model to perceive the sequential position of tokens. Principal approaches include fixed sinusoidal encoding, learnable absolute position embeddings, and relative position encodings such as RoPE. These approaches differ substantially in their ability to generalize to sequence lengths beyond those seen during training.

Core Facts

Timeline (last 90 days)

Nov 30

Sparse attention typically reuses position encodings designed for dense attention directly, ignoring that sparsification itself changes the context range each query attends to.

Unverified50%
Nov 13

SkinCast's fused features pass through a shared backbone with local-plus-global day-x positional encoding, then through an N-layer Informer decoder that outputs the forecast sequence in a single non-autoregressive pass.

Unverified50%
Nov 3

Since attention itself is insensitive to sequence order, the model relies on positional encodings (such as sinusoidal encodings or rotary position embedding RoPE) to inject order information.

Unverified50%
Nov 2

This work bridges the gap between empirical observation and theoretical explanation, providing computable theoretical guidance for the choice of positional encoding.

Unverified50%
Nov 2

The paper proposes a "position realizability theory" to explain the dependence of length generalization on positional encoding and derives widely documented empirical patterns.

Unverified50%
Oct 28

Hand-computing the 6×512 positional encoding table helps one understand how the combination of sine and cosine lets the model distinguish different positions without learning a separate vector for each position.

Unverified50%
Oct 27

For Transformers, mechanisms such as positional encoding and attention masking may fail beyond the training length.

Unverified70%
Oct 26

DDPM adopts the sinusoidal positional encoding from the Transformer, converting the time step t into a high-dimensional vector, then mapping it through two fully connected layers to a dimension matching the number of feature map channels, and finally modulating the features of each layer by element-wise addition or FiLM.

Unverified50%
Oct 26

In the diffusion model, the time step t is converted into a vector via sine-cosine encoding similar to Transformer positional encoding, and then fused with the image features.

Unverified50%
Oct 24

Tiny models like DinoGPT typically use learnable positional embeddings, with the parameter count equal to the maximum sequence length multiplied by the hidden dimension.

Unverified50%

11 more timeline events

All Facts (20)

Verified

RoPE (Rotary Position Embedding) injects positional information into attention computation in the form of a rotation matrix, preserving relative positional relationships across arbitrary sequence lengths.

80%
Verified

Positional encoding was first widely used in the Transformer architecture, and its role is to inject the order information of elements in a sequence into the model, because the pure attention mechanism itself is insensitive to order.

75%
Verified

Implementing a Transformer from scratch requires understanding and hand-coding components such as the matrix operations for attention weights, positional encoding, residual connections, and layer normalization.

70%
Verified

Because the Transformer self-attention mechanism exhibits positional bias, earlier input content has a stronger anchoring effect on subsequent generation, which is the underlying reason for the context anchoring effect of system prompts

65%
Unverified

For Transformers, mechanisms such as positional encoding and attention masking may fail beyond the training length.

70%
Unverified

The context window is the maximum number of tokens a time-series foundation model (and all Transformer-based models) can process in a single forward computation, jointly determined by the positional encoding in the model architecture and the complexity of the attention mechanism; the window size is a hyperparameter fixed at training time and cannot be extended at inference.

70%
Unverified

Positional encoding is used to inject word order information into the model, because the attention mechanism itself does not distinguish positional order.

60%
Unverified

Positional encoding has evolved from fixed sinusoidal encoding (original paper) to learnable absolute positional encoding (BERT) and then to Rotary Position Embedding RoPE (LLaMA, Qwen).

60%
Unverified

Sparse attention typically reuses position encodings designed for dense attention directly, ignoring that sparsification itself changes the context range each query attends to.

50%
Unverified

SkinCast's fused features pass through a shared backbone with local-plus-global day-x positional encoding, then through an N-layer Informer decoder that outputs the forecast sequence in a single non-autoregressive pass.

50%
Unverified

Since attention itself is insensitive to sequence order, the model relies on positional encodings (such as sinusoidal encodings or rotary position embedding RoPE) to inject order information.

50%
Unverified

The paper proposes a "position realizability theory" to explain the dependence of length generalization on positional encoding and derives widely documented empirical patterns.

50%
Unverified

This work bridges the gap between empirical observation and theoretical explanation, providing computable theoretical guidance for the choice of positional encoding.

50%
Unverified

Hand-computing the 6×512 positional encoding table helps one understand how the combination of sine and cosine lets the model distinguish different positions without learning a separate vector for each position.

50%
Unverified

DDPM adopts the sinusoidal positional encoding from the Transformer, converting the time step t into a high-dimensional vector, then mapping it through two fully connected layers to a dimension matching the number of feature map channels, and finally modulating the features of each layer by element-wise addition or FiLM.

50%
Unverified

In the diffusion model, the time step t is converted into a vector via sine-cosine encoding similar to Transformer positional encoding, and then fused with the image features.

50%
Unverified

Tiny models like DinoGPT typically use learnable positional embeddings, with the parameter count equal to the maximum sequence length multiplied by the hidden dimension.

50%
Unverified

Positional encoding should be added to the embedding, not concatenated.

50%
Unverified

The performance decline caused by 'lost in the middle' follows a U-shaped curve rather than linear decay; its mechanism may be related to Transformer attention allocation and positional encoding.

50%
Unverified

The causes of the lost-in-the-middle phenomenon are usually attributed to the decay effect of positional encoding, the fact that beginning and end content in training data is more often associated with answers, and the dilution of the attention softmax over long sequences.

50%

Source Articles