SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2002.09579 · ICML · 2020

Robustness to Programmable String Transformations via Augmented Abstract Training

Yuhao Zhang, Aws Albarghouthi, Loris Antoni

arXiv · PDF · Open in the Atlas

Code that ran

10 of 15 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (4 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 4 failures of our instrument; 5 no recorded run), measured 2026-11-21; 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/2002.09579.json · badge: /api/ran/2002.09579.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
ForeverZyh/A3T marked official in Papers with Code
Papers with Code archive
10 ran · 5 no recorded run
FunctionStatusWhere it lives
InferModule Ran
ran on a synthesized input · constructed an object; no result was computed
ForeverZyh/A3T/a3t/diffai/components.py
code served (permissive licence) · get_code("4a8ba3c0a0dbf4f8")
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, InferModule: 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 math
import types as _types

torch.manual_seed(0)

max_c_for_norm = 10000

def product(it):
    if isinstance(it, int):
        return it
    product = 1
    for x in it:
        if x >= 0:
            product *= x
    return product

class DummyInferModule(nn.Module):
    def __init__(self, *args, normal=False, ibp_init=False, **kwargs):
        self.args = args
        self.kwargs = kwargs
        self.infered = False
        self.normal = normal
        self.ibp_init = ibp_init

    def infer(self, in_shape, global_args=None):
        if self.infered:
            return self
        self.infered = True
        super(DummyInferModule, self).__init__()
        self.inShape = list(in_shape)
        self.outShape = list(self.init(list(in_shape), *self.args, global_args=global_args, **self.kwargs))
        if self.outShape is None:
            raise Exception('init should set the out_shape')
        self.reset_parameters()
        return self

    def reset_parameters(self):
        if not hasattr(self, 'weight') or self.weight is None:
            return
        n = product(self.weight.size()) / self.outShape[0]
        stdv = 1 / math.sqrt(n)
        if self.ibp_init:
            torch.nn.init.orthogonal_(self.weight.data)
        elif self.normal:
            self.weight.data.normal_(0, stdv)
            self.weight.data.clamp_(-1, 1)
        else:
            self.weight.data.uniform_(-stdv, stdv)
        if self.bias is not None:
            if self.ibp_init:
                self.bias.data.zero_()
            elif self.normal:
                self.bias.data.normal_(0, stdv)
                self.bias.data.clamp_(-1, 1)
            else:
                self.bias.data.uniform_(-stdv, stdv)

    def forward(self, x):
        return x

    def neuronCount(self):
        return 0

class ConcreteInferModule(DummyInferModule):
    def init(self, in_shape, *args, global_args=None, **kwargs):
        self.weight = nn.Parameter(torch.randn(4, 3))
        self.bias = nn.Parameter(torch.randn(4))
        return [4]

concrete_module = ConcreteInferModule(normal=False, ibp_init=False)

