{"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/shampoo-preconditioned-stochastic-tensor","title":"Shampoo: Preconditioned Stochastic Tensor Optimization","arxiv_id":"1802.09568","date":"2018-02-26","proceeding":"ICML 2018 7","authors":["Vineet Gupta","Tomer Koren","Yoram Singer"],"abstract":"Preconditioned gradient methods are among the most general and powerful tools\nin optimization. However, preconditioning requires storing and manipulating\nprohibitively large matrices. We describe and analyze a new structure-aware\npreconditioning algorithm, called Shampoo, for stochastic optimization over\ntensor spaces. Shampoo maintains a set of preconditioning matrices, each of\nwhich operates on a single dimension, contracting over the remaining\ndimensions. We establish convergence guarantees in the stochastic convex\nsetting, the proof of which builds upon matrix trace inequalities. Our\nexperiments with state-of-the-art deep learning models show that Shampoo is\ncapable of converging considerably faster than commonly used optimizers.\nAlthough it involves a more complex update rule, Shampoo's runtime per step is\ncomparable to that of simple gradient methods such as SGD, AdaGrad, and Adam.","url_abs":"http://arxiv.org/abs/1802.09568v2","url_pdf":"http://arxiv.org/pdf/1802.09568v2.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":"shampoo-preconditioned-stochastic-tensor","repo_url":"https://github.com/Daniil-Selikhanovych/Shampoo_optimizer","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":null},{"paper_slug":"shampoo-preconditioned-stochastic-tensor","repo_url":"https://github.com/kazukiosawa/asdfghjkl","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"shampoo-preconditioned-stochastic-tensor","repo_url":"https://github.com/kazukiosawa/asdl","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"stochastic-optimization","task_name":"Stochastic Optimization"}],"methods":[{"method_slug":"adagrad","method_name":"AdaGrad"},{"method_slug":"adam","method_name":"Adam"},{"method_slug":"sgd","method_name":"SGD"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1802.09568","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1802.09568"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/kazukiosawa/asdl","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/kazukiosawa/asdfghjkl","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Daniil-Selikhanovych/Shampoo_optimizer","reach":null}],"summary":{"ran_draft_wrong":1,"ran_violates":1,"ran_fixture":2},"by_repo_kind":{"listed":{"samples":4,"ran":4,"repositories":2}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":1,"samples":[{"code_sha256_prefix":"c9f6ee7ebefc6fdc","entry":"ComputePower","repo":"kazukiosawa/asdl","repo_kind":"listed","path":"asdl/precondition/shampoo.py","file_url":"https://github.com/kazukiosawa/asdl/blob/HEAD/asdl/precondition/shampoo.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c9f6ee7ebefc6fdc"}},{"code_sha256_prefix":"d8c7afb170d3964a","entry":"GetParam","repo":"Daniil-Selikhanovych/Shampoo_optimizer","repo_kind":"listed","path":"shampoo_optimizer.py","file_url":"https://github.com/Daniil-Selikhanovych/Shampoo_optimizer/blob/HEAD/shampoo_optimizer.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d8c7afb170d3964a"}},{"code_sha256_prefix":"8ae502336fb3cc51","entry":"MatPower","repo":"kazukiosawa/asdl","repo_kind":"listed","path":"asdl/precondition/shampoo.py","file_url":"https://github.com/kazukiosawa/asdl/blob/HEAD/asdl/precondition/shampoo.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8ae502336fb3cc51"}},{"code_sha256_prefix":"a8c945309568d9a8","entry":"PowerIter","repo":"kazukiosawa/asdl","repo_kind":"listed","path":"asdl/precondition/shampoo.py","file_url":"https://github.com/kazukiosawa/asdl/blob/HEAD/asdl/precondition/shampoo.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a8c945309568d9a8"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}