Skip to content
AI.info

Deep architectures

Residual, Dense, and Skip Connectivity

Compare additive residual paths, dense concatenation, highway gating, and encoder–decoder skips without treating every shortcut as equivalent.

By the end you can

A shortcut changes the problem a block must solve

Without a shortcut, a block must learn the full desired mapping from its input. An additive residual block can learn something smaller: a change, measured against an identity or projected path.

That does not make deep networks easy. It creates shorter routes for signals and gradients. The residual branch still needs sensible normalization, initialization, and scale. Each of those three words is load-bearing, and the rest of this lesson attaches a measurement to each. A scaling factor between 0.1 and 0.3 decided whether a network trained at all. A reordering of the normalisation took a 1001-layer network to 4.62% error on CIFAR-10. An initialisation scheme reached 10,000 layers with no normalization layers in the model.

A residual path changes parameterization and signal flow; it does not guarantee useful depth.

Case

Identity shortcuts alone let a 34-layer network overtake an 18-layer one

A plain 18-layer network reached 27.94 per cent top-1 error on ImageNet validation. Its 34-layer counterpart got worse, at 28.54. Add identity shortcuts, change nothing else, and the same pair reads 27.88 and 25.03. Depth started paying at the point the route changed. Capacity had not moved.

The numbers are Table 2 of the ResNet paper, from He and colleagues in 2016. Its caption is the whole argument: “Top-1 error (%, 10-crop testing) on ImageNet validation. Here the ResNets have no extra parameter compared to their plain counterparts”.

The same paper stops this being read as a law about depth. On CIFAR-10, ResNet-110 with 1.7M parameters scored 6.43. The 1202-layer network, with 19.4M parameters, scored 7.93 — worse, which the authors attribute to overfitting. The shortcut bought sixteen extra layers at 34. It did not buy a thousand.

Figure

The same sixteen layers help one network and hurt the other, which is what makes the skip connection an architectural claim rather than a tuning choice. Table 2 of the ResNet paper; the path window is Veit, Wilber and Belongie.

Comparison

Four shortcut families, four measured costs

The phrase skip connection hides four distinct operations. Each of the four has a measurement attached to it rather than a slogan.

Residual addition is the parameter-free case. Those ResNets carry no extra parameter compared with their plain counterparts, and that addition alone is what turns 27.94 → 28.54 into 27.88 → 25.03 across the same two depths.

Dense concatenation buys explicit feature reuse and pays for it in channels. DenseNet, published in 2017, wires every layer to every later one, so a block of L layers has L(L+1)/2 direct connections. What the wiring bought is in the authors' own summary: “We also highlight that DenseNet-BC with L = 100 and k = 12 achieves comparable performance (e.g., 4.51% vs 4.62% error on C10+, 22.27% vs 22.71% error on C100+) as the 1001-layer pre-activation ResNet using 90% fewer parameters.” That is 0.8M parameters standing in for 10.2M at the same error. Their largest model, DenseNet-BC with L=190 and k=40 at 25.6M parameters, reaches 3.46% on augmented CIFAR-10 and 17.18% on augmented CIFAR-100. The trade survives outside the paper. The torchvision model documentation lists densenet201 at 20.0M parameters and 76.896 Acc@1 on ImageNet-1k, against resnet101 at 44.5M and 77.374.

Highway or gated paths put parameters on the carry route itself. Highway networks introduced LSTM-inspired adaptive gating units there in 2015. Table 6 of the ResNet paper puts the two designs side by side on CIFAR-10: Highway with 19 layers and 2.3M parameters at 7.54 per cent error, ResNet-110 with 1.7M at 6.43. The same paper states what separates them: “These gates are data-dependent and have parameters, in contrast to our identity shortcuts that are parameter-free. When a gated shortcut is "closed" (approaching zero), the layers in highway networks represent non-residual functions.” A gate that can close is a shortcut that can stop being one.

Encoder–decoder skips are the family a benchmark rewarded outright. U-Net, published in 2015, carries high-resolution encoder features across the bottleneck. As of 6 March 2015 that architecture sat at rank 1 of the ISBI 2012 EM segmentation leaderboard: “The u-net (averaged over 7 rotated versions of the input data) achieves without any further pre- or postprocessing a warping error of 0.0003529 (the new best score, see Table 1) and a rand-error of 0.0382.” The Ciresan sliding-window network scored 0.000420 and 0.0504 on the same board. An independent group later tabulated the same entry — "Image Analysis Lab Freiburg" — at warping error 352×10⁻⁶, Rand error 38×10⁻³ and pixel error 61×10⁻³. The challenge organisers describe what was being scored: 30 consecutive 512×512 ssTEM images, with 13 teams and 86 submissions before the ISBI'12 workshop, rising to 22 teams and 185 submissions. The same architecture won the ISBI cell tracking challenge 2015, with IOU 0.9203 on PhC-U373 and 0.7756 on DIC-HeLa. The second-best 2015 entries scored 0.83 and 0.46. The bottleneck still compresses. What crosses beside it is what the leaderboard rewarded.

FigureComparison · 4 columns

Residual addition