ARGS = {
    'args': (),
    'normal': False,
    'ibp_init': False,
    '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 InferModule — 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 InferModule 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
ListDomain Ran
ran on a synthesized input · constructed an object; no result was computed
ForeverZyh/A3T/a3t/diffai/components.py
code served (permissive licence) · get_code("120ad26e7756dc6c")
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, ListDomain: 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

torch.manual_seed(0)

# Create a mock domain object that implements the required methods
class MockDomain:
    def __init__(self, data=None):
        self.data = data if data is not None else torch.randn(2, 4)
    
    def isPoint(self):
        return True
    
    def isSafe(self):
        return True
    
    def labels(self):
        return ["label1", "label2"]
    
    def __mul__(self, flt):
        return MockDomain(self.data * flt)
    
    def __truediv__(self, flt):
        return MockDomain(self.data / flt)
    
    def __add__(self, other):
        if isinstance(other, MockDomain):
            return MockDomain(self.data + other.data)
        else:
            return MockDomain(self.data + other)
    
    def __sub__(self, other):
        if isinstance(other, MockDomain):
            return MockDomain(self.data - other.data)
        else:
            return MockDomain(self.data - other)
    
    def merge(self, other, ref=None):
        return MockDomain(self.data)
    
    def addPar(self, a, b):
        return MockDomain(self.data)
    
    def abstractApplyLeaf(self, *args, **kwargs):
        return MockDomain(self.data)
    
    def bmm(self, other):
        return MockDomain(self.data)
    
    def matmul(self, other):
        return MockDomain(self.data)
    
    def conv(self, *args, **kwargs):
        return MockDomain(self.data)
    
    def conv1d(self, *args, **kwargs):
        return MockDomain(self.data)
    
    def conv2d(self, *args, **kwargs):
        return MockDomain(self.data)
    
    def conv3d(self, *args, **kwargs):
        return MockDomain(self.data)
    
    def max_pool2d(self, *args, **kwargs):
        return MockDomain(self.data)
    
    def avg_pool2d(self, *args, **kwargs):
        return MockDomain(self.data)
    
    def adaptive_avg_pool2d(self, *args, **kwargs):
        return MockDomain(self.data)
    
    def unsqueeze(self, *args, **kwargs):
        return MockDomain(self.data.unsqueeze(0))
    
    def squeeze(self, *args, **kwargs):
        return MockDomain(self.data.squeeze())
    
    def view(self, *args, **kwargs):
        return MockDomain(self.data.view(-1))
    
    def gather(self, *args, **kwargs):
        return MockDomain(self.data)
    
    def sum(self, *args, **kwargs):
        return MockDomain(self.data.sum().unsqueeze(0).unsqueeze(0))
    
    def double(self):
        return MockDomain(self.data.double())
    
    def float(self):
        return MockDomain(self.data.float())
    
    def to_dtype(self):
        return MockDomain(self.data)
    
    def vanillaTensorPart(self):
        return self.data
    
    def center(self):
        return MockDomain(self.data)
    
    def ub(self):
        return MockDomain(self.data)
    
    def lb(self):
        return MockDomain(self.data)
    
    def relu(self):
        return MockDomain(torch.relu(self.data))
    
    def splitRelu(self, *args, **kwargs):
        return MockDomain(self.data)
    
    def softplus(self):
        return MockDomain(torch.nn.functional.softplus(self.data))
    
    def elu(self):
        return MockDomain(torch.nn.functional.elu(self.data))
    
    def selu(self):
        return MockDomain(torch.nn.functional.selu(self.data))
    
    def sigm(self):
        return MockDomain(torch.sigmoid(self.data))
    
    def cat(self, other, *args, **kwargs):
        return MockDomain(torch.cat([self.data, other.data], dim=0))
    
    def split(self, *args, **kwargs):
        return [MockDomain(self.data)]
    
    def size(self):
        return self.data.size()
    
    def loss(self, *args, **kwargs):
        return self.data.sum()
    
    def deep_loss(self, *args, **kwargs):
        return self.data.sum()
    
    def checkSizes(self):
        return self

# Create mock domain instances
mock_domain_1 = MockDomain(torch.randn(2, 4))
mock_domain_2 = MockDomain(torch.randn(2, 4))
mock_domain_3 = MockDomain(torch.randn(2, 4))

# Define ARGS for ListDomain.__init__
ARGS = {
    'al': [mock_domain_1, mock_domain_2, mock_domain_3]
}
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 ListDomain — 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 ListDomain 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
MaxTypes Ran
ran on a synthesized input
ForeverZyh/A3T/a3t/diffai/components.py
code served (permissive licence) · get_code("8bb459fbe0df5eeb")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, 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

class MockObject:
    def __init__(self, head, beta=None):
        self.head = head
        self.beta = beta
    
    def ub(self):
        return self.head * 2

INIT_ARGS = {}

ARGS = {
    'x': MockObject(
        head=torch.tensor([1.0, 2.0, 3.0, 4.0]),
        beta=torch.tensor([0.5, 0.5, 0.5, 0.5])
    )
}

METHOD = 'head_beta'

if __name__ == '__main__':
    from __main__ import MaxTypes
    
    instance = MaxTypes()
    
    result = instance.head_beta(ARGS['x'])
    print("Result:", result)
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
__main__, 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 — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
ReduceToZono Ran
ran on a synthesized input · constructed an object; no result was computed
ForeverZyh/A3T/a3t/diffai/components.py
code served (permissive licence) · get_code("d624c2aa339ece92")
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, ReduceToZono: the run constructed the object and did not call it, so no result was computed. 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
import torch.nn as nn
import math

torch.manual_seed(0)

# Create a minimal concrete implementation of InferModule for testing
class SimpleInferModule(nn.Module):
    def __init__(self, in_features, out_features):
        super().__init__()
        self.linear = nn.Linear(in_features, out_features)
        self.in_features = in_features
        self.out_features = out_features
    
    def forward(self, x):
        return self.linear(x)
    
    def neuronCount(self):
        return self.out_features

# Create a simple ListDomain stand-in class
class SimpleAbstractDomain:
    def __init__(self, tensor):
        self.tensor = tensor
    
    def abstractApplyLeaf(self, *args, **kwargs):
        return self
    
    def __mul__(self, scalar):
        return SimpleAbstractDomain(self.tensor * scalar)
    
    def __truediv__(self, scalar):
        return SimpleAbstractDomain(self.tensor / scalar)
    
    def __add__(self, other):
        if isinstance(other, SimpleAbstractDomain):
            return SimpleAbstractDomain(self.tensor + other.tensor)
        return SimpleAbstractDomain(self.tensor + other)
    
    def __sub__(self, other):
        if isinstance(other, SimpleAbstractDomain):
            return SimpleAbstractDomain(self.tensor - other.tensor)
        return SimpleAbstractDomain(self.tensor - other)
    
    def merge(self, other, ref=None):
        return SimpleAbstractDomain(torch.max(self.tensor, other.tensor))
    
    def isPoint(self):
        return True

class SimpleListDomain:
    def __init__(self, al):
        self.al = list(al) if not isinstance(al, list) else al
    
    def new(self, items):
        return SimpleListDomain(list(items))
    
    def __mul__(self, scalar):
        return self.new([a * scalar for a in self.al])
    
    def __truediv__(self, scalar):
        return self.new([a / scalar for a in self.al])
    
    def __add__(self, other):
        if isinstance(other, SimpleListDomain):
            return self.new([a + o for a, o in zip(self.al, other.al)])
        return self.new([a + other for a in self.al])
    
    def __sub__(self, other):
        if isinstance(other, SimpleListDomain):
            return self.new([a - o for a, o in zip(self.al, other.al)])
        return self.new([a - other for a in self.al])
    
    def merge(self, other, ref=None):
        if ref is None:
            return self.new([a.merge(o) for a, o in zip(self.al, other.al)])
        return self.new([a.merge(o, ref=r) for a, o, r in zip(self.al, other.al, ref.al)])
    
    def addPar(self, a, b):
        return self.new([s.addPar(av, bv) for s, av, bv in zip(self.al, a.al, b.al)])
    
    def abstractApplyLeaf(self, *args, **kwargs):
        return self.new([a.abstractApplyLeaf(*args, **kwargs) for a in self.al])
    
    def isPoint(self):
        return all(a.isPoint() for a in self.al)

# Create sample tensors and domains
batch_size = 2
input_dim = 4
output_dim = 3

sample_tensor = torch.randn(batch_size, input_dim)
domain1 = SimpleAbstractDomain(torch.randn(batch_size, output_dim))
domain2 = SimpleAbstractDomain(torch.randn(batch_size, output_dim))
list_domain = SimpleListDomain([domain1, domain2])

# Create a simple model
model = SimpleInferModule(input_dim, output_dim)

# Define ARGS dict for InferModule
ARGS = {
    'normal': False,
    'ibp_init': False,
}
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 ReduceToZono — 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 ReduceToZono 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
Zonotope Ran
ran on a synthesized input · constructed an object; no result was computed
ForeverZyh/A3T/a3t/diffai/components.py
code served (permissive licence) · get_code("c8434411c069784c")
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, Zonotope: the run constructed the object and did not call it, so no result was computed. 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
import torch.nn.functional as F

torch.manual_seed(0)

class HybridZonotope:
    def __init__(self, head, beta, errors, customRelu=None, **kwargs):
        self.head = head
        self.beta = beta
        self.errors = errors
        self.customRelu = customRelu
    
    def new(self, *args, customRelu=None, **kwargs):
        return HybridZonotope(*args, customRelu=customRelu)
    
    def checkSizes(self):
        return self
    
    def size(self):
        return self.head.shape
    
    def ub(self):
        if self.beta is None:
            if self.errors is None:
                return self.head
            aber = torch.abs(self.errors)
            sm = torch.sum(aber, 0)
            return self.head + sm
        else:
            if self.errors is None:
                return self.head + self.beta
            aber = torch.abs(self.errors)
            sm = torch.sum(aber, 0)
            return self.head + sm + self.beta
    
    def lb(self):
        if self.beta is None:
            if self.errors is None:
                return self.head
            aber = torch.abs(self.errors)
            sm = torch.sum(aber, 0)
            return self.head - sm
        else:
            if self.errors is None:
                return self.head - self.beta
            aber = torch.abs(self.errors)
            sm = torch.sum(aber, 0)
            return self.head - sm - self.beta

class Zonotope:
    def __init__(self, head, beta, errors, customRelu=None, **kwargs):
        self.head = head
        self.beta = beta
        self.errors = errors
        self.customRelu = customRelu
    
    def new(self, *args, customRelu=None, **kwargs):
        return Zonotope(*args, customRelu=customRelu)
    
    def checkSizes(self):
        return self

batch_size = 2
output_dim = 4
error_dim = 3

head = torch.randn(batch_size, output_dim, dtype=torch.float32)
beta = torch.randn(batch_size, output_dim, dtype=torch.float32)
errors = torch.randn(error_dim, batch_size, output_dim, dtype=torch.float32)

ARGS = {
    'head': head,
    'beta': beta,
    'errors': errors,
    'customRelu': None,
}
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 Zonotope — 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 Zonotope 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
catNonNullErrors Ran
ran; our contract draft was wrong, not the code
ForeverZyh/A3T/a3t/diffai/components.py
code served (permissive licence) · get_code("d23a030e4337de7e")
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 function. 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 types as _types

torch.manual_seed(0)

# Define a minimal namespace h with zeros method since the function uses h.zeros
h = _types.SimpleNamespace(zeros=torch.zeros)

# Define the op function - a simple element-wise operation
def simple_op(a, b):
    return a + b

# Create test tensors with distinct sizes
er1 = torch.randn(4, 3)
er2 = torch.randn(2, 3)

# ref_errs can be None or a tensor
ref_errs = torch.randn(3, 3)

ARGS = {
    'op': simple_op,
    'ref_errs': ref_errs
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
creluBoxy Ran
ran; our contract draft was wrong, not the code
ForeverZyh/A3T/a3t/diffai/components.py
code served (permissive licence) · get_code("2ffd2a5fcf348d30")
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 MockDomain. 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.functional as F
import types as _types

torch.manual_seed(0)

# Define the ifThenElse function that's used in creluBoxy
def ifThenElse(cond, a, b):
    cond = cond.to(torch.float32)
    return cond * a + (1 - cond) * b

# Create a mock domain object with the required attributes and methods
class MockDomain:
    def __init__(self, head, errors=None, beta=None):
        self.head = head
        self.errors = errors
        self.beta = beta
    
    def new(self, head, beta, errors):
        """Create a new domain object with updated values"""
        return MockDomain(head, errors, beta)

# Create the namespace h with ifThenElse
h = _types.SimpleNamespace(ifThenElse=ifThenElse)

# Create test tensors
head = torch.randn(2, 4)
errors = torch.randn(3, 2, 4)  # Different first dimension to distinguish
beta = torch.randn(2, 4)

# Create the domain object
dom = MockDomain(head=head, errors=errors, beta=beta)

# Monkey-patch torch.Tensor to have to_dtype method if needed
if not hasattr(torch.Tensor, 'to_dtype'):
    def to_dtype(self):
        return self.to(torch.float32)
    torch.Tensor.to_dtype = to_dtype

ARGS = {
    'dom': dom
}
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 MockDomain — a MockDomain output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MockDomain 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
ifThenElse Ran
ran; our contract draft was wrong, not the code
ForeverZyh/A3T/a3t/diffai/components.py
code served (permissive licence) · get_code("d61a7573dc44b067")
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)

class CondTensor:
    """Stand-in for a condition tensor that has a to_dtype() method"""
    def __init__(self, tensor):
        self.tensor = tensor
    
    def to_dtype(self):
        # Returns a float tensor for arithmetic operations
        return self.tensor.float()

# Create small tensors for the arguments
cond = CondTensor(torch.tensor([[1.0, 0.0, 1.0, 0.0],
                                 [0.0, 1.0, 0.0, 1.0]]))
a = torch.tensor([[1.0, 2.0, 3.0, 4.0],
                   [5.0, 6.0, 7.0, 8.0]])
b = torch.tensor([[10.0, 20.0, 30.0, 40.0],
                   [50.0, 60.0, 70.0, 80.0]])

ARGS = {
    "cond": cond,
    "a": a,
    "b": b
}
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
msum Ran
ran; our contract draft was wrong, not the code
ForeverZyh/A3T/a3t/diffai/components.py
code served (permissive licence) · get_code("eb7dd779a62b7538")
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)

