SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1906.12340 · 2019

Using Self-Supervised Learning Can Improve Model Robustness and Uncertainty

arXiv · PDF · Open in the Atlas

Code that ran

11 of 12 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 3 have no contract verdict; 8 failures of our instrument; 1 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/1906.12340.json · badge: /api/ran/1906.12340.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
hendrycks/ss-ood canonical (classifier label)
classifier basis: census
11 ran · 1 no recorded run
FunctionStatusWhere it lives
conv1x1 Ran
ran; our contract draft was wrong, not the code
hendrycks/ss-ood/models/resnet.py
code served (permissive licence) · get_code("d9def42110729a85")
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 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)

# The function conv1x1 takes in_planes, out_planes, and stride as parameters
# It returns an nn.Conv2d layer configured for 1x1 convolution
# We need to provide valid integer arguments for these parameters

ARGS = {
    "in_planes": 3,
    "out_planes": 64,
    "stride": 1
}
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 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
conv3x3 Ran
ran; our contract draft was wrong, not the code
hendrycks/ss-ood/models/resnet.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.

make_layers Ran
ran; our contract draft was wrong, not the code
hendrycks/ss-ood/multiclass_ood/models/allconv.py
code served (permissive licence) · get_code("72410f1136cc7250")
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 Sequential. 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)

# The make_layers function takes a cfg parameter which is a list/sequence
# of configuration values that can be:
# - 'Md' for MaxPool2d + Dropout
# - 'A' for AvgPool2d
# - 'NIN' for 1x1 conv layer
# - 'nopad' for 3x3 conv without padding
# - integers for output channels (3x3 conv with padding)

cfg = [64, 'NIN', 'Md', 128, 'nopad', 'A']

ARGS = {
    'cfg': cfg
}
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 Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 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
normalize Ran
ran; our contract draft was wrong, not the code
hendrycks/ss-ood/multiclass_ood/opencv_functional.py
code served (permissive licence) · get_code("0c4ba7caa2964ea7")
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 3, dtype family float, shape (3, 4, 5) 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)

# Create a tensor image of size (C, H, W) where C=3 channels, H=4, W=5
tensor = torch.rand(3, 4, 5)

# Define mean and std for each channel
mean = [0.485, 0.456, 0.406]
std = [0.229, 0.224, 0.225]

