O&O ConsultingBook a free call

Home / Insights / AI Foundations

Neural Networks and Backpropagation, Explained

What a neural network computes, how it learns from its mistakes, and why depth matters.

O&O Consulting · · 2 min read

Close view of an electronic circuit board

Despite the biological name, an artificial neural network is a mathematical function. Each unit multiplies its inputs by weights, adds them, and passes the result through a simple non-linear function. Units are arranged in layers, and the output of one layer feeds the next.

Why non-linearity matters

Without the non-linear step, any number of layers would collapse into a single linear calculation, able to draw only straight boundaries. With it, networks can approximate a very wide class of functions. Universal approximation results show that even one hidden layer is sufficient in principle, though possibly only if it is impractically large.

One step of training a neural networkIllustrative diagram, not data
Pass inputs forward through the layersCompare the output with the targetSend the error backwardAdjust each weight a littleand the loop repeats
Pass inputs forward through thelayersCompare the output with the targetSend the error backwardAdjust each weight a littleand the loop repeats

Diagram by O&O Consulting.

Learning by gradient descent

Training begins with random weights. The network makes a prediction, and a loss function scores how wrong it was. The goal is to change the weights so the loss falls.

Backpropagation applies the chain rule of calculus to find, efficiently, how the loss would change if each weight were nudged. That list of sensitivities is the gradient. Gradient descent then moves every weight a small step in the direction that reduces the loss. In practice the gradient is estimated from small random batches of data, which is cheaper and often helps the search.

The value of depth

In image models, early layers tend to respond to edges and colours, later layers to textures and parts, and the final layers to whole objects. Nobody programs these features; they emerge because they help reduce the loss. Yann LeCun and colleagues showed this approach reading handwritten digits well before computing power made it widespread.

Training very deep networks was long difficult because gradients faded or exploded as they passed back through many layers. Better initialisation, normalisation and "residual" shortcut connections, introduced in ResNet, made networks with over a hundred layers trainable.

Limitations and open questions

Neural networks need considerable data and computing power, and their internal reasoning is hard to inspect. Theory still lags practice: why very large networks generalise well, despite having enough capacity to memorise their training sets, is an active research question.

References

  • LeCun, Y. et al. (1998). "Gradient-based learning applied to document recognition." Proceedings of the IEEE. doi.org/10.1109/5.726791
  • He, K. et al. (2015). "Deep Residual Learning for Image Recognition." arxiv.org/abs/1512.03385
  • Rumelhart, D., Hinton, G. and Williams, R. (1986). "Learning representations by back-propagating errors." Nature. doi.org/10.1038/323533a0

This article is general information, not financial, legal or investment advice. AI research and rules change quickly; check the cited sources for the current position.