liveBook · Manning

Residual connection

As explained in Applied Reinforcement Learning

A neural-network connection that adds a layer's input directly to its transformed output.

A residual connection adds a layer’s input to its transformed output: Output = LayerNorm(x + SubLayer(x)). The layer adds to the existing representation instead of replacing it. section 9.6

This addition preserves the original information and lets gradients flow directly through the skip connection, making deep networks easier to train. section 9.6

Transformer encoder

In a Transformer encoder, residual connections wrap both self-attention and feedforward sub-layers that process zone representations. section 9.6

Figure 9.8 Transformer architecture.

The Transformer architecture diagram provides context for where residual connections fit in the encoder. section 9.6

How Applied Reinforcement Learning covers it

How deep it goes
Defines the addition as x + SubLayer(x), explains preserved information and direct gradient flow, and stops short of implementation details.
Examples
Uses Transformer encoder layers that wrap self-attention and feedforward sub-layers processing zone representations.
What you can do after
Evaluate/understand how adding a layer input to its output can preserve information and ease deep-network training.
How it connects
Connects residual connections with Transformer layers, self-attention, feedforward networks, layer normalization, and gradient flow.

Also explained in

Compare how 18 books explain residual connection →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Applied Reinforcement Learning. The section links point to the parts of the book it draws on.