MLP

Also known as: Multi-Layer Perceptron, Multilayer Perceptron

An MLP (multi-layer perceptron) is a small stack of fully connected layers: each layer is a linear map (matrix × vector + bias) followed by a nonlinear activation.

In the soft-attention score of Bahdanau et al., a tiny MLP takes the concatenated query and encoder state $ [q; h_i] $ and outputs a single compatibility number. In Transformers, the position-wise feed-forward network inside each block is also an MLP (usually two linear layers with a nonlinearity in between).

← Back to AI Glossary