The AI Researcher's Toolkit
Every learning machine, from the perceptron of 1958 to a language model, holds its knowledge as numbers, measures how wrong it is, and changes the numbers to become less wrong. This unit teaches the mathematics behind those three ingredients: data as vectors and the dot product, probability and Bayes' rule, logarithms, the derivative and the gradient, and what it means for an algorithm to be fast, with a closing page on how numbers reach a computer.
1 Introduction
In October 1950 the journal Mind printed a paper by the mathematician Alan Turing (1912-1954) that opened with a question few had asked in earnest before, namely whether a machine can think. Turing knew that the question as stated could not be settled, because nobody agrees on what thinking is, so he replaced it with a game. A person exchanges typed messages with two hidden partners, one of them a human and the other a machine, and tries to tell which is which. If the machine cannot be told apart, the old question has lost its point. The paper, “Computing Machinery and Intelligence”, is 28 pages long, and it spends many of them on the objections Turing expected, among them the theological one, the one from consciousness, and the one from Lady Lovelace, who had written a century earlier that a calculating engine can only do what it is told. His answer to the last objection is the one this unit is really about. A machine that learns, he argued, does things its programmer never told it in detail.
Eight years later, in 1958, a psychologist at the Cornell Aeronautical Laboratory, Frank Rosenblatt (1928-1971), described a machine that did exactly that, and his laboratory built it. The Mark I Perceptron, the machine in the photograph at the head of this unit, looked at a picture through 400 photocells arranged in a 20 by 20 grid. The photocells were wired, through a layer of fixed random connections, to 512 intermediate units, which Rosenblatt called association units, and each of those fed its signal through a small motor-driven potentiometer, which is a variable resistor, so that the machine’s answer was the sum of the signals weighted by the resistor settings. When the answer was wrong, the motors turned the potentiometers a little, and after a series of training pictures the machine could tell simple shapes apart, and in its public demonstrations letters of the alphabet, without anyone having written down what a letter looks like. The adjustable resistors were the numbers of the machine, the error was its teacher, and the turning of the knobs was its learning.
Those three things have not changed. The system that answered a question for you this morning, whatever it was, holds its knowledge as a list of numbers, many billions of them rather than a few hundred. It was trained by measuring how wrong its answers were, and it improved by changing its numbers a little in the direction that made the error smaller. The numbers are organized as vectors and matrices, the error is measured with probabilities, and the direction of improvement is a slope. A reader who understands a vector, a probability, and a slope understands, in outline, every machine this masterclass describes, and the purpose of this unit is to make sure that the reader does.
The field has had a strange history. There were two long periods, known in the field as AI winters, in which funding disappeared and the name itself became an embarrassment, and there have been the years since 2012, in which several of the old ambitions, among them translation between languages and the recognition of objects in photographs, were met in some form. Figure 1 marks the main events. The results that matter most are recent. The paper that gave the training method its modern form appeared in 1986, the network that convinced the sceptics appeared in 2012, and the architecture behind the language models appeared in 2017, and most of the people who wrote those papers are still at work, so the reader of this unit is not studying a finished science. The questions of what these systems understand, why training works as well as it does, and how a system can be made to want what its users want are open, and the units of this masterclass present them as open. What is settled is the toolkit, and that is where we begin.