SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2001.06838 · 2020

Towards Stabilizing Batch Statistics in Backward Propagation of Batch Normalization

arXiv · PDF · Open in the Atlas

Code that ran

3 of 4 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 1 has no contract verdict; 2 failures of our instrument; 1 no recorded run), measured 2026-11-21; 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/2001.06838.json · badge: /api/ran/2001.06838.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
megvii-model/MABN canonical (classifier label)
classifier basis: census
3 ran · 1 no recorded run
FunctionStatusWhere it lives
conv1x1 Ran
ran; our contract draft was wrong, not the code
megvii-model/MABN/cls/networks/resnet.py
code served (permissive licence) · get_code("7a48395822d92761")
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)

# The function conv1x1 takes in_planes, out_planes, and stride as parameters
# It returns a Conv2d instance which is used as a layer
# We need to provide valid integer values for these parameters

ARGS = {
    "in_planes": 3,
    "out_planes": 4,
    "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
conv3x3 Ran
ran; our contract draft was wrong, not the code
megvii-model/MABN/cls/networks/resnet.py
code served (permissive licence) · get_code("1e5865e06cfa8e5d")
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
get_train_dataloader Ran
ran on a synthesized input
megvii-model/MABN/cls/utils.py
code served (permissive licence) · get_code("2dd50f3ea73256ab")
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 DataLoader. 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 numpy as np
import PIL
from torchvision import transforms, datasets
import cv2
from torch.utils.data import Sampler
import random
import math
import tempfile
import os
from pathlib import Path

torch.manual_seed(0)
random.seed(0)
np.random.seed(0)

# Create a minimal fake ImageFolder dataset
temp_dir = tempfile.mkdtemp()
class_dir_1 = os.path.join(temp_dir, "class_1")
class_dir_2 = os.path.join(temp_dir, "class_2")
os.makedirs(class_dir_1, exist_ok=True)
os.makedirs(class_dir_2, exist_ok=True)

# Create small dummy images (4x4 RGB images)
for i in range(3):
    img_array = np.random.randint(0, 256, (4, 4, 3), dtype=np.uint8)
    img = PIL.Image.fromarray(img_array)
    img.save(os.path.join(class_dir_1, f"img_{i}.png"))

for i in range(3):
    img_array = np.random.randint(0, 256, (4, 4, 3), dtype=np.uint8)
    img = PIL.Image.fromarray(img_array)
    img.save(os.path.join(class_dir_2, f"img_{i}.png"))

ARGS = {
    "train_dir": temp_dir,
    "batch_size": 2,
    "total_epochs": 1,
    "local_rank": 0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, cv2, numpy, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataLoader — a DataLoader output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataLoader 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
accuracy Not yet run
unverified (harvested, no recorded run)
megvii-model/MABN/cls/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from yuxwind/exactcompression, is pointer only (licence: NONE) · get_code("469bf48752905889")
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 yuxwind/exactcompression, 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. No invocation recorded.

Also present in other papers' code

Of 4 samples lifted from this paper's linked repositories, 4 carry a function identity and 0 do not. Of the 4 distinct functions with an identity, 3 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 1 the same month, 3 later) and 1 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
accuracy 71 other papers
22 dated earlier, 1 the same month, 48 later · 2 only as an assembly brick
1505.05424 (2015-05)
Weight Uncertainty in Neural Networks
1705.07204 (2017-05)
Ensemble Adversarial Training: Attacks and Defenses
1802.10399 (2018-02)
Compressing Neural Networks using the Variational Information Bottleneck
and 68 more not named here
conv3x3 9 other papers
9 later
2004.00288 (2020-04)
CurricularFace: Adaptive Curriculum Learning Loss for Deep Face Recognition
2107.08621 (2021-07)
Face.evoLVe: A High-Performance Face Recognition Library
2210.10090 (2022-10)
How to Boost Face Recognition with StyleGAN?
and 6 more not named here
conv1x1 8 other papers
8 later
2004.00288 (2020-04)
CurricularFace: Adaptive Curriculum Learning Loss for Deep Face Recognition
2008.04115 (2020-08)
T-GD: Transferable GAN-generated Images Detection Framework
2107.08621 (2021-07)
Face.evoLVe: A High-Performance Face Recognition Library
and 5 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-21.

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 one of the most widely used techniques in Deep Learning field. But its performance can awfully degrade with insufficient batch size. This weakness limits the usage of BN on many computer vision tasks like detection or segmentation, where batch size is usually small due to the constraint of memory consumption. Therefore many modified normalization techniques have been proposed, which either fail to restore the performance of BN completely, or have to introduce additional nonlinear operations in inference procedure and increase huge consumption. In this paper, we reveal that there are two extra batch statistics involved in backward propagation of BN, on which has never been well discussed before. The extra batch statistics associated with gradients also can severely affect the training of deep neural network. Based on our analysis, we propose a novel normalization method, named Moving Average Batch Normalization (MABN). MABN can completely restore the performance of vanilla BN in small batch cases, without introducing any additional nonlinear operations in inference procedure. We prove the benefits of MABN by both theoretical analysis and experiments. Our experiments demonstrate the effectiveness of MABN in multiple computer vision tasks including ImageNet and COCO. The code has been released in https://github.com/megvii-model/MABN.

For agents

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

get_harvested_code_for_paper("2001.06838")
get_code_for_paper("2001.06838")
have("2001.06838")

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

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

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

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

Connect an agent — have() is free.