Blog | Feedforward Neural Networks

Feedforward Neural Networks

NOTE: This post is part of my Machine Learning Series where I’m discussing how AI/ML works and how it has evolved over the last few decades.

Feedforward Neural Networks (FNNs), also known as Multi-Layer Perceptrons (MLPs), are one of the most fundamental and widely-used neural network architectures in machine learning. FNNs have been employed for a variety of tasks, including classification, regression, and feature extraction. In this post, we'll explore the architecture, training process, and applications of FNNs.

Architecture of FNNs

An FNN consists of multiple layers of neurons, including an input layer, one or more hidden layers, and an output layer. Each neuron is connected to the neurons in the adjacent layers through weighted edges.

Neurons: Building Blocks of FNNs

A neuron receives inputs from other neurons or external sources, applies an activation function, and produces an output. Common activation functions include the sigmoid, ReLU (Rectified Linear Unit), and tanh functions.

Activation Functions in Neural Networks

Layers: Input, Hidden, and Output

  • Input Layer: The input layer receives raw data features and passes them to the hidden layers.
  • Hidden Layer(s): Hidden layers perform complex transformations on the data using weighted connections and activation functions.
  • Output Layer: The output layer provides the final predictions or classifications.

Training FNNs: Backpropagation and Gradient Descent

Training FNNs involves adjusting the weights and biases to minimize the loss function. The loss function measures the difference between the predicted output and the actual target.


Backpropagation is an algorithm used to calculate the gradients of the loss function with respect to the weights and biases. It uses the chain rule to efficiently propagate error signals from the output layer to the input layer.

Backpropagation Explained

Gradient Descent

Gradient descent is an optimization algorithm that updates the weights and biases based on the gradients calculated during backpropagation. Variants like stochastic gradient descent (SGD) and Adam optimizer improve the optimization process.

Gradient Descent: The Optimization Algorithm

Applications of FNNs

  • Classification: FNNs can classify data into distinct categories, such as spam or not-spam for email filtering.
  • Regression: FNNs can predict continuous values, such as house prices based on property features.
  • Feature Extraction: FNNs can learn meaningful representations of data for downstream tasks.


Feedforward Neural Networks (FNNs) consist of layers of interconnected neurons that transform input data into predictions. FNNs are trained using backpropagation and gradient descent to minimize the loss function. They are fundamental in machine learning and are used for classification, regression, and feature extraction.

Further Reading

  1. Neural Networks and Deep Learning - Michael Nielsen
  2. Deep Learning - Ian Goodfellow, Yoshua Bengio, and Aaron Courville


  • FNNs
  • Feedforward Neural Networks
  • MLPs
  • Multi-Layer Perceptrons
  • Neurons
  • Layers
  • Backpropagation
  • Gradient Descent
  • Activation Functions
  • Machine Learning



Post date:

Monday, May 8th, 2023 at 10:27:26 AM