SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2006.04062 · NeurIPS · 2020

Consistency Regularization for Certified Robustness of Smoothed Classifiers

Jinwoo Shin, Jongheon Jeong

arXiv · PDF · Open in the Atlas

Code that ran

5 of 6 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; 2 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/2006.04062.json · badge: /api/ran/2006.04062.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
jh-jeong/smoothing-consistency canonical (classifier label)
classifier basis: census
5 ran · 1 no recorded run
FunctionStatusWhere it lives
consistency_loss Ran
ran on a synthesized input
jh-jeong/smoothing-consistency/code/consistency.py
code served (permissive licence) · get_code("3d45147f0a674bc0")
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 0, dtype family float, 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
import torch.nn.functional as F

torch.manual_seed(0)

# Create small logit tensors: batch_size=2, num_classes=4
batch_size = 2
num_classes = 4

# Create a list of logit batches (the function expects multiple noisy samples)
logit1 = torch.randn(batch_size, num_classes)
logit2 = torch.randn(batch_size, num_classes)
logit3 = torch.randn(batch_size, num_classes)

logits = [logit1, logit2, logit3]

# Define hyperparameters
lbd = 1.0
eta = 0.5
loss_type = 'default'

ARGS = {
    'logits': logits,
    'lbd': lbd,
    'eta': eta,
    'loss': loss_type
}
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 0, dtype family float, 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
conv3x3 Ran
ran; our contract draft was wrong, not the code
jh-jeong/smoothing-consistency/code/archs/cifar_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.

entropy Ran
ran; our contract draft was wrong, not the code
jh-jeong/smoothing-consistency/code/consistency.py
pointer only (licence: MIT); the stored copy get_code serves, from xiasong0501/DRS, is pointer only (licence: NONE) · get_code("23f822c3d6d64a12")
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 xiasong0501/DRS, 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_num_classes Ran
ran on a synthesized input
jh-jeong/smoothing-consistency/code/datasets.py
code served (permissive licence) · get_code("626fd2d46f9e5106")
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
import torch.nn as nn

torch.manual_seed(0)

# Based on the function signature, get_num_classes takes a single parameter: dataset (str)
# The function simply checks the dataset name and returns the corresponding number of classes
# No complex objects needed - just a string

ARGS = {
    'dataset': 'cifar10'
}
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
kl_div Ran
ran on a synthesized input
jh-jeong/smoothing-consistency/code/consistency.py
code served (permissive licence) · get_code("6518bcfd499a3632")
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 1, dtype family float, shape (2,) 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.functional as F

torch.manual_seed(0)

# The function takes input and targets tensors
# input: logits that will be log_softmax'd (batch_size, num_classes)
# targets: probability distribution over classes (batch_size, num_classes)

batch_size = 2
num_classes = 4

# Create input logits (batch_size, num_classes)
input_tensor = torch.randn(batch_size, num_classes)

# Create target probabilities (batch_size, num_classes)
# These should sum to 1 along dim 1 for KL divergence
targets_tensor = F.softmax(torch.randn(batch_size, num_classes), dim=1)

ARGS = {
    'input': input_tensor,
    'targets': targets_tensor,
}
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 1, dtype family float, shape (2,) — shape (2,) 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
get_dataset Not yet run
unverified (harvested, no recorded run)
jh-jeong/smoothing-consistency/code/datasets.py
code served (permissive licence) · get_code("009cb123eeb4af07")
How it ran

no invocation recorded.

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, 4 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 1 the same month, 4 later) and 2 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
226 dated earlier, 11 the same month, 448 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
entropy 2 other papers
2 later
2212.09000 (2022-12)
Confidence-aware Training of Smoothed Classifiers for Certified Robustness
2404.09586 (2024-04)
Mitigating the Curse of Dimensionality for Certified Robustness via Dual Randomized Smoothing
consistency_loss 1 other paper
1 later
2212.09000 (2022-12)
Confidence-aware Training of Smoothed Classifiers for Certified Robustness
kl_div 1 other paper
1 later
2212.09000 (2022-12)
Confidence-aware Training of Smoothed Classifiers for Certified Robustness

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

A recent technique of randomized smoothing has shown that the worst-case (adversarial) 2 -robustness can be transformed into the average-case Gaussian-robustness by "smoothing" a classifier, i.e., by considering the averaged prediction over Gaussian noise. In this paradigm, one should rethink the notion of adversarial robustness in terms of generalization ability of a classifier under noisy observations. We found that the trade-off between accuracy and certified robustness of smoothed classifiers can be greatly controlled by simply regularizing the prediction consistency over noise. This relationship allows us to design a robust training objective without approximating a non-existing smoothed classifier, e.g., via soft smoothing. Our experiments under various deep neural network architectures and datasets show that the "certified" 2 -robustness can be dramatically improved with the proposed regularization, even achieving better or comparable results to the state-of-the-art approaches with significantly less training costs and hyperparameters. 34th Conference on Neural Information Processing Systems (NeurIPS 2020),

For agents

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

get_harvested_code_for_paper("2006.04062")
get_code_for_paper("2006.04062")
have("2006.04062")

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

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

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

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

Connect an agent — have() is free.