{"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/does-sgd-really-happen-in-tiny-subspaces","title":"Does SGD really happen in tiny subspaces?","arxiv_id":"2405.16002","date":"2024-05-25","proceeding":null,"authors":["Minhak Song","Kwangjun Ahn","Chulhee Yun"],"abstract":"Understanding the training dynamics of deep neural networks is challenging due to their high-dimensional nature and intricate loss landscapes. Recent studies have revealed that, along the training trajectory, the gradient approximately aligns with a low-rank top eigenspace of the training loss Hessian, referred to as the dominant subspace. Given this alignment, this paper explores whether neural networks can be trained within the dominant subspace, which, if feasible, could lead to more efficient training methods. Our primary observation is that when the SGD update is projected onto the dominant subspace, the training loss does not decrease further. This suggests that the observed alignment between the gradient and the dominant subspace is spurious. Surprisingly, projecting out the dominant subspace proves to be just as effective as the original update, despite removing the majority of the original update component. We observe similar behavior across practical setups, including the large learning rate regime (also known as Edge of Stability), Sharpness-Aware Minimization, momentum, and adaptive optimizers. We discuss the main causes and implications of this spurious alignment, shedding light on the dynamics of neural network training.","url_abs":"https://arxiv.org/abs/2405.16002v3","url_pdf":"https://arxiv.org/pdf/2405.16002v3.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":[],"tasks":[],"methods":[{"method_slug":"sgd","method_name":"SGD"},{"method_slug":"sharpness-aware-minimization","method_name":"Sharpness-Aware Minimization"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2405.16002","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2405.16002"}},"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":"deterministic:regex_extraction","url":"https://github.com/locuslab/edge-of-stability","reach":{"status":"ok"}}],"summary":{"ran":13,"ran_draft_wrong":1,"unverified":1},"by_repo_kind":{"found_in_text":{"samples":15,"ran":14,"repositories":1}},"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":15,"samples":[{"code_sha256_prefix":"b37b8602123cd711","entry":"center","repo":"locuslab/edge-of-stability","repo_kind":"found_in_text","path":"src/cifar.py","file_url":"https://github.com/locuslab/edge-of-stability/blob/HEAD/src/cifar.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b37b8602123cd711"}},{"code_sha256_prefix":"fac5364e2f53c6db","entry":"conv3x3","repo":"locuslab/edge-of-stability","repo_kind":"found_in_text","path":"src/resnet_cifar.py","file_url":"https://github.com/locuslab/edge-of-stability/blob/HEAD/src/resnet_cifar.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"fac5364e2f53c6db"}},{"code_sha256_prefix":"5ae58d45938cf313","entry":"flatten","repo":"locuslab/edge-of-stability","repo_kind":"found_in_text","path":"src/cifar.py","file_url":"https://github.com/locuslab/edge-of-stability/blob/HEAD/src/cifar.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5ae58d45938cf313"}},{"code_sha256_prefix":"9d866a28174c7773","entry":"get_activation","repo":"locuslab/edge-of-stability","repo_kind":"found_in_text","path":"src/archs.py","file_url":"https://github.com/locuslab/edge-of-stability/blob/HEAD/src/archs.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9d866a28174c7773"}},{"code_sha256_prefix":"c9020a109e8d40e6","entry":"get_adam_nu","repo":"locuslab/edge-of-stability","repo_kind":"found_in_text","path":"src/adam.py","file_url":"https://github.com/locuslab/edge-of-stability/blob/HEAD/src/adam.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c9020a109e8d40e6"}},{"code_sha256_prefix":"6fc397cdc1cb7bfd","entry":"get_flow_directory","repo":"locuslab/edge-of-stability","repo_kind":"found_in_text","path":"src/utilities.py","file_url":"https://github.com/locuslab/edge-of-stability/blob/HEAD/src/utilities.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6fc397cdc1cb7bfd"}},{"code_sha256_prefix":"668f4bd271368cb3","entry":"get_gd_directory","repo":"locuslab/edge-of-stability","repo_kind":"found_in_text","path":"src/utilities.py","file_url":"https://github.com/locuslab/edge-of-stability/blob/HEAD/src/utilities.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"668f4bd271368cb3"}},{"code_sha256_prefix":"469c24f9be20c5be","entry":"get_modified_flow_directory","repo":"locuslab/edge-of-stability","repo_kind":"found_in_text","path":"src/utilities.py","file_url":"https://github.com/locuslab/edge-of-stability/blob/HEAD/src/utilities.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"469c24f9be20c5be"}},{"code_sha256_prefix":"295abaa4814b4e95","entry":"get_pooling","repo":"locuslab/edge-of-stability","repo_kind":"found_in_text","path":"src/archs.py","file_url":"https://github.com/locuslab/edge-of-stability/blob/HEAD/src/archs.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"295abaa4814b4e95"}},{"code_sha256_prefix":"5107ac691376fc43","entry":"make_chebyshev_dataset","repo":"locuslab/edge-of-stability","repo_kind":"found_in_text","path":"src/synthetic.py","file_url":"https://github.com/locuslab/edge-of-stability/blob/HEAD/src/synthetic.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5107ac691376fc43"}},{"code_sha256_prefix":"ac62432dc5134b0d","entry":"make_layers","repo":"locuslab/edge-of-stability","repo_kind":"found_in_text","path":"src/vgg.py","file_url":"https://github.com/locuslab/edge-of-stability/blob/HEAD/src/vgg.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ac62432dc5134b0d"}},{"code_sha256_prefix":"3f99563e280b4081","entry":"num_input_channels","repo":"locuslab/edge-of-stability","repo_kind":"found_in_text","path":"src/data.py","file_url":"https://github.com/locuslab/edge-of-stability/blob/HEAD/src/data.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3f99563e280b4081"}},{"code_sha256_prefix":"c931ef45cfe86923","entry":"standardize","repo":"locuslab/edge-of-stability","repo_kind":"found_in_text","path":"src/cifar.py","file_url":"https://github.com/locuslab/edge-of-stability/blob/HEAD/src/cifar.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c931ef45cfe86923"}},{"code_sha256_prefix":"6e1ce477ef41fc78","entry":"unflatten","repo":"locuslab/edge-of-stability","repo_kind":"found_in_text","path":"src/data.py","file_url":"https://github.com/locuslab/edge-of-stability/blob/HEAD/src/data.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6e1ce477ef41fc78"}},{"code_sha256_prefix":"f04e278f3a337f1a","entry":"make_linear_dataset","repo":"locuslab/edge-of-stability","repo_kind":"found_in_text","path":"src/synthetic.py","file_url":"https://github.com/locuslab/edge-of-stability/blob/HEAD/src/synthetic.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f04e278f3a337f1a"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}