{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/stochastic-gradient-descent-as-approximate","title":"Stochastic Gradient Descent as Approximate Bayesian Inference","arxiv_id":"1704.04289","date":"2017-04-13","proceeding":null,"authors":["Stephan Mandt","Matthew D. Hoffman","David M. Blei"],"abstract":"Stochastic Gradient Descent with a constant learning rate (constant SGD)\nsimulates a Markov chain with a stationary distribution. With this perspective,\nwe derive several new results. (1) We show that constant SGD can be used as an\napproximate Bayesian posterior inference algorithm. Specifically, we show how\nto adjust the tuning parameters of constant SGD to best match the stationary\ndistribution to a posterior, minimizing the Kullback-Leibler divergence between\nthese two distributions. (2) We demonstrate that constant SGD gives rise to a\nnew variational EM algorithm that optimizes hyperparameters in complex\nprobabilistic models. (3) We also propose SGD with momentum for sampling and\nshow how to adjust the damping coefficient accordingly. (4) We analyze MCMC\nalgorithms. For Langevin Dynamics and Stochastic Gradient Fisher Scoring, we\nquantify the approximation errors due to finite learning rates. Finally (5), we\nuse the stochastic process perspective to give a short proof of why Polyak\naveraging is optimal. Based on this idea, we propose a scalable approximate\nMCMC algorithm, the Averaged Stochastic Gradient Sampler.","url_abs":"http://arxiv.org/abs/1704.04289v2","url_pdf":"http://arxiv.org/pdf/1704.04289v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"stochastic-gradient-descent-as-approximate","repo_url":"https://github.com/taohu88/BayesianML","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"unanswered"}}],"tasks":[{"task_slug":"bayesian-inference","task_name":"Bayesian Inference"}],"methods":[{"method_slug":"sgd","method_name":"SGD"},{"method_slug":"sgd-with-momentum","method_name":"SGD with Momentum"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1704.04289","mcp":null,"developers":"https://syntology.ai/developers"},"arxiv_metadata":null,"syntology_extracted_results":null}