SECTION 01 / 4

From Brain Cells to the McCulloch–Pitts Neuron

6 min read
On this page 8 headings
BUILD INTUITION WITH NUMBERS

When does one neuron fire?

Two excitatory inputs, no inhibitory inputs. The neuron fires when their sum is at least 2.

  1. Try one active input.

    g=1+0=1<2⇒y=0g=1+0=1<2\quad\Rightarrow\quad y=0
  2. Now activate both inputs.

    g=1+1=2≥2⇒y=1g=1+1=2\ge2\quad\Rightarrow\quad y=1

What changed? The threshold turns a sum into a yes/no decision. This neuron implements AND.

Quick check: What is the output for inputs (0, 1)?

0: the sum is 1, below the threshold of 2.

Swipe long formulas, tables or code sideways to see the rest.

Start here Every deep learning model, from a phone’s face unlock to a chatbot, is built from one tiny unit: the artificial neuron. It is a very simple copy of a brain cell. This page shows where the idea came from and builds the very first artificial neuron (from 1943) step by step.

1. Why is it called a “neuron”?

The idea comes from biology — from the brain. A brain cell is called a neuron (also: neural cell, neural processing unit). Deep learning borrows the name and a very rough version of how it works.

A brain cell takes in signals, processes them, and sends one signal out.
A brain cell takes in signals, processes them, and sends one signal out.
Open image ↗
A biological neuron with dendrites, soma, axon and synapse labelled
Part What it does Simple picture
Dendrite receives signals from other neurons the “ears”
Soma processes (combines) the information the “brain” of the cell
Axon sends this neuron’s output onward the “mouth”
Synapse the point where one neuron connects to another the “handshake”

Everyday example You see a funny video. Your eyes and ears (sense organs) send signals to neurons. Some neurons fire (become active). They pass the signal to other neurons, which may also fire … and finally you laugh.

2. Many neurons, working together

One neuron does not do all this. Your brain has about 1011=10010^{11} = 100 billion neurons in a huge, massively parallel network.

Two big ideas from the brain:

  1. Division of work. Each neuron has its own job. In the lecture’s cartoon, one neuron fires “if the text is funny”, one “if the visual is funny”, one “if the speech style is funny”, and a top neuron fires “if at least 2 of these 3 fired”.
  2. Hierarchy (layers). In the visual cortex, information flows from the retina through layers V1, V2, … up to AIT. Lower layers find simple things; higher layers find complex things.
Simple features at the bottom, whole objects at the top — deep networks work in the same layered way.
Simple features at the bottom, whole objects at the top — deep networks work in the same layered way.
Open image ↗
Layer 1 finds edges, layer 2 finds eyes/nose/mouth, layer 3 finds a face

Lecture example — face detection in layers Layer 1: detect edges and corners → Layer 2: group them into features like nose, mouth, eyes → Layer 3: detect a whole face.

The professor’s honest disclaimer: this is a very simplified story of how the brain works. It is enough for this course. Real brains are far more complex.

In one line: An artificial neuron is a tiny, simplified copy of a brain cell; many of them in layers make a neural network.

3. The McCulloch–Pitts (MP) neuron (1943)

Warren McCulloch (a neuroscientist) and Walter Pitts (a logician) proposed the first, very simple, computational model of a neuron in 1943.

Two steps: g adds the inputs, f compares the sum with the threshold θ.
Two steps: g adds the inputs, f compares the sum with the threshold θ.
Open image ↗
MP neuron: inputs go into g which adds them, then f compares with threshold theta

The rules:

  • Inputs x1,x2,…,xnx_{1}, x_{2}, \ldots , x_{n} are only 0 or 1 (Boolean).
  • Output y is also only 0 or 1.
  • Each input is either excitatory (normal) or inhibitory (a “veto” input).

Step 1 — g adds up the inputs:

g(x)=x1+x2+…+xng(x) = x_{1} + x_{2} + \ldots + x_{n}

Step 2 — f makes the decision:

  • y=1y = 1 if g(x)≥θg(x) \ge \theta
  • y=0y = 0 if g(x)<θg(x) < \theta

θ\theta (theta) is called the thresholding parameter. This whole idea is called thresholding logic.

Veto rule: if any inhibitory input is 1, the output is 0, no matter what.

Everyday example You go to a cricket match only if at least 2 of these are true: friend is coming (x1)(x_{1}), it is a weekend (x2)(x_{2}), tickets are cheap (x3)(x_{3}). Soθ=2So \theta = 2. But if “I have an exam tomorrow” (inhibitory) is 1, you do not go at all.

