<p>There is nothing &quot;obvious&quot; about skip connections, it is something that as a community we learned the hard way. The basic premise is that in neural network parametrisation of feed forward layers, it is surprisingly hard to learn identify function. Skip connections make this special function (<code>f(x)=x</code>) extremely easy to learn, which improves network learning stability, and overall performance in a wide range of applications, at pretty much no extra computational cost. You are essentially giving a network an easy way of not using convoluted, comlpex part of computation when it does not need to, and thus allow us to use complex and big architectures without in depth understanding of the dynamics of the problem (which are beyond our current understanding of math!).</p>
<p>You can look at old-ish papers like <a href="https://arxiv.org/pdf/1505.00387.pdf" rel="nofollow noreferrer">highway networks</a> showing how it allows to train very deep models that otherwise would be to ill-conditioned to trian.</p>
What's the use of residual connections in neural networks?
<p>I've recently been learning about self-attention transformers and the &quot;Attention is All You Need&quot; paper. When describing the architecture of the neural network used in the paper, one breakdown of the paper included this explanation for residual connections:</p>
<p>&quot;Residual layer connections are used (of course) in both encoder and decoder blocks&quot;
(origin: <a href="https://www.kaggle.com/code/residentmario/transformer-architecture-self-attention/notebook" rel="nofollow noreferrer">https://www.kaggle.com/code/residentmario/transformer-architecture-self-attention/notebook</a>)</p>
<p>This was, unfortunately, not obvious to me. What is the purpose of residual connections, and why should this be standard practice?</p>