SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2305.17205 · 2023

Ghost Noise for Regularizing Deep Neural Networks

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 (0 of them constructed an object rather than computing a result; 4 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 0 failures of our instrument; 0 no recorded run); 1 of them was also run on the host, not in the jail, by the peer-agreement lane that set its level, 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/2305.17205.json · badge: /api/ran/2305.17205.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
epfml/ghost-noise canonical (classifier label)
classifier basis: census
6 ran · 0 no recorded run
FunctionStatusWhere it lives
count_params Ran
ran, honoured the contract we drafted
epfml/ghost-noise/submodules/timm/benchmark.py
code served (permissive licence) · get_code("410bffb8a07b52e3")
How it ran

Ran in Syntology's jail on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. The comparison behind this sample's level is a different run: the peer-agreement lane ran it again on the host, not in the jail (report dated 2026-09-04T23:28:41Z). 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)

# Build a small model with parameters
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

model = SimpleModel()

ARGS = {
    "model": model
}
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 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
checkpoint_metric Ran
ran, honoured the contract we drafted
epfml/ghost-noise/submodules/timm/avg_checkpoints.py
code served (permissive licence) · get_code("33bca8cbc866bf64")
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 float, 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 tempfile
import os

torch.manual_seed(0)

# Create a temporary checkpoint file with a 'metric' key
with tempfile.NamedTemporaryFile(delete=False, suffix='.pt') as f:
    checkpoint_path = f.name
    checkpoint_data = {
        'metric': 0.95,
        'model_state': torch.randn(2, 4),
        'epoch': 10
    }
    torch.save(checkpoint_data, checkpoint_path)

ARGS = {
    'checkpoint_path': checkpoint_path
}
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 float, 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
cuda_timestamp Ran
ran, honoured the contract we drafted
epfml/ghost-noise/submodules/timm/benchmark.py
code served (permissive licence) · get_code("50d653ee6a59955c")
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 float, ndim 0, dtype family float, shape () 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 time
import torch
import torch.nn.parallel

torch.manual_seed(0)

ARGS = {
    "sync": False,
    "device": None,
}
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 float, 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
ghost_noise_injection Ran
ran on a synthesized input
epfml/ghost-noise/nodo/minimal_gni.py
code served (permissive licence) · get_code("bec9456c146ecd1e")
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, 4, 3, 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 small 4D tensor (B, C, H, W)
# B=2 (batch), C=4 (channels), H=3 (height), W=5 (width)
X = torch.randn(2, 4, 3, 5)

# N is the number of ghost samples to draw
N = 2

# eps is a small constant for numerical stability
eps = 0.001

ARGS = {
    "X": X,
    "N": N,
    "eps": eps,
}
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, 4, 3, 5) — shape (2, 4, 3, 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
timestamp Ran
ran, honoured the contract we drafted
epfml/ghost-noise/submodules/timm/benchmark.py
code served (permissive licence) · get_code("475160c5a1a1225a")
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 float, 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 time

def timestamp(sync=False):
    return time.perf_counter()

ARGS = {
    "sync": False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, 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
xbn2d Ran
ran on a synthesized input
epfml/ghost-noise/nodo/exclusive_batch_norm.py
code served (permissive licence) · get_code("3ec5d12d27b05a19")
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, 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)

# Analyzing the function xbn2d:
# - x: a tensor that gets reshaped and normalized
# - weight: optional tensor used for gain scaling (viewed as [1, -1, 1, 1])
# - bias: optional tensor used for shift (viewed as [1, -1, 1, 1])
# - batch_size: optional int for batch dimension
# - eps: float for numerical stability

# The function expects:
# - x to have shape that can be reshaped to (-1, N, ...) where N is batch_size
# - weight and bias to have a dimension that matches x.shape[1]
# - The function processes 2D spatial data (4D tensors: batch, channels, height, width)

# Create a 4D tensor: (batch=2, channels=3, height=4, width=5)
x = torch.randn(2, 3, 4, 5)

# weight and bias should match the channel dimension (3)
weight = torch.randn(3)
bias = torch.randn(3)

# batch_size parameter
batch_size = 2

# eps parameter (use default)
eps = 1e-05

ARGS = {
    "x": x,
    "weight": weight,
    "bias": bias,
    "batch_size": batch_size,
    "eps": eps
}
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, 3, 4, 5) — shape (2, 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

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 (4 with at least one paper dated earlier, 4 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
count_params 10 other papers
3 dated earlier, 1 the same month, 5 later, 1 same year, order not determinable
2108.01390 (2021-08)
Evo-ViT: Slow-Fast Token Evolution for Dynamic Vision Transformer
2201.09792 (2022-01)
Patches Are All You Need?
ijcai2023_0106 (2023 (year only))
SWAT: Spatial Structure Within and Among Tokens
and 7 more not named here
cuda_timestamp 10 other papers
3 dated earlier, 1 the same month, 5 later, 1 same year, order not determinable
2108.01390 (2021-08)
Evo-ViT: Slow-Fast Token Evolution for Dynamic Vision Transformer
2201.09792 (2022-01)
Patches Are All You Need?
ijcai2023_0106 (2023 (year only))
SWAT: Spatial Structure Within and Among Tokens
and 7 more not named here
timestamp 10 other papers
3 dated earlier, 1 the same month, 5 later, 1 same year, order not determinable
2108.01390 (2021-08)
Evo-ViT: Slow-Fast Token Evolution for Dynamic Vision Transformer
2201.09792 (2022-01)
Patches Are All You Need?
ijcai2023_0106 (2023 (year only))
SWAT: Spatial Structure Within and Among Tokens
and 7 more not named here
checkpoint_metric 4 other papers
1 dated earlier, 1 the same month, 2 later
2201.09792 (2022-01)
Patches Are All You Need?
2305.17190 (2023-05)
Multiplication-Free Transformer Training via Piecewise Affine Operations
2401.17992 (2024-01)
Multilinear Operator 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-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

Batch Normalization (BN) is widely used to stabilize the optimization process and improve the test performance of deep neural networks. The regularization effect of BN depends on the batch size and explicitly using smaller batch sizes with Batch Normalization, a method known as Ghost Batch Normalization (GBN), has been found to improve generalization in many settings. We investigate the effectiveness of GBN by disentangling the induced ``Ghost Noise'' from normalization and quantitatively analyzing the distribution of noise as well as its impact on model performance. Inspired by our analysis, we propose a new regularization technique called Ghost Noise Injection (GNI) that imitates the noise in GBN without incurring the detrimental train-test discrepancy effects of small batch training. We experimentally show that GNI can provide a greater generalization benefit than GBN. Ghost Noise Injection can also be beneficial in otherwise non-noisy settings such as layer-normalized networks, providing additional evidence of the usefulness of Ghost Noise in Batch Normalization as a regularizer.

For agents

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

get_harvested_code_for_paper("2305.17205")
get_code_for_paper("2305.17205")
have("2305.17205")

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

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

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

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

Connect an agent — have() is free.