Adds a transformed branch to an identity or projection path.

  • Preserves channel count at addition
  • Encourages incremental refinement
  • Cheap output width
  • Requires compatible tensor shapes

Dense concatenation

Appends earlier features to later inputs.

  • Explicit feature reuse
  • Channel dimension grows
  • Transition layers control expansion
  • Memory can rise quickly

Highway or gated path

Learns how much transformed and carried information to combine.

  • Adaptive information flow
  • Additional gates and parameters
  • Can saturate or favor bypass
  • Useful when carry behavior should be conditional

Encoder–decoder skip

Transfers high-resolution features across a bottleneck.

  • Restores localization detail
  • Connects different semantic levels
  • Fusion may need projection or attention
  • Can leak nuisance texture into the decoder

Visual

Path length through a deep network

Short routes coexist with longer transformed routes, and the short ones carry more of the training than the drawing suggests. In a 110-layer residual network, most of the gradient comes from paths only 10 to 34 layers deep — the first 30.9 per cent of the nominal depth. That window was measured in 2016.

The paths are also individually droppable, which is the strongest evidence that they are paths and not one computation. Drop residual blocks at random during training, bypassing them with the identity, and a 1202-layer residual network reaches 4.91% on CIFAR-10. The identical network trained at constant depth reaches 6.67%.

FigureLayers · 3 layers
  1. 01

    Long transformed path

    Passes through every nonlinear block and builds complex features.

  2. 02

    Intermediate shortcut paths

    Bypass selected blocks and preserve earlier signals.

  3. 03

    Near-identity path

    Carries a direct reference that stabilizes incremental updates.

Example

Connectivity choices solve different engineering problems

The correct shortcut depends on what must be preserved. Each choice below has been measured on a named benchmark rather than argued for.

  • Deep classifier: residual addition lets stages refine representations without reconstructing an identity mapping at every block. That parameter-free change moved plain-34's 28.54 top-1 error to ResNet-34's 25.03 on ImageNet validation.
  • Segmentation network: encoder–decoder skips return the edge and location detail lost in the compressed bottleneck. That took U-Net to warping error 0.000353 and Rand error 0.0382, against the Ciresan sliding-window network's 0.000420 and 0.0504. It also took U-Net to IOU 0.9203 on PhC-U373, where the second-best 2015 entry scored 0.83.
  • Feature reuse network: dense concatenation exposes all earlier maps, so features are not relearned. DenseNet-BC at 0.8M parameters matched a 10.2M-parameter 1001-layer pre-activation ResNet, 4.51% against 4.62% on augmented CIFAR-10. But L layers wired that way carry L(L+1)/2 direct connections, and the activation storage that implies.
  • Adaptive computation: gated carry paths can preserve stable state and open transformation only where it helps. Highway-19 paid 2.3M parameters for 7.54 per cent CIFAR-10 error where ResNet-110 spent 1.7M for 6.43. The gates are data-dependent and parameterised, and a closed gate leaves a non-residual function behind.
  • Multimodal fusion: a projection skip can align dimensions before combining branches. Alignment does not guarantee semantic compatibility.

Analogy

Annotations layered over an original document

Edits accumulate on a document whose original text stays underneath. Residual changes record amendments. Dense concatenation keeps every prior draft available for reference, which is why L densely wired layers carry L(L+1)/2 direct connections rather than L.

Paper amendments are readable sentences, while neural features are distributed tensors. Adding a correction and storing an expanding archive are still two different operations.

Addition revises a representation; concatenation preserves multiple representations side by side.

Key idea

Shortcut branches can dominate or destabilize each other

When two branches are added, their relative scale affects optimization and representation. A nominal identity path may overwhelm a weak residual branch. An unscaled branch may grow without bound. Normalization placement, residual scaling, initialization, and projection design therefore belong to what the shortcut has to specify. “Add a skip” is not a complete recipe. Each of those four words has a paper behind it.

Start with scale, because there the failure is total rather than gradual. Once a residual Inception network exceeded 1,000 filters it stopped training altogether. The 2017 Inception-ResNet paper describes it plainly: “Also we found that if the number of filters exceeded 1000, the residual variants started to exhibit instabilities and the network has just "died" early in the training, meaning that the last layer before the average pooling started to produce only zeros after a few tens of thousands of iterations.” Neither a lower learning rate nor an extra batch-normalisation layer prevented it. Scaling the residual branch down by a factor between 0.1 and 0.3 before the addition did. The same wall turned up independently while building EDSR, and the remedy came out the same: "we found that increasing the number of feature maps above a certain level would make the training procedure numerically unstable. A similar phenomenon was reported by Szegedy et al. We resolve this issue by adopting the residual scaling with factor 0.1." Two teams, two domains, the same fix.

Placement is the second variable, and it moves results without moving the architecture diagram. Reorder the normalisation and the activation so that both the shortcut and the after-addition path are clean identity mappings, and depth stops fighting back. That is the ResNet authors' own follow-up in 2016, and its abstract gives the number: “We report improved results using a 1001-layer ResNet on CIFAR-10 (4.62% error) and CIFAR-100, and a 200-layer ResNet on ImageNet.” The DenseNet authors tabulate that same model a year later, independently, as "ResNet (pre-activation) 1001 10.2M 10.56 4.62 33.47 22.71". The layers did not change. Their order did.

