SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1811.09310 · 2018

Parametric Noise Injection: Trainable Randomness to Improve Deep Neural Network Robustness against Adversarial Attack

arXiv · PDF · Open in the Atlas

Code that ran

6 of 8 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 4 failures of our instrument; 2 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/1811.09310.json · badge: /api/ran/1811.09310.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
elliothe/CVPR_2019_PNI canonical (classifier label)
classifier basis: census
6 ran · 2 no recorded run
FunctionStatusWhere it lives
convert_secs2time Ran
ran, honoured the contract we drafted
elliothe/CVPR_2019_PNI/code/utils.py
code served (permissive licence) · get_code("09b3d0b3ea772a30")
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 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 torch
import numpy as np

# The function convert_secs2time takes epoch_time as input
# and performs arithmetic operations on it to convert seconds to hours, minutes, seconds
# It expects a numeric value (int or float)

ARGS = {
    'epoch_time': 3661  # 1 hour, 1 minute, 1 second in seconds
}
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, ndim 1, dtype family int — 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
noise_resnet20 Ran
ran; our contract draft was wrong, not the code
elliothe/CVPR_2019_PNI/code/models/noisy_resnet_cifar.py
code served (permissive licence) · get_code("0fd256b4a9f1e67f")
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 CifarResNet. 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

torch.manual_seed(0)

# Define stub classes for noise_Conv2d and noise_Linear
class noise_Conv2d(nn.Conv2d):
    """Stub for noise-injected Conv2d - behaves like regular Conv2d"""
    pass

class noise_Linear(nn.Linear):
    """Stub for noise-injected Linear - behaves like regular Linear"""
    pass

# Make these available in the module namespace
import sys
current_module = sys.modules[__name__]
setattr(current_module, 'noise_Conv2d', noise_Conv2d)
setattr(current_module, 'noise_Linear', noise_Linear)

ARGS = {
    'num_classes': 10
}
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 CifarResNet — a CifarResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a CifarResNet 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
summary Ran
ran on a synthesized input
elliothe/CVPR_2019_PNI/code/utils_/model_summary.py
code served (permissive licence) · get_code("6de508671f95b11e")
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 OrderedDict. 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

torch.manual_seed(0)

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

model = SimpleModel()

# Define arguments
ARGS = {
    'model': model,
    'input_size': (4,),
    'device': 'cpu'
}
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 OrderedDict — a OrderedDict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a OrderedDict 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
vanilla_resnet20 Ran
ran; our contract draft was wrong, not the code
elliothe/CVPR_2019_PNI/code/models/vanilla_models/vanilla_resnet_cifar.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from mail-research/randomized_defenses, is pointer only (licence: GPL-3.0) · get_code("cd56898dd1531f85")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from mail-research/randomized_defenses, and GPL-3.0, as GitHub detects it on that repository, is not in the permissive set Syntology serves inline. 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.

vanilla_resnet32 Ran
ran; our contract draft was wrong, not the code
elliothe/CVPR_2019_PNI/code/models/vanilla_models/vanilla_resnet_cifar.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from mail-research/randomized_defenses, is pointer only (licence: GPL-3.0) · get_code("cab91481ef35184c")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from mail-research/randomized_defenses, and GPL-3.0, as GitHub detects it on that repository, is not in the permissive set Syntology serves inline. 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.

vanilla_resnet44 Ran
ran; our contract draft was wrong, not the code
elliothe/CVPR_2019_PNI/code/models/vanilla_models/vanilla_resnet_cifar.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from mail-research/randomized_defenses, is pointer only (licence: GPL-3.0) · get_code("2acb1379b48508e4")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from mail-research/randomized_defenses, and GPL-3.0, as GitHub detects it on that repository, is not in the permissive set Syntology serves inline. 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.

noise_resnet32 Not yet run
unverified (harvested, no recorded run)
elliothe/CVPR_2019_PNI/code/models/noisy_resnet_cifar.py
code served (permissive licence) · get_code("f8a863a7430e2faf")
How it ran

no invocation recorded.

noise_resnet44 Not yet run
unverified (harvested, no recorded run)
elliothe/CVPR_2019_PNI/code/models/noisy_resnet_cifar.py
code served (permissive licence) · get_code("f9281016e42877da")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 5 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 5 later) and 3 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
convert_secs2time 3 other papers
3 later
2006.07794 (2020-06)
PatchUp: A Feature-Space Block-Level Regularization Technique for Convolutional Neural Networks
2008.05369 (2020-08)
Anomaly localization by modeling perceptual features
2311.13613 (2023-11)
Spanning Training Progress: Temporal Dual-Depth Scoring (TDDS) for Enhanced Dataset Pruning
noise_resnet20 1 other paper
1 later
2310.00567 (2023-10)
Understanding the Robustness of Randomized Feature Defense Against Query-Based Adversarial Attacks
vanilla_resnet20 1 other paper
1 later
2310.00567 (2023-10)
Understanding the Robustness of Randomized Feature Defense Against Query-Based Adversarial Attacks
vanilla_resnet32 1 other paper
1 later
2310.00567 (2023-10)
Understanding the Robustness of Randomized Feature Defense Against Query-Based Adversarial Attacks
vanilla_resnet44 1 other paper
1 later
2310.00567 (2023-10)
Understanding the Robustness of Randomized Feature Defense Against Query-Based Adversarial Attacks

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

Recent development in the field of Deep Learning have exposed the underlying vulnerability of Deep Neural Network (DNN) against adversarial examples. In image classification, an adversarial example is a carefully modified image that is visually imperceptible to the original image but can cause DNN model to misclassify it. Training the network with Gaussian noise is an effective technique to perform model regularization, thus improving model robustness against input variation. Inspired by this classical method, we explore to utilize the regularization characteristic of noise injection to improve DNN's robustness against adversarial attack. In this work, we propose Parametric-Noise-Injection (PNI) which involves trainable Gaussian noise injection at each layer on either activation or weights through solving the min-max optimization problem, embedded with adversarial training. These parameters are trained explicitly to achieve improved robustness. To the best of our knowledge, this is the first work that uses trainable noise injection to improve network robustness against adversarial attacks, rather than manually configuring the injected noise level through cross-validation. The extensive results show that our proposed PNI technique effectively improves the robustness against a variety of powerful white-box and black-box attacks such as PGD, C & W, FGSM, transferable attack and ZOO attack. Last but not the least, PNI method improves both clean- and perturbed-data accuracy in comparison to the state-of-the-art defense methods, which outperforms current unbroken PGD defense by 1.1 % and 6.8 % on clean test data and perturbed test data respectively using Resnet-20 architecture.

For agents

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

get_harvested_code_for_paper("1811.09310")
get_code_for_paper("1811.09310")
have("1811.09310")

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

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

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

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

Connect an agent — have() is free.