Simultaneous perturbation stochastic approximation (SPSA) is analgorithmic method for optimizing systems with multiple unknownparameters. It is a type ofstochastic approximation algorithm. As an optimization method, it is appropriately suited to large-scale population models, adaptive modeling, simulationoptimization, andatmospheric modeling. Many examples are presented at the SPSA websitehttp://www.jhuapl.edu/SPSA. A comprehensive book on the subject is Bhatnagar et al. (2013). An early paper on the subject is Spall (1987) and the foundational paper providing the key theory and justification is Spall (1992).
SPSA is a descent method capable of finding global minima, sharing this property with other methods such assimulated annealing. Its main feature is the gradient approximation that requires only two measurements of the objective function, regardless of the dimension of the optimization problem. Recall that we want to find the optimal control with lossfunction:
Both Finite Differences Stochastic Approximation (FDSA)and SPSA use the same iterative process:
whererepresents the iterate, is the estimate of the gradient of the objective function evaluated at, and is a positive number sequence converging to 0. If is ap-dimensional vector, the component of thesymmetric finite difference gradient estimator is:
1 ≤i ≤p, where is theunit vector with a 1 in theplace, and is a small positive number that decreases withn. With this method,2p evaluations ofJ for each are needed. Whenp is large, this estimator loses efficiency.
Let now be a random perturbation vector. The component of the stochastic perturbation gradient estimator is:
Remark that FD perturbs only one direction at a time, while the SP estimator disturbs all directions at the same time (the numerator is identical in allp components). The number of loss function measurements needed in the SPSA method for each is always 2, independent of thedimensionp. Thus, SPSA usesp times fewer function evaluations than FDSA, which makes it a lot more efficient.
Simple experiments withp=2 showed that SPSA converges in the same number of iterations as FDSA. The latter followsapproximately thesteepest descent direction, behaving like the gradient method. On the other hand, SPSA, with the random search direction, does not follow exactly the gradient path. In average though, it tracks it nearly because the gradient approximation is an almostunbiasedestimator of the gradient, as shown in the following lemma.
Denote by
the bias in the estimator. Assume that are all mutually independent with zero-mean, bounded secondmoments, and uniformly bounded. Then→0 w.p. 1.
The mainidea is to use conditioning on to express and then to use a second order Taylor expansion of and. After algebraic manipulations using the zero mean and the independence of, we get
The result follows from thehypothesis that→0.
Next we resume some of the hypotheses under which converges inprobability to the set of global minima of. The efficiency ofthe method depends on the shape of, the values of the parameters and and the distribution of the perturbation terms. First, the algorithm parameters must satisfy thefollowing conditions:
A good choice for is theRademacher distribution, i.e. Bernoulli +-1 with probability 0.5. Other choices are possible too, but note that the uniform and normal distributions cannot be used because they do not satisfy the finite inverse moment conditions.
The loss functionJ(u) must be thrice continuouslydifferentiable and the individual elements of thethird derivative must be bounded:. Also, as.
In addition, must be Lipschitz continuous, bounded and the ODE must have a unique solution for each initial condition.Under these conditions and a few others,converges in probability to the set of global minima of J(u) (see Maryak and Chin, 2008).
It has been shown that differentiability is not required: continuity and convexity are sufficient for convergence.[1]
It is known that a stochastic version of the standard (deterministic) Newton-Raphson algorithm (a “second-order” method) provides an asymptotically optimal or near-optimal form of stochastic approximation. SPSA can also be used to efficiently estimate theHessian matrix of the loss function based on either noisy loss measurements or noisy gradient measurements (stochastic gradients). As with the basic SPSA method, only a small fixed number of loss measurements or gradient measurements are needed at each iteration, regardless of the problem dimensionp. See the brief discussion inStochastic gradient descent.