The Transformer version of the placement question was settled the same way, in 2020. Ten authors “prove with mean field theory that at initialization, for the original-designed Post-LN Transformer, which places the layer normalization between the residual blocks, the expected gradients of the parameters near the output layer are large”. That is why a learning-rate warm-up stage was needed at all. Move the normalisation inside the residual block — the Pre-LN arrangement — and “the gradients are well-behaved at initialization”, so Pre-LN Transformers trained without warm-up “can reach comparable results with baselines”. Same shortcut. Different training recipe.

Initialization finishes the list, and it carries more of the weight than normalization does. Fixup, in 2019, rescales the initialisation of the residual branch and nothing else: “We find training residual networks with Fixup to be as stable as training with normalization -- even for networks with 10,000 layers.” ReZero reached the same place from another direction in 2021, with a single zero-initialised gate on each residual connection: 120-layer Transformers trained, and a 12-layer one converged 56% faster. The normalization layers were not what made the depth trainable. The scale of the branch was.

Scaling the residual branch by a factor between 0.1 and 0.3 was the difference between a network that trained and one that died.

Steps

Audit a shortcut before accepting it

The goal is to preserve useful access without creating an uncontrolled bypass. The fourth step is the one teams skip. The Inception-ResNet failure was found only by watching the last layer before the average pooling produce nothing but zeros after a few tens of thousands of iterations. Fixup removed the normalization layers altogether by setting the branch scale at initialisation instead. Branch magnitude is a quantity you choose. It is not one you inherit from the diagram.

FigureProcess · 5 steps
  1. 1. Name what must survive

    Identify detail, state, gradient flow, or reusable features.

  2. 2. Check tensor semantics

    Verify that branches refer to compatible positions, channels, and abstraction levels.

  3. 3. Choose fusion

    Select addition, concatenation, gating, or attention for a stated reason.

  4. 4. Measure branch scale

    Inspect activation and gradient norms on both paths.

  5. 5. Ablate the shortcut

    Test whether the connection improves quality, stability, or convergence under equal budgets.

A shortcut can hide a weak main branch

A network may achieve acceptable loss by leaning on a bypass while the intended transformation learns little. That matters in bottlenecks, multimodal fusion, and conditional branches.

Inspect branch-specific activations, gradients, and ablations. End-to-end accuracy alone cannot reveal whether the architecture uses the path for the reason you intended.

The suspicion became an experiment in 2016. Veit and colleagues rewrite residual networks “as an explicit collection of paths” of differing length. Cut individual paths and the network barely notices: “a lesion study reveals that these paths show ensemble-like behavior in the sense that they do not strongly depend on each other”. The routes that matter are also far shorter than the model card: “most of the gradient in a residual network with 110 layers comes from paths that are only 10-34 layers deep”. The long path is still there in the diagram. It is not where the training signal went.

Short paths should enable learning, not provide an unexamined escape route.

Position

A layer count is not a depth

Depth is the thing everyone remembers from this line of work. Depth is also the one variable the decisive experiment held fixed.

A plain 18-layer network reached 27.94 top-1 error on ImageNet validation, with 10-crop testing. Its 34-layer counterpart reached 28.54 — sixteen more layers, six tenths of a point worse. Add identity shortcuts and change nothing else, and the same two depths read 27.88 and 25.03. Going from 18 to 34 layers now buys 2.85 points instead of costing 0.60. The residual models carry no extra parameter compared with their plain counterparts. Between plain-34 and ResNet-34 the layer count is the one thing that did not move.

The second half of the argument is about what the number on the model card describes. A residual network can be rewritten as an explicit collection of paths that behave like an ensemble whose members do not strongly depend on one another. In a 110-layer residual network, most of the gradient comes from paths only 10 to 34 layers deep. The number on the model card and the lengths of the routes that carried the training signal are two different quantities.

The cleanest demonstration is one network measured three times. The 1202-layer ResNet, at 19.4M parameters, scored 7.93 per cent on CIFAR-10. That is worse than the 110-layer network at 6.43, which its authors attribute to overfitting. The same 1202-layer network was re-run in 2016 with stochastic depth. At constant depth it scored 6.67. With residual blocks randomly dropped and bypassed by the identity during training it scored 4.91: “With stochastic depth we can increase the depth of residual networks even beyond 1200 layers and still yield meaningful improvements in test error (4.91% on CIFAR-10).” A 26% relative improvement, bought by changing which paths were trained. The layer count on the model card never moved.

So “we made it deeper” is not an architecture decision that can be defended on its own. And “it is a 110-layer model” is a fact about the drawing rather than about the computation that gets learned. What is defensible is a claim about the route: which shortcut, joining which endpoints, and what the block on the residual branch is being asked to learn relative to what arrives along it. Layers are how that gets counted afterwards.

The same 1202 layers scored 7.93, 6.67 and 4.91 depending only on which paths were trained.

Key takeaways