AI Model Wiki

    Skip to main content
    7 min read
    Lesson 3 of 5

    Neural Networks Explained

    From the course Introduction to AI: Core Concepts

    Neural networks are the engine behind modern AI. Despite the name, they're not modeled on actual brains — they're mathematical functions inspired loosely by how neurons connect.

    The Basic Unit: A Neuron (Node)

    A single artificial neuron does something simple:

    1. Takes multiple inputs (numbers)
    2. Multiplies each input by a weight (how important is this input?)
    3. Adds them together
    4. Passes through an activation function (should this neuron "fire"?)
    5. Outputs a single number

    By itself, a single neuron can only learn simple patterns (like a straight line separating two categories). The power comes from connecting thousands or millions of neurons together.

    Layers of Neurons

    Neural networks are organized in layers:

    • Input layer — Receives raw data (pixels of an image, words of a sentence)
    • Hidden layers — Process information, each layer learning more abstract patterns
    • Output layer — Produces the final result (a classification, a prediction, generated text)

    The "deep" in deep learning means many hidden layers — modern models can have hundreds.

    How Layers Build Understanding

    For image recognition, each layer learns increasingly complex features:

    • Layer 1: Edges and gradients
    • Layer 2: Textures and simple shapes
    • Layer 3: Object parts (eyes, wheels, leaves)
    • Layer 4: Full objects (faces, cars, trees)
    • Layer 5+: Scenes, contexts, abstract concepts

    This hierarchical feature learning is what makes deep learning so powerful.

    Common Neural Network Types

    • Feedforward (Dense) — Data flows in one direction. Good for tabular data.
    • Convolutional (CNN) — Specialized for images. Uses filters that scan across the image to detect features. Powers image recognition, object detection.
    • Recurrent (RNN/LSTM) — Processes sequences by maintaining memory of previous inputs. Was used for language before transformers replaced them.
    • Transformers — The architecture behind GPT, BERT, and all modern LLMs. Uses attention mechanisms instead of sequential processing. We'll cover this in depth next.

    Training Neural Networks: Backpropagation

    Training a neural network is an optimization process:

    1. Forward pass: Data flows through the network, producing a prediction
    2. Loss calculation: How wrong is the prediction compared to the correct answer?
    3. Backward pass: The error is propagated backward through the network
    4. Weight update: Each weight is adjusted to reduce the error
    5. Repeat millions of times

    This process requires enormous computing power — that's why training GPT-4 cost over $100 million in compute.

    GPUs: The Hardware Behind AI

    Neural networks involve massive amounts of parallel math (matrix multiplications). GPUs (Graphics Processing Units), originally designed for rendering game graphics, excel at this type of computation. This is why NVIDIA has become one of the world's most valuable companies — their GPUs power AI training and inference.

    Key Takeaways

    • •Neural networks are layers of mathematical neurons, not actual brain simulations
    • •Deeper layers learn more abstract features — from edges to objects to concepts
    • •CNNs excel at images, RNNs at sequences, transformers at everything (especially language)
    • •Backpropagation trains networks by propagating errors backward and adjusting weights
    • •GPUs are essential for AI because neural networks require massive parallel computation
    0 of 5 lessons marked complete

    Progress is kept in this browser only.