SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2008.06081 · 2020

Adversarial Training and Provable Robustness: A Tale of Two Objectives

arXiv · PDF · Open in the Atlas

Code that ran

11 of 14 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; 0 honoured the contract we drafted, 2 violated it and 9 have no contract verdict; 0 failures of our instrument; 3 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/2008.06081.json · badge: /api/ran/2008.06081.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
JmfanBU/AdvIBP canonical (classifier label)
classifier basis: census
11 ran · 3 no recorded run
FunctionStatusWhere it lives
flat_grad Ran
ran on a synthesized input
JmfanBU/AdvIBP/IBP_Adv_Training/torch/flat_grad.py
code served (permissive licence) · get_code("f89badf903725d22")
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 1, dtype family float, shape (12,) 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.autograd import grad

torch.manual_seed(0)

# Create a minimal model
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

# Instantiate model
model = SimpleModel()

# Create a small input tensor and target
x = torch.randn(2, 4)
y = torch.randn(2, 3)

# Forward pass to compute loss
output = model(x)
loss = nn.MSELoss()(output, y)

# Construct ARGS dict
ARGS = {
    "model": model,
    "loss": loss
}
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 1, dtype family float, shape (12,) — shape (12,) 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_file_close Ran
ran on a synthesized input
JmfanBU/AdvIBP/IBP_Adv_Training/utils/config.py
code served (permissive licence) · get_code("89e7fb1ddfe31384")
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 tempfile
import os

# Create a temporary directory for test files
temp_dir = tempfile.mkdtemp()

# Create some dummy files to match the glob patterns
test_filename_base = os.path.join(temp_dir, "test_model")

# Create test files with different extensions and patterns
open(test_filename_base + ".pkl", "w").close()
open(test_filename_base + ".best.pkl", "w").close()
open(test_filename_base + ".last.pkl", "w").close()

ARGS = {
    "filename": test_filename_base,
    "ext": "pkl",
    "load": True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — 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_stats Ran
ran on a synthesized input
JmfanBU/AdvIBP/IBP_Adv_Training/utils/datasets.py
code served (permissive licence) · get_code("1692f72216960bf3")
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, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 simple data loader
# The function expects an iterable of (images, labels) tuples
# It accesses: images.size(0), images.size(1), images.size(2), images.size(3)
# and iterates twice over loader, accessing len(loader.dataset)

class SimpleDataset:
    def __init__(self, num_samples=2):
        self.num_samples = num_samples
        # Create images: (batch_size, channels, height, width) = (2, 3, 4, 5)
        self.images = torch.randn(num_samples, 3, 4, 5)
        self.labels = torch.zeros(num_samples)
    
    def __len__(self):
        return self.num_samples
    
    def __getitem__(self, idx):
        return self.images[idx:idx+1], self.labels[idx:idx+1]

class SimpleDataLoader:
    def __init__(self, dataset, batch_size=1):
        self.dataset = dataset
        self.batch_size = batch_size
    
    def __iter__(self):
        for i in range(len(self.dataset)):
            yield self.dataset[i]
    
    def __len__(self):
        return len(self.dataset)

# Create dataset and loader
dataset = SimpleDataset(num_samples=2)
loader = SimpleDataLoader(dataset, batch_size=1)

ARGS = {
    "loader": loader
}
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, ndim 2, dtype family float — a tuple output has no array shape of its own; none is stated
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
intermediate_eps Ran
ran on a synthesized input
JmfanBU/AdvIBP/IBP_Adv_Training/torch/training.py
code served (permissive licence) · get_code("731a25439ed3d809")
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. 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)

# Build a minimal eps_scheduler that has init_value and final_value attributes
class EpsScheduler:
    def __init__(self):
        self.init_value = None
        self.final_value = None

eps_scheduler = EpsScheduler()

