SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1909.01492 · 2019

Achieving Verified Robustness to Symbol Substitutions via Interval Bound Propagation

arXiv · PDF · Open in the Atlas

Code that ran

7 of 7 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, 0 violated it and 7 have no contract verdict; 0 failures of our instrument; 0 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/1909.01492.json · badge: /api/ran/1909.01492.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
deepmind/interval-bound-propagation canonical (classifier label)
classifier basis: census
7 ran · 0 no recorded run
FunctionStatusWhere it lives
build_dataset Ran
ran on a synthesized input
deepmind/interval-bound-propagation/interval_bound_propagation/src/utils.py
code served (permissive licence) · get_code("2e105c9e60e20558")
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 Sample. 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 collections
import numpy as np

Sample = collections.namedtuple('Sample', ['image', 'label'])

# Create tiny raw data: images and labels
# Images: shape (2, 4, 3) - 2 samples, 4x3 pixel images (grayscale will be expanded to 4x3x1)
images = np.random.randint(0, 256, size=(2, 4, 3), dtype=np.uint8)

# Labels: shape (2,) - 2 samples with class labels
labels = np.array([0, 1], dtype=np.int32)

raw_data = (images, labels)

ARGS = {
    'raw_data': raw_data,
    'batch_size': 2,
    'sequential': True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Sample — a Sample 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
conv_output_shape Ran
ran on a synthesized input
deepmind/interval-bound-propagation/interval_bound_propagation/src/layer_utils.py
code served (permissive licence) · get_code("d22d23d5d83cc957")
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, ndim 1, dtype family int; 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 tensorflow.compat.v1 as tf
import numpy as np

# Disable eager execution for TensorFlow v1 compatibility
tf.disable_eager_execution()

# Create a simple 2D convolution case
# input_shape: [height, width, channels]
input_shape = [8, 8, 3]

# w: (kernel_height, kernel_width, input_channels, output_channels)
w = tf.constant(
    np.random.randn(3, 3, 3, 16).astype(np.float32),
    dtype=tf.float32
)

# padding: "VALID" or "SAME"
padding = "SAME"

# strides: [vertical_stride, horizontal_stride]
strides = [1, 1]

ARGS = {
    "input_shape": input_shape,
    "w": w,
    "padding": padding,
    "strides": strides,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family int — a list 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
linear_schedule Ran
ran on a synthesized input
deepmind/interval-bound-propagation/interval_bound_propagation/src/utils.py
code served (permissive licence) · get_code("a60e232adbec82fd")
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 SymbolicTensor. 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 tensorflow.compat.v1 as tf

tf.disable_v2_behavior()

ARGS = {
    "step": tf.constant(5, dtype=tf.int32),
    "init_step": 0,
    "final_step": 10,
    "init_value": 0.1,
    "final_value": 0.9,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SymbolicTensor — a SymbolicTensor 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
materialise_conv Ran
ran on a synthesized input
deepmind/interval-bound-propagation/interval_bound_propagation/src/layer_utils.py
code served (permissive licence) · get_code("70efb0e927ae7e5a")
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 tensorflow.compat.v1 as tf

tf.disable_v2_behavior()

# Create setup for materialise_conv with 2D convolution case
kernel_height = 3
kernel_width = 3
input_channels = 2
output_channels = 4
input_height = 5
input_width = 5

# Create weight tensor: (kernel_height, kernel_width, input_channels, output_channels)
w_2d = tf.constant(
    [[[[0.1, 0.2, 0.3, 0.4],
       [0.5, 0.6, 0.7, 0.8]],
      [[0.9, 1.0, 1.1, 1.2],
       [1.3, 1.4, 1.5, 1.6]],
      [[1.7, 1.8, 1.9, 2.0],
       [2.1, 2.2, 2.3, 2.4]]],
     [[[2.5, 2.6, 2.7, 2.8],
       [2.9, 3.0, 3.1, 3.2]],
      [[3.3, 3.4, 3.5, 3.6],
       [3.7, 3.8, 3.9, 4.0]],
      [[4.1, 4.2, 4.3, 4.4],
       [4.5, 4.6, 4.7, 4.8]]],
     [[[4.9, 5.0, 5.1, 5.2],
       [5.3, 5.4, 5.5, 5.6]],
      [[5.7, 5.8, 5.9, 6.0],
       [6.1, 6.2, 6.3, 6.4]],
      [[6.5, 6.6, 6.7, 6.8],
       [6.9, 7.0, 7.1, 7.2]]]],
    dtype=tf.float32
)

# Create bias tensor: (output_channels,)
b_2d = tf.constant([0.1, 0.2, 0.3, 0.4], dtype=tf.float32)

# Input shape for 2D case: [input_height, input_width, input_channels]
input_shape_2d = [input_height, input_width, input_channels]

# Strides for 2D case: [vertical_stride, horizontal_stride]
strides_2d = [1, 1]

# Padding
padding_2d = "SAME"

ARGS = {
    "w": w_2d,
    "b": b_2d,
    "input_shape": input_shape_2d,
    "padding": padding_2d,
    "strides": strides_2d
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — 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
pgd_attack Ran
ran on a synthesized input
deepmind/interval-bound-propagation/interval_bound_propagation/src/attacks.py
code served (permissive licence) · get_code("cde1139d55d20376")
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 SymbolicTensor. 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 tensorflow.compat.v1 as tf
import collections
import six
import abc

nest = tf.nest

@six.add_metaclass(abc.ABCMeta)
class UnrolledOptimizer(object):
    """In graph optimizer to be used in tf.while_loop."""

    def __init__(self, colocate_gradients_with_ops=False):
        self._colocate_gradients_with_ops = colocate_gradients_with_ops

    @abc.abstractmethod
    def minimize(self, loss, x, optim_state):
        pass

    @abc.abstractmethod
    def init_state(self, x):
        pass

class UnrolledGradientDescent(UnrolledOptimizer):
    """Vanilla gradient descent optimizer."""
    _State = collections.namedtuple('State', ['iteration'])

    def __init__(self, lr=0.1, lr_fn=None, fgsm=False, colocate_gradients_with_ops=False):
        super(UnrolledGradientDescent, self).__init__(colocate_gradients_with_ops=colocate_gradients_with_ops)
        self._lr_fn = (lambda i: lr) if lr_fn is None else lr_fn
        self._fgsm = fgsm

    def init_state(self, unused_x):
        return self._State(tf.constant(0, dtype=tf.int64))

    def minimize(self, loss, x, optim_state):
        lr = self._lr_fn(optim_state.iteration)
        grads = self.gradients(loss, x)
        if self._fgsm:
            grads = [tf.sign(g) for g in grads]
        new_x = [None] * len(x)
        for i in range(len(x)):
            new_x[i] = x[i] - lr * grads[i]
        new_optim_state = self._State(optim_state.iteration + 1)
        return (new_x, new_optim_state)

    def gradients(self, loss, x):
        return tf.gradients(loss, x, colocate_gradients_with_ops=self._colocate_gradients_with_ops)

def _project_perturbation(perturbation, epsilon, input_image, image_bounds):
    """Project `perturbation` onto L-infinity ball of radius `epsilon`."""
    clipped_perturbation = tf.clip_by_value(perturbation, -epsilon, epsilon)
    new_image = tf.clip_by_value(input_image + clipped_perturbation, image_bounds[0], image_bounds[1])
    return new_image - input_image

tf.disable_v2_behavior()

# Create a simple loss function that takes input_image and returns a scalar loss
def simple_loss_fn(input_image):
    return tf.reduce_sum(input_image ** 2)

# Create input image tensor: batch_size=2, height=4, width=3, channels=1
input_image = tf.constant([
    [[[0.5], [0.3], [0.7]], [[0.2], [0.4], [0.6]], [[0.1], [0.8], [0.9]], [[0.4], [0.5], [0.3]]],
    [[[0.6], [0.2], [0.4]], [[0.7], [0.3], [0.5]], [[0.8], [0.1], [0.2]], [[0.3], [0.6], [0.4]]]
], dtype=tf.float32)

# Create optimizer
optimizer = UnrolledGradientDescent(lr=0.01)

# Define arguments for pgd_attack
ARGS = {
    'loss_fn': simple_loss_fn,
    'input_image': input_image,
    'epsilon': 0.1,
    'num_steps': 2,
    'optimizer': optimizer,
    'project_perturbation': _project_perturbation,
    'image_bounds': (0.0, 1.0),
    'random_init': 0.5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
six, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SymbolicTensor — a SymbolicTensor 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
randomize Ran
ran on a synthesized input
deepmind/interval-bound-propagation/interval_bound_propagation/src/utils.py
code served (permissive licence) · get_code("e912de699162590e")
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 SymbolicTensor. 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 tensorflow.compat.v1 as tf
import numpy as np

tf.disable_v2_behavior()

# Create a small batch of images
batch_size = 2
height = 4
width = 3
channels = 2

# Create image tensor with shape [batch_size, height, width, channels]
images = tf.constant(np.random.randn(batch_size, height * width * channels).astype(np.float32))

# Initial shape before reshape
init_shape = [height, width, channels]

# Expanded shape (larger than initial)
expand_shape = [6, 5, channels]

# Cropped shape (smaller than expanded)
crop_shape = [5, 4, channels]

# Vertical flip flag
vertical_flip = True

ARGS = {
    "images": images,
    "init_shape": init_shape,
    "expand_shape": expand_shape,
    "crop_shape": crop_shape,
    "vertical_flip": vertical_flip
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SymbolicTensor — a SymbolicTensor 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
wrap_optimizer Ran
ran on a synthesized input
deepmind/interval-bound-propagation/interval_bound_propagation/src/attacks.py
code served (permissive licence) · get_code("6c96553a1753aaa9")
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 type. 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
from torch.optim import SGD

torch.manual_seed(0)

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

model = SimpleModel()

# Create optimizer class (SGD in this case)
optimizer_cls = SGD

# Create default kwargs for the optimizer
default_kwargs = {
    'lr': 0.01,
    'momentum': 0.9
}

ARGS = {
    'cls': optimizer_cls,
    'default_kwargs': default_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 type — a type output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a type 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

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 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 7 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-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

Neural networks are part of many contemporary NLP systems, yet their empirical successes come at the price of vulnerability to adversarial attacks. Previous work has used adversarial training and data augmentation to partially mitigate such brittleness, but these are unlikely to find worst-case adversaries due to the complexity of the search space arising from discrete text perturbations. In this work, we approach the problem from the opposite direction: to formally verify a system's robustness against a predefined class of adversarial attacks. We study text classification under synonym replacements or character flip perturbations. We propose modeling these input perturbations as a simplex and then using Interval Bound Propagation -- a formal model verification method. We modify the conventional log-likelihood training objective to train models that can be efficiently verified, which would otherwise come with exponential search complexity. The resulting models show only little difference in terms of nominal accuracy, but have much improved verified accuracy under perturbations and come with an efficiently computable formal guarantee on worst case adversaries.

For agents

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

get_harvested_code_for_paper("1909.01492")
get_code_for_paper("1909.01492")
have("1909.01492")

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

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

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

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

Connect an agent — have() is free.