SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2007.10538 · NeurIPS · 2020

Regularizing Deep Networks with Semantic Data Augmentation

Yulin Wang, Gao Huang, Shiji Song, Xuran Pan, Yitong Xia, Cheng Wu

arXiv · PDF · Open in the Atlas

Code that ran

6 of 6 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 2 failures of our instrument; 0 no recorded run), measured 2026-11-22; 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/2007.10538.json · badge: /api/ran/2007.10538.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
speedinghzl/pytorch-segmentation-toolbox canonical (classifier label)
classifier basis: census
4 ran · 0 no recorded run
blackfeather-wang/ISDA-for-Deep-Networks canonical (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
FunctionStatusWhere it lives
EstimatorCV Ran
ran on a synthesized input · constructed an object; no result was computed
blackfeather-wang/ISDA-for-Deep-Networks/Image classification on CIFAR/ISDA.py
pointer only (licence: NONE) · get_code("422a78ccd75601b6")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, blackfeather-wang/ISDA-for-Deep-Networks 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.

ISDALoss Ran
ran on a synthesized input
blackfeather-wang/ISDA-for-Deep-Networks/Image classification on CIFAR/ISDA.py
pointer only (licence: NONE) · get_code("9f0d35073e5bc8f5")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, blackfeather-wang/ISDA-for-Deep-Networks 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.

conv3x3 Ran
ran; our contract draft was wrong, not the code
speedinghzl/pytorch-segmentation-toolbox/networks/deeplabv3.py
pointer only (licence: MIT); the stored copy get_code serves, from lixiaotong97/DSU, is pointer only (licence: NONE) · get_code("fac5364e2f53c6db")
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 lixiaotong97/DSU, 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.

get_palette Ran
ran, honoured the contract we drafted
speedinghzl/pytorch-segmentation-toolbox/evaluate.py
code served (permissive licence) · get_code("26664d79586aad5a")
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 torch
import numpy as np

def get_palette(num_cls):
    """ Returns the color map for visualizing the segmentation mask.
    Args:
        num_cls: Number of classes
    Returns:
        The color map
    """
    n = num_cls
    palette = [0] * (n * 3)
    for j in range(0, n):
        lab = j
        palette[j * 3 + 0] = 0
        palette[j * 3 + 1] = 0
        palette[j * 3 + 2] = 0
        i = 0
        while lab:
            palette[j * 3 + 0] |= (lab >> 0 & 1) << 7 - i
            palette[j * 3 + 1] |= (lab >> 1 & 1) << 7 - i
            palette[j * 3 + 2] |= (lab >> 2 & 1) << 7 - i
            i += 1
            lab >>= 3
    return palette

ARGS = {
    "num_cls": 5
}
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 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
pad_image Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
speedinghzl/pytorch-segmentation-toolbox/evaluate.py
code served (permissive licence) · get_code("6ec02fe7ffee8530")
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 4, dtype family float, shape (2, 3, 6, 8) 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

# Create a small test image with shape (batch, channels, height, width)
# Using distinct dimensions: batch=2, channels=3, height=4, width=5
img = np.random.rand(2, 3, 4, 5).astype(np.float32)

# Target size is (height, width) - we'll pad to larger dimensions
target_size = (6, 8)

ARGS = {
    "img": img,
    "target_size": target_size,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 4, dtype family float, shape (2, 3, 6, 8) — shape (2, 3, 6, 8) 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
predict_sliding Ran
ran on a synthesized input
speedinghzl/pytorch-segmentation-toolbox/evaluate.py
code served (permissive licence) · get_code("9dace7a45606441d")
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 3, dtype family float, shape (64, 64, 5) as a later run recorded it. 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, 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
import numpy as np

torch.manual_seed(0)

class SimpleSegmentationNet(nn.Module):
    """Minimal segmentation network that outputs class probabilities."""
    def __init__(self, num_classes):
        super(SimpleSegmentationNet, self).__init__()
        self.conv1 = nn.Conv2d(3, 16, kernel_size=3, padding=1)
        self.conv2 = nn.Conv2d(16, num_classes, kernel_size=3, padding=1)
    
    def forward(self, x):
        x = self.conv1(x)
        x = self.conv2(x)
        return x

# Create a simple network
num_classes = 5
net = SimpleSegmentationNet(num_classes)
net.eval()

# Create a sample image (batch_size=1, channels=3, height=64, width=64)
image = np.random.rand(1, 3, 64, 64).astype(np.float32)

# Define tile size for sliding window
tile_size = (32, 32)

# Number of output classes
classes = num_classes

# Flip evaluation flag
flip_evaluation = False

# Recurrence parameter (not directly used in function body, but passed as argument)
recurrence = 1

ARGS = {
    'net': net,
    'image': image,
    'tile_size': tile_size,
    'classes': classes,
    'flip_evaluation': flip_evaluation,
    'recurrence': recurrence
}
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 ndarray, ndim 3, dtype family float, shape (64, 64, 5) — shape (64, 64, 5) 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

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 3 the same month, 2 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
conv3x3 686 other papers
238 dated earlier, 16 the same month, 431 later, 1 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
get_palette 8 other papers
6 dated earlier, 1 the same month, 1 later
1703.07511 (2017-03)
Deep Photo Style Transfer
1811.11721 (2018-11)
CCNet: Criss-Cross Attention for Semantic Segmentation
1903.04197 (2019-03)
Structured Knowledge Distillation for Dense Prediction
and 5 more not named here
pad_image 4 other papers
3 dated earlier, 1 the same month
1811.11721 (2018-11)
CCNet: Criss-Cross Attention for Semantic Segmentation
1903.04197 (2019-03)
Structured Knowledge Distillation for Dense Prediction
2003.00872 (2020-03)
AlignSeg: Feature-Aligned Segmentation Networks
and 1 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-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

Data augmentation is widely known as a simple yet surprisingly effective technique for regularizing deep networks. Conventional data augmentation schemes, e.g., flipping, translation or rotation, are low-level, data-independent and class-agnostic operations, leading to limited diversity for augmented samples. To this end, we propose a novel semantic data augmentation algorithm to complement traditional approaches. The proposed method is inspired by the intriguing property that deep networks are effective in learning linearized features, i.e., certain directions in the deep feature space correspond to meaningful semantic transformations, e.g., changing the background or view angle of an object. Based on this observation, translating training samples along many such directions in the feature space can effectively augment the dataset for more diversity. To implement this idea, we first introduce a sampling based method to obtain semantically meaningful directions efficiently. Then, an upper bound of the expected cross-entropy (CE) loss on the augmented training set is derived by assuming the number of augmented samples goes to infinity, yielding a highly efficient algorithm. In fact, we show that the proposed implicit semantic data augmentation (ISDA) algorithm amounts to minimizing a novel robust CE loss, which adds minimal extra computational cost to a normal training procedure. In addition to supervised learning, ISDA can be applied to semi-supervised learning tasks under the consistency regularization framework, where ISDA amounts to minimizing the upper bound of the expected KL-divergence between the augmented features and the original features. Although being simple, ISDA consistently improves the generalization performance of popular deep models (e.g., ResNets and DenseNets) on a variety of datasets, i.e., CIFAR-10, CIFAR-100, SVHN, ImageNet, and Cityscapes. Code for reproducing our results is available at https://github.com/blackfeather-wang/ISDA-for-Deep-Networks.

For agents

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

get_harvested_code_for_paper("2007.10538")
get_code_for_paper("2007.10538")
have("2007.10538")

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

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

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

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

Connect an agent — have() is free.