Brain and Neuron
Brain and Neuron
We’ve spent enough time with the concepts of machine learning, now it is time to actually
see it in practice. To start the process, we will return to our demonstration that learning is
possible, which is the squishy thing that your skull protects.
39
40 Machine Learning: An Algorithmic Perspective
book, but we do want to make programs that learn. So how does learning occur in the
brain? The principal concept is plasticity: modifying the strength of synaptic connections
between neurons, and creating new connections. We don’t know all of the mechanisms by
which the strength of these synapses gets adapted, but one method that does seem to be
used was first postulated by Donald Hebb in 1949, and that is what is discussed now.
FIGURE 3.1 A picture of McCulloch and Pitts’ mathematical model of a neuron. The
inputs xi are multiplied by the weights wi , and the neurons sum their values. If this sum
is greater than the threshold θ then the neuron fires; otherwise it does not.
A picture of their model is given in Figure 3.1, and we’ll use the picture to write down
a mathematical description. On the left of the picture are a set of input nodes (labelled
x1 , x2 , . . . xm ). These are given some values, and as an example we’ll assume that there are
three inputs, with x1 = 1, x2 = 0, x3 = 0.5. In real neurons those inputs come from the
outputs of other neurons. So the 0 means that a neuron didn’t fire, the 1 means it did,
and the 0.5 has no biological meaning, but never mind. (Actually, this isn’t quite fair, but
it’s a long story and not very relevant.) Each of these other neuronal firings flowed along
a synapse to arrive at our neuron, and those synapses have strengths, called weights. The
strength of the synapse affects the strength of the signal, so we multiply the input by the
weight of the synapse (so we get x1 × w1 and x2 × w2 , etc.). Now when all of these signals
arrive into our neuron, it adds them up to see if there is enough strength to make it fire.
We’ll write that as
m
X
h= wi xi , (3.1)
i=1
which just means sum (add up) all the inputs multiplied by their synaptic weights. I’ve
assumed that there are m of them, where m = 3 in the example. If the synaptic weights
are w1 = 1, w2 = −0.5, w3 = −1, then the inputs to our model neuron are h = 1 × 1 + 0 ×
−0.5 + 0.5 × −1 = 1 + 0 + −0.5 = 0.5. Now the neuron needs to decide if it is going to
fire. For a real neuron, this is a question of whether the membrane potential is above some
threshold. We’ll pick a threshold value (labelled θ), say θ = 0 as an example. Now, does
our neuron fire? Well, h = 0.5 in the example, and 0.5 > 0, so the neuron does fire, and
produces output 1. If the neuron did not fire, it would produce output 0.
42 Machine Learning: An Algorithmic Perspective
The McCulloch and Pitts neuron is a binary threshold device. It sums up the inputs
(multiplied by the synaptic strengths or weights) and either fires (produces output 1) or
does not fire (produces output 0) depending on whether the input is above some threshold.
We can write the second half of the work of the neuron, the decision about whether or not
to fire (which is known as an activation function), as:
1 if h > θ
o = g(h) = (3.2)
0 if h ≤ θ.
This is a very simple model, but we are going to use these neurons, or very simple
variations on them using slightly different activation functions (that is, we’ll replace the
threshold function with something else) for most of our study of neural networks. In fact,
these neurons might look simple, but as we shall see, a network of such neurons can perform
any computation that a normal computer can, provided that the weights wi are chosen
correctly. So one of the main things we are going to talk about for the next few chapters is
methods of setting these weights.
chemical concentrations, refractory periods, etc. Having this model is only useful if we can
use it to understand what is happening when we learn, or use the model in order to solve
some kind of problem. We are going to try to do both in this chapter, although the learning
that we try to understand will be machine learning rather than animal learning.