{"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/on-training-implicit-models","title":"On Training Implicit Models","arxiv_id":"2111.05177","date":"2021-11-09","proceeding":"NeurIPS 2021 12","authors":["Zhengyang Geng","Xin-Yu Zhang","Shaojie Bai","Yisen Wang","Zhouchen Lin"],"abstract":"This paper focuses on training implicit models of infinite layers. Specifically, previous works employ implicit differentiation and solve the exact gradient for the backward propagation. However, is it necessary to compute such an exact but expensive gradient for training? In this work, we propose a novel gradient estimate for implicit models, named phantom gradient, that 1) forgoes the costly computation of the exact gradient; and 2) provides an update direction empirically preferable to the implicit model training. We theoretically analyze the condition under which an ascent direction of the loss landscape could be found, and provide two specific instantiations of the phantom gradient based on the damped unrolling and Neumann series. Experiments on large-scale tasks demonstrate that these lightweight phantom gradients significantly accelerate the backward passes in training implicit models by roughly 1.7 times, and even boost the performance over approaches based on the exact gradient on ImageNet.","url_abs":"https://arxiv.org/abs/2111.05177v4","url_pdf":"https://arxiv.org/pdf/2111.05177v4.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":"on-training-implicit-models","repo_url":"https://github.com/gsunshine/phantom_grad","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"unrolling","task_name":"Rolling Shutter Correction"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2111.05177","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2111.05177"}},"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/gsunshine/phantom_grad","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":3,"ran_honours":1,"ran":1,"unverified":5},"by_repo_kind":{"official":{"samples":10,"ran":5,"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":0,"samples":[{"code_sha256_prefix":"bc359191fdd6e179","entry":"conv3x3","repo":"gsunshine/phantom_grad","repo_kind":"official","path":"MDEQ/MDEQ_ImageNet/models/mdeq.py","file_url":"https://github.com/gsunshine/phantom_grad/blob/HEAD/MDEQ/MDEQ_ImageNet/models/mdeq.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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"bc359191fdd6e179"}},{"code_sha256_prefix":"cf5710371bcfb0ab","entry":"line_search","repo":"gsunshine/phantom_grad","repo_kind":"official","path":"MDEQ/MDEQ_ImageNet/modules/broyden.py","file_url":"https://github.com/gsunshine/phantom_grad/blob/HEAD/MDEQ/MDEQ_ImageNet/modules/broyden.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cf5710371bcfb0ab"}},{"code_sha256_prefix":"968a8f446ad3c5b1","entry":"rmatvec","repo":"gsunshine/phantom_grad","repo_kind":"official","path":"MDEQ/MDEQ_ImageNet/modules/broyden.py","file_url":"https://github.com/gsunshine/phantom_grad/blob/HEAD/MDEQ/MDEQ_ImageNet/modules/broyden.py","link_basis":"harvester_set","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":"968a8f446ad3c5b1"}},{"code_sha256_prefix":"b2b5022f654ee4d3","entry":"scalar_search_armijo","repo":"gsunshine/phantom_grad","repo_kind":"official","path":"MDEQ/MDEQ_ImageNet/modules/broyden.py","file_url":"https://github.com/gsunshine/phantom_grad/blob/HEAD/MDEQ/MDEQ_ImageNet/modules/broyden.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b2b5022f654ee4d3"}},{"code_sha256_prefix":"f0fda38cdd52aefb","entry":"weight_norm","repo":"gsunshine/phantom_grad","repo_kind":"official","path":"MDEQ/MDEQ_ImageNet/modules/optimizations.py","file_url":"https://github.com/gsunshine/phantom_grad/blob/HEAD/MDEQ/MDEQ_ImageNet/modules/optimizations.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f0fda38cdd52aefb"}},{"code_sha256_prefix":"40d68cf21decfa98","entry":"accuracy","repo":"gsunshine/phantom_grad","repo_kind":"official","path":"MDEQ/MDEQ_ImageNet/utils.py","file_url":"https://github.com/gsunshine/phantom_grad/blob/HEAD/MDEQ/MDEQ_ImageNet/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"40d68cf21decfa98"}},{"code_sha256_prefix":"d979af99360f8cf5","entry":"compute_weight","repo":"gsunshine/phantom_grad","repo_kind":"official","path":"MDEQ/MDEQ_ImageNet/utils.py","file_url":"https://github.com/gsunshine/phantom_grad/blob/HEAD/MDEQ/MDEQ_ImageNet/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d979af99360f8cf5"}},{"code_sha256_prefix":"7ed294bbbc64fbcc","entry":"norm_diff","repo":"gsunshine/phantom_grad","repo_kind":"official","path":"MDEQ/MDEQ_ImageNet/models/mdeq_core.py","file_url":"https://github.com/gsunshine/phantom_grad/blob/HEAD/MDEQ/MDEQ_ImageNet/models/mdeq_core.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7ed294bbbc64fbcc"}},{"code_sha256_prefix":"eb0f3b20cb022fb0","entry":"power_method","repo":"gsunshine/phantom_grad","repo_kind":"official","path":"MDEQ/MDEQ_ImageNet/models/mdeq_forward_backward.py","file_url":"https://github.com/gsunshine/phantom_grad/blob/HEAD/MDEQ/MDEQ_ImageNet/models/mdeq_forward_backward.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"eb0f3b20cb022fb0"}},{"code_sha256_prefix":"f55cbb1d14054e26","entry":"reduce_tensor","repo":"gsunshine/phantom_grad","repo_kind":"official","path":"MDEQ/MDEQ_ImageNet/train_mdeq_imagenet.py","file_url":"https://github.com/gsunshine/phantom_grad/blob/HEAD/MDEQ/MDEQ_ImageNet/train_mdeq_imagenet.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f55cbb1d14054e26"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}