Method

Ablation and oracle error analysis

Attribute performance and errors to their causes.

Based on Andrej Karpathy's public content. Not affiliated with or endorsed by Andrej Karpathy.

Steps

  1. Remove one modification at a time
  2. Use oracles to peel away error categories
  3. Compare small and large models to see what scaling fixes
  4. Use control runs to rule out confounds

Covered in

Paper · Deep Visual-Semantic Alignments for Generating Image Descriptions

This paper by Karpathy and Fei-Fei teaches how to generate natural language descriptions of images and image regions by treating image captions as weak labels. It presents an alignment model (region CNN + bidirectional RNN + max-margin objective in a shared embedding, smoothed with an MRF) and a Multimodal RNN that learns to generate descriptions from the inferred alignments, along with practical training lessons.

Deep Neural Nets: 33 years ago and 33 years from now

Karpathy reproduces LeCun et al.'s 1989 zip code recognition paper in PyTorch and uses it as a case study on progress in deep learning. He shows that modern techniques (cross entropy, AdamW, data augmentation, dropout, ReLU) cut the error by about 60%, and that scaling data helps further. He then extrapolates these lessons to predict how 2055 will view 2022 deep learning, arguing that training from scratch is giving way to finetuning and prompting foundation models.

Paper · PixelCNN++: Improving the PixelCNN with Discretized Logistic Mixture Likelihood and Other Modifications

This co-authored paper (Salimans, Karpathy, Chen, Kingma) presents PixelCNN++, a released implementation of PixelCNN with five modifications: a discretized logistic mixture likelihood, conditioning on whole pixels, downsampling, extra short-cut connections, and dropout. The authors argue these changes simplify the model and speed training, and they support each change with ablation experiments and state-of-the-art CIFAR-10 log-likelihood (2.92 bits per sub-pixel).

Paper · Visualizing and Understanding Recurrent Networks

This paper, co-authored by Karpathy with Justin Johnson and Li Fei-Fei, uses character-level language models as an interpretable testbed to study what LSTMs actually learn. It shows interpretable cells that track long-range structure (line length, quotes, brackets), traces LSTM gains over n-gram baselines to long-range dependencies, and breaks down remaining errors with a sequence of oracles, finding that scaling up mostly fixes short-range n-gram errors.

Paper · ImageNet Large Scale Visual Recognition Challenge

This co-authored paper (Karpathy is one of twelve authors) describes how the ImageNet Large Scale Visual Recognition Challenge dataset was built, how algorithms are evaluated at scale, how methods progressed from SIFT/Fisher vectors to convolutional neural networks, and how state-of-the-art accuracy compares with trained human annotators. The authors teach that crowdsourced annotation tasks must be exceptionally well designed and that scaling up always reveals unexpected challenges.