Educatifu
Open menu

From neurons to networks

One neuron draws a straight line. Stack them into layers and a network can represent almost any pattern. Here is how single neurons become a network.

FoundationsArtificial Intelligence~12 min

Before this lesson

  • Lesson: What is a neuron?

In the last lesson you built a single neuron: inputs, weights, a bias, an activation. A lone neuron is surprisingly limited — it can only separate its inputs with a single straight cut. Real problems are not that tidy. The fix is almost embarrassingly simple: use more neurons, arranged in layers.

A layer is neurons in parallel

Put several neurons side by side and feed them all the same inputs. Each neuron has its own weights, so each learns to respond to a different feature of the input. Three inputs feeding four neurons gives you four new numbers — a fresh representation of the same data, seen four different ways.

That group of neurons is a layer, and its four outputs become the inputs to the next layer.

A network is layers in sequence

Chain layers together and you have a feedforward neural network:

  • the input layer is just the raw numbers you feed in;
  • one or more hidden layers transform the data, each reading the layer before it;
  • the output layer produces the final answer — one number for a yes/no decision, or several for a choice between categories.

Data flows in one direction, input to output. Running it is called the forward pass, and it is nothing new: at every layer, each neuron computes a weighted sum and an activation, exactly as in the previous lesson. A network is that one computation, tiled across a grid.

Why depth helps

Here is the key intuition. A single layer can only draw straight boundaries. But once the first hidden layer has re-described the data, the next layer draws straight boundaries in that new space — which correspond to curved, intricate boundaries back in the original one. Stack a few layers and the network can carve out almost any shape it needs. This is why "deep" learning is deep: each layer composes on the last.

What we have not explained yet is where the weights come from. So far we have been setting them by hand. In a real network there are thousands to billions of them, and no human sets them — the network learns them from examples. That learning process is the subject of the next lesson, and it comes down to a single idea: measure how wrong you are, then nudge every weight in the direction that makes you a little less wrong.

A three-node input layer fully connected to a four-node hidden layer, fully connected to a two-node output layer.
A small feedforward network — every neuron in a layer reads every output of the layer before it.

Key takeaways

  • A layer is just many neurons reading the same inputs in parallel; a network is layers feeding the next.
  • Depth buys expressiveness: each layer transforms the data so the next can separate what the last could not.
  • The same forward pass — weighted sums and activations — runs at every layer; only the numbers differ.

← All Artificial Intelligence lessons

Bring us the problem, not a perfect specification

Tell us what needs to change, who it affects and any important deadline. We will review the context and reply with useful next questions.

  1. 01Share contextDescribe the workflow, constraint or risk.
  2. 02Clarify togetherWe identify missing facts and useful options.
  3. 03Choose a startAgree a focused assessment or delivery step.
Start a conversation