# The function msum takes three parameters: a, b, and l
# It checks if a or b is None, and if neither are None, it calls l(a, b)
# l appears to be a callable (function) that takes two arguments
# a and b appear to be tensors or None based on the logic

# Create small tensors for a and b
a = torch.randn(2, 4)
b = torch.randn(2, 4)

# Create a callable l that takes two tensors and returns their sum
l = lambda x, y: x + y

ARGS = {
    "a": a,
    "b": b,
    "l": l
}
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
product Ran
ran, honoured the contract we drafted
ForeverZyh/A3T/a3t/diffai/components.py
code served (permissive licence) · get_code("92e628e2d5712cd5")
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

torch.manual_seed(0)

# The function takes a single parameter 'it' which can be:
# 1. An int - in which case it returns that int
# 2. An iterable - in which case it multiplies all non-negative values

# Test case 1: pass an int
ARGS = {
    "it": 42
}
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 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
TaggedDomain Not yet run
unverified (harvested, no recorded run)
ForeverZyh/A3T/a3t/diffai/components.py
code served (permissive licence) · get_code("91824b771e51d588")
How it ran

no invocation recorded.

cudify Not yet run
unverified (harvested, no recorded run)
ForeverZyh/A3T/a3t/diffai/components.py
code served (permissive licence) · get_code("1b9317ae6adf1d20")
How it ran

