How AI methods evolved
Three recurring questions shaped AI research. Where do the rules come from? How does a system represent its input? What computation becomes feasible with the available hardware?
Open this chapter with experiments and audio
What could an observer test?
In 1950 Alan Turing discussed a text-based imitation game. An observer would make a judgment from a conversation. The setup made a broad question about machine intelligence experimentally approachable. It did not require a particular algorithm. Different internal mechanisms can produce equally convincing answers to a short exchange.
A rule-based system stores decisions that people can inspect. Suppose a support program routes any message containing “refund” to billing. The sentence “I already received my refund” takes the same route as “please refund my payment”. Adding an exception is possible, but each new wording requires more decisions about language.
When did the settings become trainable?
The perceptron, developed in the 1950s, assigned adjustable weights to input features. A weighted sum on one side of a threshold produced one class, and a sum on the other side produced the other. Showing labelled examples made it possible to change the weights after an error. People still had to choose what the input features represented.
| Approach | What the developer supplies | What can change |
|---|---|---|
| Explicit rule | Words and conditions | The written rules |
| Perceptron | Features and labelled examples | Feature weights |
| Deep network | Layers, objective and examples | Features inside several layers |
Work popularized in 1986 demonstrated learning internal representations using backpropagation. An error measured at the output could inform changes in earlier layers. The chain rule, introduced later in this book, makes that credit assignment computable.
Select two dates and compare the calculations. The perceptron’s score uses a single weighted sum. The attention example also takes a weighted sum, but its weights can depend on the current input. Looking at the operation itself helps explain both the continuity and the change.
Why were images and language turning points?
AlexNet’s 2012 image-classification result combined a deep convolutional network, a large labelled dataset and GPU training. A convolution reuses the same detector at many positions. Seeing an edge on the left and seeing a similar edge on the right can therefore improve the same weights. Architecture, data and computation each contributed.
The 2017 Transformer demonstrated an attention-based encoder and decoder for translation. Attention lets one position combine information from several others. During training, many positions can be processed in parallel. In an autoregressive language model, generating the answer still requires selecting a token before using that token to generate the next one.
Pretraining later made it possible to reuse one set of representations across tasks. The original BERT model learned in part by predicting masked tokens using surrounding context. GPT-style causal models predict tokens using the preceding context. A word hidden in the middle of a complete sentence and the next word of an unfinished sentence are different training problems. Both can learn syntax and word associations. Their training setups help explain why filling a gap and generating a long continuation call for different model choices.
Which historical ideas do assistants still use?
A current assistant can contain all three approaches. A Transformer processes a request, a learned classifier may rank relevant documents, and an explicit rule checks whether a supplied booking date exists. Knowing the date format exactly makes that last problem well suited to ordinary software. Using more than one method lets each component be tested independently.
Does parallel training imply parallel generation of all answer tokens?
For standard autoregressive decoding, each new token depends on the prefix that includes the previous selection. Training already has the target sequence and can compute losses at many positions together.
Can a machine find a route it has never seen?
A delivery robot must get from the depot A to a door D. The map offers a direct road costing 6 minutes and two shorter roads, A → B and B → D, costing 2 minutes each. A programmer can supply a map, a way to add travel times and a rule for which route to explore next. Those ingredients already suffice to discover a route. No one has to record an example trip from A to D.
Uniform-cost search keeps unfinished routes ordered by their cost so far. At A it lists B at 2 and D at 6. It takes B first, then discovers D at 4 and puts that ahead of D at 6. When the cheapest item taken from the list reaches the goal, the cost is 4. Stopping when the goal first appeared on the list would have returned 6. With nonnegative road costs, extending a route can only preserve or increase its cost. That is the property behind the stopping rule.
What changes if B → D now costs 7 minutes?
The two options cost 6 and 9. The same search now returns the direct route. A learned model could estimate each edge cost from traffic observations and hand those estimates to the search algorithm. Even a perfectly executed search then inherits uncertainty in the estimates.
Compare that programmed search with learning an action from feedback →
Further reading · UC Berkeley · Uniform-cost search