# Create small tensors for layer_ub and layer_lb
# Using distinct dimensions: batch=2, features=4
layer_ub = torch.tensor([[1.0, 2.0, 3.0, 4.0],
                         [5.0, 6.0, 7.0, 8.0]])

layer_lb = torch.tensor([[0.5, 1.0, 1.5, 2.0],
                         [2.5, 3.0, 3.5, 4.0]])

ARGS = {
    "eps_scheduler": eps_scheduler,
    "layer_ub": layer_ub,
    "layer_lb": layer_lb
}
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 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
intermediate_eps Ran
ran on a synthesized input
JmfanBU/AdvIBP/IBP_Adv_Training/torch/warm_up_training.py
code served (permissive licence) · get_code("5c48d9a294f12f68")
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, ndim 3, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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)

# The function intermediate_eps takes layer_ub and layer_lb
# It performs arithmetic operations on them: addition, subtraction, division, abs()
# These should be tensors that support these operations

# Create small tensors with distinct shapes (batch=2, features=4)
layer_ub = torch.randn(2, 4)
layer_lb = torch.randn(2, 4)

ARGS = {
    "layer_ub": layer_ub,
    "layer_lb": layer_lb,
}
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, ndim 3, dtype family float — a tuple output has no array shape of its own; none is stated
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
isfloat Ran
ran, violated the contract we drafted
JmfanBU/AdvIBP/IBP_Adv_Training/utils/argparser.py
code served (permissive licence) · get_code("2f8e524a282482b9")
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) and returned bool, 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

torch.manual_seed(0)

