← VQA Labs

Optimization Dynamics

Comparing optimizers on VQA cost landscapes

Three optimizers — vanilla gradient descent, Adam (adaptive moments), and SPSA (simultaneous perturbation stochastic approximation) — race on the same landscape from the same starting point. Observe how Adam's per-coordinate adaptation navigates narrow valleys, how SPSA's stochastic gradients explore broadly, and how vanilla GD can get trapped.

Two symmetric minima separated by a saddle — tests whether optimizers escape local traps

iteration: 0
-1.0pi-0.6pi-0.3pi00.3pi0.6pi1.0piparameter 1-1.0pi-0.6pi-0.3pi00.3pi0.6pi1.0piparameter 2click to set start point

Click the landscape to set a starting point, then run all three optimizers simultaneously. Gradient Descent follows the raw gradient; Adam adapts per-coordinate learning rates; SPSA estimates gradients via random perturbations.

Optimization Dynamics — VQA Labs · hbar.university