no invocation recorded.

getEi Not yet run
unverified (harvested, no recorded run)
ForeverZyh/A3T/a3t/diffai/components.py
code served (permissive licence) · get_code("779dcec4a5be25f9")
How it ran

no invocation recorded.

one_hot Not yet run
unverified (harvested, no recorded run)
ForeverZyh/A3T/a3t/diffai/components.py
code served (permissive licence) · get_code("bfd82e9e809aad36")
How it ran

no invocation recorded.

preDomRes Not yet run
unverified (harvested, no recorded run)
ForeverZyh/A3T/a3t/diffai/components.py
code served (permissive licence) · get_code("0a31eb9cb910ab65")
How it ran

no invocation recorded.

Also present in other papers' code

Of 15 samples lifted from this paper's linked repositories, 15 carry a function identity and 0 do not. Of the 15 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 0 later) and 14 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
creluBoxy
brick of this paper's assembly: helper
2 other papers
2 dated earlier
1412.6572 (2014-12)
Explaining and Harnessing Adversarial Examples
1810.12715 (2018-10)
On the Effectiveness of Interval Bound Propagation for Training Verifiably Robust Models

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

Repositories linked to this paper

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

Abstract

Deep neural networks for natural language processing tasks are vulnerable to adversarial input perturbations. In this paper, we present a versatile language for programmatically specifying string transformations-e.g., insertions, deletions, substitutions, swaps, etc.-that are relevant to the task at hand. We then present an approach to adversarially training models that are robust to such user-defined string transformations. Our approach combines the advantages of search-based techniques for adversarial training with abstractionbased techniques. Specifically, we show how to decompose a set of user-defined string transformations into two component specifications, one that benefits from search and another from abstraction. We use our technique to train models on the AG and SST2 datasets and show that the resulting models are robust to combinations of user-defined transformations mimicking spelling mistakes and other meaning-preserving transformations.

For agents

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

get_harvested_code_for_paper("2002.09579")
get_code_for_paper("2002.09579")
have("2002.09579")

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

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

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

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

Connect an agent — have() is free.