A neural network architecture designed and implemented from first principles, with custom forward and backward propagation, systematic hyperparameter optimisation, and SHAP-based interpretability to demystify the model's decision-making process.
Type
Deep Learning
Domain
Classification
Methods
Custom NN, SHAP, Hyperparameter Optimisation
Status
Completed
The Challenge
Off-the-shelf deep learning frameworks abstract away the mechanics of neural networks, which is efficient for production but leaves practitioners without a deep understanding of what their models are actually doing. For high-stakes applications, this lack of understanding is a liability.
Building from first principles forces genuine comprehension of gradient flow, weight initialisation, activation functions, and the interplay between architecture decisions and model behaviour.
Approach
01
Architecture Design
Designed the network architecture from scratch, making deliberate choices about layer depth, width, activation functions, and regularisation strategies based on the classification task requirements.
02
Custom Implementation
Implemented forward propagation, backward propagation, and gradient descent from first principles using NumPy. No high-level framework abstractions were used for the core training loop.
03
Hyperparameter Optimisation
Conducted systematic hyperparameter search across learning rates, batch sizes, network architectures, and regularisation strengths using grid and random search strategies with visual analytics.
04
Interpretability Analysis
Applied SHAP values to the trained model to understand feature contributions, identify the most influential inputs, and validate that the model's learned patterns align with domain knowledge.
NEURAL NETWORK
FROM SCRATCH
Results
From Scratch
Full implementation without framework abstractions
Optimised
Systematic hyperparameter search
Interpretable
SHAP analysis of learned representations
The from-scratch implementation achieved competitive classification performance while providing complete transparency into every stage of the training process. The hyperparameter optimisation visualisations revealed the sensitivity landscape of the architecture, and SHAP analysis confirmed that the model had learned meaningful feature relationships rather than spurious correlations.