ARGS = {
    'tensor': tensor,
    'mean': mean,
    'std': std
}
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 3, dtype family float, shape (3, 4, 5) — shape (3, 4, 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
normalize_l2 Ran
ran; our contract draft was wrong, not the code
hendrycks/ss-ood/adversarial/attacks.py
pointer only (licence: MIT); the stored copy get_code serves, from joelsimonoff/gram-adversary-detection, is pointer only (licence: NONE) · get_code("b16e920816efe253")
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 joelsimonoff/gram-adversary-detection, 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.

possible_downsample Ran
ran on a synthesized input
hendrycks/ss-ood/models/revnet.py
code served (permissive licence) · get_code("ff93f9f79d2b719f")
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 4, dtype family float, shape (2, 6, 8, 8) 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
from torch.autograd import Variable
import math

torch.manual_seed(0)

# Create a small input tensor: (batch=2, channels=4, height=8, width=8)
x = torch.randn(2, 4, 8, 8, requires_grad=True)

# Set up parameters
in_channels = 4
out_channels = 6
stride = 1
padding = 1
dilation = 1

ARGS = {
    "x": x,
    "in_channels": in_channels,
    "out_channels": out_channels,
    "stride": stride,
    "padding": padding,
    "dilation": dilation,
}
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 4, dtype family float, shape (2, 6, 8, 8) — shape (2, 6, 8, 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
resnet18 Ran
ran; our contract draft was wrong, not the code
hendrycks/ss-ood/models/resnet.py
code served (permissive licence) · get_code("5b03b7018885e7bf")
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)

ARGS = {
    'pretrained': 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 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
size_after_residual Ran
ran on a synthesized input
hendrycks/ss-ood/models/revnet.py
code served (permissive licence) · get_code("db245d85a98ab1e9")
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 math
import torch

torch.manual_seed(0)

# The function calculates output size after a residual block operation
# It takes:
# - size: a tuple (N, C_in, H_in, W_in) representing batch size, channels, height, width
# - out_channels: integer for output channels
# - kernel_size: integer for convolution kernel size
# - stride: integer for stride
# - padding: integer for padding
# - dilation: integer for dilation

ARGS = {
    "size": (2, 3, 8, 10),  # (N=2, C_in=3, H_in=8, W_in=10)
    "out_channels": 16,
    "kernel_size": 3,
    "stride": 1,
    "padding": 1,
    "dilation": 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 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
tensor_clamp Ran
ran; our contract draft was wrong, not the code
hendrycks/ss-ood/adversarial/attacks.py
pointer only (licence: MIT); the stored copy get_code serves, from joelsimonoff/gram-adversary-detection, is pointer only (licence: NONE) · get_code("5b640b32a444ae38")
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 joelsimonoff/gram-adversary-detection, 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.

tensor_clamp_l2 Ran
ran; our contract draft was wrong, not the code
hendrycks/ss-ood/adversarial/attacks.py
pointer only (licence: MIT); the stored copy get_code serves, from joelsimonoff/gram-adversary-detection, is pointer only (licence: NONE) · get_code("63b4423b18c974ad")
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 joelsimonoff/gram-adversary-detection, 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.

to_tensor Ran
ran on a synthesized input
hendrycks/ss-ood/multiclass_ood/opencv_functional.py
code served (permissive licence) · get_code("b46a3fe2c2098a3e")
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 3, dtype family float, shape (3, 4, 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 torch
import numpy as np

torch.manual_seed(0)

# Create a sample numpy image with shape (height, width, channels)
# Using uint8 dtype to test the ByteTensor conversion path
pic = np.random.randint(0, 256, size=(4, 3, 3), dtype=np.uint8)

ARGS = {
    'pic': pic
}
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 Tensor, ndim 3, dtype family float, shape (3, 4, 3) — shape (3, 4, 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
resize Not yet run
unverified (harvested, no recorded run)
hendrycks/ss-ood/multiclass_ood/opencv_functional.py
code served (permissive licence) · get_code("6f725a3000220ae9")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 8 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 2 the same month, 8 later) and 4 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
132 dated earlier, 4 the same month, 550 later · 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
conv1x1 431 other papers
36 dated earlier, 2 the same month, 392 later, 1 undated · 38 only as an assembly brick
1409.1556 (2014-09)
Very Deep Convolutional Networks for Large-Scale Image Recognition
1506.01186 (2015-06)
Cyclical Learning Rates for Training Neural Networks
1507.05717 (2015-07)
An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition
and 428 more not named here
resnet18 89 other papers
18 dated earlier, 71 later
1705.09759 (2017-05)
CASENet: Deep Category-Aware Semantic Edge Detection
1801.07698 (2018-01)
ArcFace: Additive Angular Margin Loss for Deep Face Recognition
1803.00839 (2018-03)
Pose-Robust Face Recognition via Deep Residual Equivariant Mapping
and 86 more not named here
tensor_clamp 4 other papers
2 dated earlier, 2 later
1508.06576 (2015-08)
A Neural Algorithm of Artistic Style
1901.09960 (2019-01)
Using Pre-Training Can Improve Model Robustness and Uncertainty
1908.08016 (2019-08)
Testing Robustness Against Unforeseen Adversaries
and 1 more not named here
make_layers 3 other papers
1 dated earlier, 2 later
1901.09960 (2019-01)
Using Pre-Training Can Improve Model Robustness and Uncertainty
2010.08001 (2020-10)
Maximum-Entropy Adversarial Data Augmentation for Improved Generalization and Robustness
2406.01494 (2024-06)
Robust Classification by Coupling Data Mollification with Label Smoothing
normalize_l2 3 other papers
2 dated earlier, 1 later
1508.06576 (2015-08)
A Neural Algorithm of Artistic Style
1901.09960 (2019-01)
Using Pre-Training Can Improve Model Robustness and Uncertainty
1912.12510 (2019-12)
Detecting Out-of-Distribution Examples with In-distribution Examples and Gram Matrices
tensor_clamp_l2 3 other papers
2 dated earlier, 1 later
1508.06576 (2015-08)
A Neural Algorithm of Artistic Style
1901.09960 (2019-01)
Using Pre-Training Can Improve Model Robustness and Uncertainty
1912.12510 (2019-12)
Detecting Out-of-Distribution Examples with In-distribution Examples and Gram Matrices
normalize 2 other papers
2 later
2006.00212 (2020-06)
Complex Sequential Understanding through the Awareness of Spatial and Temporal Concepts
136950719 (2022 (year only))
A Simple and Robust Correlation Filtering method for text-based person search

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

Self-supervision provides effective representations for downstream tasks without requiring labels. However, existing approaches lag behind fully supervised training and are often not thought beneficial beyond obviating or reducing the need for annotations. We find that self-supervision can benefit robustness in a variety of ways, including robustness to adversarial examples, label corruption, and common input corruptions. Additionally, self-supervision greatly benefits out-of-distribution detection on difficult, near-distribution outliers, so much so that it exceeds the performance of fully supervised methods. These results demonstrate the promise of self-supervision for improving robustness and uncertainty estimation and establish these tasks as new axes of evaluation for future self-supervised learning research.

For agents

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

get_harvested_code_for_paper("1906.12340")
get_code_for_paper("1906.12340")
have("1906.12340")

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

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

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

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

Connect an agent — have() is free.