SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2310.00116 · NeurIPS · 2023

Certified Robustness via Dynamic Margin Maximization and Improved Lipschitz Regularization

Rama Chellappa, Mahyar Fazlyab, Taha Entesari, Aniket Roy

arXiv · PDF · Open in the Atlas

Code that ran

8 of 10 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 7 failures of our instrument; 2 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/2310.00116.json · badge: /api/ran/2310.00116.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
o4lc/CRM-LipLT canonical (classifier label)
classifier basis: census
7 ran · 1 no recorded run
o4lc/crm-liplt canonical (classifier label)
classifier basis: classifier_2025
1 ran · 1 no recorded run
FunctionStatusWhere it lives
GloRoLoss Ran
ran on a synthesized input · constructed an object; no result was computed
o4lc/crm-liplt/Losses/GloRo.py
code served (permissive licence) · get_code("458f7d49b22fe047")
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 an instance of its own class, GloRoLoss: the run constructed the object and did not call it, so no result was computed. 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
import wandb

# Initialize wandb in offline mode to avoid network issues
wandb.init(mode="disabled")

torch.manual_seed(0)

# Define ARGS dict with all parameters for GloRoLoss.__init__
ARGS = {
    'initialLambda': 0.5,
    'schedulerConfiguration': {
        'type': 'exponential',
        'schedulerCoefficient': 0.9,
        'maximumCoefficient': 1.0
    },
    'robustStartingEpoch': 0,
    'regularizeOnlyCorrectPredictions': True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, wandb — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type GloRoLoss — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a GloRoLoss 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
createGloroPerturbation Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
o4lc/CRM-LipLT/Utilities/Perturbations.py
code served (permissive licence) · get_code("5e67decdab795f5a")
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 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
import torch.nn as nn

torch.manual_seed(0)

# Analyze the function:
# - lipschitzConstants: needs .T attribute (transpose), .shape attribute, .repeat() method, indexing with [correctLabels, :]
#   The function checks len(lipschitzConstants.shape) for 0, 2, or other values
# - batchSize: an integer used in .repeat(batchSize, 1)
# - correctLabels: used for indexing lipschitzConstants[correctLabels, :]
# - eps: a scalar multiplied with perturbation

# Test case 1: len(lipschitzConstants.shape) == 2 and lipschitzConstants.shape[1] == 1
# This is a safe middle case that exercises the second conditional

batchSize = 2
numClasses = 4

# Create lipschitzConstants as a 2D tensor with shape (numClasses, 1)
# So lipschitzConstants.T will be (1, numClasses)
lipschitzConstants = torch.randn(numClasses, 1)

# correctLabels: indices into the first dimension of lipschitzConstants
correctLabels = torch.tensor([0, 2])

# eps: a scalar
eps = 0.1

ARGS = {
    "lipschitzConstants": lipschitzConstants,
    "batchSize": batchSize,
    "correctLabels": correctLabels,
    "eps": eps,
}
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 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
createLmtPerturbation Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
o4lc/CRM-LipLT/Utilities/Perturbations.py
code served (permissive licence) · get_code("711f53f08fe70e79")
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 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)

# Test case 1: 1D lipschitzConstants (len(shape) < 2)
batchSize = 2
numberOfClasses = 4
correctLabels = torch.tensor([0, 2])
eps = 0.1
lipschitzConstants = torch.tensor([0.5, 0.3, 0.4, 0.6])

ARGS = {
    "lipschitzConstants": lipschitzConstants,
    "batchSize": batchSize,
    "numberOfClasses": numberOfClasses,
    "correctLabels": correctLabels,
    "eps": eps
}
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 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
createScheduler Ran
ran; our contract draft was wrong, not the code
o4lc/CRM-LipLT/Utilities/Schedulers.py
code served (permissive licence) · get_code("6137815a7ee997de")
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 ExponentialLRWithStopping. 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
import torch.optim as optim

torch.manual_seed(0)

# Create a simple model
model = nn.Sequential(
    nn.Linear(4, 8),
    nn.ReLU(),
    nn.Linear(8, 2)
)

# Create an optimizer
optimizer = optim.SGD(model.parameters(), lr=0.1)

# Define scheduler configurations for different types
scheduler_config_exponential_with_stopping = {
    'type': 'exponentialWithStopping',
    'gamma': 0.95,
    'startingEpoch': 0,
    'endingEpoch': 100,
    'leastLearningRate': 1e-6,
    'last_epoch': -1,
    'verbose': False
}

scheduler_config_exponential = {
    'type': 'exponential',
    'gamma': 0.9
}

scheduler_config_exponential_with_restarting = {
    'type': 'exponentialWithRestarting',
    'gamma': 0.9,
    'restartingEpochs': [50, 100, 150],
    'leastLearningRate': 1e-6,
    'last_epoch': -1,
    'verbose': False
}

scheduler_config_plateau = {
    'type': 'plateau',
    'gamma': 0.5,
    'leastLearningRate': 1e-6
}

ARGS = {
    'schedulerConfiguration': scheduler_config_exponential_with_stopping,
    'optimizer': optimizer
}
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 ExponentialLRWithStopping — a ExponentialLRWithStopping output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ExponentialLRWithStopping 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
getCriterionConfiguration Ran
ran; our contract draft was wrong, not the code
o4lc/CRM-LipLT/Losses/LossConfigurations.py
code served (permissive licence) · get_code("7e0f0616b4835dd6")
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
import torch.nn as nn

