ML0046 Forward Propagation

Please explain the process of Forward Propagation.

Answer

Forward propagation is the process by which a neural network takes an input and generates a prediction: the input data is passed systematically through each layer of the network. At every neuron, a weighted sum of the previous layer’s outputs (plus a bias) is computed, then a non-linear activation is applied; this repeats layer by layer until the output layer emits the final prediction. It is essentially the prediction phase of the network: information flows in one direction, from input to output, using the learned weights and biases.

(1) Input Layer: The network receives the raw input data.
(2) Layer-Wise Processing: Each neuron computes a linear combination (weighted sum plus bias), then applies a non-linear activation (ReLU, sigmoid, tanh) to introduce non-linearity.
(3) Propagation Through Layers: The output of one layer becomes the input to the next, progressing through all hidden layers.
(4) Output Generation: The final layer applies a task-appropriate function (softmax for classification, a linear function for regression) to produce the prediction.

Forward propagation flow diagram showing inputs flowing through weighted sum, bias, and activation at each layer up to the output prediction

Figure 1: One direction only: each layer transforms activations into pre-activations (z = Wx + b) and back into activations (a = f(z)) until the output layer produces the prediction. No gradient information flows here; that is backpropagation’s job.

Mathematical Formulation:
z^{(l)} = W^{(l)} a^{(l-1)} + b^{(l)}
a^{(l)} = f\big(z^{(l)}\big)
\hat{y} = a^{(L)}

Where:

  • a^{(l-1)} is the previous layer’s activation vector (a^{(0)} = x, the input).
  • W^{(l)}, b^{(l)} are layer l‘s learned weights and biases; z^{(l)} is the pre-activation.
  • f(\cdot) is the activation function; L is the number of layers and \hat{y} the prediction.
Small two three one network annotated with concrete input, weight, bias, pre-activation, and activation values flowing to a single numeric output

Figure 2: A worked example with concrete numbers: inputs x = (0.5, 0.1, 0.4) flow through fixed weights and biases; each hidden node shows its computed z and sigmoid activation a, ending in the scalar prediction. Every number on the diagram follows from the two formulas above.


Login to view more content


Log in to track your progress

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *