SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2101.02824 · CVPR · 2021

Neighbor2Neighbor: Self-Supervised Denoising from Single Noisy Images

Jianzhuang Liu, Tao Huang, Huchuan Lu, Xu Jia, Songjiang Li

arXiv · PDF · Open in the Atlas

Code that ran

12 of 13 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (7 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 8 have no contract verdict; 4 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/2101.02824.json · badge: /api/ran/2101.02824.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
TaoHuang2018/Neighbor2Neighbor marked official in Papers with Code
Papers with Code archive
5 ran · 1 no recorded run
pminhtam/Neigh2Neigh community
Papers with Code archive
5 ran · 0 no recorded run
Wenchao-Du/Neighbor2Neighbor_Pytorch community
Papers with Code archive
1 ran · 0 no recorded run
neeraj3029/Ne2Ne-Image-Denoising community
Papers with Code archive
1 ran · 0 no recorded run
FunctionStatusWhere it lives
Crop2d Ran
ran on a synthesized input · constructed an object; no result was computed
pminhtam/Neigh2Neigh/ssdn/network.py
pointer only (licence: NONE) · get_code("c9ef6c33ec47630e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, pminhtam/Neigh2Neigh 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.

Multi_MSE_Loss Ran
ran on a synthesized input
Wenchao-Du/Neighbor2Neighbor_Pytorch/libs/loss.py
pointer only (licence: NONE) · get_code("f249185d6b91104c")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Wenchao-Du/Neighbor2Neighbor_Pytorch 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.

NoiseNetwork Ran
ran on a synthesized input · constructed an object; no result was computed
pminhtam/Neigh2Neigh/ssdn/network.py
pointer only (licence: NONE) · get_code("c8bfe7ded4cad667")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, pminhtam/Neigh2Neigh 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.

Shift2d Ran
ran on a synthesized input · constructed an object; no result was computed
pminhtam/Neigh2Neigh/ssdn/network.py
pointer only (licence: NONE) · get_code("a6334958a9565f52")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, pminhtam/Neigh2Neigh 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.

ShiftConv2d Ran
ran on a synthesized input · constructed an object; no result was computed
pminhtam/Neigh2Neigh/ssdn/network.py
pointer only (licence: NONE) · get_code("b05820d71c37ef68")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, pminhtam/Neigh2Neigh 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.

UNet Ran
ran on a synthesized input · constructed an object; no result was computed
neeraj3029/Ne2Ne-Image-Denoising/UNet.py
pointer only (licence: NONE) · get_code("0224deb6ef909d03")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, neeraj3029/Ne2Ne-Image-Denoising 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.

UNet Ran
ran on a synthesized input · constructed an object; no result was computed
TaoHuang2018/Neighbor2Neighbor/arch_unet.py
code served (permissive licence) · get_code("50e8e32ad310c881")
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 an instance of its own class, UNet: the run constructed the object and did not call it, so no result was computed. 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
import torch.nn.init as init

torch.manual_seed(0)

# Define ARGS dict with all UNet parameters
ARGS = {
    'in_nc': 3,
    'out_nc': 3,
    'n_feature': 48,
    'blindspot': False,
    'zero_last': 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 UNet — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a UNet 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
UpsampleCat Ran
ran on a synthesized input · constructed an object; no result was computed
TaoHuang2018/Neighbor2Neighbor/arch_unet.py
code served (permissive licence) · get_code("5c84351023118bb3")
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 an instance of its own class, UpsampleCat: the run constructed the object and did not call it, so no result was computed. 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
import torch.nn.init as init

torch.manual_seed(0)

def initialize_weights(net_l, scale=1):
    if not isinstance(net_l, list):
        net_l = [net_l]
    for net in net_l:
        for m in net.modules():
            if isinstance(m, nn.Conv2d) or isinstance(m, nn.Conv3d):
                init.kaiming_normal_(m.weight, a=0, mode='fan_in')
                m.weight.data *= scale
                if m.bias is not None:
                    m.bias.data.zero_()
            elif isinstance(m, nn.ConvTranspose2d) or isinstance(m, nn.ConvTranspose3d):
                init.kaiming_normal_(m.weight, a=0, mode='fan_in')
                m.weight.data *= scale
                if m.bias is not None:
                    m.bias.data.zero_()
            elif isinstance(m, nn.Linear):
                init.kaiming_normal_(m.weight, a=0, mode='fan_in')
                m.weight.data *= scale
                if m.bias is not None:
                    m.bias.data.zero_()
            elif isinstance(m, nn.BatchNorm2d) or isinstance(m, nn.BatchNorm3d):
                init.constant_(m.weight, 1)
                init.constant_(m.bias.data, 0.0)

class UpsampleCat(nn.Module):

    def __init__(self, in_nc, out_nc):
        super(UpsampleCat, self).__init__()
        self.in_nc = in_nc
        self.out_nc = out_nc
        self.deconv = nn.ConvTranspose2d(in_nc, out_nc, 2, 2, 0, False)
        initialize_weights(self.deconv, 0.1)

    def forward(self, x1, x2):
        x1 = self.deconv(x1)
        return torch.cat([x1, x2], dim=1)

ARGS = {
    'in_nc': 8,
    'out_nc': 16,
}
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 UpsampleCat — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a UpsampleCat 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
conv_func Ran
ran; our contract draft was wrong, not the code
TaoHuang2018/Neighbor2Neighbor/arch_unet.py
code served (permissive licence) · get_code("f844c4029b596c7d")
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; 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 torch.nn as nn

torch.manual_seed(0)

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

# Create a Conv2d module with odd kernel size (required for blindspot=True case)
# in_channels=4, out_channels=3, kernel_size=3
conv = nn.Conv2d(in_channels=4, out_channels=3, kernel_size=3, padding=0, bias=True)

# blindspot parameter: test with True to exercise the padding logic
blindspot = True

ARGS = {
    "x": x,
    "conv": conv,
    "blindspot": blindspot
}
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 — no output shape is stated: observe_signature.py could not observe it (no_result)
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
pool_func Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
TaoHuang2018/Neighbor2Neighbor/arch_unet.py
code served (permissive licence) · get_code("d0e74e91b0b81520")
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; 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 torch.nn as nn

torch.manual_seed(0)

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

# Create a pooling layer - MaxPool2d is a common choice
pool = nn.MaxPool2d(kernel_size=2, stride=1)

# blindspot parameter - boolean flag
blindspot = True

ARGS = {
    "x": x,
    "pool": pool,
    "blindspot": blindspot
}
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 — no output shape is stated: observe_signature.py could not observe it (no_result)
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
rotate Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
TaoHuang2018/Neighbor2Neighbor/arch_unet.py
code served (permissive licence) · get_code("619d574c900357ee")
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; 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

torch.manual_seed(0)

# Create a small 4D tensor (batch=2, channels=3, height=4, width=5)
# The function uses dims=(3, 2) for rotation, which are the last two spatial dimensions
x = torch.randn(2, 3, 4, 5)

# Test with angle=90 (one of the valid cases)
angle = 90

ARGS = {
    "x": x,
    "angle": angle
}
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 — no output shape is stated: observe_signature.py could not observe it (no_result)
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
rotate Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
pminhtam/Neigh2Neigh/ssdn/network.py
pointer only (licence: NONE) · get_code("c0c224ec3f6201e6")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, pminhtam/Neigh2Neigh 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.

initialize_weights Not yet run
unverified (harvested, no recorded run)
TaoHuang2018/Neighbor2Neighbor/arch_unet.py
code served (permissive licence) · get_code("4f766d82438d4198")
How it ran

no invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 13 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.

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

In the last few years, image denoising has benefited a lot from the fast development of neural networks. However, the requirement of large amounts of noisy-clean image pairs for supervision limits the wide use of these models. Although there have been a few attempts in training an image denoising model with only single noisy images, existing self-supervised denoising approaches suffer from inefficient network training, loss of useful information, or dependence on noise modeling. In this paper, we present a very simple yet effective method named Neighbor2Neighbor to train an effective image denoising model with only noisy images. Firstly, a random neighbor sub-sampler is proposed for the generation of training image pairs. In detail, input and target used to train a network are images sub-sampled from the same noisy image, satisfying the requirement that paired pixels of paired images are neighbors and have very similar appearance with each other. Secondly, a denoising network is trained on sub-sampled training pairs generated in the first stage, with a proposed regularizer as additional loss for better performance. The proposed Neighbor2Neighbor framework is able to enjoy the progress of state-of-the-art supervised denoising networks in network architecture design. Moreover, it avoids heavy dependence on the assumption of the noise distribution. We explain our approach from a theoretical perspective and further validate it through extensive experiments, including synthetic experiments with different noise distributions in sRGB space and real-world experiments on a denoising benchmark dataset in raw-RGB space.

For agents

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

get_harvested_code_for_paper("2101.02824")
get_code_for_paper("2101.02824")
have("2101.02824")

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

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

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

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

Connect an agent — have() is free.