[KongchangAI]
Concept前馈网络 / Feed-Forward Network

FFN

The feed-forward neural network layer in the Transformer architecture, typically composed of two linear transformations and an activation function. It operates independently on each token in a sequence, and its parameters account for a large share of the model's total parameters.

Core Facts

Timeline (last 90 days)

Dec 2

Sequence compression directly reduces the number of tokens, causing the computation of the FFN and per-token projections to drop proportionally, a benefit that the "cheaper per token" approach cannot achieve.

Unverified50%
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 2

Current mainstream LLM efficiency optimization methods (shrinking the KV cache, limiting the receptive field, replacing attention operators) mainly reduce the attention cost per token but do not reduce the number of tokens flowing through the network, so the computation of the FFN and per-token projections still grows with the full sequence length.

Unverified50%
Oct 21

The MoE architecture splits the feed-forward network (FFN) layers in the Transformer into multiple parallel experts, and each token is routed to only a few experts for computation.

Unverified50%
Oct 21

The author of the experiment characterized the result of replacing the FFN with shared product-key memory as a "negative result."

Expired50%
Oct 21

An experiment shared in the Reddit community replaced the FFN with a shared product-key memory, matching the performance of MoE models at a scale of 23 million parameters.

Expired50%
Oct 21

In the Transformer architecture, feed-forward network (FFN) layers typically account for more than two-thirds of the model's parameters.

Unverified50%
Oct 21

In Transformers, product-key memory is typically inserted after the attention layer, as a replacement for or supplement to the FFN.

Unverified50%
Oct 21

Compared with a standard FFN Transformer, the shared product-key memory approach did not demonstrate a clear advantage.

Expired50%
Oct 13

reViT introduces a shared expert bank, representing the FFN at each recursion depth as a convex combination of the expert bank weights, with a depth-invariant parameter pool paired with depth-varying combination weights.

Unverified50%

5 more timeline events

All Facts (14)

Verified

The Mixture-of-Experts (MoE) architecture is a sparsely activated design that splits a single large model into multiple expert sub-networks, where each expert is usually a set of independent feed-forward layer (FFN) weights, and a lightweight router network decides which few experts to assign to based on input token features.

90%
Unverified

The feed-forward neural network (FFN) is responsible for storing knowledge, transforming contextual information into implicit knowledge stored in the network parameters in vector form

60%
Unverified

In the standard Transformer architecture, the feed-forward network (FFN) accounts for approximately two-thirds of the model's total parameter count.

60%
Unverified

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.

50%
Unverified

Sequence compression directly reduces the number of tokens, causing the computation of the FFN and per-token projections to drop proportionally, a benefit that the "cheaper per token" approach cannot achieve.

50%
Unverified

Current mainstream LLM efficiency optimization methods (shrinking the KV cache, limiting the receptive field, replacing attention operators) mainly reduce the attention cost per token but do not reduce the number of tokens flowing through the network, so the computation of the FFN and per-token projections still grows with the full sequence length.

50%
Unverified

The MoE architecture splits the feed-forward network (FFN) layers in the Transformer into multiple parallel experts, and each token is routed to only a few experts for computation.

50%
Unverified

In the Transformer architecture, feed-forward network (FFN) layers typically account for more than two-thirds of the model's parameters.

50%
Unverified

In Transformers, product-key memory is typically inserted after the attention layer, as a replacement for or supplement to the FFN.

50%
Unverified

reViT introduces a shared expert bank, representing the FFN at each recursion depth as a convex combination of the expert bank weights, with a depth-invariant parameter pool paired with depth-varying combination weights.

50%
Unverified

In the MoE (Mixture of Experts) architecture, optimization for knowledge storage is primarily focused on the FFN layer

50%
Unverified

The FFN feed-forward network module upscales vectors via the up layer (e.g., 4K→8K), passes them through an activation function (such as SwiGLU gated activation), and then reduces them back to the original dimension via the down layer.

50%
Unverified

FFN层的隐藏维度一般是模型维度的4倍

50%
Unverified

以GPT-3的1750亿参数为例,大约2/3的参数分布在FFN层中,1/3在注意力层中

50%

Source Articles