Neural Networks: Nobody Told Your Phone What a Face Is
A neural network is a stack of tiny yes/no decisions, each tuned a little at a time until the right answer comes out.
Nobody ever typed "two eyes, a nose, a mouth" into your phone. Try writing that rule yourself and some face always breaks it. Even a famous face finder from 2001 picked its own clues. This episode builds one tiny piece of what's doing it, by hand: your face as a grid of numbers, four dots, four knobs and a bar. The knobs start wrong (a blank wall scores as a face), and two clicks fix them, with nobody choosing the numbers. Then we stack those little questions into a network, see how a network with 60,000 knobs was tuned in 1996, and meet the same idea in Gmail's spam filter, in bank check scanners and in a 1958 machine the size of a room. The episode ends on the question for next time: with sixty thousand knobs, which knob do you turn, and which way?
Face ID here is simplified. The real one doesn't answer a single yes/no question: it turns your face (an infrared image and a depth map) into numbers and matches them against the ones it saved when you set it up. The parts are the ones in this episode.
Watch the Short of this episode on YouTube
Go deeper
- 1.1Coming
- 1.2Coming
- 1.3Coming
- 1.4Coming
From the film
Where this sits: Deep Learning 1, what a neural network is (the course follows Simon J. D. Prince, Understanding Deep Learning, free at udlbook.github.io). Next: Deep Learning 1.1, gradient descent: which knob to turn, and which way.
Sources
- Over a billion images used to develop Face ID's facial matching networks: Apple Platform Security, "Facial matching security"https://support.apple.com/guide/security/facial-matching-security-sece151358d1/web
- Less than 1 in 1,000,000 that a random person unlocks it (one enrolled appearance; higher for twins, look-alike siblings and children under 13); works with glasses; turns the depth map and infrared image into a mathematical representation and compares it with the enrolled data: Apple, "About Face ID advanced technology"https://support.apple.com/en-us/102381
- A 2001 face finder that picked its own clues, the first being that the eyes are darker than the cheeks: P. Viola and M. Jones, "Rapid Object Detection using a Boosted Cascade of Simple Features", CVPR 2001http://vision.stanford.edu/teaching/cs231b_spring1213/papers/CVPR01_ViolaJones.pdf
- Gmail's spam classifier and the 38% better spam detection from a new text vectorizer (2023): Google Security Blog, "Improving Text Classification Resilience and Efficiency with RETVec"https://security.googleblog.com/2023/11/improving-text-classification.html
- Check readers in banks since June 1996, millions of checks, and the LeNet-5 network with about 60,000 trainable parameters: Y. LeCun, L. Bottou, Y. Bengio and P. Haffner, "Gradient-Based Learning Applied to Document Recognition", Proceedings of the IEEE, 1998https://gwern.net/doc/ai/nn/cnn/1998-lecun.pdf
- The 1958 perceptron demonstration (a 5-ton IBM 704 that taught itself to tell left-marked from right-marked cards after 50 trials): Cornell Chronicle, "Professor's perceptron paved the way for AI – 60 years too soon"https://news.cornell.edu/stories/2019/09/professors-perceptron-paved-way-ai-60-years-too-soon
- The worked example's numbers (knobs, totals and the bar) are checked in the project's check script.
The drawings are made with generative AI and drawn on stroke by stroke; the number grids, knobs, sums and the network are drawn by code. The narration is a synthetic voice.