SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2210.07394 · NeurIPS · 2022

Efficiently Computing Local Lipschitz Constants of Neural Networks via Bound Propagation

Huan Zhang, Cho-Jui Hsieh, Zhouxing Shi, Yihan Wang, Zico Kolter

arXiv · PDF · Open in the Atlas

Code that ran

14 of 25 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 2 violated it and 4 have no contract verdict; 6 failures of our instrument; 11 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2210.07394.json · badge: /api/ran/2210.07394.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
verified-intelligence/auto_lirpa canonical (classifier label)
classifier basis: classifier_2025
9 ran · 4 no recorded run
shizhouxing/Local-Lipschitz-Constants canonical (classifier label)
classifier basis not recorded on the link
4 ran · 7 no recorded run
copy not recorded community
not in the paper's declared repositories
1 ran · 0 no recorded run
FunctionStatusWhere it lives
adult_mlp Ran
ran on a synthesized input
shizhouxing/Local-Lipschitz-Constants/models/adult.py
code served (permissive licence) · get_code("df0f1dc3ba92ec50")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Sequential. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    "in_dim": 10,
    "width": 512
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
concretize_bound Ran
ran; our contract draft was wrong, not the code
verified-intelligence/auto_lirpa/examples/vision/simple_verification.py
pointer only (licence: NOASSERTION) · get_code("f2689b948e0d82a5")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, verified-intelligence/auto_lirpa (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

create_valid_mask Ran
ran; our contract draft was wrong, not the code
verified-intelligence/auto_lirpa/auto_LiRPA/backward_bound.py
pointer only (licence: NOASSERTION) · get_code("9a5afe4bd80c5d43")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, verified-intelligence/auto_lirpa (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_unstable_size Ran
ran, honoured the contract we drafted
verified-intelligence/auto_lirpa/auto_LiRPA/backward_bound.py
pointer only (licence: NOASSERTION) · get_code("9cdadd9a266ee694")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, verified-intelligence/auto_lirpa (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_unstable_size Ran
ran, honoured the contract we drafted
this paper's copy was not recorded; identical code first harvested from Verified-Intelligence/alpha-beta-CROWN_vnncomp2024
pointer only; the stored copy get_code serves, from Verified-Intelligence/alpha-beta-CROWN_vnncomp2024, is pointer only (licence: NOASSERTION) · get_code("d5f02d6ed407b5ca")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

global_lip Ran
ran on a synthesized input
shizhouxing/Local-Lipschitz-Constants/global_lip.py
code served (permissive licence) · get_code("a5a70cc952c1052d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.fc1 = nn.Linear(4, 3)
        self.fc2 = nn.Linear(3, 2)
        self.bias_only = nn.Parameter(torch.randn(2))
        self.conv1d = nn.Conv1d(2, 3, kernel_size=2)
    
    def forward(self, x):
        return x

model = SimpleModel()

class Args:
    def __init__(self):
        self.norm = float('inf')

args = Args()

ARGS = {
    'model': model,
    'args': args
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
inplace_unfold Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
verified-intelligence/auto_lirpa/auto_LiRPA/backward_bound.py
pointer only (licence: NOASSERTION) · get_code("0e9219ecac67f26c")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, verified-intelligence/auto_lirpa (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

insert_zeros Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
verified-intelligence/auto_lirpa/auto_LiRPA/backward_bound.py
pointer only (licence: NOASSERTION) · get_code("f651cc9b3d2901ec")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, verified-intelligence/auto_lirpa (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

is_shape_used Ran
ran, violated the contract we drafted
verified-intelligence/auto_lirpa/auto_LiRPA/backward_bound.py
pointer only (licence: NOASSERTION) · get_code("7e1a351b56d6c037")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, verified-intelligence/auto_lirpa (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

mnist_cnn_4layer_8 Ran
ran on a synthesized input
shizhouxing/Local-Lipschitz-Constants/models/vision.py
code served (permissive licence) · get_code("d93193c2aae75058")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Sequential. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    "in_ch": 1,
    "in_dim": 1,
    "width": 16,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
patches_to_matrix Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
verified-intelligence/auto_lirpa/auto_LiRPA/backward_bound.py
pointer only (licence: NOASSERTION) · get_code("ccf2c48831f9ceae")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, verified-intelligence/auto_lirpa (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

pick_out_batch Ran
ran on a synthesized input
shizhouxing/Local-Lipschitz-Constants/branching_domains.py
code served (permissive licence) · get_code("06e0dde1eed031c3")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

class CandidateDomain:
    def __init__(self, lower_bound, valid, lA, lA_intermediate, uA_intermediate, lower_all, upper_all):
        self.lower_bound = lower_bound
        self.valid = valid
        self.lA = lA
        self.lA_intermediate = lA_intermediate
        self.uA_intermediate = uA_intermediate
        self.lower_all = lower_all
        self.upper_all = upper_all

# Create small tensors for lA, lA_intermediate, uA_intermediate
# Each is a list of tensors (one per layer)
lA_tensors = [torch.randn(2, 4), torch.randn(4, 3)]
lA_intermediate_tensors = [torch.randn(2, 4), torch.randn(4, 3)]
uA_intermediate_tensors = [torch.randn(2, 4), torch.randn(4, 3)]

# Create lower_all and upper_all (lists of bound tensors per domain)
lower_all_tensors = [torch.randn(5), torch.randn(6)]
upper_all_tensors = [torch.randn(5), torch.randn(6)]

# Create domains with lower_bound < threshold (0 by default)
domain1 = CandidateDomain(
    lower_bound=-0.5,
    valid=True,
    lA=lA_tensors,
    lA_intermediate=lA_intermediate_tensors,
    uA_intermediate=uA_intermediate_tensors,
    lower_all=lower_all_tensors,
    upper_all=upper_all_tensors
)

domain2 = CandidateDomain(
    lower_bound=-0.3,
    valid=True,
    lA=lA_tensors,
    lA_intermediate=lA_intermediate_tensors,
    uA_intermediate=uA_intermediate_tensors,
    lower_all=lower_all_tensors,
    upper_all=upper_all_tensors
)

domains = [domain1, domain2]

ARGS = {
    'domains': domains,
    'batch': 2,
    'intermediate': False,
    'threshold': 0,
    'device': 'cpu'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
remove_zeros Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
verified-intelligence/auto_lirpa/auto_LiRPA/backward_bound.py
pointer only (licence: NOASSERTION) · get_code("6e312527304e8f61")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, verified-intelligence/auto_lirpa (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

unify_shape Ran
ran, violated the contract we drafted
verified-intelligence/auto_lirpa/auto_LiRPA/backward_bound.py
pointer only (licence: NOASSERTION) · get_code("da2d98a9144edff0")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, verified-intelligence/auto_lirpa (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

Patches Not yet run
unverified (harvested, no recorded run)
verified-intelligence/auto_lirpa/auto_LiRPA/backward_bound.py
pointer only (licence: NOASSERTION) · get_code("c21c29ceab7623e0")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, verified-intelligence/auto_lirpa (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

add_domain_parallel Not yet run
unverified (harvested, no recorded run)
shizhouxing/Local-Lipschitz-Constants/branching_domains.py
code served (permissive licence) · get_code("2df8ebffff1adda7")
How it ran

no invocation recorded.

batched_backward Not yet run
unverified (harvested, no recorded run)
verified-intelligence/auto_lirpa/auto_LiRPA/backward_bound.py
pointer only (licence: NOASSERTION) · get_code("858a516d0fc767db")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, verified-intelligence/auto_lirpa (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

batched_backward Not yet run
unverified (harvested, no recorded run)
verified-intelligence/auto_lirpa/auto_LiRPA/backward_bound.py
pointer only (licence: NOASSERTION) · get_code("741b681a375f9086")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, verified-intelligence/auto_lirpa (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

load_data Not yet run
unverified (harvested, no recorded run)
shizhouxing/Local-Lipschitz-Constants/datasets.py
code served (permissive licence) · get_code("c6e0ca4669fe01e6")
How it ran

no invocation recorded.

merge_A Not yet run
unverified (harvested, no recorded run)
verified-intelligence/auto_lirpa/auto_LiRPA/backward_bound.py
pointer only (licence: NOASSERTION) · get_code("96c85df219532813")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, verified-intelligence/auto_lirpa (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

mnist_cnn_4layer Not yet run
unverified (harvested, no recorded run)
shizhouxing/Local-Lipschitz-Constants/models/vision.py
code served (permissive licence) · get_code("c46dac31a1eb0d97")
How it ran

no invocation recorded.

mnist_mlp_3layer Not yet run
unverified (harvested, no recorded run)
shizhouxing/Local-Lipschitz-Constants/models/vision.py
code served (permissive licence) · get_code("5ca3703080a824f9")
How it ran

no invocation recorded.

simple_cnn_3layer Not yet run
unverified (harvested, no recorded run)
shizhouxing/Local-Lipschitz-Constants/models/simple.py
code served (permissive licence) · get_code("f8c2a41b06c6022c")
How it ran

no invocation recorded.

simple_mlp_3layer Not yet run
unverified (harvested, no recorded run)
shizhouxing/Local-Lipschitz-Constants/models/simple.py
code served (permissive licence) · get_code("328f2eab4ffc3345")
How it ran

no invocation recorded.

simple_mlp_width32 Not yet run
unverified (harvested, no recorded run)
shizhouxing/Local-Lipschitz-Constants/models/simple.py
code served (permissive licence) · get_code("62b6a288e660a618")
How it ran

no invocation recorded.

Also present in other papers' code

Of 25 samples lifted from this paper's linked repositories, 25 carry a function identity and 0 do not. Of the 23 distinct functions with an identity, 11 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 0 the same month, 11 later) and 12 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
inplace_unfold
brick of this paper's assembly: helper
3 other papers
2 dated earlier, 1 later · 3 only as an assembly brick
2103.06624 (2021-03)
Beta-CROWN: Efficient Bound Propagation with Per-neuron Split Constraints for Neural Network Robustness Verification
2208.05740 (2022-08)
General Cutting Planes for Bound-Propagation-Based Neural Network Verification
2405.21063 (2024-05)
Neural Network Verification with Branch-and-Bound for General Nonlinearities
insert_zeros
brick of this paper's assembly: helper
3 other papers
2 dated earlier, 1 later · 3 only as an assembly brick
2103.06624 (2021-03)
Beta-CROWN: Efficient Bound Propagation with Per-neuron Split Constraints for Neural Network Robustness Verification
2208.05740 (2022-08)
General Cutting Planes for Bound-Propagation-Based Neural Network Verification
2405.21063 (2024-05)
Neural Network Verification with Branch-and-Bound for General Nonlinearities
is_shape_used
brick of this paper's assembly: helper
3 other papers
2 dated earlier, 1 later · 3 only as an assembly brick
2103.06624 (2021-03)
Beta-CROWN: Efficient Bound Propagation with Per-neuron Split Constraints for Neural Network Robustness Verification
2208.05740 (2022-08)
General Cutting Planes for Bound-Propagation-Based Neural Network Verification
2405.21063 (2024-05)
Neural Network Verification with Branch-and-Bound for General Nonlinearities
remove_zeros
brick of this paper's assembly: helper
3 other papers
2 dated earlier, 1 later · 3 only as an assembly brick
2103.06624 (2021-03)
Beta-CROWN: Efficient Bound Propagation with Per-neuron Split Constraints for Neural Network Robustness Verification
2208.05740 (2022-08)
General Cutting Planes for Bound-Propagation-Based Neural Network Verification
2405.21063 (2024-05)
Neural Network Verification with Branch-and-Bound for General Nonlinearities
unify_shape
brick of this paper's assembly: helper
3 other papers
2 dated earlier, 1 later · 3 only as an assembly brick
2103.06624 (2021-03)
Beta-CROWN: Efficient Bound Propagation with Per-neuron Split Constraints for Neural Network Robustness Verification
2208.05740 (2022-08)
General Cutting Planes for Bound-Propagation-Based Neural Network Verification
2405.21063 (2024-05)
Neural Network Verification with Branch-and-Bound for General Nonlinearities
get_unstable_size
brick of this paper's assembly: helper
2 other papers
1 dated earlier, 1 later
2011.13824 (2020-11)
Fast and Complete: Enabling Complete Neural Network Verification with Rapid and Massively Parallel Incomplete Verifiers
2405.21063 (2024-05)
Neural Network Verification with Branch-and-Bound for General Nonlinearities
Patches
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2405.21063 (2024-05)
Neural Network Verification with Branch-and-Bound for General Nonlinearities
batched_backward
brick of this paper's assembly: entry
1 other paper
1 later
2405.21063 (2024-05)
Neural Network Verification with Branch-and-Bound for General Nonlinearities
concretize_bound 1 other paper
1 later
2405.21063 (2024-05)
Neural Network Verification with Branch-and-Bound for General Nonlinearities
create_valid_mask
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2405.21063 (2024-05)
Neural Network Verification with Branch-and-Bound for General Nonlinearities
patches_to_matrix
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2405.21063 (2024-05)
Neural Network Verification with Branch-and-Bound for General Nonlinearities

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

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 ∞ 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.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2210.07394")
get_code_for_paper("2210.07394")
have("2210.07394")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2210.07394.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2210.07394.svg)](https://syntology.ai/paper/2210.07394)

Connect an agent — have() is free.