001Notes

Neural Network Tutor: From Replay Lab to Production Debugger

On this page02

A story-driven visual course that lets every neural-network idea earn its place by solving a visible problem, from one weighted vote through hidden representations, transformers, modern learning phenomena, and production debugging.

Article details
Status
Published
Subcategory
Neural Network Tutor
Last reviewed
6 Sept 2026
Prerequisites
None—the course begins with one weighted vote
2 sections

Suppose we want to teach a tiny robot whether a fruit is an apple. Before drawing a neuron, we must answer simpler questions. What is one fruit? Which clues may the robot inspect? Where is the answer stored? How do we prevent it from reading that answer before making its guess?

Only then do we build the first neuron. Roundness and redness cast weighted votes. We add those votes, include a starting preference called bias, and make one prediction. A neural-network name is not permission to leave an idea mysterious.

Then we deliberately break that tiny model.

It fails on XOR. It loses information when a layer becomes too narrow. It memorizes when a network becomes too large for its evidence. Its gradients vanish, its ReLUs die, its attention maps look persuasive without proving causality, and its validation performance can change long after its training accuracy becomes perfect.

Every later idea must repair a failure that we can already see:

perceptron
    ↓ one boundary is not enough
hidden representation
    ↓ shape controls information flow
width / depth / expansion / compression / skips
    ↓ data has structure
CNN / RNN / LSTM / encoder-decoder / attention / transformer
    ↓ a prediction is still not an explanation
activation / gradient / representation / ablation inspection
    ↓ laboratory behavior must survive real execution
replay trace / run comparison / bounded production debugger

This is not a gallery of network pictures. The course is organized into 47 stories covering 102 named concepts. Closely connected ideas share a story when one naturally creates the need for the next. Every concept remains directly linkable and keeps its own explanation, visual scene, use case, limitation, and safe conclusion.

The order inside every story is deliberate:

what we already understand

the exact thing that breaks

a child-sized analogy—and where it stops being true

a tiny example with real numbers

predict what the animation should do

run the narrated visual

calculate it by hand

use it, diagnose it, and compare it

Small mechanisms are computed in the browser. Long-running or research-scale behavior is shown as a deterministic trace or an explicitly labelled conceptual reconstruction.

How to use the tutor

Do not begin with Play. First read the question, the failure, the analogy, and the tiny example. Say your prediction aloud. Then use Play, Previous, and Next to compare what happened with what you expected. Change one slider only after you can name the quantity it should affect.

The recurring questions are:

  1. What representation exists here?
  2. What route changed it?
  3. What information was expanded, compressed, reused, or destroyed?
  4. What evidence supports the explanation?
  5. What would falsify the claim?

What comes from the desktop project

Neural Network Desktop Tutor is a local PyQt teaching and research lab. Its implemented family workspaces are Dense, CNN, LSTM, encoder–decoder, attention, and transformer. Each family has its own learned replay, comparison, and compatible ablation views.

The browser course reuses those inspection contracts but does not pretend that a small JavaScript animation is a production PyTorch trace. The final chapter shows the exact boundary: an explicitly supplied eager-mode module, bounded capture, continuous summaries, selective tensors, append-only metadata, safe tensor payloads, and offline replay. Distributed and LLM-specific tracing remain outside the current desktop release.

This Project Lessons course is independently understandable. It begins with one weighted vote and builds the theory alongside each visual experiment, so no separate machine-learning article is a prerequisite.

Primary references

  1. Neural Network Desktop Tutor source
  2. Neural Network Desktop Tutor production debugger guide
  3. PyTorch autograd mechanics
  4. Rosenblatt: The Perceptron
  5. Rumelhart, Hinton, and Williams: Learning representations by back-propagating errors
  6. LeCun et al.: Gradient-Based Learning Applied to Document Recognition
  7. Hochreiter and Schmidhuber: Long Short-Term Memory
  8. Bahdanau, Cho, and Bengio: Neural Machine Translation by Jointly Learning to Align and Translate
  9. Vaswani et al.: Attention Is All You Need
  10. He et al.: Deep Residual Learning for Image Recognition
  11. Belkin et al.: Reconciling modern machine-learning practice and the bias–variance trade-off
  12. Frankle and Carbin: The Lottery Ticket Hypothesis
  13. Papyan, Han, and Donoho: Prevalence of neural collapse during terminal phase of deep learning training
  14. Power et al.: Grokking—Generalization Beyond Overfitting on Small Algorithmic Datasets
  15. Nanda et al.: Progress measures for grokking via mechanistic interpretability
  16. Prakash and Martin: Late-Stage Generalization Collapse in Grokking
  17. Cohen et al.: Gradient Descent on Neural Networks Typically Occurs at the Edge of Stability
  18. Elhage et al.: Toy Models of Superposition
Diagram