{"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/efficiently-computing-local-lipschitz","title":"Efficiently Computing Local Lipschitz Constants of Neural Networks via Bound Propagation","arxiv_id":"2210.07394","date":"2022-10-13","proceeding":null,"authors":["Zhouxing Shi","Yihan Wang","huan zhang","Zico Kolter","Cho-Jui Hsieh"],"abstract":"Lipschitz constants are connected to many properties of neural networks, such as robustness, fairness, and generalization. Existing methods for computing Lipschitz constants either produce relatively loose upper bounds or are limited to small networks. In this paper, we develop an efficient framework for computing the $\\ell_\\infty$ local Lipschitz constant of a neural network by tightly upper bounding the norm of Clarke Jacobian via linear bound propagation. We formulate the computation of local Lipschitz constants with a linear bound propagation process on a high-order backward graph induced by the chain rule of Clarke Jacobian. To enable linear bound propagation, we derive tight linear relaxations for specific nonlinearities in Clarke Jacobian. This formulate unifies existing ad-hoc approaches such as RecurJac, which can be seen as a special case of ours with weaker relaxations. The bound propagation framework also allows us to easily borrow the popular Branch-and-Bound (BaB) approach from neural network verification to further tighten Lipschitz constants. Experiments show that on tiny models, our method produces comparable bounds compared to exact methods that cannot scale to slightly larger models; on larger models, our method efficiently produces tighter results than existing relaxed or naive methods, and our method scales to much larger practical models that previous works could not handle. We also demonstrate an application on provable monotonicity analysis. Code is available at https://github.com/shizhouxing/Local-Lipschitz-Constants.","url_abs":"https://arxiv.org/abs/2210.07394v1","url_pdf":"https://arxiv.org/pdf/2210.07394v1.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":"efficiently-computing-local-lipschitz","repo_url":"https://github.com/shizhouxing/local-lipschitz-constants","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"BSD-3-Clause"}},{"paper_slug":"efficiently-computing-local-lipschitz","repo_url":"https://github.com/verified-intelligence/auto_lirpa","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"NOASSERTION"}}],"tasks":[{"task_slug":"fairness","task_name":"Fairness"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2210.07394","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2210.07394"}},"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/shizhouxing/Local-Lipschitz-Constants","reach":{"status":"ok","spdx":"BSD-3-Clause"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/Verified-Intelligence/auto_LiRPA","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/Verified-Intelligence/alpha-beta-CROWN","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/verified-intelligence/auto_lirpa","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/shizhouxing/local-lipschitz-constants","reach":{"status":"ok","spdx":"BSD-3-Clause"}}],"summary":{"ran_draft_wrong":2,"ran_honours":2,"ran_fixture":4,"ran_violates":2,"unverified":15},"by_repo_kind":{"official":{"samples":24,"ran":9,"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":14,"samples":[{"code_sha256_prefix":"f2689b948e0d82a5","entry":"concretize_bound","repo":"verified-intelligence/auto_lirpa","repo_kind":"official","path":"examples/vision/simple_verification.py","file_url":"https://github.com/verified-intelligence/auto_lirpa/blob/HEAD/examples/vision/simple_verification.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":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"f2689b948e0d82a5"}},{"code_sha256_prefix":"9a5afe4bd80c5d43","entry":"create_valid_mask","repo":"verified-intelligence/auto_lirpa","repo_kind":"official","path":"auto_LiRPA/backward_bound.py","file_url":"https://github.com/verified-intelligence/auto_lirpa/blob/HEAD/auto_LiRPA/backward_bound.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"9a5afe4bd80c5d43"}},{"code_sha256_prefix":"9cdadd9a266ee694","entry":"get_unstable_size","repo":"verified-intelligence/auto_lirpa","repo_kind":"official","path":"auto_LiRPA/backward_bound.py","file_url":"https://github.com/verified-intelligence/auto_lirpa/blob/HEAD/auto_LiRPA/backward_bound.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"9cdadd9a266ee694"}},{"code_sha256_prefix":"d5f02d6ed407b5ca","entry":"get_unstable_size","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"d5f02d6ed407b5ca"}},{"code_sha256_prefix":"0e9219ecac67f26c","entry":"inplace_unfold","repo":"verified-intelligence/auto_lirpa","repo_kind":"official","path":"auto_LiRPA/backward_bound.py","file_url":"https://github.com/verified-intelligence/auto_lirpa/blob/HEAD/auto_LiRPA/backward_bound.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"0e9219ecac67f26c"}},{"code_sha256_prefix":"f651cc9b3d2901ec","entry":"insert_zeros","repo":"verified-intelligence/auto_lirpa","repo_kind":"official","path":"auto_LiRPA/backward_bound.py","file_url":"https://github.com/verified-intelligence/auto_lirpa/blob/HEAD/auto_LiRPA/backward_bound.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"f651cc9b3d2901ec"}},{"code_sha256_prefix":"7e1a351b56d6c037","entry":"is_shape_used","repo":"verified-intelligence/auto_lirpa","repo_kind":"official","path":"auto_LiRPA/backward_bound.py","file_url":"https://github.com/verified-intelligence/auto_lirpa/blob/HEAD/auto_LiRPA/backward_bound.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"7e1a351b56d6c037"}},{"code_sha256_prefix":"ccf2c48831f9ceae","entry":"patches_to_matrix","repo":"verified-intelligence/auto_lirpa","repo_kind":"official","path":"auto_LiRPA/backward_bound.py","file_url":"https://github.com/verified-intelligence/auto_lirpa/blob/HEAD/auto_LiRPA/backward_bound.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"ccf2c48831f9ceae"}},{"code_sha256_prefix":"6e312527304e8f61","entry":"remove_zeros","repo":"verified-intelligence/auto_lirpa","repo_kind":"official","path":"auto_LiRPA/backward_bound.py","file_url":"https://github.com/verified-intelligence/auto_lirpa/blob/HEAD/auto_LiRPA/backward_bound.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"6e312527304e8f61"}},{"code_sha256_prefix":"da2d98a9144edff0","entry":"unify_shape","repo":"verified-intelligence/auto_lirpa","repo_kind":"official","path":"auto_LiRPA/backward_bound.py","file_url":"https://github.com/verified-intelligence/auto_lirpa/blob/HEAD/auto_LiRPA/backward_bound.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"da2d98a9144edff0"}},{"code_sha256_prefix":"c21c29ceab7623e0","entry":"Patches","repo":"verified-intelligence/auto_lirpa","repo_kind":"official","path":"auto_LiRPA/backward_bound.py","file_url":"https://github.com/verified-intelligence/auto_lirpa/blob/HEAD/auto_LiRPA/backward_bound.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"c21c29ceab7623e0"}},{"code_sha256_prefix":"2df8ebffff1adda7","entry":"add_domain_parallel","repo":"shizhouxing/Local-Lipschitz-Constants","repo_kind":"official","path":"branching_domains.py","file_url":"https://github.com/shizhouxing/Local-Lipschitz-Constants/blob/HEAD/branching_domains.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"2df8ebffff1adda7"}},{"code_sha256_prefix":"df0f1dc3ba92ec50","entry":"adult_mlp","repo":"shizhouxing/Local-Lipschitz-Constants","repo_kind":"official","path":"models/adult.py","file_url":"https://github.com/shizhouxing/Local-Lipschitz-Constants/blob/HEAD/models/adult.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"df0f1dc3ba92ec50"}},{"code_sha256_prefix":"858a516d0fc767db","entry":"batched_backward","repo":"verified-intelligence/auto_lirpa","repo_kind":"official","path":"auto_LiRPA/backward_bound.py","file_url":"https://github.com/verified-intelligence/auto_lirpa/blob/HEAD/auto_LiRPA/backward_bound.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"858a516d0fc767db"}},{"code_sha256_prefix":"741b681a375f9086","entry":"batched_backward","repo":"verified-intelligence/auto_lirpa","repo_kind":"official","path":"auto_LiRPA/backward_bound.py","file_url":"https://github.com/verified-intelligence/auto_lirpa/blob/HEAD/auto_LiRPA/backward_bound.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"741b681a375f9086"}},{"code_sha256_prefix":"a5a70cc952c1052d","entry":"global_lip","repo":"shizhouxing/Local-Lipschitz-Constants","repo_kind":"official","path":"global_lip.py","file_url":"https://github.com/shizhouxing/Local-Lipschitz-Constants/blob/HEAD/global_lip.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"a5a70cc952c1052d"}},{"code_sha256_prefix":"c6e0ca4669fe01e6","entry":"load_data","repo":"shizhouxing/Local-Lipschitz-Constants","repo_kind":"official","path":"datasets.py","file_url":"https://github.com/shizhouxing/Local-Lipschitz-Constants/blob/HEAD/datasets.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"c6e0ca4669fe01e6"}},{"code_sha256_prefix":"96c85df219532813","entry":"merge_A","repo":"verified-intelligence/auto_lirpa","repo_kind":"official","path":"auto_LiRPA/backward_bound.py","file_url":"https://github.com/verified-intelligence/auto_lirpa/blob/HEAD/auto_LiRPA/backward_bound.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"96c85df219532813"}},{"code_sha256_prefix":"c46dac31a1eb0d97","entry":"mnist_cnn_4layer","repo":"shizhouxing/Local-Lipschitz-Constants","repo_kind":"official","path":"models/vision.py","file_url":"https://github.com/shizhouxing/Local-Lipschitz-Constants/blob/HEAD/models/vision.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"c46dac31a1eb0d97"}},{"code_sha256_prefix":"d93193c2aae75058","entry":"mnist_cnn_4layer_8","repo":"shizhouxing/Local-Lipschitz-Constants","repo_kind":"official","path":"models/vision.py","file_url":"https://github.com/shizhouxing/Local-Lipschitz-Constants/blob/HEAD/models/vision.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"d93193c2aae75058"}},{"code_sha256_prefix":"5ca3703080a824f9","entry":"mnist_mlp_3layer","repo":"shizhouxing/Local-Lipschitz-Constants","repo_kind":"official","path":"models/vision.py","file_url":"https://github.com/shizhouxing/Local-Lipschitz-Constants/blob/HEAD/models/vision.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"5ca3703080a824f9"}},{"code_sha256_prefix":"06e0dde1eed031c3","entry":"pick_out_batch","repo":"shizhouxing/Local-Lipschitz-Constants","repo_kind":"official","path":"branching_domains.py","file_url":"https://github.com/shizhouxing/Local-Lipschitz-Constants/blob/HEAD/branching_domains.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"06e0dde1eed031c3"}},{"code_sha256_prefix":"f8c2a41b06c6022c","entry":"simple_cnn_3layer","repo":"shizhouxing/Local-Lipschitz-Constants","repo_kind":"official","path":"models/simple.py","file_url":"https://github.com/shizhouxing/Local-Lipschitz-Constants/blob/HEAD/models/simple.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"f8c2a41b06c6022c"}},{"code_sha256_prefix":"328f2eab4ffc3345","entry":"simple_mlp_3layer","repo":"shizhouxing/Local-Lipschitz-Constants","repo_kind":"official","path":"models/simple.py","file_url":"https://github.com/shizhouxing/Local-Lipschitz-Constants/blob/HEAD/models/simple.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"328f2eab4ffc3345"}},{"code_sha256_prefix":"62b6a288e660a618","entry":"simple_mlp_width32","repo":"shizhouxing/Local-Lipschitz-Constants","repo_kind":"official","path":"models/simple.py","file_url":"https://github.com/shizhouxing/Local-Lipschitz-Constants/blob/HEAD/models/simple.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"62b6a288e660a618"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}