← LibraryBlog · AI

Deep Neural Nets 33 Years Ago and 33 Years From Now

Andrej Karpathy
✓ Source-grounded

The fundamental architecture of deep learning hasn't changed much in 33 years; progress is driven by massive scaling of data, parameters, and compute infrastructure, supplemented by micro-optimizations.

Read the original

In one sentence

The "macro" level of deep learning—layered neurons optimized end-to-end via backpropagation—has remained remarkably stable for over three decades, while the "micro" innovations (optimizers, activations, regularization) and massive scaling of data/compute drive actual progress.

Why read this (and who it's for)

This is for AI engineers and researchers who want to understand the nature of progress in the field. It solves the misconception that we are constantly inventing fundamentally new ways to learn; instead, it shows how specific, iterative improvements on known tools (like switching from Tanh to ReLU) yield measurable gains when applied to the same problem. You will be able to identify which "low-hanging fruit" optimizations to apply to your models and understand why scaling is the ultimate lever.

The big idea

Karpathy argues that if you look at a 1989 paper on handwritten zip code recognition, it "type checks" as a modern deep learning paper. We are still doing the same thing: setting up differentiable architectures made of layers of neurons and optimizing them end-toend with backpropagation and stochastic gradient descent (SGD).

The logic of progress is two-fold. First, there is Micro-innovation: replacing MSE with Cross Entropy, SGD with AdamW, or Tanh with ReLU. These are "low-hanging fruit" that can cut error rates by significant margins (e.g., 60% in Karpathy's experiment). Second, there is Macro-scaling: the sheer volume of pixel data and parameter counts has grown by roughly 10,000,000x. Progress happens because we can now feed much larger models significantly more information.

Key ideas

Macro Stability

What it is — The fundamental architecture of neural networks (layers, neurons, backpropagation) hasn't fundamentally changed since the late 80s. Why it matters — It means that "new" architectures are often just larger versions of old ones; understanding the core mechanics is still the primary requirement for success. In the book — Karpathy notes that the 1989 paper reads "remarkably modern today," describing a dataset, architecture, loss function, and optimization in a way that mirrors current practices perfectly.

The Three-Component Software Stack

What it is — Modern deep learning software is split into three layers: a fast C/CUDA tensor library, an autograd engine to track the compute graph, and a scriptable Python API for high-level operations. Why it matters — This abstraction allows researchers to focus on architecture and loss functions without manually calculating gradients or managing memory buffers. In the book — Karpathy contrasts this with the 1988/1989 "Lush" simulator, which was a higher-level API but lacked the modern split of concerns.

Micro-Optimization Gains

What it is — Small changes to the training recipe—like switching loss functions, optimizers, or activation functions—can yield massive improvements on small models. Why it matters — You can often achieve significant performance gains without increasing model size or inference latency by simply "time traveling" your hyperparameters. In the book — By swapping MSE $\rightarrow$ Softmax, SGD $\rightarrow$ AdamW, and Tanh $\rightarrow$ ReLU, Karpathy was able to cut the error rate of a 1989 network by about 60%.

Data Scaling vs. Model Scaling

What it is — Simply increasing the size of the training dataset provides modest gains at no cost to inference latency; however, further significant gains require larger models and more R&D to stabilize those larger scales. Why it matters — It defines the limits of "free" progress: data scaling is easy but has diminishing returns; model scaling is hard but necessary for breakthroughs. In the book — Karpathy shows that scaling the training set by ~7X (from 7,291 to 50,000 examples) improved test error from 4.09% to 2.74%.

The Foundation Model Shift

What it is — Training a network from scratch for a specific task is becoming outdated as "foundation models" (like GPT) become the standard. Why it matters — Future progress will likely come from fine-tuning, prompt engineering, or distillation rather than training new base models from zero. In the book — Karpathy predicts that by 2055, you won't want to train a neural net at all; you will ask a "megabrain" to perform tasks via natural language.

Frameworks & tools

The Modern Software Stack Architecture

To build modern systems, ensure your stack follows this three-component split:

  1. Tensor Library: A fast (C/CUDA) library for basic math over multi-dimensional tensors.
  2. Autograd Engine: A system that tracks the forward compute graph to generate backward pass operations.
  3. High-level API: A scriptable (Python) layer for layers, architectures, and optimizers.

The "Time Travel" Optimization Checklist

If you have a baseline model (like the 1989 zip code net) and want to improve it without scaling up, apply these in order:

  1. Loss Function: Swap Mean Squared Error (MSE) $\rightarrow$ Cross Entropy / Softmax.
  2. Optimizer: Swap SGD $\rightarrow$ AdamW (with a learning rate of ~3e-4).
  3. Activation: Swap Tanh $\rightarrow$ ReLU.
  4. Regularization: Add Data Augmentation (shifting images) and Dropout (e.g., 0.25).

Memorable examples & stories

The 3000x Speedup

The original 1989 network took 3 days to train on a SUN-4/260 workstation; Karpathy's version ran in 90 seconds on an M1 MacBook Air. Lesson: Hardware evolution allows us to iterate on "old" ideas at lightning speed.

The "Lost to Time" Dataset

Because the original 1989 dataset was lost, Karpathy had to simulate it by taking MNIST digits, scaling them down to 16x16 pixels with bilinear interpolation. Lesson: When data is missing, synthetic reconstruction via known distributions is a viable proxy for reproduction.

The "Megabrain" Prediction

Karpathy extrapolates that in 2055, we will have a 10,000,000x sized neural net megabrain where you simply speak to it in English to get results. Lesson: The ultimate trajectory of AI is moving away from "training" and toward "interaction."

Key quotes

"The paper... reads remarkably modern today, 33 years later - it lays out a dataset, describes the neural net architecture, loss function, optimization, and reports the experimental classification error rates..." Why it matters: Highlights the macro-stability of the field.

"We’re still setting up differentiable neural net architectures made of layers of neurons and optimizing them end-to-end with backpropagation and stochastic gradient descent." (paraphrased) Why it matters: Defines the core loop of AI research.

"Our datasets and models today look like a joke. Both are somewhere around 10,000,000X larger." (paraphrased) Why it matters: Contextualizes our current "state-of-the-art" as merely a slightly larger version of 1989 tech.

How to apply it

This week

Ongoing

Common pitfalls

Connects to

If you remember only three things

Internalize it

Q: What was the "macro" level change in neural nets between 1989 and 2022? A: Virtually none; we still use layers of neurons optimized end-to-end via backpropagation.

Q: What were some specific "micro" innovations that cut error rates by ~60%? A: Swapping MSE $\rightarrow$ Softmax, SGD $\rightarrow$ AdamW, Tanh $\rightarrow$ ReLU, and adding Data Augmentation/Dropout.

Q: How much larger are modern datasets/models compared to the 1989 version? A: Roughly 10,000,000x larger.

Q: What is Karpathy's prediction for neural nets in 2055? A: We will interact with a "megabrain" via natural language rather than training networks from scratch.

Fidelity note

Confidence: High. This summary captures the core experiment (reproducing LeCun et al. 1989), the specific technical swaps Karpathy made to improve results, and his final extrapolations on scaling and foundation models. Note that some specifics of the 1989 paper were "lost to time" or "abstract," so Karpathy's reproduction involved some sensible guesses (e.g., weight initialization).

Keep going — related reads

More from Andrej Karpathy