Chapter 7: The Problems of Pattern Recognition
Core Idea
Section titled “Core Idea”Early bilaterians recognized things only through single sensory neurons, such as one neuron for light and one for touch. Early vertebrates evolved a cortex that decodes patterns across many neurons, which let them recognize smells, sights, and sounds. Pattern recognition has to solve four problems: discrimination, generalization, catastrophic forgetting, and invariance. AI systems handle the first two with backpropagation, avoid the third by freezing networks after training, and handle the fourth partly with built-in assumptions such as those in convolutional networks. Fish solve all four without labeled data, and nobody yet knows how.
Frameworks Introduced
Section titled “Frameworks Introduced”- Two ways to recognize things (Bennett’s table):
- Early bilaterians: a single neuron detects a specific thing, so only a small number of things can be recognized. Recognizing something new requires evolution to build new sensory machinery.
- Early vertebrates: the brain decodes the pattern of activated neurons, so a large number of things can be recognized. Something new can be recognized by learning a new pattern, with no new sensory machinery needed.
- Scale: the lamprey has about fifty types of olfactory neurons, and fifty cells can represent over one hundred trillion patterns. Figure 7.1 shows the inside of a fish’s nose, where each olfactory neuron carries receptors shaped to bind particular molecules. A smell is a mix of molecules, so it activates a pattern of these neurons rather than a single one.
- The four problems of pattern recognition:
- The discrimination problem: how to recognize overlapping patterns as distinct. Figure 7.2 shows three 4×4 grids of olfactory neurons for a predator smell, a food smell, and a mate smell. They share active neurons but call for opposite responses (escape or approach).
- The generalization problem: how to recognize a new pattern that is similar but not the same. Figure 7.3 shows a predator smell on its first, second, and third encounters, each with a slightly different set of active neurons.
- Catastrophic forgetting (the continual learning problem, part 2): learning a new pattern overwrites old ones when knowledge is stored across a shared population of neurons.
- The invariance problem: how to recognize a pattern as the same despite large variances in its input, such as rotation, distance, location, or the pitch of a voice. Smell mostly avoids it, because an egg smells the same from any angle. Vision and hearing do not. Figures 7.7 and 7.8 make the point: a four-pointed star and a long rectangular block, then the same two objects rotated and swapped in position. You see at once that they match, even though the active retinal neurons could share no cells.
- Expansion recoding (the cortex’s answer to discrimination):
- How: a small number of olfactory neurons connect to a much larger number of cortical pyramidal neurons (dimensionality expansion), and each olfactory cell connects to only some of them (sparsity). Overlapping inputs then activate different cortical patterns. This is also called pattern separation, decorrelation, or orthogonalization.
- Figure 7.6 shows four olfactory neurons fanning out to about twelve cortical neurons. The predator smell and the food smell share two active input neurons, yet each lights up a mostly different set of cortical neurons.
- Auto-association (the cortex’s answer to generalization):
- How: pyramidal neurons connect back onto thousands of nearby pyramidal neurons. Hebbian plasticity wires together the cells that fire for a pattern, so a partial input later reactivates the whole pattern.
- Trade-off: this gives content-addressable memory, where part of a memory recalls the rest. Computers use register-addressable memory, which needs an address but keeps memories in separate places. Shared storage is what exposes the brain to overwriting.
- Inductive bias (the lesson of convolutional networks):
- When to use: when a network needs too much data to learn a fact about the world that you already know.
- How: build the fact into the architecture. Fukushima’s convolutional neural network assumes translational invariance, so a feature means the same thing wherever it appears.
- Why it works: “In pattern recognition, it is good assumptions that make learning fast and efficient.” Bennett thinks the vertebrate cortex must have such a bias, though “we just don’t know what it is.”
Key Concepts
Section titled “Key Concepts”- Backpropagation: popularized in the 1980s by Geoffrey Hinton, David Rumelhart, and Ronald Williams. It compares the network’s output with the correct answer and adjusts every weight in the direction that reduces the error. Figure 7.4 shows a fully connected network, with an input layer, several hidden layers, and an output layer.
- Supervised learning: training with labeled examples, meaning the correct answer is given. Hinton himself saw two problems with it as a model of the brain: brains get no labels, and adjusting millions of synapses at once by exactly the right amount is biologically implausible.
- Pyramidal neuron: the cortical neuron with hundreds of dendrites and thousands of synapses, the first neuron built for pattern recognition. Figure 7.5 shows one inside the three-layered cortex of an early vertebrate.
- Freezing: today’s AI avoids catastrophic forgetting by not learning after training. As of printing, even ChatGPT did not learn continually from its users.
- Novelty-gated learning: one theory is that the cortex changes its synapses only when input passes a threshold of novelty. The cortex and thalamus compare incoming data with stored patterns. A mismatch triggers neuromodulator release and learning, and a match triggers no learning.
- Visual hierarchy: Hubel and Wiesel (1958 onward) found V1 neurons tuned to lines of a specific orientation at a specific location. Figure 7.9 traces input from the eye through the LGN (part of the thalamus) to V1 (edges and lines), V2 (shapes), V4 (objects), and IT (faces and objects). Receptive fields grow larger at each level.
- Convolutional neural network (CNN): Fukushima’s late-1970s design. Figure 7.10 shows an input image of a dog passing through convolutions into stacks of feature maps, then smaller and more numerous feature maps, then an output.
- DeLong’s goldfish (2022): goldfish trained to tap a frog picture for food swam straight to the same frog shown from angles they had never seen.
Mental Models
Section titled “Mental Models”- Think of perception as pattern recognition. In Bennett’s words, “smell recognition is nothing more than pattern recognition.”
- Use expansion and sparsity when overlapping inputs must lead to different outputs.
- Use auto-association when you need to recall a whole from a noisy or partial cue.
- Think of every network that stores knowledge in shared weights as being at risk of catastrophic forgetting. Bilaterians were safe only because they never learned patterns.
- Prefer a good inductive bias over more data when you know a true fact about the domain.
- Think of the senses and the brain as having evolved in a feedback loop. Better pattern recognition made richer sense organs worth having, and the reverse was also true. The same loop links pattern recognition and reinforcement learning, because the more things a brain can recognize, the more distinct actions it can learn.
Anti-patterns
Section titled “Anti-patterns”- Treating backpropagation as a model of the brain: brains learn without labels, and backpropagation is biologically implausible.
- Treating CNNs as how brains see: Bennett gives four reasons they are not. Visual processing skips and branches across levels. CNNs do not understand 3D rotation. CNNs still rely on supervision and backpropagation. And fish solve invariance without the mammalian hierarchy that inspired CNNs.
- Assuming deployed AI keeps learning: deployed systems are frozen and are updated only by retraining under human monitoring.
Rules of Thumb (author’s wording)
Section titled “Rules of Thumb (author’s wording)”- “In pattern recognition, it is good assumptions that make learning fast and efficient.”
- “We don’t let AI systems learn things sequentially; they learn things all at once and then stop learning.”
- “In some ways, the tiny fish brain surpasses some of our best computer-vision systems.”
- “In the predatory arms race of the Cambrian, evolution shifted from arming animals with new sensory neurons for detecting specific things to arming animals with general mechanisms for recognizing anything.”
Worked Example
Section titled “Worked Example”Cohen and McCloskey’s addition network (Johns Hopkins, 1989), and the fish that does not forget.
- Neal Cohen and Michael McCloskey encoded numbers as patterns of neurons and trained a network to output the sum of two inputs, such as 1 and 3 giving 4.
- They first trained it on adding ones (1+2, 1+3, 1+4, and so on) until it did this well.
- They then trained the same network on adding twos (2+1, 2+2, 2+3, and so on) until it did this well too.
- After that, the network could no longer add ones. Backpropagating the errors for the twos had overwritten the weights that stored the ones.
- They named this catastrophic forgetting. It is a general limit: training a network on a new task risks damaging what it learned before.
- Compare a fish. Train it to escape a net through a small hatch, leave it alone for a year while it keeps learning new smells, sights, and sounds, and then test it again. It escapes with almost the same speed and accuracy as before.
- Two candidate explanations exist: pattern separation keeps new patterns from interfering, or the cortex learns only when it detects enough novelty. Neither is confirmed.
Key Takeaways
Section titled “Key Takeaways”- Early vertebrates moved from detecting things with single neurons to decoding patterns of neurons, which let them recognize far more things without new sensory hardware.
- Discrimination, generalization, continual learning, and invariance are four separate problems for any pattern recognizer.
- Expansion recoding addresses discrimination, and auto-association addresses generalization.
- Neural networks forget catastrophically, which is why AI systems are frozen after training. Fish learn continually without this problem.
- CNNs solved invariance for translation by building in an assumption, but fish recognize rotated 3D objects in one shot.
- The cortex, basal ganglia, and sense organs evolved together, each increasing the value of the others.
Connects To
Section titled “Connects To”- Ch 4: the continual learning problem, part 1, in early bilaterians.
- Ch 6: the reinforcement learning that pattern recognition feeds.
- Ch 9: the same three-layered cortex builds spatial maps in its medial part.
- Ch 11: the mammalian neocortex as a generative model, a different answer to how the cortex recognizes things.
- Ch 22: ChatGPT, which this chapter notes does not learn continually from the people who use it.