Feedforward Neural Networks (FNN)
Feedforward Neural Networks (FNN) are the simplest type of artificial neural network where information flows in one direction—from input to output—without any cycles or feedback loops.
Key Concepts
Architecture
- Input Layer: Receives the input features.
- Hidden Layers: Intermediate layers that learn representations of the input data.
- Output Layer: Produces the final predictions.
An FNN with one hidden layer is called a single-layer perceptron, while networks with multiple hidden layers are referred to as deep feedforward neural networks.
Neuron Computation
Each neuron computes a weighted sum of its inputs, adds a bias, and applies an activation function:
Where:
- are the inputs,
- are the weights,
- is the bias,
- is the activation function.
Example
For a simple network with two inputs , weights , and bias :
Forward Propagation
Forward propagation refers to the process of computing the output of the network by passing inputs through each layer.
-
Compute the weighted sum for each neuron:
Where:
- is the weight matrix for layer ,
- are the activations from the previous layer,
- is the bias vector.
-
Apply the activation function:
-
Repeat for all layers until the output layer.
Limitations
- Linear Separability: Without activation functions, FNNs can only represent linear decision boundaries.
- Overfitting: Larger networks with too many parameters may overfit small datasets.
Applications
- Regression: Predicting continuous outputs like house prices.
- Classification: Categorizing data into classes, e.g., spam detection.
Advantages
- Simplicity and interpretability for basic tasks.
- Easy to implement and train for small datasets.
Challenges
- Requires careful selection of hyperparameters (e.g., number of layers, neurons, learning rate).
- Prone to vanishing gradients when deep networks are used without modern techniques like ReLU.
Summary
Feedforward Neural Networks are foundational in deep learning. While simple in structure, they are powerful when combined with appropriate activation functions and optimization techniques. Their limitations have paved the way for more advanced architectures like Convolutional and Recurrent Neural Networks.