{"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/adam-through-a-second-order-lens","title":"Studying K-FAC Heuristics by Viewing Adam through a Second-Order Lens","arxiv_id":"2310.14963","date":"2023-10-23","proceeding":null,"authors":["Ross M. Clarke","José Miguel Hernández-Lobato"],"abstract":"Research into optimisation for deep learning is characterised by a tension between the computational efficiency of first-order, gradient-based methods (such as SGD and Adam) and the theoretical efficiency of second-order, curvature-based methods (such as quasi-Newton methods and K-FAC). Noting that second-order methods often only function effectively with the addition of stabilising heuristics (such as Levenberg-Marquardt damping), we ask how much these (as opposed to the second-order curvature model) contribute to second-order algorithms' performance. We thus study AdamQLR: an optimiser combining damping and learning rate selection techniques from K-FAC (Martens & Grosse, 2015) with the update directions proposed by Adam, inspired by considering Adam through a second-order lens. We evaluate AdamQLR on a range of regression and classification tasks at various scales and hyperparameter tuning methodologies, concluding K-FAC's adaptive heuristics are of variable standalone general effectiveness, and finding an untuned AdamQLR setting can achieve comparable performance vs runtime to tuned benchmarks.","url_abs":"https://arxiv.org/abs/2310.14963v3","url_pdf":"https://arxiv.org/pdf/2310.14963v3.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":"adam-through-a-second-order-lens","repo_url":"https://github.com/rmclarke/adamthroughasecondorderlens","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"jax","reach":{"status":"ok"}}],"tasks":[{"task_slug":"computational-efficiency","task_name":"Computational Efficiency"},{"task_slug":"second-order-methods","task_name":"Second-order methods"}],"methods":[{"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=2310.14963","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2310.14963"}},"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/rmclarke/adamthroughasecondorderlens","reach":{"status":"ok"}}],"summary":{"ran":7,"unverified":9},"by_repo_kind":{"official":{"samples":16,"ran":7,"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":16,"samples":[{"code_sha256_prefix":"257367ad05bc7c21","entry":"bootstrap_sample","repo":"rmclarke/adamthroughasecondorderlens","repo_kind":"official","path":"util.py","file_url":"https://github.com/rmclarke/adamthroughasecondorderlens/blob/HEAD/util.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":"257367ad05bc7c21"}},{"code_sha256_prefix":"fc7c3f257d2193b8","entry":"compute_regrets","repo":"rmclarke/adamthroughasecondorderlens","repo_kind":"official","path":"play.py","file_url":"https://github.com/rmclarke/adamthroughasecondorderlens/blob/HEAD/play.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":"fc7c3f257d2193b8"}},{"code_sha256_prefix":"f7f1eb814f1e4e7d","entry":"compute_sgd_trajectory","repo":"rmclarke/adamthroughasecondorderlens","repo_kind":"official","path":"play.py","file_url":"https://github.com/rmclarke/adamthroughasecondorderlens/blob/HEAD/play.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":"f7f1eb814f1e4e7d"}},{"code_sha256_prefix":"f10708dbee71608b","entry":"cosine_similarity","repo":"rmclarke/adamthroughasecondorderlens","repo_kind":"official","path":"util.py","file_url":"https://github.com/rmclarke/adamthroughasecondorderlens/blob/HEAD/util.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":"f10708dbee71608b"}},{"code_sha256_prefix":"1d46e386a844b390","entry":"create_model","repo":"rmclarke/adamthroughasecondorderlens","repo_kind":"official","path":"models.py","file_url":"https://github.com/rmclarke/adamthroughasecondorderlens/blob/HEAD/models.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":"1d46e386a844b390"}},{"code_sha256_prefix":"176c79969c679521","entry":"log_directory","repo":"rmclarke/adamthroughasecondorderlens","repo_kind":"official","path":"config.py","file_url":"https://github.com/rmclarke/adamthroughasecondorderlens/blob/HEAD/config.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":"176c79969c679521"}},{"code_sha256_prefix":"8c0747124badb4dc","entry":"pad_dataset_for_equal_batches","repo":"rmclarke/adamthroughasecondorderlens","repo_kind":"official","path":"datasets.py","file_url":"https://github.com/rmclarke/adamthroughasecondorderlens/blob/HEAD/datasets.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":"8c0747124badb4dc"}},{"code_sha256_prefix":"379dfdf7f2210c62","entry":"correction_line_search_by_jvp","repo":"rmclarke/adamthroughasecondorderlens","repo_kind":"official","path":"optimisers.py","file_url":"https://github.com/rmclarke/adamthroughasecondorderlens/blob/HEAD/optimisers.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":"379dfdf7f2210c62"}},{"code_sha256_prefix":"d9123205375186bb","entry":"create_loss","repo":"rmclarke/adamthroughasecondorderlens","repo_kind":"official","path":"models.py","file_url":"https://github.com/rmclarke/adamthroughasecondorderlens/blob/HEAD/models.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":"d9123205375186bb"}},{"code_sha256_prefix":"f9d1f74db9f050e2","entry":"curvature_loss","repo":"rmclarke/adamthroughasecondorderlens","repo_kind":"official","path":"play.py","file_url":"https://github.com/rmclarke/adamthroughasecondorderlens/blob/HEAD/play.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":"f9d1f74db9f050e2"}},{"code_sha256_prefix":"cfef9f25e27b585e","entry":"get_best_config","repo":"rmclarke/adamthroughasecondorderlens","repo_kind":"official","path":"hyperparameter_optimisation.py","file_url":"https://github.com/rmclarke/adamthroughasecondorderlens/blob/HEAD/hyperparameter_optimisation.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":"cfef9f25e27b585e"}},{"code_sha256_prefix":"b2c5afc2f8e707ed","entry":"key_to_sort_order","repo":"rmclarke/adamthroughasecondorderlens","repo_kind":"official","path":"plot.py","file_url":"https://github.com/rmclarke/adamthroughasecondorderlens/blob/HEAD/plot.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":"b2c5afc2f8e707ed"}},{"code_sha256_prefix":"ae5f7be907de0e09","entry":"learning_rate_from_fisher","repo":"rmclarke/adamthroughasecondorderlens","repo_kind":"official","path":"optimisers.py","file_url":"https://github.com/rmclarke/adamthroughasecondorderlens/blob/HEAD/optimisers.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":"ae5f7be907de0e09"}},{"code_sha256_prefix":"a328664915e79be2","entry":"learning_rate_from_hessian","repo":"rmclarke/adamthroughasecondorderlens","repo_kind":"official","path":"optimisers.py","file_url":"https://github.com/rmclarke/adamthroughasecondorderlens/blob/HEAD/optimisers.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":"a328664915e79be2"}},{"code_sha256_prefix":"6556173b1b08119e","entry":"make_split_datasets","repo":"rmclarke/adamthroughasecondorderlens","repo_kind":"official","path":"datasets.py","file_url":"https://github.com/rmclarke/adamthroughasecondorderlens/blob/HEAD/datasets.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":"6556173b1b08119e"}},{"code_sha256_prefix":"2a558d12e10cc21b","entry":"save_plot","repo":"rmclarke/adamthroughasecondorderlens","repo_kind":"official","path":"plot.py","file_url":"https://github.com/rmclarke/adamthroughasecondorderlens/blob/HEAD/plot.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":"2a558d12e10cc21b"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}