To make a neural network learn, we need to backpropagate the errors through the network so that each individual parameter can be adjusted. For every parameter, we will need to calculate \(dL/dw\) where \(w\) is the value of the parameter and \(L\) is the loss. Consider a simple regression network with activation function \(\sigma\)
\[
\begin{aligned}
z &= wx + b\newline
\hat{y} &= \sigma(z)\newline
L &= \frac{1}{2}(y - \hat{y})^{2}\end{aligned}
\]
Thus, we do not need to construct the jacobian explicitly. This simplification suffices where \(\odot\) is the elementwise product.
Thus, we can write the gradients with respect to loss as a sum-product of gradient of loss at connected nodes and the gradient of the connected node with respect to node under study. This is mathematically represented in the last equation. Jacobian helps us write this equation in a simpliefied manner. However, Consider a transformation of the format
\[
\begin{aligned}
N \times p \to N \times m\end{aligned}
\]
The Jacobian will be of the shape \(N \times p \times N \times m\) which is extremely large in size even for a small network. We use the error notation defined earlier (error at $x = J^{T} \times $ error at \(y\)) and directly calculate the product, error times Jacobian, instead of the Jacobian explicitly This product is called Vector Jacobian Product (VJP). Ultimately, we will be only calculating \(dL/dw\) everywhere instead of the intermediate Jacobians. This simplifies the calculations to a large extent.