Skip to content
Neural Networks and AI / Feedforward Foundations

Derivation: Backward Functions for Basic Modules and Vectorized Backpropagation

The previous lesson stated the backpropagation algorithm and its chain-rule justification at the level of a single hand-worked example. This note derives, once and for all, the backward function for each of the three building blocks used throughout this topic — the affine (dense) layer, the ReLU activation, and the combined softmax-plus-cross-entropy output layer — and assembles them into a fully vectorised backward pass for an arbitrary-depth MLP.

In this lesson

  1. Setup and notation
  2. Derivation: the affine (dense) layer's backward function
  3. Derivation: the ReLU backward function
  4. Derivation: the softmax + cross-entropy backward function
  5. Assembling the vectorized backward pass
  6. Worked numerical check

Before you start

The full lesson, with worked examples and exercise solutions, is for members.

Read the full lesson

New to SelfMadeQuant.com? See membership options or explore the curriculum.