MNIST (Modified National Institute of Standards and Technology) is the most famous dataset in machine learning — a collection of 70,000 handwritten digit images (0 through 9) used as a benchmark for image classification algorithms. Created by Yann LeCun and collaborators in 1998, MNIST remains the "hello world" of neural networks and the first dataset most practitioners use when learning deep learning. Each image is a 28×28 grayscale photograph of a single handwritten digit, labeled with its correct value. Despite its age, MNIST continues to serve as an essential starting point for understanding how machines learn to see.
The neural network in this interactive tool takes a 14×14 grayscale image (196 pixels) as input — a downsampled version of the original 28×28 MNIST format. Each pixel becomes a number between 0 and 1, where 0 represents white and 1 represents black. These 196 input values flow through a hidden layer of 100 neurons, each of which learns to detect specific visual features like edges, curves, and loops. Finally, the output layer contains 10 neurons — one for each digit from 0 to 9 — that produce probability scores indicating how likely the input is to be each digit.
This architecture — called a fully-connected feedforward network — is one of the simplest neural network designs capable of image classification. Every input pixel connects to every hidden neuron, and every hidden neuron connects to every output neuron. The network learns the right connection weights during training by seeing thousands of labeled examples and adjusting its parameters to minimize classification errors.
Each of the 100 hidden neurons develops a receptive field — a unique pattern of pixel weights that causes it to activate strongly when it detects certain shapes in the input image. Some neurons learn to respond to vertical strokes, others to horizontal edges, curves, enclosed loops, or specific digit fragments. These learned features emerge automatically during training; the network discovers on its own which visual patterns are most useful for distinguishing digits.
You can visualize each neuron's receptive field as a 14×14 heatmap, where positive weights (shown in orange) indicate pixels that excite the neuron and negative weights (shown in blue) indicate pixels that suppress it. The brightness of each neuron's glow in the grid above reflects its activation level — how strongly it is responding to the current input.
The output layer combines hidden neuron activations to make a final classification. For example, the digit "8" might require strong activation from neurons that detect both a top loop and a bottom loop. The digit "1" might rely on a single vertical stroke detector. The digit "7" might combine a horizontal stroke detector at the top with a diagonal stroke detector. The network learns these specific combinations during training, discovering which feature combinations uniquely identify each digit class.
The probability bars in this tool show how confident the neural network is about each possible digit classification. When the network shows high confidence concentrated on a single digit, it means the input clearly matches one learned pattern. When probabilities are spread across multiple digits, the network is uncertain — the input contains features consistent with several different digits.
Common confusion patterns reveal structural similarities between digits that humans also find ambiguous: 4 vs. 9 (both have a vertical stroke and a top element), 3 vs. 5 (similar curves on the right side), and 7 vs. 1 (both dominated by a single stroke). These confusions demonstrate that the network, like humans, relies on subtle distinguishing features to tell similar-looking characters apart.
The "dissect" feature in this tool lets you click on any individual hidden neuron to disable it and observe how the network's predictions change. This is a powerful way to understand how neural networks distribute information across their hidden layers. When disabling a neuron dramatically shifts the prediction, that neuron captures a critical feature for the current input. When disabling has little effect, the information is redundantly encoded across multiple neurons.
This kind of analysis — sometimes called ablation testing — is a core technique in neural network interpretability research. By systematically removing components and measuring the impact, researchers can map which parts of a network are responsible for which behaviors, building a mechanistic understanding of how artificial neural networks process information.
Modern convolutional neural networks achieve over 99.7% accuracy on MNIST, effectively solving it as a classification problem. Yet the dataset remains invaluable for teaching and research. It is small enough to train in seconds on any hardware, visual enough to understand intuitively without specialized domain knowledge, and complex enough to require genuine learning — simple rules and templates cannot achieve high accuracy. Every fundamental concept that works on MNIST — gradient descent, backpropagation, activation functions, overfitting, regularization — scales directly to harder problems in computer vision, natural language processing, and beyond.
Draw a digit above and explore what the network sees — tap any hidden neuron to dissect its contribution to the final classification.