Skip to content
Financial Machine Learning / Neural Networks and Deep Learning

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 optional derivation sub-note works out the backward function for the three building blocks used in this introductory topic — the affine (dense) layer, the ReLU activation, and the combined softmax-plus-cross-entropy output layer — and assembles them into a vectorised backward pass. Skip it on a first pass if you only need the conceptual algorithm; return when you want the algebra that frameworks automate.

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 browse the Financial Machine Learning syllabus.