- Introduced by
- Geman, S. & Geman, D. (Bayesian framing); Kirkpatrick, S. et al. (SA foundation)
- Year
- 1984
- Type
- Probabilistic metaheuristic with Bayesian inference
- Family
- Simulation / optimization
What does it do?
Bayesian Simulated Annealing (BSA) is an informal name for a family of simulated annealing variants in which a prior distribution over the parameters is used to weight the acceptance decision.
The search still proposes moves and lowers a temperature, but each move is also scaled by a prior ratio. This prior enters as a tuning weight, not as a validated posterior probability that a region contains the optimum. The cited sources do not describe this variant or show that it improves on uninformed SA, so any benefit depends on the quality of the prior and should be checked on your own problem.
The intuition behind the method
Simulated annealing accepts a worse solution with a probability that depends on the energy difference and on a temperature that is gradually lowered. The method draws on the analogy between optimisation and the annealing of solids described by Kirkpatrick and colleagues. Geman and Geman showed how annealing can be applied to a Gibbs posterior distribution to obtain a maximum a posteriori estimate. In the BSA variant described here, a prior over the parameters is added as an extra weight in the acceptance step, so regions the modeller considers plausible are kept more often. If the prior is uniform, the ratio is constant and the rule reduces to standard SA. The prior is a weighting term whose calibration is the user's responsibility; a misleading prior can bias the search away from the true optimum.
History
Simulated annealing was introduced by Kirkpatrick, Gelatt and Vecchi in 1983, drawing on an analogy between optimisation and the annealing of solids in statistical mechanics. Geman and Geman (1984) applied annealing to a Gibbs posterior distribution for maximum a posteriori estimation in Bayesian image restoration, and established convergence properties for that relaxation procedure. Bayesian simulated annealing as a named method has no verified originator or date; the two works above are the foundations it draws on.
When to use it
Consider BSA when the objective is costly to evaluate, when a defensible prior over the parameters exists, and when plain SA would spend evaluations in regions that domain knowledge already rules out. It is a candidate for multimodal problems where the modeller can state where good solutions are expected. Do not use it when the objective is cheap to evaluate, because the posterior-update overhead may exceed the saving. Do not use it when no meaningful prior information exists, because the method then reduces to standard SA with extra cost. Be cautious when the prior is weakly supported and the landscape has several modes, since a single prior can mislead the search.
Limitations and considerations
- Posterior updates, especially with surrogate models, add computation at each iteration, which can outweigh the saving when the objective is cheap.
- The prior-weighted acceptance rule is a heuristic rather than a derivation from the cited sources, so the long-run behaviour of the search and any convergence guarantee are not established by them.
- Classical convergence results for annealing concern the standard acceptance rule under slow cooling and do not automatically transfer once acceptance is modified by prior weights.
- Results depend on the prior: a poorly chosen prior can bias the search away from the true optimum, and the procedure itself gives no direct check of this.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Allows prior domain knowledge to enter the acceptance decision, so evaluations can be concentrated on regions the modeller considers plausible.
- Keeps SA's temperature-controlled acceptance of worse moves, which is the mechanism the standard method uses to escape local optima.
- May use a surrogate model, such as a Gaussian process, to rank candidate moves before expensive evaluations; this is a design option to validate, as no comparative evidence is cited.
Applications
- Hyperparameter tuning, where each objective evaluation is costly and a prior over sensible settings is available.
- Bayesian inverse problems in which the parameters carry prior information and the objective is a misfit function.
- Engineering design optimisation with simulation-based objectives, where earlier designs can inform the prior.
- Model calibration under prior constraints on parameters.
- Scheduling problems in which task durations are described probabilistically.
How it works
How it works
Specify a prior distribution P(theta) over the parameter or solution space that encodes domain knowledge about which regions are likely to give good objective values. It acts as a weighting term in acceptance and its calibration is your responsibility. With a uniform (non-informative) prior, the prior ratio equals one and the procedure reduces to standard simulated annealing.
Evaluate the objective (energy) function E(theta) at the current solution. The factor exp(-E/T) is the Boltzmann-type weight from statistical mechanics used in the SA acceptance rule. It should be read as the usual SA energy weight, not as a statistical likelihood.
Generate a candidate theta' from a proposal distribution. A commonly used heuristic acceptance probability is min(1, exp(-(E'-E)/T) * P(theta')/P(theta)), which multiplies the standard SA term by a prior ratio. This rule is an unsourced heuristic: neither cited source derives it. It omits the proposal-density ratio that a Metropolis-Hastings correction would require, so it should not be assumed to preserve any target distribution. In this rule only the prior P enters the ratio; if a surrogate posterior is substituted for P, state that choice explicitly.
Optionally, update a surrogate model of the landscape from the evaluations collected so far, for example a Gaussian process, to rank candidate moves without evaluating the objective at every candidate. This is an additional design choice that you should validate; its accuracy depends on the data gathered during the search, and no comparative evidence for it is cited here. If the surrogate is used inside the acceptance ratio, it replaces the prior P in the formula above.
Lower the temperature T according to a cooling schedule, for example geometric or logarithmic. As T falls, worse moves are accepted less often, so the search becomes more greedy and the prior ratio has a larger relative influence on which moves are kept. Classical convergence results for annealing are stated for slow, logarithmic-type schedules and the standard acceptance rule.
Stop when the temperature falls below a chosen threshold, when an iteration limit is reached, or when the best solution stops improving over a window of iterations. No procedure for computing credible intervals and no convergence guarantee is established for this variant. Judge results using independent restarts and a sensitivity check on the prior, and do not report intervals as if they were valid posterior summaries.
Common pitfalls
- An overly informative prior on a multimodal landscape can make the search miss global optima that lie in regions the prior assigns low probability.
- Confusing BSA with Bayesian optimization: BSA keeps the SA search engine and adds prior weighting to acceptance, whereas Bayesian optimization replaces the search with surrogate-guided acquisition.
- Adding Bayesian weighting changes the effective acceptance rate, so the initial temperature and cooling schedule should be checked again rather than copied from plain SA.
- Treating BSA as a replacement for restarts: priors reduce but do not remove the risk of becoming trapped in local optima.
- Centring a single Gaussian prior on one guess when the landscape is multimodal; a mixture or non-informative prior is safer when uncertainty is high.
Frequently asked questions
How does Bayesian Simulated Annealing differ from standard Simulated Annealing?
Standard SA uses only the Metropolis-type acceptance rule, based on the energy difference and the temperature. The BSA variant described here additionally multiplies the acceptance probability by a prior ratio P(theta')/P(theta), so regions favoured by domain knowledge are kept more often. If a surrogate posterior is used, it replaces the prior in that ratio. The intended effect is fewer evaluations in low-quality regions, but this depends on the accuracy of the prior and is not established by the cited sources.
Is Bayesian Simulated Annealing the same as Bayesian Optimization?
No. Bayesian Optimization (BO) replaces the iterative search with a surrogate model and an acquisition function that selects the next evaluation point. BSA retains the SA search engine and incorporates a prior weight into the acceptance probability. A BO-style surrogate could in principle supply the distribution used inside BSA, but this is a design choice to validate, and no comparative evidence is cited.
What prior should I use if I have no domain knowledge?
Use a non-informative prior, such as uniform over the feasible space. The prior ratio then equals one and BSA reduces to standard SA, so the extra overhead is not justified. If earlier runs exist, a prior built from the good solutions they found is a practical starting point, with the usual caution about bias.
Related methods
Sources
Kirkpatrick, S., Gelatt, C. D., & Vecchi, M. P. (1983). Optimization by simulated annealing. Science, 220(4598), 671–680.
Open DOI referenceGeman, S., & Geman, D. (1984). Stochastic relaxation, Gibbs distributions, and the Bayesian restoration of images. IEEE Transactions on Pattern Analysis and Machine Intelligence, 6(6), 721–741.
Open DOI reference