Chain rule

  • 1-var function:
  • multi-var function:

Every variable depends on the chain rule.

Example: if and , what is ?

Jacobians

The jacobians are:

Exercise

Given the functions:

is the score, h is the the function that transforms input , with weights and is the activation

activation means if we need to activate that neuron


Step 1: Rewrite

Express explicitly and rewrite h:


Step 2: Apply the chain rule

We want to find the derivative of with respect to :

Calculate each term:

  • , a diagonal matrix with derivatives of applied element-wise

Putting it all together: