What Is an Artificial Neuron?
A single artificial neuron is almost embarrassingly simple. It does three things: it receives numbers, it multiplies each number by another number called a weight, and it adds everything up to produce a result. That is it. And yet, when you stack thousands or millions of these simple units together and train them carefully, they can recognize handwritten digits, detect tumors in X-rays, and translate between dozens of languages. The power is not in any individual neuron — it is in the organization. Before you can understand the organization, you need to understand the unit. Let's build it up from scratch.
Inputs: The Data Coming In
Every artificial neuron receives one or more input values. These are plain numbers — not words, not images directly, not sounds. Everything that enters a neural network must first be converted into numbers. A pixel's brightness becomes a number between 0 and 1. A word becomes a list of hundreds of numbers called an embedding. A sensor reading becomes a decimal value. Suppose you are building a very simple system to help decide whether a strawberry is ripe enough to pick. You might feed the neuron three inputs: the redness of the berry on a scale from 0 to 1, the firmness on a scale from 0 to 1, and the size relative to average, also from 0 to 1. Those three numbers go into the neuron simultaneously. The neuron has no idea what a strawberry is — it just receives three numbers.
An artificial neuron does not see words, images, or sounds directly. Everything must be encoded as a number before it enters the network. This encoding step — turning raw data into numerical inputs — is a critical part of building any neural network system.
Now for the interesting part: the neuron does not treat every input equally. Each input is multiplied by a weight before being added to the others. A weight is a number that controls how much influence that input has on the result. Back to the strawberry. Suppose redness gets a weight of 0.8, firmness gets a weight of 0.5, and size gets a weight of 0.2. Those weights represent a judgment that redness matters a lot (high weight), firmness matters moderately, and size matters less. When a berry is very red (0.9), moderately firm (0.6), and average-sized (1.0), the neuron computes: (0.9 × 0.8) + (0.6 × 0.5) + (1.0 × 0.2) = 0.72 + 0.30 + 0.20 = 1.22 That sum — 1.22 — is the neuron's raw output. We will talk about what happens to it next.
Bias: The Neuron's Own Nudge
There is one more ingredient that real neurons use: a bias. A bias is an extra number added to the weighted sum before producing the output. You can think of it as the neuron's default 'lean' before it even sees the inputs. If a bias is positive, the neuron is easier to activate; if negative, harder. So the full calculation is: (input_1 × weight_1) + (input_2 × weight_2) + ... + bias = raw output. In the strawberry example, if the bias is −0.5, then the raw output becomes 1.22 − 0.5 = 0.72. The bias shifts where the neuron 'sits' on its output scale. Every real neuron in every real network has both weights and a bias.
output = (x₁ × w₁) + (x₂ × w₂) + ... + (xₙ × wₙ) + bias Where x values are inputs and w values are weights. This weighted sum, plus bias, is what every artificial neuron computes. The weights and bias are the numbers that get adjusted during learning.
After computing the weighted sum plus bias, the neuron passes that number through one more step called an activation function. The activation function decides the final output. The simplest version just checks: is the number above zero? If yes, output something; if no, output zero. More sophisticated activation functions produce smooth curves that let the network learn more complex patterns. You do not need to memorize the math yet — the key point is that the activation function is what makes the network able to learn curved, non-linear relationships instead of only straight lines.
Fill in the blanks to complete the description of an artificial neuron's computation.
Right now, in this lesson, the weights in our strawberry example were chosen by hand. In a real neural network, the weights start as small random numbers and get adjusted automatically through a learning process. By the end of training, the weights encode everything the network has 'learned' from examples. Lesson 4 digs into this in depth.
What does a weight do in an artificial neuron?
Why does a neural network need an activation function after computing the weighted sum?
Hand-Compute a Neuron
- Imagine a neuron deciding whether a movie will be popular. It has three inputs:
- - Budget size (0 = tiny, 1 = huge)
- - Famous actors (0 = unknown cast, 1 = major stars)
- - Sequel to a hit (0 = original, 1 = sequel)
- The weights are: budget × 0.3, famous actors × 0.6, sequel × 0.5. The bias is −0.4.
- Compute the raw output for these two movies:
- Movie A: budget = 0.8, famous actors = 0.9, sequel = 1.0
- Movie B: budget = 0.2, famous actors = 0.3, sequel = 0.0
- For a simple activation function, say: if raw output > 0, predict 'popular'; otherwise predict 'not popular.'
- Which movie does the neuron predict will be popular? Does that seem reasonable given the inputs?
- Now try changing one weight. How does the prediction change?