How does AI actually work?

The 'godfather' of artificial intelligence explains...
21 May 2024

Interview with 

Geoff Hinton

NEURAL-NETWORK-BRAIN

Technology is bringing computers and the brain closer together

Share

We start with an explanation of how artificial intelligence actually works. There’s nobody better to do that than the man dubbed the ‘godfather of AI’: Geoffrey Hinton. He began by telling Chris Smith about the development of AI in the 1970s…

Geoff - At the time, the idea of doing science by simulating things on computers was fairly new and it seemed like the right approach to try to understand how the brain learns, or at least a complimentary approach to doing experiments on the brain. So, I spent my time when I was a graduate student in Edinburgh writing computer programmes that pretended to be networks of brain cells trying to answer the question, how should the connections between brain cells change so the collection of brain cells, hooked up in a network, can learn to do complicated things like for example recognise an object in an image or recognise a word in speech or understand a natural language sentence.

Chris - Do we have a clear idea even today of how that works? Because obviously you were working towards something we had no idea about and trying to model it. Have we got there or are we still in the dark?

Geoff - Neither of those. We haven't fully got there, but we have a much better understanding. So we now have computer models of neural networks, things that run on a computer but pretend their networks are brain cells that work really well. You see that in these larger language models and in the fact that your cell phone can recognise objects now, it can also recognise speech. So we understand how to make things like that work and we understand that brains quite like many of those things. We are not quite sure exactly how the brain learns, but we have a much better idea of what it is that it learns. It learns to behave like one of these big neural networks.

Chris - If it's down to the fact that we've got brain cells talking to brain cells and they're just big populations of connections, is that not relatively easy to model? What's the holdup? Why is it hard to do this?

Geoff - Well, the tricky thing is coming up with the rule about how the strength of a connection should change as a result of the experience the network gets. So, for example, very early on in the 1940s or maybe early 1950s, a psychologist called Hebb had the idea that if two neurons, two brain cells, fire at the same time, then the connection between them will get stronger. If you try and simulate that on a computer, you discover that all the connections get much too strong and the whole thing blows up. You have to have some way of making them weaker too.

Chris - I love that line: what fires together, wires together. It's never left me. because I remember reading Hebb's book when I was at University College London. So how did you try and address that, then? Was it just a damping problem? You make it so that the nerve cells get bored more easily, as it were, so that it doesn't overheat in the way that the computer would otherwise have them do?

Geoff - Well, that's the first thing you think of and you try that and it still doesn't work very well. So, the problem is, can you get it to work well enough so that it can do complicated things like recognise an object in an image or, in the old days, recognise something like a handwritten digit. So you take lots of examples of twos and threes and so on and you see if you can make it recognise which is a two and which is a three. It turns out that's quite tricky, and you try various different learning rules to discover which ones work, and then you learn a lot more about what works and what doesn't work.

Chris - What does and doesn't work, and why?

Geoff - I'll tell you something that does work because that's obviously more interesting. You have a layer of neurons that pretend to be the pixels. An image consists of a whole bunch of pixels, and the pixels have different brightnesses and that's what an image is. It's just numbers that say how bright each pixel is. So that's the input neurons, they're telling you the brightness of pixels, and then you have output neurons. If you're recognizing digits, you might have 10 output neurons and they're telling you which digit it is, and typically the network, at least to begin with, wouldn't be sure, so it would hedge its bets and say, it's probably a two, it might just be a three, it's certainly not a four. It would represent that by the output unit for a two being fairly active. The output unit for a three would be a little bit active, and the output unit for a four would be completely silent, and now the question is, how do you get those pixels as inputs to cause those activities in the outputs? Here's a way to do it that all the big neural networks now use: so, this is the same algorithm as is used to train big chatbots like GPT-4. It's used to train the things that recognise objects and images and it's called back propagation. It works like this: you have some layers of neurons between the inputs and the outputs. So, the neurons that represent the pixel intensities have connections to the first hidden layer, and then the second hidden layer, and then the third hidden layer, and finally to the outputs. So they're called hidden layers because you don't know to begin with what they should be doing.

You start off with just random connections in these networks. The network obviously doesn't do anything sensible and, when you put in an image of a digit, it will typically hedge its bets across all the possible 10 digits and say they're all more or less equally likely because it hasn't got a clue what's going on. Then, you ask the following question, how could I change one of the strengths of the connections between a neuron in one layer and neuron in another layer so that it gets a little bit better at getting the right answer. So suppose you're just trying to tell the difference between twos and threes to begin with. You give it a two and it says with a probability 0.5 it's a two with a probability 0.5 it's a three. It's hedging its bets. You ask, well, how could I change connection strength so that it would say 51%, two and 49% three.

You can imagine doing that by just tinkering with the connections. You could choose one of the connection strengths in the network and you can make it a little bit stronger and see if that makes the network work better or work worse if it makes it work worse. Obviously, you make that connection a little bit weaker and that's a bit like evolution. It's obvious that in the end that will work, but it would take huge amounts of time. So, in the early days, we would use networks that had thousands of connections. Now these big chatbots have trillions of connections and it would just take forever to train it that way. But you can achieve pretty much the same thing by this algorithm called back propagation. What you do is you put in an image, let's say it's a two, the weights are initially random weights on the connections.

Information will flow forward through the network and it'll say 50% it's a two and 50% it's a three. Now you send a message back through the network and the message you send back is really saying, I'd like you to make it more likely to be a two and less likely to be a three. If you send the message back in the right way, you can figure out for all the connections at the same time how to change them a little bit so the answer is a little bit more correct. That's called backpropagation. It uses calculus but it's essentially doing this tinkering with connection strengths that evolution would do by just changing one at a time. But the backpropagation algorithm can figure out for all of them at the same time how to change each one a tiny bit to make things work better. So if you have a trillion connections, that's a trillion times more efficient than just changing one and seeing what happens.

Comments

Add a comment