4. Building Boolean functions with one MP neuron

Changing only θ (and marking some inputs inhibitory) gives different logic gates.
Changing only θ (and marking some inputs inhibitory) gives different logic gates.
Open image ↗
AND, OR, NOR and NOT built from single MP units with different thresholds
Function Inputs θ\theta Why it works
AND (3 inputs) x1,x2,x3x_{1}, x_{2}, x_{3} 3 sum ≥3\ge 3 only when all three are 1
OR (3 inputs) x1,x2,x3x_{1}, x_{2}, x_{3} 1 sum ≥1\ge 1 when at least one is 1
NOR (2 inputs) both inhibitory 0 any 1 vetoes; if both 0, sum =0≥0→1= 0 \ge 0 \to 1
NOT (1 input) x1x_{1} inhibitory 0 x1=1x_{1} = 1 vetoes →0;x1=0→0≥0→1\to 0; x_{1} = 0 \to 0 \ge 0 \to 1
Tautology (always 1) x1,x2x_{1}, x_{2} 0 sum is always ≥0\ge 0

Lecture example — check OR with numbers (θ=1,2\theta = 1, 2 inputs) (0,0):0+0=0(0,0): 0 + 0 = 0, and 0<1→y=0(0,1):0+1=10 < 1 \to y = 0 (0,1): 0 + 1 = 1, and 1≥1→y=1(1,0):1+0=1≥1→y=1(1,1):1+1=2≥1→y=11 \ge 1 \to y = 1 (1,0): 1 + 0 = 1 \ge 1 \to y = 1 (1,1): 1 + 1 = 2 \ge 1 \to y = 1 ✔ this is OR

5. The picture: one MP neuron draws one straight line

With 2 inputs there are only 4 possible points: (0,0), (0,1), (1,0), (1,1). The MP neuron fires when x1+x2≥θx_{1} + x_{2} \ge \theta . The boundary x1+x2=θx_{1} + x_{2} = \theta is a straight line.

All points giving 1 are on one side of the line; all points giving 0 are on the other side.
All points giving 1 are on one side of the line; all points giving 0 are on the other side.
Open image ↗
OR line x1+x2=1 and AND line x1+x2=2 on the four input points
  • OR: line x1+x2=1x_{1} + x_{2} = 1. Only (0,0) is below it.
  • AND: line x1+x2=2x_{1} + x_{2} = 2. Only (1,1) is on/above it.
  • With 3 inputs, the line becomes a plane (for OR:x1+x2+x3=1OR: x_{1} + x_{2} + x_{3} = 1 separates (0,0,0) from the other 7 points). With n inputs it is a hyperplane.

Linearly separable (for Boolean functions): there is a line (plane) such that every input with output 1 is on one side and every input with output 0 is on the other side.

In one line: A single MP neuron can represent only linearly separable Boolean functions.

6. What the MP neuron cannot do

Limitation Question it raises
Inputs must be 0 or 1 What about real numbers (like a rating of 7.8)?
θ\theta is set by hand Can the machine learn θ\theta from data?
All inputs count equally What if one input is more important?
Only linearly separable functions What about functions like XOR?

The perceptron (next page) fixes the first three. A network of perceptrons fixes the fourth.

Exam words: artificial neuron, dendrite, soma, axon, synapse, McCulloch–Pitts neuron, excitatory input, inhibitory input, thresholding logic, threshold θ\theta , linearly separable, hyperplane.

Quick check

  1. An MP neuron has 4 excitatory inputs and θ=4\theta = 4. Which Boolean function is it?
4-input AND. The sum reaches 4 only when all four inputs are 1.
  1. An MP neuron has 3 inputs, θ=2\theta = 2, no inhibitory inputs. Output for (1, 0, 1)?
Sum=1+0+1=2Sum = 1 + 0 + 1 = 2. 2≥22 \ge 2, so y=1y = 1. (This neuron is “at least 2 of 3”.)
  1. Same neuron as Q2, but x2x_{2} is inhibitory. Output for (1, 1, 1)?
y=0y = 0. x2x_{2} is inhibitory and equals 1, so it vetoes the output.
  1. Which part of a biological neuron sends the output to other neurons?
The axon.
  1. Can one MP neuron represent every Boolean function?
No. Only linearly separable ones. XOR, for example, cannot be done.
YOUR STUDY PROGRESS

Finished this section? Save your progress.

Back to top ↑