AI for Doctors / Theory / Lesson 3

Neural networks: one neuron, then millions

What a weight is, what training changes, and why a learning rate can make or break a model.

10 min

An artificial neuron is a weighted sum followed by a squashing function. Each input is multiplied by a weight, the products are added with a bias, and the result is passed through a function that turns it into something like a probability. That is all. Move the sliders:

One artificial neuron (made-up weights)

Two inputs go in, each is multiplied by a weight, a bias is added, and the total is squashed to a number between 0 and 1. Training a network means finding good weights. This one is a toy, not a real risk score.

z = (0.90 × 2.0) + (-0.060 × 70) + 1.5 = -0.90 output = 1 / (1 + e^−z) = 0.289

Output: 29% “risk”. Flip the sign of a weight and the input pushes the other way.

A deep network stacks thousands of these in layers. The first layers of an imaging model learn edges and textures; later layers combine them into shapes like a rib margin or a nodule. Nobody programs these features. They emerge because they help reduce the error.

How are the weights found? Start with random ones, measure the error, nudge every weight a little in the direction that lowers the error, repeat. This is gradient descent. The size of each nudge is the learning rate:

Roll downhill to lower error
errorweight value
Steps0
Error now4.12

Small steps get stuck in the first dip (a local minimum). Medium steps can hop out and find the lower valley. Very large steps overshoot and bounce around. Real training does this over millions of weights at once.

Parameters: the weights and biases. Large language models have billions of them.
Epoch: one full pass through the training data.
CNN: convolutional neural network, the classic design for images: it slides small filters over the picture.
Transformer: the design behind modern language models and many new imaging models. It lets every part of the input look at every other part (attention).

Watch

The artificial neuron
4 min · on-screen captions, no voice
Gradient descent
4 min · on-screen captions, no voice

Check yourself

1. What does training change inside a neural network?
2. A learning rate that is far too large tends to:
3. Who designs the features (edges, shapes) in a deep imaging model?

Educational material, not clinical advice. Interactive numbers are teaching examples unless a source is named.