SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2207.13916 · 2022

A Novel Data Augmentation Technique for Out-of-Distribution Sample Detection using Compounded Corruptions

arXiv · PDF · Open in the Atlas

Code that ran

7 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; 1 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 2 failures of our instrument; 7 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2207.13916.json · badge: /api/ran/2207.13916.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
cnc-ood/cnc_ood canonical (classifier label)
classifier basis not recorded on the link
7 ran · 7 no recorded run
FunctionStatusWhere it lives
ResNet34 Ran
ran on a synthesized input
cnc-ood/cnc_ood/models/resnet.py
code served (permissive licence) · get_code("135e97055dfaf8bd")
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 ResNet. 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 minimal normalizer class with mean and std attributes
class Normalizer:
    def __init__(self):
        self.mean = torch.tensor([0.5, 0.5, 0.5])
        self.std = torch.tensor([0.2, 0.2, 0.2])

normalizer = Normalizer()

ARGS = {
    'num_classes': 10,
    'normalizer': normalizer
}
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 ResNet — a ResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNet 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
WideResNet40_2 Ran
ran on a synthesized input
cnc-ood/cnc_ood/models/wide_resnet.py
code served (permissive licence) · get_code("fba2431c495541ec")
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 WideResNet. 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 logging

torch.manual_seed(0)

# Setup logging
logging.basicConfig(level=logging.INFO)

# Define ARGS dict with all parameters for WideResNet40_2
ARGS = {
    'num_classes': 11,
}

# Verify the function can be called
def WideResNet40_2(num_classes=11, **kwargs):
    logging.info('Loading Wide-ResNet40-2')
    
    class WideResNet(nn.Module):
        def __init__(self, depth, widen_factor=1, dropRate=0.0, num_classes=10, dim_aux=0):
            super(WideResNet, self).__init__()
            nChannels = [16, 16 * widen_factor, 32 * widen_factor, 64 * widen_factor]
            assert (depth - 4) % 6 == 0
            n = (depth - 4) // 6
            
            self.conv1 = nn.Conv2d(3, nChannels[0], kernel_size=3, stride=1, padding=1, bias=False)
            self.bn1 = nn.BatchNorm2d(nChannels[3])
            self.relu = nn.ReLU(inplace=True)
            self.fc = nn.Linear(nChannels[3], num_classes)
            self.nChannels = nChannels[3]
            self.dim_aux = dim_aux
            if self.dim_aux > 0:
                hidden_size = self.fc.in_features
                self.fc_aux = nn.Linear(hidden_size, self.dim_aux)

        def forward(self, x, return_feature=False, return_aux=False, use_cam=False):
            return x

    return WideResNet(depth=40, widen_factor=2, dropRate=0, num_classes=num_classes, dim_aux=0)
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 WideResNet — a WideResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a WideResNet 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
clipped_zoom Ran
ran; our contract draft was wrong, not the code
cnc-ood/cnc_ood/augmentations/corruptions.py
code served (permissive licence) · get_code("466ca3cdf4524d82")
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 ndarray, ndim 3, dtype family float, shape (8, 8, 3) 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 numpy as np
from scipy.ndimage import zoom as scizoom

# Create a small test image with shape (height, width, channels)
# Using distinct dimensions: 8x8x3 for a small RGB-like image
img = np.random.rand(8, 8, 3).astype(np.float32)

# zoom_factor should be a positive number that scales the image
zoom_factor = 2.0

ARGS = {
    "img": img,
    "zoom_factor": zoom_factor,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family float, shape (8, 8, 3) — shape (8, 8, 3) 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
conv3x3 Ran
ran; our contract draft was wrong, not the code
cnc-ood/cnc_ood/models/resnet_tinyimagenet.py
code served (permissive licence) · get_code("2ace1c98fa5f2cd5")
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 Conv2d. 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)

ARGS = {
    'in_planes': 3,
    'out_planes': 64,
    'stride': 1
}
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 Conv2d — a Conv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv2d 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
disk Ran
ran, honoured the contract we drafted
cnc-ood/cnc_ood/augmentations/corruptions.py
code served (permissive licence) · get_code("bc8b7f1d3348c560")
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 ndarray, ndim 2, dtype family float, shape (17, 17) 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 numpy as np
import cv2

ARGS = {
    'radius': 5,
    'alias_blur': 0.1,
    'dtype': np.float32
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (17, 17) — shape (17, 17) 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
resnet18 Ran
ran on a synthesized input
cnc-ood/cnc_ood/models/resnet_tinyimagenet.py
code served (permissive licence) · get_code("4ae4dd2fed7d16da")
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 ResNet. 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)