ARGS = {
    "value": "3.14"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, 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
isint Ran
ran, violated the contract we drafted
JmfanBU/AdvIBP/IBP_Adv_Training/utils/argparser.py
pointer only (licence: MIT); the stored copy get_code serves, from SliencerX/Belief-enriched-robust-Q-learning, is pointer only (licence: NONE) · get_code("10119e52ad9b6cf6")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from SliencerX/Belief-enriched-robust-Q-learning, and GitHub detected no licence in that repository when it was checked. 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_loaders Ran
ran on a synthesized input
JmfanBU/AdvIBP/IBP_Adv_Training/utils/datasets.py
code served (permissive licence) · get_code("5a918baac3f47e20")
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, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 import data
import torchvision.transforms as transforms

torch.manual_seed(0)

class MockDataset:
    """Mock dataset that mimics torchvision MNIST dataset interface"""
    def __init__(self, root, train=True, download=False, transform=None):
        self.root = root
        self.train = train
        self.download = download
        self.transform = transform
        self.data = torch.randn(10, 28, 28)
        self.targets = torch.randint(0, 10, (10,))
    
    def __len__(self):
        return len(self.data)
    
    def __getitem__(self, idx):
        x = self.data[idx].unsqueeze(0)
        y = self.targets[idx].item()
        if self.transform:
            x = self.transform(x.squeeze(0))
        return x, y

ARGS = {
    'dataset': MockDataset,
    'batch_size': 2,
    'shuffle_train': True,
    'shuffle_test': False,
    'normalize_input': False,
    'num_examples': 4,
    'test_batch_size': 2,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
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
two_obj_gradient Ran
ran on a synthesized input
JmfanBU/AdvIBP/IBP_Adv_Training/torch/training.py
code served (permissive licence) · get_code("1c80ff3d696781d0")
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, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 two small gradient tensors
grad1 = torch.randn(4)
grad2 = torch.randn(4)

ARGS = {
    "grad1": grad1,
    "grad2": grad2,
    "c_eval": 0.0005,
    "c_t": 0.001,
}
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, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
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
two_obj_gradient Ran
ran on a synthesized input
JmfanBU/AdvIBP/IBP_Adv_Training/torch/warm_up_training.py
code served (permissive licence) · get_code("d36f6a9eee8b7bfb")
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, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 two gradient tensors
grad1 = torch.randn(4)
grad2 = torch.randn(4)

# Create optional constraint parameters
c_eval = 0.5
c_t = 1.0

ARGS = {
    "grad1": grad1,
    "grad2": grad2,
    "c_eval": c_eval,
    "c_t": c_t,
}
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, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
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_dict Ran
ran on a synthesized input
JmfanBU/AdvIBP/IBP_Adv_Training/utils/config.py
code served (permissive licence) · get_code("1215d6cf47fc376f")
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

# Simple base dictionary with some config values
d = {
    'learning_rate': 0.001,
    'batch_size': 32,
    'model': {
        'hidden_dim': 128,
        'num_layers': 2
    },
    'optimizer': 'adam'
}

# Update dictionary with new values, including nested updates
u = {
    'learning_rate': 0.0005,
    'model': {
        'hidden_dim': 256
    },
    'new_key': 'new_value'
}

# Boolean flag for showing warnings
show_warning = True

ARGS = {
    'd': d,
    'u': u,
    'show_warning': show_warning
}
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
argparser Not yet run
unverified (harvested, no recorded run)
JmfanBU/AdvIBP/IBP_Adv_Training/utils/argparser.py
code served (permissive licence) · get_code("28fd9484122ade47")
How it ran

no invocation recorded.

cifar_loaders Not yet run
unverified (harvested, no recorded run)
JmfanBU/AdvIBP/IBP_Adv_Training/utils/datasets.py
code served (permissive licence) · get_code("c41b33e06e9006fb")
How it ran

no invocation recorded.

load_config Not yet run
unverified (harvested, no recorded run)
JmfanBU/AdvIBP/IBP_Adv_Training/utils/config.py
code served (permissive licence) · get_code("fa1acd6bf18395f2")
How it ran

no invocation recorded.

Also present in other papers' code

Of 14 samples lifted from this paper's linked repositories, 14 carry a function identity and 0 do not. Of the 14 distinct functions with an identity, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 2 later) and 9 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
isfloat 4 other papers
2 dated earlier, 2 later
1712.07629 (2017-12)
SuperPoint: Self-Supervised Interest Point Detection and Description
2002.12920 (2020-02)
Automatic Perturbation Analysis for Scalable Certified Robustness and Beyond
2105.02486 (2021-05)
Towards General Natural Language Understanding with Probabilistic Worldbuilding
and 1 more not named here
isint 2 other papers
1 dated earlier, 1 later
2002.12920 (2020-02)
Automatic Perturbation Analysis for Scalable Certified Robustness and Beyond
2403.04050 (2024-03)
Belief-Enriched Pessimistic Q-Learning against Adversarial State Perturbations
cifar_loaders 1 other paper
1 dated earlier
2002.12920 (2020-02)
Automatic Perturbation Analysis for Scalable Certified Robustness and Beyond
get_stats 1 other paper
1 dated earlier
2002.12920 (2020-02)
Automatic Perturbation Analysis for Scalable Certified Robustness and Beyond
mnist_loaders 1 other paper
1 dated earlier
2002.12920 (2020-02)
Automatic Perturbation Analysis for Scalable Certified Robustness and Beyond

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

We propose a principled framework that combines adversarial training and provable robustness verification for training certifiably robust neural networks. We formulate the training problem as a joint optimization problem with both empirical and provable robustness objectives and develop a novel gradient-descent technique that can eliminate bias in stochastic multi-gradients. We perform both theoretical analysis on the convergence of the proposed technique and experimental comparison with state-of-the-arts. Results on MNIST and CIFAR-10 show that our method can consistently match or outperform prior approaches for provable l infinity robustness. Notably, we achieve 6.60% verified test error on MNIST at epsilon = 0.3, and 66.57% on CIFAR-10 with epsilon = 8/255.

For agents

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

get_harvested_code_for_paper("2008.06081")
get_code_for_paper("2008.06081")
have("2008.06081")

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

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

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

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

Connect an agent — have() is free.