Deep Learning From the Ground Up: Layers, Neurons and Backpropagation
A deep network is just many small calculations stacked together. Learn what each layer contributes and how the error flows back through the whole stack.
Deep learning earns its name from depth: many layers of simple computations stacked one on top of another. Each layer transforms its input a little, and together the stack learns to map raw data to useful answers. To use these models well you do not need to derive every equation, but you should understand what a layer does, what a neuron computes and how a training pass updates the whole stack.
Neurons combine inputs with weights and a bias
A single neuron takes several input numbers, multiplies each by its own weight, adds them together and then adds a bias before passing the total through an activation function. The activation decides how strongly the neuron fires and introduces the non-linearity that lets the network model complex relationships. If every neuron were purely linear, stacking them would collapse into one big linear function and depth would buy you nothing.
- Each input has a weight that says how much it matters.
- The bias shifts the neuron's firing threshold.
- Activation functions such as ReLU add the needed non-linearity.
- Weights and biases together are the learnable parameters.
What layers actually learn
Early layers learn low-level features: edges and textures in images, character fragments in text. Middle layers combine those into shapes, parts and phrases. Later layers assemble full objects, concepts and meanings. You never tell a layer what to detect; the architecture and the data shape what emerges. This hierarchy is why deep models transfer so well: the early layers of a network trained on one large dataset are often reusable for a different but related task.
Backpropagation: the learning algorithm
Backpropagation is how a network turns a mistake into better weights. After a forward pass produces a prediction, the loss measures the error. Backpropagation then works backwards from the output layer, using the chain rule of calculus to compute how much each weight contributed to that error. Each weight is nudged in the direction that would reduce the loss, scaled by the learning rate. Repeating forward and backward passes across many batches slowly sculpts the network into an accurate model.
- A forward pass makes a prediction and computes the loss.
- Backpropagation walks the error backward through every layer.
- The gradient tells each weight which direction reduces the loss.
- The learning rate controls how large each update step is.
Training dynamics you will meet in practice
Three numbers dominate every training run. The learning rate decides step size; too large and training diverges, too small and it crawls. The batch size decides how many examples are used per update, trading gradient noise against memory. The epoch count decides how many full passes over the data you make. Modern optimisers such as Adam adapt the step size per weight, but you still tune these three and watch a validation curve to stop before overfitting.
Key takeaways
- Depth works because each layer transforms the input and non-linear activations keep the stack expressive.
- Neurons are weighted sums with a bias passed through an activation function.
- Backpropagation distributes each error back to the weights that caused it.
- Learning rate, batch size and epochs shape every training run you will do.
Written by
Priya Sharma
Priya previously built ML systems at a cloud provider. She writes hands-on tutorials covering embeddings, RAG and model deployment.
More articles by Priya Sharma →