[KongchangAI]
ConceptSelf-Attention

Self-Attention

An attention mechanism in which each position in a sequence computes similarity with other positions, enabling the model to establish global dependencies within the same sequence. It is a core component of Transformer encoders and decoders.

Core Facts

Timeline (last 90 days)

Nov 23

In a standard Transformer decoder, attention when computing the current token's output aggregates information from all historical positions, constituting full-prefix conditioning rather than a strict first-order Markov autoregressive dependency.

Unverified50%
Nov 23

Self-attention has quadratic complexity, so researchers have proposed a variety of alternatives, including state space models (such as Mamba and S4), long convolutions (such as Hyena), linear attention, and gated recurrent units, among others.

Unverified50%
Nov 20

Standard self-attention has O(n²) computation and memory cost in sequence length n.

Unverified50%
Nov 18

In the prefill stage, for a prompt of length L, the self-attention computation grows with L^2, the matrix multiplications are large in scale and highly parallel, and GPU compute utilization (MFU) is usually high, making it compute-bound.

Unverified50%
Nov 5

In language models, visual tokens are concatenated with text tokens and jointly participate in self-attention computation, whose computational overhead grows quadratically with the number of tokens.

Unverified50%
Oct 28

Hybrid language models alternate or combine full-attention layers with efficient layers such as linear attention and state space models (e.g., Mamba); full-attention layers must store key-value vectors for every historical token, with overhead growing linearly with sequence length, while linear attention layers replace the KV cache with a fixed-size recurrent state.

Unverified50%
Oct 25

The Transformer is an architecture built entirely on self-attention.

Unverified50%
Oct 24

Self-attention itself is permutation-invariant, so the model cannot directly learn the input order from the attention output.

Unverified50%
Oct 23

Transformers access past trajectories through the attention mechanism, at the cost of quadratic memory and computation overhead.

Unverified50%
Oct 19

Each Transformer block contains a self-attention layer and a position-wise feed-forward network, both surrounded by residual connections and layer normalization.

Verified65%

7 more timeline events

All Facts (20)

Verified

The computational complexity of the self-attention mechanism grows approximately quadratically with sequence length, with the attention matrix computation being proportional to n² for a sequence of length n.

90%
Verified

The computational complexity of the standard Self-Attention mechanism has a quadratic relationship with sequence length (O(n²)).

90%
Verified

When resolution doubles, the attention computation the model must handle often grows fourfold or more, causing elapsed time to increase non-linearly.

75%
Verified

Expanding the context window from 8K to 128K increases computational cost by 256 times.

75%
Verified

The self-attention mechanism allows the model to simultaneously see the information of all other tokens in the input sequence when processing each token, and the computational complexity of the attention matrix is O(n²)

75%
Verified

The core idea of ViT is to divide an image into fixed-size patches, flatten each patch and treat it as a token in a sequence, and then model global dependencies through a multi-head self-attention mechanism.

75%
Verified

Each Transformer block contains a self-attention layer and a position-wise feed-forward network, both surrounded by residual connections and layer normalization.

65%
Unverified

When sequence length n grows from 2K to 128K, the attention computation volume increases approximately 4,000-fold.

70%
Unverified

The study finds that hallucinations manifest as three types of information flow distortion patterns: over-reliance on self-attention, diffuse contextual retrieval, and excessive information compression.

70%
Unverified

The scaled dot-product attention formula is Attention(Q,K,V) = softmax(QK^T/√d_k)V, where dividing by √d_k prevents dot products in high-dimensional space from becoming too large and causing softmax to enter a saturation region.

60%
Unverified

In a standard Transformer decoder, attention when computing the current token's output aggregates information from all historical positions, constituting full-prefix conditioning rather than a strict first-order Markov autoregressive dependency.

50%
Unverified

Self-attention has quadratic complexity, so researchers have proposed a variety of alternatives, including state space models (such as Mamba and S4), long convolutions (such as Hyena), linear attention, and gated recurrent units, among others.

50%
Unverified

Standard self-attention has O(n²) computation and memory cost in sequence length n.

50%
Unverified

In the prefill stage, for a prompt of length L, the self-attention computation grows with L^2, the matrix multiplications are large in scale and highly parallel, and GPU compute utilization (MFU) is usually high, making it compute-bound.

50%
Unverified

In language models, visual tokens are concatenated with text tokens and jointly participate in self-attention computation, whose computational overhead grows quadratically with the number of tokens.

50%
Unverified

Hybrid language models alternate or combine full-attention layers with efficient layers such as linear attention and state space models (e.g., Mamba); full-attention layers must store key-value vectors for every historical token, with overhead growing linearly with sequence length, while linear attention layers replace the KV cache with a fixed-size recurrent state.

50%
Unverified

The Transformer is an architecture built entirely on self-attention.

50%
Unverified

Self-attention itself is permutation-invariant, so the model cannot directly learn the input order from the attention output.

50%
Unverified

Transformers access past trajectories through the attention mechanism, at the cost of quadratic memory and computation overhead.

50%
Unverified

Self-Attention means that each position within a sequence computes similarity with all other positions, allowing the model to establish global dependencies within the same sequence, and it is the core of the Transformer encoder and decoder.

50%

Source Articles