HomeAI & Machine LearningGradient Descent in 3D: Reading a Loss Surface Like a Landscape

⛰️ Gradient Descent in 3D

Interactive 3D loss-surface terrain where dropping a ball at different starting points and adjusting learning rate and momentum shows gradient descent rolling toward minima, valleys, or getting stuck in saddle points.

AI & Machine Learning3DModerate60 FPS
gradient-descent-3d-loss-surface-lab ↗ Open standalone

An interactive 3D loss-surface terrain: drop a ball anywhere on the landscape and watch gradient descent roll it downhill, step by step, toward a minimum — or into a valley, or stuck at a saddle.

🔬 What It Demonstrates

Each terrain height is a loss value; the ball's motion is literal gradient descent — step opposite the local slope, scaled by the learning rate, with momentum carrying velocity forward between steps.

🎮 How to Use

Pick a surface shape, click anywhere on the terrain to drop the ball, then tune learning rate and momentum to see smooth convergence, valley zig-zagging, overshoot, or a stall near a saddle point.

💡 Did You Know?

In the high-dimensional weight spaces of real neural networks, saddle points vastly outnumber true local minima — which is exactly why momentum-based optimizers were invented.

⚙ Under the hood

Interactive 3D loss-surface terrain where dropping a ball at different starting points and adjusting learning rate and momentum shows gradient descent rolling toward minima, valleys, or getting stuck in saddle points.

gradient-descentloss-surfaceoptimizationneural-networkslearning-rateai-ml

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)