Build and train neural networks from scratch with no ML libraries. Watch forward propagation, backpropagation, and gradient descent in real-time with interactive visualizations.
- From Scratch Implementation: Pure TypeScript neural network — no TensorFlow, PyTorch, or ML frameworks
- Interactive Architecture: Configure hidden layers, neurons per layer, and activation functions
- Multiple Datasets: XOR problem, concentric circles, spiral, and Gaussian clusters
- Real-time Visualization: Watch neurons activate and weights update during training
- Decision Boundary: Live heatmap showing classification regions
- Training Metrics: Loss curve, accuracy, epoch counter, and parameter count
- Forward propagation with arbitrary depth
- Backpropagation with gradient computation
- Momentum-based gradient descent optimizer
- Xavier/Glorot weight initialization
- Sigmoid
- Tanh
- ReLU
- Leaky ReLU
- XOR: Classic non-linearly separable problem
- Circle: Concentric ring classification
- Spiral: Interlocking spiral arms
- Gaussian: Overlapping cluster separation
- React 19 + TypeScript
- Vite
- Tailwind CSS 4
- Recharts
- Lucide Icons
npm install
npm run dev- Configure Architecture: Add/remove hidden layers, adjust neurons per layer
- Select Dataset: Choose a classification problem to solve
- Tune Hyperparameters: Adjust learning rate and momentum
- Train: Click "Start Training" or use "Step" for single epochs
- Watch: Observe the network learn as the decision boundary forms
The network implements:
- Forward Pass:
a[l] = σ(W[l] · a[l-1] + b[l]) - Loss Function: Mean Squared Error (MSE)
- Backprop: Chain rule gradient computation
- Update Rule:
W = W - α(∇W) + β(ΔW_prev)(momentum)
MIT