SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2311.16833 · 2023

1-Lipschitz Layers Compared: Memory, Speed, and Certifiable Robustness

arXiv · PDF · Open in the Atlas

Code that ran

7 of 10 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 6 failures of our instrument; 3 no recorded run), measured 2026-11-23; 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/2311.16833.json · badge: /api/ran/2311.16833.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
berndprach/1lipschitzlayerscompared canonical (classifier label)
classifier basis: census
7 ran · 3 no recorded run
FunctionStatusWhere it lives
dump_yaml Ran
ran; our contract draft was wrong, not the code
berndprach/1lipschitzlayerscompared/make_tree.py
code served (permissive licence) · get_code("70073c38af486064")
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 str. 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 yaml

def dump_yaml(kwargs, indent_level=0):
    template = ''
    for line in yaml.dump(kwargs).split('\n'):
        template += ' ' * indent_level + line + '\n'
    return template


# The function takes a dict (kwargs) and an indent_level (int)
# It calls yaml.dump(kwargs) which requires kwargs to be a dict-like object
# and yaml.dump returns a string which is then split and formatted

ARGS = {
    'kwargs': {
        'model_name': 'bert-base',
        'batch_size': 32,
        'learning_rate': 0.001,
        'layers': [64, 128, 256],
        'enabled': True,
        'timeout': None
    },
    'indent_level': 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
yaml — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 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
epoch_budget_estimator Ran
ran, honoured the contract we drafted
berndprach/1lipschitzlayerscompared/epoch_budget_estimator.py
code served (permissive licence) · get_code("54e35f4bb46d953b")
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 int, ndim 0, dtype family int, 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
from torch.utils.data import DataLoader, TensorDataset
import numpy as np

torch.manual_seed(0)

# Create a simple model
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.fc1 = nn.Linear(4, 8)
        self.fc2 = nn.Linear(8, 3)
    
    def forward(self, x):
        x = torch.relu(self.fc1(x))
        x = self.fc2(x)
        return x

# Create tiny dataset
X = torch.randn(6, 4)
y = torch.randint(0, 3, (6,))
dataset = TensorDataset(X, y)
data_loader = DataLoader(dataset, batch_size=2)

# Create model and device
model = SimpleModel()
device = torch.device('cpu')

# Set parameters
training_time = 0.1  # 0.1 hours (very small for testing)
num_iters = 4

ARGS = {
    'model': model,
    'device': device,
    'training_time': training_time,
    'data_loader': data_loader,
    'num_iters': num_iters
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, 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
get_header Ran
ran; our contract draft was wrong, not the code
berndprach/1lipschitzlayerscompared/make_tree.py
code served (permissive licence) · get_code("8402ea08ee6f7913")
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 str. 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 numpy as np

torch.manual_seed(0)

# The function uses dataset['name'] and mode as strings
# dataset needs to be a dict with at least a 'name' key
dataset = {
    'name': 'CIFAR10'
}

mode = 'training'

ARGS = {
    'dataset': dataset,
    'mode': mode
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 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
get_model Ran
ran; our contract draft was wrong, not the code
berndprach/1lipschitzlayerscompared/make_tree.py
code served (permissive licence) · get_code("019bfa57926026d3")
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 str. 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 yaml

torch.manual_seed(0)

ARGS = {
    'model_id': 'test_model_001',
    'get_conv': 'Conv2d',
    'get_linear': 'Linear',
    'get_conv_first': 'Conv2d',
    'get_conv_head': 'Conv2d',
    'extra_param1': 42,
    'extra_param2': 'some_value',
    'nested_config': {
        'learning_rate': 0.001,
        'batch_size': 32
    }
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, yaml — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 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
get_url_models Ran
ran; our contract draft was wrong, not the code
berndprach/1lipschitzlayerscompared/lipnn/lip_conv_net.py
code served (permissive licence) · get_code("fb14504d4d3d6ae1")
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 str. 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

LAYERS_DICT = dict(cpl='CPLConv2d', aol='AOLConv2d', bcop='BCOP', cayley='CayleyConv', lot='LOT', sll='SLLConv2d', soc='SOC', eco='ECO')

def get_url_models(model_id: str, dataset: str, layer_id: str) -> str:
    base_url = 'https://github.com/berndprach/1LipschitzLayersCompared/releases/download/weights'
    translate_model_dict = dict(lipnetXS='ConvNetXS', lipnetS='ConvNetS', lipnetM='ConvNetM', lipnetL='ConvNetL', t_lipnetXS='TConvNetXS', t_lipnetS='TConvNetS', t_lipnetM='TConvNetM', t_lipnetL='TConvNetL')
    _model_id = translate_model_dict[model_id]
    _layer_id = LAYERS_DICT[layer_id]
    _dataset = dataset.upper()
    path = f'{_dataset}_final_training_24h_{_model_id}_{_layer_id}.pth'
    return f'{base_url}/{path}'

ARGS = {
    'model_id': 'lipnetXS',
    'dataset': 'cifar10',
    'layer_id': 'cpl',
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 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
tensor2numpy Ran
ran; our contract draft was wrong, not the code
berndprach/1lipschitzlayerscompared/trainer/train_module.py
code served (permissive licence) · get_code("1cb7369440b6a2f9")
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 ndarray, ndim 2, dtype family float, shape (2, 4) 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

torch.manual_seed(0)

# Create a small tensor for testing
tensor = torch.randn(2, 4)

ARGS = {
    "tensor": tensor
}
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 ndarray, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) 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
update_layers_dict Ran
ran; our contract draft was wrong, not the code
berndprach/1lipschitzlayerscompared/epoch_budget_estimator.py
code served (permissive licence) · get_code("f87136d16621a162")
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 dict. 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

torch.manual_seed(0)

# Construct valid arguments for update_layers_dict
# The function takes two Dict[str, dict] parameters and merges new_dict into old_dict

old_dict = {
    "layer1": {"weight": torch.randn(4, 3), "bias": torch.randn(4)},
    "layer2": {"weight": torch.randn(3, 2), "activation": "relu"}
}

new_dict = {
    "layer1": {"bias": torch.randn(4), "extra": "param"},
    "layer3": {"weight": torch.randn(2, 5), "bias": torch.randn(2)}
}

ARGS = {
    "old_dict": old_dict,
    "new_dict": new_dict
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 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
conv_net Not yet run
unverified (harvested, no recorded run)
berndprach/1lipschitzlayerscompared/models/simplified_conv_net.py
code served (permissive licence) · get_code("d01cf17f6047ced1")
How it ran

no invocation recorded.

get_layers Not yet run
unverified (harvested, no recorded run)
berndprach/1lipschitzlayerscompared/models/simplified_conv_net.py
code served (permissive licence) · get_code("c7c9cb838427bef2")
How it ran

no invocation recorded.

load_eco_weights Not yet run
unverified (harvested, no recorded run)
berndprach/1lipschitzlayerscompared/plot_lipschitz_constant.py
code served (permissive licence) · get_code("ed1b102ff4cb8bb8")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 10 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 10 later) and 0 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
conv_net 1 other paper
1 later
Prach_1-Lipschitz_Layers_Compared_Memory_Speed_and_Certifiable_Robustness_CVPR_2024_paper (2024 (year only))
-Lipschitz Layers Compared: Memory, Speed, and Certifiable Robustness
dump_yaml 1 other paper
1 later
Prach_1-Lipschitz_Layers_Compared_Memory_Speed_and_Certifiable_Robustness_CVPR_2024_paper (2024 (year only))
-Lipschitz Layers Compared: Memory, Speed, and Certifiable Robustness
epoch_budget_estimator 1 other paper
1 later
Prach_1-Lipschitz_Layers_Compared_Memory_Speed_and_Certifiable_Robustness_CVPR_2024_paper (2024 (year only))
-Lipschitz Layers Compared: Memory, Speed, and Certifiable Robustness
get_header 1 other paper
1 later
Prach_1-Lipschitz_Layers_Compared_Memory_Speed_and_Certifiable_Robustness_CVPR_2024_paper (2024 (year only))
-Lipschitz Layers Compared: Memory, Speed, and Certifiable Robustness
get_layers 1 other paper
1 later
Prach_1-Lipschitz_Layers_Compared_Memory_Speed_and_Certifiable_Robustness_CVPR_2024_paper (2024 (year only))
-Lipschitz Layers Compared: Memory, Speed, and Certifiable Robustness
get_model 1 other paper
1 later
Prach_1-Lipschitz_Layers_Compared_Memory_Speed_and_Certifiable_Robustness_CVPR_2024_paper (2024 (year only))
-Lipschitz Layers Compared: Memory, Speed, and Certifiable Robustness
get_url_models 1 other paper
1 later
Prach_1-Lipschitz_Layers_Compared_Memory_Speed_and_Certifiable_Robustness_CVPR_2024_paper (2024 (year only))
-Lipschitz Layers Compared: Memory, Speed, and Certifiable Robustness
load_eco_weights 1 other paper
1 later
Prach_1-Lipschitz_Layers_Compared_Memory_Speed_and_Certifiable_Robustness_CVPR_2024_paper (2024 (year only))
-Lipschitz Layers Compared: Memory, Speed, and Certifiable Robustness
tensor2numpy 1 other paper
1 later
Prach_1-Lipschitz_Layers_Compared_Memory_Speed_and_Certifiable_Robustness_CVPR_2024_paper (2024 (year only))
-Lipschitz Layers Compared: Memory, Speed, and Certifiable Robustness
update_layers_dict 1 other paper
1 later
Prach_1-Lipschitz_Layers_Compared_Memory_Speed_and_Certifiable_Robustness_CVPR_2024_paper (2024 (year only))
-Lipschitz Layers Compared: Memory, Speed, and Certifiable Robustness

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

Repositories linked to this paper

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

Abstract

The robustness of neural networks against input perturbations with bounded magnitude represents a serious concern in the deployment of deep learning models in safety-critical systems. Recently, the scientific community has focused on enhancing certifiable robustness guarantees by crafting 1-Lipschitz neural networks that leverage Lipschitz bounded dense and convolutional layers. Although different methods have been proposed in the literature to achieve this goal, understanding the performance of such methods is not straightforward, since different metrics can be relevant (e.g., training time, memory usage, accuracy, certifiable robustness) for different applications. For this reason, this work provides a thorough theoretical and empirical comparison between methods by evaluating them in terms of memory usage, speed, and certifiable robust accuracy. The paper also provides some guidelines and recommendations to support the user in selecting the methods that work best depending on the available resources. We provide code at https://github.com/berndprach/1LipschitzLayersCompared.

For agents

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

get_harvested_code_for_paper("2311.16833")
get_code_for_paper("2311.16833")
have("2311.16833")

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

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

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

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

Connect an agent — have() is free.