[KongchangAI]
ConceptAttention Mechanism / 自注意力 / 多头注意力

Attention Mechanism

The attention mechanism is a core technique in deep learning that enables models to dynamically focus on the most relevant parts of an input when processing sequential data, rather than treating all information equally. Its core idea is to compute relevance weights among queries, keys, and values to achieve selective attention to information at different positions. It is widely applied in natural language processing and computer vision, and is a foundational component of the Transformer architecture.

Core Facts

Timeline (last 90 days)

Dec 2

The FFN in a Transformer often accounts for more than two-thirds of the model's total parameters, and its computation is O(sequence length × hidden dimension × intermediate dimension), growing linearly with sequence length; attention computation is O(sequence length² × dimension), growing quadratically with length.

Unverified50%
Dec 1

Activation patching experiments show that words in the plan mainly rely on attention mechanisms, while action tokens mainly rely on the recurrent GatedDeltaNet (GDN) blocks.

Unverified50%
Dec 1

The capability gap between open-source and closed-source models may stem partly from fundamental differences at the attention-mechanism level, rather than merely from differences in data and compute.

Unverified50%
Nov 27

After AlexNet in 2012, paradigms such as convolutional networks, attention mechanisms, Transformers, and large-scale pretraining succeeded one another.

Unverified50%
Nov 27

Long context itself does not equal factual consistency; supporting designs such as attention mechanisms and retrieval augmentation are still needed to ensure that evidence across paragraphs does not conflict.

Unverified50%
Nov 25

An NVIDIA developer blog states that attention is one of the main bottlenecks when serving world foundation models.

Unverified50%
Nov 24

Existing interpretability research has shown that there is a certain correlation between attention patterns and reasoning steps.

Unverified50%
Nov 23

Current mainstream decoder large language models rely on a combination of attention, feedforward layers, and residual layers.

Unverified50%
Nov 20

HiSA (Hidden Sparse Attention) is a sparsified attention mechanism whose core is to keep the query and key projections unchanged but compute only a subset of the dot products, where the rule for this subset is static, parameter-free, and determined by token position.

Unverified50%
Nov 18

In spiking Transformers, membrane variables are usually as important as weights, because the query, key, and value computations in the attention mechanism all depend on spike sequences, and small deviations in membrane variables propagate and accumulate across time steps, causing firing patterns to deviate.

Unverified50%

40 more timeline events

All Facts (20)

Verified

The self-attention mechanism maps inputs into three sets of vectors—Query, Key, and Value—computes dot-product similarity followed by softmax normalization, and then performs a weighted sum of the Values to generate a representation that incorporates global context.

90%
Verified

The Transformer's core innovation is the self-attention mechanism, which allows models to attend to all positions in the input simultaneously rather than processing step-by-step like RNNs or LSTMs

90%
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

Set Transformer models interactions between row vectors based on the self-attention mechanism and maintains permutation invariance by removing positional encodings.

90%
Verified

Context length and computational load grow in an approximately quadratic relationship, influenced by the attention mechanism.

90%
Verified

The context window of a large language model determines the upper limit of information the model can process in a single inference.

90%
Verified

The self-attention mechanism allows the model to simultaneously reference the contextual information of all other tokens in a sequence when processing each token, rather than processing sequentially as RNNs do

90%
Verified

The Attention Mechanism is the core component of the Transformer architecture and also the foundation of all current mainstream large language models.

90%
Verified

The self-attention mechanism of the standard Transformer architecture has a computational complexity of O(n²).

90%
Verified

In the Transformer architecture, the tokens of system instructions are placed at the very front of the attention mechanism, exerting a continuous constraining influence on all subsequently generated content.

90%
Verified

The key innovation of the Transformer is the self-attention mechanism, which allows the model to simultaneously attend to information from all other tokens in the input sequence when processing a single token.

90%
Verified

The Transformer architecture was proposed in 2017 by the Google Brain team in the paper "Attention Is All You Need"

90%
Verified

Transformer-based large language models use attention mechanisms to uniformly encode system prompts, user inputs, and externally retrieved content as homogenized token sequences, making it impossible for the model to distinguish trusted instructions from untrusted data at the semantic level.

80%
Verified

The self-attention mechanism is capable of capturing dependencies between any two positions in a sequence.

80%
Verified

FlashAttention improves inference speed and maintains mathematical equivalence with standard attention computation by reordering the computation sequence and leveraging the GPU's SRAM high-speed cache to reduce memory read/write operations.

80%
Verified

AlphaFold2 elevated the prediction accuracy of protein monomer structures to near-experimental levels by incorporating attention mechanisms (the Evoformer module) and equivariant neural networks

80%
Verified

The core formula of Self-Attention is Attention(Q,K,V) = softmax(QKᵀ/√dk)V, where dividing by √dk is intended to mitigate the vanishing gradient problem caused by excessively large dot product values.

80%
Verified

Each Transformer layer contains two core sub-modules: multi-head self-attention and a feed-forward neural network.

80%
Verified

研究表明当上下文过长时,模型对中间部分信息的注意力会显著下降,即"Lost in the Middle"现象

80%
Verified

Transformer架构的自注意力机制在处理长序列时面临二次方复杂度的计算开销,上下文长度翻倍则计算量增长四倍

80%

Source Articles