Skip to content
ToolUlkaa Tool
All tools

Machine Learning

TensorFlow PlaygroundConfusion Matrix CalculatorROC Curve and AUC CalculatorK-Means Clustering VisualizerGradient Descent VisualizerDecision Tree BuilderClassifier PlaygroundPCA VisualizerActivation Function Plotter

Categories

AcademicTextMathematicsStatisticsMachine LearningAIData ScienceFile
All tools
Machine Learning

Gradient Descent on a Bumpy Loss

See how a bumpy loss traps plain gradient descent and how momentum helps.

f(x)=x2+3sin⁡(3x)f(x) = x^2 + 3\sin(3x)f(x)=x2+3sin(3x)
Suggested for this function: 0.05. Try a larger value to watch it diverge.

Tap the plot to move the starting point (the cross). All four optimizers start from the same place with the same learning rate.

After 0 steps, lowest value

9.75563SGD

Many local minima. Plain SGD, RMSprop and Adam stop in the first dip they reach; Momentum builds speed and can roll through it.

Curve and paths

  • SGD
  • Momentum
  • RMSprop
  • Adam

Value against step

Where each optimizer is

OptimizerStepsxfStatus
SGD02.69.75563running
Momentum02.69.75563running
RMSprop02.69.75563running
Adam02.69.75563running
  1. Tools
  2. Machine Learning
  3. Gradient Descent Visualizer
  4. Gradient Descent on a Bumpy Loss

About Gradient Descent on a Bumpy Loss

This page uses f(x) = x squared + 3 sin(3x), a bowl covered with ripples, so it has several local minima, with a learning rate of 0.05 and a start at x = 2.6. It is free, needs no sign-up and runs in your browser, so nothing you enter is uploaded.

The overall shape is a bowl whose lowest point is near x = -0.49, but the sine term makes dips along the way. Plain SGD settles in the first dip it meets on the way down, at x of about 1.46, which is not the best one. RMSprop and Adam stop there too. Momentum carries speed through the dip and rolls on to the global minimum.

Real training losses are bumpy in a similar, much higher-dimensional way, which is one of the reasons momentum and small noisy batches help in practice. Tap the plot to try other starting points: which optimizer escapes depends on where you begin.

How to use Gradient Descent on a Bumpy Loss

  1. 1Choose a function. The suggested learning rate for it is filled in.
  2. 2Change the learning rate if you like. Smaller is slower and safer, larger is faster until it blows up.
  3. 3Press Step to move every optimizer once, or Play to animate. "+25 steps" skips ahead.
  4. 4Tap the plot to move the starting point (the cross). The paths restart from there.
  5. 5Read the table for each optimizer's position, value and status: running, converged or diverged.
  6. 6Watch the log chart: a line that keeps falling is converging, and a line that climbs is diverging.

Features

  • Seven functions: three curves and four 2D surfaces, including a narrow valley, Rosenbrock, Himmelblau and a saddle.
  • SGD, Momentum, RMSprop and Adam, all from the same start with the same learning rate.
  • Contour map for 2D functions and a curve for 1D, with a coloured path for each optimizer.
  • Divergence detection that stops a run and says which optimizers blew up.
  • A log-scale chart of the function value against step.
  • Step, play and +25 steps controls, with slower playback if you prefer reduced motion.
  • Tap the plot to choose the starting point.

Worked examples

  • Bumpy quadratic, start 2.6, learning rate 0.05, 600 steps → gives SGD -0.7042, Momentum -2.7448, RMSprop -0.7042, Adam -0.7042

    The global minimum is about -2.75. Momentum reaches it; the others stop in a dip with f of about -0.70 (x near 1.46).

Privacy: how it works

  • Everything is computed in your browser tab. Nothing is sent to Ulkaa or anyone else.

Tips

  • On the parabola, try a learning rate of 0.5: SGD jumps to the minimum in a single step because the step size matches the curvature exactly.
  • On the double well, drag the start to the left side and see it settle in the other, shallower minimum.
  • On Himmelblau, change the start point and see different optimizers choose different minima.
  • If a path vanishes off the plot, check the status column: it probably diverged.

Frequently asked questions

Is it really free?

Yes. There is no price, no trial and no credit card. Ulkaa Tool does the work with your own device, so there is no server bill to pass on to you.

Do I need an account?

No. There is no sign-up and no login. Open the page and use it. An Ulkaa account is not needed for anything on this tool.

Does it run in my browser?

Yes. Your settings are processed by code running in your browser tab, on your own device.

Is my data uploaded?

No. Your settings are never sent to Ulkaa or to anyone else. You can check this yourself by watching the Network tab in your browser developer tools while you use the tool.

Why does gradient descent get stuck on a bumpy surface?

It always moves downhill, so it stops in the first local minimum it reaches.

Does momentum help with local minima?

It can: accumulated velocity can carry an optimizer over a shallow dip, although it can also overshoot a good minimum.

More Gradient Descent Visualizer pages

  • Gradient Descent VisualizerCompare SGD, Momentum, RMSprop and Adam side by side, step by step, on curves and contour maps.
  • Learning Rate Too High: Gradient Descent DivergenceSee the error grow instead of shrink when the learning rate crosses its limit.
  • SGD Learning Rate VisualizerChange the learning rate and watch plain gradient descent speed up, oscillate or stall.
  • Momentum vs SGDSee how a running velocity helps gradient descent in a long, narrow valley.
  • Adam Optimizer VisualizerSee Adam adapt its step per direction on the curved Rosenbrock valley.
  • RMSprop Optimizer VisualizerSee RMSprop normalise its steps on a surface with four minima.
  • Gradient Descent and Local MinimaStart on one side of a double well and see which minimum each optimizer reaches.
  • Gradient Descent at a Saddle PointStart almost on a ridge and see how long each optimizer takes to escape the saddle.
  • Gradient Descent on the Rosenbrock FunctionFollow gradient descent down the curved banana valley of the Rosenbrock function.

Ulkaa Apps

  • Ulkaa
  • Calendar
  • Task
  • Note
  • Disk
  • Call
  • Contact
  • Mail
  • Finance
  • Health
  • Office
  • Work
  • Workspace
  • Halum
  • Jaal
  • Islam
  • Game
  • Weather
  • Campus
  • News
  • Developer
  • Help
  • Account
About·Privacy·Terms·© 2026 Ulkaa

What is Ulkaa Tool?

Ulkaa Tool is a free collection of fast, privacy-friendly online tools from Ulkaa Network. Calculate your GPA and CGPA, edit rich text, count words and characters, replace text and more — all in your browser.

Every tool runs entirely in your browser — no sign-up, and your data never leaves your device.

Academic

  • GPA Calculator
  • CGPA Calculator
  • Citation Generator
  • Quiz Maker

Text

  • Rich Text Editor
  • Word Counter
  • Character Counter
  • Text Replacement

Ulkaa

  • Ulkaa
  • Ulkaa News
  • Ulkaa Campus
  • Ulkaa Tool
  • Ulkaa Game
  • Ulkaa Weather
  • Ulkaa Islam

Company

  • About Ulkaa
  • Careers
  • Support
  • Help
  • Privacy Policy
  • Terms of Service
  • Disclaimer
  • Sitemap

© 2015-26, Ulkaa. All rights reserved.
Facebook PageLinkedIn CompanyX (Twitter) ProfileInstagram ProfileGitHub Account