Deep Learning / deep dive
Simple operations. Learned representations.
Follow a signal through a neural network, then follow the error back to understand what training changes.
deep diveDeep Learningdeep-diveWhat changes between layers?
Consider an image classifier. The input is an array of pixel values, but the output is a score for each class. A neural network learns intermediate representations that help map one to the other.
A layer combines its inputs using weights, adds biases, and usually applies a nonlinear function. Stacking only linear transformations would still produce a linear transformation. Nonlinearity allows the composition to represent a richer family of functions.
Follow the forward pass
Take two input values: parcel weight and distance. A small hidden layer could compute several weighted combinations of these values and pass each through an activation function. An output layer combines those hidden values into a prediction.
Follow the gradient
Backpropagation applies the chain rule to calculate how a loss changes with respect to parameters. An optimizer then uses those gradients to update the parameters. Backpropagation and the optimizer are related but distinct operations.
A gradient is local information. It does not certify that the next update will improve performance on unseen data, or that optimization will find the best possible solution. Learning rate, initialization, architecture, and data all matter.
The Deep Learning textbook develops the mathematics of feedforward networks and gradient-based learning. Work through the chain rule alongside the visual explanation.
A small thought experiment
Imagine a hidden unit whose output is always zero for the current examples. Depending on the activation and inputs, its gradient path may contribute little or nothing to learning. Adding more hidden units is not automatically useful if the training dynamics prevent them from contributing.
Inspect distributions of activations and gradients when training behaves strangely. Also verify input scaling and labels before changing architecture.
Representation is not a guarantee of meaning
An internal vector may encode distinctions useful for the training objective. That does not mean every coordinate corresponds to a human concept, or that the representation will transfer to an unfamiliar domain.
Test the behavior you need. A classifier that succeeds on clean catalog images may fail on dim warehouse photographs. The class names can be identical while the evidence distribution changes.
Build understanding before scale
For a first experiment, use a tiny dataset and a tiny network. Check that it can fit a small subset. Then evaluate held-out examples. Plot training and validation losses separately, and keep the preprocessing fixed.
Next question: if representations are useful because they combine information, how should a language model decide which other tokens matter? That leads to attention.
Supporting sources
- Goodfellow, Bengio and Courville: Deep Feedforward Networks ↗
Feedforward networks and backpropagation background; not a result from the illustrative delivery-time model.
Sources support the technical background. TheJobPoolConsultants examples, diagrams and proposed designs are identified separately.
Part 1 of 1 published · Deep Learning Under the Hood
Explore this series →

