Skip to content
AI & Machine Learning Medium #resnet#skip-connections#residual

Residual Connections

A shortcut adds the input to the output. Gradients have a highway; networks scale to hundreds of layers.

A free, animated residual connections you can read here or embed on any website, from Scrollchart.

Residual Connections

Residual ConnectionsHe et al. 2016: output = F(x) + x; identity shortcut keeps gradient magnitude near 1Block diagramx (input)Conv 3x3, BNReLUConv 3x3, BN+x + F(x) (output)skip pathidentity shortcutTraining loss after convergencePlain vs residual at 50 / 100 / 150 layers0.00.40.81.2Training loss50 layers0.380.21100 layers0.720.23150 layers1.040.25Plain networkResidual networkAt 150 layers: plain loss 1.04 vs residual 0.25 (4x lower). Depth scales, plain degrades.

A residual block: input x, computed F(x), output x + F(x). The shortcut path lets gradient pass directly. Plain vs residual networks at depth 50, 100, 150 layers compared on training loss.

Good for

  • ResNet and deep CNN architecture explainers connecting the degradation problem to the skip-connection fix
  • Transformer residual stream articles explaining how attention layers write incrementally to a shared representation
  • Gradient flow and training stability tutorials demonstrating why depth stops hurting once shortcuts are added

Source & accuracy

This residual connections is an editorial illustration built to represent the concept accurately. Where it shows figures, they are typical or representative values chosen to make the relationship clear, not a single underlying dataset. The diagram and its explainer are reviewed and maintained centrally, and updated over time as understanding improves.

Shortcuts that enable depth

A residual connection (or skip connection) adds the input directly to the output of a layer, bypassing the learned transformation. Instead of y = f(x), residual blocks compute y = f(x) + x. This simple addition has profound effects. Gradients can now flow directly through the shortcut path, ensuring a gradient magnitude of at least 1. Deep networks (ResNet trained on 152 layers) became practical after residual connections were introduced. The identity path also serves as a highway for feature information: the model learns to add refined representations to the original features rather than replace them.

From ResNet to modern architectures

ResNet proved that residual connections unlock depth, and the pattern became a cornerstone of modern architecture design. Transformers use residual connections around every attention and feedforward block. Dense connections (DenseNet) extend the idea by concatenating outputs from all previous layers instead of just adding the input. Attention mechanisms also implicitly provide skip connections through the residual path before the feedforward. The prevalence of residual connections across very different architectures (CNNs, RNNs, transformers) suggests they capture a fundamental principle about learning in deep networks: representations benefit from additive refinement, and gradient flow requires low-cost paths through depth. Most modern models beyond 20 layers rely on skip connections.

Embed this diagram

Add this animated residual connections to your own site. Copy one line of HTML, or use the embed builder for theme and sizing options.

Reference

What this is
A free, embeddable, animated residual connections for any website.
Who uses it
AI/ML blogs, CS educators.
How to embed
Copy one line of HTML. No signup. No watermark. Works in WordPress, Webflow, Ghost, Substack, plain HTML.
File size
iframe embed, ~80 KB gzipped (loads on demand, does not block your page paint).
License
Free forever. Editorial explainer text included; updated centrally over time.

Embed format options

Copy the universal HTML snippet, the WordPress shortcode, or an iframe fallback - see the WordPress plugin page for details. Any format keeps the same Core Web Vitals profile and the same explainer text.

Embed snippet
<div data-scrollchart="residual-connections" data-scrollchart-v="1"></div>
<script src="https://scrollchart.com/embed.js" async></script>

Frequently asked questions

Where can I get a free animated "Residual Connections" for my website?
Scrollchart provides "Residual Connections" as a free, embeddable animated diagram you can add to any website with one line of HTML. No signup is required and there is no watermark. The diagram and its explainer text are served from scrollchart.com, so the embed stays current without any maintenance on your end.
How do I embed a residual connections in a developer or tech blog?
Copy the one-line snippet from the Scrollchart diagram page and paste it into your post HTML. It works in any static site generator, CMS, or hand-coded HTML page. The embed is a thin loader, not an iframe, so the content is fully in your DOM.