
In your brain, thinking happens when huge networks of neurons work together. This inspires many of today's machine learning models, called neural networks. But how do neural networks work?
Practice Makes Perfect
Neural networks consist of artificial neurons—computational units that, like the neurons in our brain, exchange information and do calculations. Say you want to predict rent in Manhattan based on square footage (a simple task for a neural network). Before it can do this, a neural network must adjust its calculations through training.
First, gather the square footage and rental price for thousands of apartments from real estate records. This is your training data.
Take the square footage and rent for one apartment. Now send the square footage through your neural network. A small group (or "layer") of neurons takes in the square footage as input, and does a calculation. Then, those neurons send their results to the neurons in the next layer. Eventually, the system produces a prediction for rent.
The first prediction will be wrong. But after comparing its prediction to the true rent, the network tweaks the way it does calculations. After repeating this process for many (many!) instances of training data, the network learns to make accurate predictions. At that point, the network can predict the rent of an apartment, given only its square footage.
In practice, neural networks use millions of neurons. These large networks can find extremely subtle and intricate patterns in their training data, says science journalist Anil Ananthaswamy. But if you hope to extract those patterns from the network, you're out of luck. When a network is large and complicated, understanding its inner workings is nearly impossible.
Science journalist Anil Ananthaswamy discusses...Download interview audio |
References
- Why Machines Learn: The Elegant Math Behind Modern AI. Anil Ananthaswamy. New York: Dutton (2024)
- "A logical calculus of the ideas immanent in nervous activity." Warren S. McCulloch and Walter Pitts. Bulletin of Mathematical Biophysics 5, 115–133 (1943).
- "Brain Basics: The Life and Death of a Neuron." National Institute of Neurological Disorders and Stroke. Accessed Nov. 18, 2024.
- "Here’s what’s really going on inside an LLM’s neural network." Kyle Orland. Ars Technica. May 22, 2024. Accessed December 3, 2024.