# Residual Connection

- **Canonical URL:** https://getaimath.com/dictionary/residual-connection/
- **Topics:** [Transformer Architecture](https://getaimath.com/dictionary/category/transformer-architecture/)
- **Also called:** Skip Connection
- **Last updated:** 2026-11-25

## What is Residual Connection?

**In one sentence:** A residual connection lets a layer's input skip ahead and be added to its output, creating a shortcut through the network.

Instead of each layer completely replacing the information, it adds an update on top of what was already there. This shortcut helps learning signals flow through very deep networks, and it is also called a skip connection.

![Transformers & Attention: The Smart Highlighter — Simple cartoon diagram showing how a Transformer reads a whole sentence at once and shines a bright highlighter beam from the word "IT" back to "trophy" so it knows what "IT" means.](https://getaimath.com/diagrams/transformer-architecture.png)
*Napkin Diagram (Transformer Architecture): Older AI read word-by-word and often lost track of earlier words; a Transformer highlights which words connect to which.*

## What is an example of Residual Connection?

In a Transformer, the result of attention is added back to the original token numbers before moving on.

## Why does Residual Connection matter?

Residual connections made it possible to train networks with dozens or hundreds of layers.

## Related Concepts

- [RMSNorm](https://getaimath.com/dictionary/rmsnorm/): RMSNorm is a simpler, faster version of layer normalization that only rescales numbers by their overall size.
- [Transformer Block](https://getaimath.com/dictionary/transformer-block/): A Transformer block is one repeated layer of a Transformer, usually made of attention, a feed-forward network, normalization and residual connections.
- [Layer Normalization](https://getaimath.com/dictionary/layer-normalization/): Layer normalization rescales the numbers in each layer so they stay in a steady, healthy range during training.
- [Hidden Dimension](https://getaimath.com/dictionary/hidden-dimension/): The hidden dimension is the number of values used to represent each token inside the model.
- [SwiGLU](https://getaimath.com/dictionary/swiglu/): SwiGLU is an activation design used in many modern LLMs that adds a "gate" so the network can control how much information passes.
- [Hidden State](https://getaimath.com/dictionary/hidden-state/): A hidden state is the list of numbers representing a token at some point inside the model.

---
Source: The AI Math Dictionary (https://getaimath.com/dictionary/residual-connection/)
