← 🧠 AI & Machine Learning

⛰️ Loss Surface Lab

low losshigh loss
Step: 0
Loss:
Gradient |∇L|:
Status: click terrain to drop
FPS:
Click terrain — drop ball · Drag — rotate · Scroll — zoom

⛰️ Gradient Descent in 3D

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.