Neural Network Manual Backpropagation
A recommendation-engine neural network built and trained entirely by hand in NumPy — no TensorFlow, no PyTorch — to demonstrate genuine first-principles understanding of forward propagation, gradient computation, and gradient descent.
The Challenge
A complete neural network, forward pass, backpropagation, and gradient descent, built and trained using nothing but NumPy, establishing first-principles understanding before scaling to a production retail recommendation engine.
Before reaching for a deep learning framework, this project set out to build and train a neural network entirely by hand, to establish genuine first-principles understanding of forward propagation, backpropagation, and gradient descent, rather than treating them as a framework's black box.
Approach
Results
The exercise successfully traced a full training step end-to-end: a customer feature vector flows forward through ReLU and Sigmoid activations to a prediction, the loss gradient is computed against a target label, and that error is propagated backward through both layers to produce weight updates via gradient descent.
Working through the maths manually surfaces exactly why frameworks like TensorFlow and PyTorch exist, and exactly what they're automating underneath their abstractions. That distinction matters directly for architecture decisions on real projects: knowing what backpropagation is actually computing makes it much easier to reason about vanishing gradients, activation choice, and learning rate sensitivity when scaling a model up.
Business Impact
For a retail recommendation engine specifically, this foundation supports better-informed architecture decisions when scaling from a toy 2-2-1 network to a production system serving millions of customers and products, more personalised recommendations translate fairly directly into higher engagement, conversion, and customer lifetime value, and being able to reason about the mechanics rather than just calling model.fit() is a genuine differentiator when diagnosing why a production model isn't learning as expected.