ARGS = {
    "num_classes": 200
}
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 ResNet — a ResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNet 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
resnet34 Ran
ran on a synthesized input
cnc-ood/cnc_ood/models/resnet_tinyimagenet.py
code served (permissive licence) · get_code("d5479a626082361a")
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 ResNet. 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)

ARGS = {
    "num_classes": 200
}
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 ResNet — a ResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNet 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
DenseNet100 Not yet run
unverified (harvested, no recorded run)
cnc-ood/cnc_ood/models/densenet.py
code served (permissive licence) · get_code("e24439db1f89a5eb")
How it ran

no invocation recorded.

ResNet50 Not yet run
unverified (harvested, no recorded run)
cnc-ood/cnc_ood/models/resnet.py
code served (permissive licence) · get_code("48e78dc688691eef")
How it ran

no invocation recorded.

get_datasets Not yet run
unverified (harvested, no recorded run)
cnc-ood/cnc_ood/datasets/cifar10.py
code served (permissive licence) · get_code("fd7eb4a19cf6344a")
How it ran

no invocation recorded.

get_datasets Not yet run
unverified (harvested, no recorded run)
cnc-ood/cnc_ood/datasets/cifar100.py
code served (permissive licence) · get_code("b018c7f90d510364")
How it ran

no invocation recorded.

get_datasets Not yet run
unverified (harvested, no recorded run)
cnc-ood/cnc_ood/datasets/svhn.py
code served (permissive licence) · get_code("edd840936d027c2e")
How it ran

no invocation recorded.

get_train_valid_test_loader Not yet run
unverified (harvested, no recorded run)
cnc-ood/cnc_ood/datasets/svhn.py
code served (permissive licence) · get_code("6b801f8b2ef516d6")
How it ran

no invocation recorded.

plasma_fractal Not yet run
unverified (harvested, no recorded run)
cnc-ood/cnc_ood/augmentations/corruptions.py
code served (permissive licence) · get_code("3f32f32f9972eaf6")
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, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 1 the same month, 3 later) and 11 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
conv3x3 686 other papers
398 dated earlier, 7 the same month, 270 later, 11 same year, order not determinable · 31 only as an assembly brick
1406.2661 (2014-06)
Generative Adversarial Networks
1409.0575 (2014-09)
ImageNet Large Scale Visual Recognition Challenge
1412.6572 (2014-12)
Explaining and Harnessing Adversarial Examples
and 683 more not named here
disk 7 other papers
2 dated earlier, 5 later
1906.02337 (2019-06)
MNIST-C: A Robustness Benchmark for Computer Vision
2110.13771 (2021-10)
AugMax: Adversarial Composition of Random Augmentations for Robust Training
2211.02578 (2022-11)
Data Models for Dataset Drift Controls in Machine Learning With Optical Images
and 4 more not named here
clipped_zoom 5 other papers
3 dated earlier, 2 later
1903.12261 (2019-03)
Benchmarking Neural Network Robustness to Common Corruptions and Perturbations
2001.06057 (2020-01)
A simple way to make neural networks robust against diverse image corruptions
2110.13771 (2021-10)
AugMax: Adversarial Composition of Random Augmentations for Robust Training
and 2 more not named here

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

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

Abstract

Modern deep neural network models are known to erroneously classify out-of-distribution (OOD) test data into one of the in-distribution (ID) training classes with high confidence. This can have disastrous consequences for safety-critical applications. A popular mitigation strategy is to train a separate classifier that can detect such OOD samples at the test time. In most practical settings OOD examples are not known at the train time, and hence a key question is: how to augment the ID data with synthetic OOD samples for training such an OOD detector? In this paper, we propose a novel Compounded Corruption technique for the OOD data augmentation termed CnC. One of the major advantages of CnC is that it does not require any hold-out data apart from the training set. Further, unlike current state-of-the-art (SOTA) techniques, CnC does not require backpropagation or ensembling at the test time, making our method much faster at inference. Our extensive comparison with 20 methods from the major conferences in last 4 years show that a model trained using CnC based data augmentation, significantly outperforms SOTA, both in terms of OOD detection accuracy as well as inference time. We include a detailed post-hoc analysis to investigate the reasons for the success of our method and identify higher relative entropy and diversity of CnC samples as probable causes. We also provide theoretical insights via a piece-wise decomposition analysis on a two-dimensional dataset to reveal (visually and quantitatively) that our approach leads to a tighter boundary around ID classes, leading to better detection of OOD samples. Source code link: https://github.com/cnc-ood

For agents

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

get_harvested_code_for_paper("2207.13916")
get_code_for_paper("2207.13916")
have("2207.13916")

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

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

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

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

Connect an agent — have() is free.