# Residual connection

> Residual connection: Adding a sub-layer's output back onto its input, so each block refines the token vectors instead of replacing them.

Canonical: https://llmdojo.dev/glossary/residual-connection

Also called residual connections.

Adding a sub-layer's output back onto its input, so each block refines the token vectors instead of replacing them.

Learn it in the lesson: [The transformer block](https://llmdojo.dev/learn/model-foundations/attention/the-transformer-block) (Model Foundations · Attention: How Tokens Use Their Context).

## Related
- [Attention](https://llmdojo.dev/glossary/attention)
- [Query, key and value](https://llmdojo.dev/glossary/qkv)
- [Attention head](https://llmdojo.dev/glossary/attention-head)
- [Causal mask](https://llmdojo.dev/glossary/causal-mask)
- [Softmax](https://llmdojo.dev/glossary/softmax)
- [Transformer block](https://llmdojo.dev/glossary/transformer-block)
- [Layer norm](https://llmdojo.dev/glossary/layer-norm)
- [Feed-forward network (MLP)](https://llmdojo.dev/glossary/mlp)
- [Glossary of every term](https://llmdojo.dev/glossary)