torch.manual_seed(0)

class Args:
    def __init__(self):
        # For 'standard' criterion - no additional args needed
        
        # For 'GloRo' criterion
        self.maxEpoch = 100
        self.gloroInitialLambda = 0.1
        self.robustStartingEpoch = 10
        
        # For 'LMT' criterion
        self.lmtInitialLambda = 0.01
        self.lmtLambdaGamma = 0.95
        self.lmtMaximumLambda = 1.0
        
        # For 'certifiedRadiusMaximization' criterion
        self.radiusMaximizationInitialLambda = 0.05
        self.radiusMaximizationLambdaGamma = 0.9
        self.radiusMaximizationMaximumLambda = 2.0
        self.radiusMaximizationMinimumLambda = 0.01
        self.radiusMaximizationAlpha = 0.5
        self.radiusMaximizationMaximumPenalizingRadius = 1.5
        self.radiusMaximizationMaximumPenalizingRadiusGamma = 0.98
        self.radiusMaximizationMaximumPenalizingRadiusMaximumValue = 3.0
        self.numberOfClasses = 10
        self.radiusMaximizationCrossEntropyType = 'standard'
        self.radiusMaximizationRobustLossType = 'cross_entropy'

ARGS = {
    'criterionName': 'GloRo',
    '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 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
getNetworkArchitecture Ran
ran; our contract draft was wrong, not the code
o4lc/CRM-LipLT/Networks/NetworkArchitectures.py
code served (permissive licence) · get_code("fbb931d71e0437d3")
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 list. 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)

# The function getNetworkArchitecture takes architectureName as a parameter
# and returns a layers list based on the architecture name.
# It doesn't actually use the parameter beyond string matching,
# so we just need to pass a valid architecture name string.

ARGS = {
    'architectureName': '3F'
}
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 list — a list 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
getSchedulerConfiguration Ran
ran; our contract draft was wrong, not the code
o4lc/CRM-LipLT/Utilities/Schedulers.py
code served (permissive licence) · get_code("0caba4e24fca01e3")
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
import torch.nn as nn

# Create a minimal args object with required attributes
class Args:
    def __init__(self):
        self.maxEpoch = 500
        self.learningRateDecayEpoch = 100
        self.smallestLearningRate = 1e-6

# Define ARGS dictionary with all parameters
ARGS = {
    'schedulerName': 'exponentialWithStopping',
    'args': Args(),
    'kwargs': {}
}
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
modifyOutputForVerifiedAccuracy Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
o4lc/CRM-LipLT/Utilities/Perturbations.py
code served (permissive licence) · get_code("9b26107834bb9dda")
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 2, dtype family float, shape (2, 5) 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 numpy as np

torch.manual_seed(0)

# Create small tensors for testing
batch_size = 2
num_classes = 4

# output: logits tensor of shape (batch_size, num_classes)
output = torch.randn(batch_size, num_classes)

# perturbation: tensor of same shape as output for adversarial perturbation
perturbation = torch.randn(batch_size, num_classes)

# correctLabels: ground truth labels of shape (batch_size,)
correct_labels = torch.tensor([1, 2])

# regularizeOnlyIfCorrectlyClassified: boolean flag
regularize_only_if_correct = True

ARGS = {
    "output": output,
    "perturbation": perturbation,
    "batchSize": batch_size,
    "correctLabels": correct_labels,
    "regularizeOnlyIfCorrectlyClassified": regularize_only_if_correct
}
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 Tensor, ndim 2, dtype family float, shape (2, 5) — shape (2, 5) 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
Criterion Not yet run
unverified (harvested, no recorded run)
o4lc/crm-liplt/Losses/GloRo.py
code served (permissive licence) · get_code("1a311dbca0ad5db0")
How it ran

no invocation recorded.

createNetwork Not yet run
unverified (harvested, no recorded run)
o4lc/CRM-LipLT/Networks/NetworkArchitectures.py
code served (permissive licence) · get_code("05113d09307a2d34")
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, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 10 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.

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

To improve the robustness of deep classifiers against adversarial perturbations, many approaches have been proposed, such as designing new architectures with better robustness properties (e.g., Lipschitz-capped networks), or modifying the training process itself (e.g., min-max optimization, constrained learning, or regularization). These approaches, however, might not be effective at increasing the margin in the input (feature) space. In this paper, we propose a differentiable regularizer that is a lower bound on the distance of the data points to the classification boundary. The proposed regularizer requires knowledge of the model's Lipschitz constant along certain directions. To this end, we develop a scalable method for calculating guaranteed differentiable upper bounds on the Lipschitz constant of neural networks accurately and efficiently. The relative accuracy of the bounds prevents excessive regularization and allows for more direct manipulation of the decision boundary. Furthermore, our Lipschitz bounding algorithm exploits the monotonicity and Lipschitz continuity of the activation layers, and the resulting bounds can be used to design new layers with controllable bounds on their Lipschitz constant. Experiments on the MNIST, CIFAR-10, and Tiny-ImageNet data sets verify that our proposed algorithm obtains competitively improved results compared to the state-of-the-art.

For agents

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

get_harvested_code_for_paper("2310.00116")
get_code_for_paper("2310.00116")
have("2310.00116")

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

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

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

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

Connect an agent — have() is free.