Skip to content
Navigation
Dashboard
💻Interactive•30 min

Feedforward Neural Networks

Build your understanding of multi-layer neural networks and how information flows through them.

Feedforward Neural Networks

Architecture Overview

A feedforward neural network (also called Multi-Layer Perceptron or MLP) consists of:

1. Input Layer

  • Receives the raw features
  • No computation, just passes data forward
  • 2. Hidden Layers

  • Where the "learning" happens
  • Each neuron applies: output = activation(weights × inputs + bias)
  • Multiple hidden layers = "deep" network
  • 3. Output Layer

  • Produces final predictions
  • Activation depends on task (softmax for classification, linear for regression)
  • Forward Propagation

    Data flows in one direction: Input → Hidden Layers → Output

    For each layer: z = W × x + b (linear transformation) a = activation(z) (non-linear activation)

    Network Design Considerations

    Width vs Depth:

  • Wider networks: More neurons per layer
  • Deeper networks: More layers
  • Modern trend: Deeper is often better
  • Common Configurations:

  • Small: 2 hidden layers, 128 neurons each
  • Medium: 4-6 layers, 256-512 neurons
  • Large: 10+ layers, 1000+ neurons
  • Universal Approximation Theorem

    A neural network with a single hidden layer can approximate any continuous function, given enough neurons. However, deep networks can represent functions more efficiently.

    🎯 Key Takeaways

    • ✓Feedforward networks have input, hidden, and output layers
    • ✓Data flows forward through the network during inference
    • ✓Deeper networks can represent complex functions more efficiently
    • ✓The Universal Approximation Theorem shows NNs can learn any function

    📚 Additional Resources