Loss Surface Results
Configure the calculator, then select Calculate Surface.
No calculation is running.
| Surface | Not calculated |
|---|
| # | Input | Target | Prediction | Error |
|---|---|---|---|---|
| Dataset predictions will appear here. | ||||
The calculator evaluates a loss function across two parameter axes. Each grid point represents one parameter combination. Regularization is added before plotting the final surface.
Numerical gradients use centered finite differences. Optimizers follow those gradients across the landscape. The plotted path reveals convergence behavior and instability.
- Select an analytical surface, dataset model, or custom expression.
- Set parameter ranges, grid resolution, and selected coordinates.
- Choose regularization, optimizer, learning rate, and iterations.
- Configure the 3D surface, contour, heatmap, or wireframe view.
- Select Calculate Surface, then inspect minima and cross-sections.
- Animate the optimizer or export charts, points, and history.
Choose the quadratic bowl preset with ranges from negative four to four. Start Adam near negative three and positive three. The path should approach the global minimum smoothly.
Reduce the learning rate when the path oscillates. Increase resolution for a more detailed surface. Compare the same start using momentum or RMSProp.
A broad bowl usually indicates stable optimization. Narrow valleys can cause oscillation and slow convergence. Multiple depressions indicate possible local minima.
A flat region produces small gradients and slow progress. A saddle has opposing curvature across directions. Training-validation differences may indicate overfitting or distribution mismatch.
What does a 3D loss surface show?
It shows loss across two selected model parameters. Lower areas represent better parameter combinations. Peaks represent combinations producing larger errors.
Is the displayed minimum always global?
The reported grid minimum is the lowest sampled point. A finer grid may reveal a lower point. Non-convex surfaces can contain multiple minima.
Why does the optimizer path oscillate?
The learning rate may be too large. Narrow valleys also create alternating gradients. Lower rates or adaptive optimizers can improve stability.
What is a saddle point?
A saddle rises in one direction and falls in another. Its gradient may become very small. Optimizers can temporarily stall nearby.
What does regularization change?
Regularization penalizes large parameter values. It reshapes the loss landscape around the origin. This can improve model generalization.
Which grid resolution should I use?
Start near fifty points per axis. Increase resolution for final inspection. Very large grids require more browser memory.
Can I upload my own dataset?
Yes, upload a two-column CSV file. The columns should represent input and target. Text pasted into the dataset box also works.
How are gradients calculated?
The calculator uses centered numerical differences. It evaluates nearby points on each axis. Smaller steps improve precision but increase sensitivity.
Why are binary losses restricted?
Binary cross-entropy expects targets near zero or one. Logistic predictions are automatically bounded. Invalid probabilities are clipped for numerical safety.
Can this replace full model training?
No, it is an educational visualization tool. Real models often contain millions of parameters. This calculator displays only two dimensions.