{"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/torchdeq-a-library-for-deep-equilibrium","title":"TorchDEQ: A Library for Deep Equilibrium Models","arxiv_id":"2310.18605","date":"2023-10-28","proceeding":null,"authors":["Zhengyang Geng","J. Zico Kolter"],"abstract":"Deep Equilibrium (DEQ) Models, an emerging class of implicit models that maps inputs to fixed points of neural networks, are of growing interest in the deep learning community. However, training and applying DEQ models is currently done in an ad-hoc fashion, with various techniques spread across the literature. In this work, we systematically revisit DEQs and present TorchDEQ, an out-of-the-box PyTorch-based library that allows users to define, train, and infer using DEQs over multiple domains with minimal code and best practices. Using TorchDEQ, we build a ``DEQ Zoo'' that supports six published implicit models across different domains. By developing a joint framework that incorporates the best practices across all models, we have substantially improved the performance, training stability, and efficiency of DEQs on ten datasets across all six projects in the DEQ Zoo. TorchDEQ and DEQ Zoo are released as \\href{https://github.com/locuslab/torchdeq}{open source}.","url_abs":"https://arxiv.org/abs/2310.18605v1","url_pdf":"https://arxiv.org/pdf/2310.18605v1.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":"torchdeq-a-library-for-deep-equilibrium","repo_url":"https://github.com/locuslab/torchdeq","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[],"methods":[{"method_slug":"deq","method_name":"DEQ"},{"method_slug":null,"method_name":"Library"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2310.18605","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2310.18605"}},"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/locuslab/torchdeq","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":6,"ran_honours":1,"unverified":6},"by_repo_kind":{"official":{"samples":13,"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":0,"samples":[{"code_sha256_prefix":"57ab5dcbc1952b7d","entry":"backward_factory","repo":"locuslab/torchdeq","repo_kind":"official","path":"torchdeq/grad.py","file_url":"https://github.com/locuslab/torchdeq/blob/HEAD/torchdeq/grad.py","link_basis":"first_harvest_node","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":"57ab5dcbc1952b7d"}},{"code_sha256_prefix":"4ff06575536b0142","entry":"deq_decorator","repo":"locuslab/torchdeq","repo_kind":"official","path":"torchdeq/utils/layer_utils.py","file_url":"https://github.com/locuslab/torchdeq/blob/HEAD/torchdeq/utils/layer_utils.py","link_basis":"first_harvest_node","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":"4ff06575536b0142"}},{"code_sha256_prefix":"1552f16f70dc3e07","entry":"fp_correction","repo":"locuslab/torchdeq","repo_kind":"official","path":"torchdeq/loss/correction.py","file_url":"https://github.com/locuslab/torchdeq/blob/HEAD/torchdeq/loss/correction.py","link_basis":"first_harvest_node","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":"1552f16f70dc3e07"}},{"code_sha256_prefix":"3c0e1781de7876ee","entry":"line_search","repo":"locuslab/torchdeq","repo_kind":"official","path":"torchdeq/solver/broyden.py","file_url":"https://github.com/locuslab/torchdeq/blob/HEAD/torchdeq/solver/broyden.py","link_basis":"first_harvest_node","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":"3c0e1781de7876ee"}},{"code_sha256_prefix":"41e82f3c5dad5481","entry":"make_pair","repo":"locuslab/torchdeq","repo_kind":"official","path":"torchdeq/grad.py","file_url":"https://github.com/locuslab/torchdeq/blob/HEAD/torchdeq/grad.py","link_basis":"first_harvest_node","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":"41e82f3c5dad5481"}},{"code_sha256_prefix":"18129febc3623c8c","entry":"rmatvec","repo":"locuslab/torchdeq","repo_kind":"official","path":"torchdeq/solver/broyden.py","file_url":"https://github.com/locuslab/torchdeq/blob/HEAD/torchdeq/solver/broyden.py","link_basis":"first_harvest_node","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":"18129febc3623c8c"}},{"code_sha256_prefix":"b2b5022f654ee4d3","entry":"scalar_search_armijo","repo":"locuslab/torchdeq","repo_kind":"official","path":"torchdeq/solver/broyden.py","file_url":"https://github.com/locuslab/torchdeq/blob/HEAD/torchdeq/solver/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":"2b081a164710a995","entry":"anderson_solver","repo":"locuslab/torchdeq","repo_kind":"official","path":"torchdeq/solver/anderson.py","file_url":"https://github.com/locuslab/torchdeq/blob/HEAD/torchdeq/solver/anderson.py","link_basis":"first_harvest_node","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":"2b081a164710a995"}},{"code_sha256_prefix":"7d4074259849d14f","entry":"fixed_point_iter","repo":"locuslab/torchdeq","repo_kind":"official","path":"torchdeq/solver/fp_iter.py","file_url":"https://github.com/locuslab/torchdeq/blob/HEAD/torchdeq/solver/fp_iter.py","link_basis":"first_harvest_node","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":"7d4074259849d14f"}},{"code_sha256_prefix":"2677e9c85456cf7e","entry":"get_deq","repo":"locuslab/torchdeq","repo_kind":"official","path":"torchdeq/core.py","file_url":"https://github.com/locuslab/torchdeq/blob/HEAD/torchdeq/core.py","link_basis":"first_harvest_node","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":"2677e9c85456cf7e"}},{"code_sha256_prefix":"c9d6967faf17a74e","entry":"jac_reg","repo":"locuslab/torchdeq","repo_kind":"official","path":"torchdeq/loss/jacobian.py","file_url":"https://github.com/locuslab/torchdeq/blob/HEAD/torchdeq/loss/jacobian.py","link_basis":"first_harvest_node","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":"c9d6967faf17a74e"}},{"code_sha256_prefix":"e2bb819b499ea264","entry":"power_method","repo":"locuslab/torchdeq","repo_kind":"official","path":"torchdeq/loss/jacobian.py","file_url":"https://github.com/locuslab/torchdeq/blob/HEAD/torchdeq/loss/jacobian.py","link_basis":"first_harvest_node","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":"e2bb819b499ea264"}},{"code_sha256_prefix":"454b51ab87ef1d00","entry":"simple_fixed_point_iter","repo":"locuslab/torchdeq","repo_kind":"official","path":"torchdeq/solver/fp_iter.py","file_url":"https://github.com/locuslab/torchdeq/blob/HEAD/torchdeq/solver/fp_iter.py","link_basis":"first_harvest_node","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":"454b51ab87ef1d00"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}