SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2303.15140 · CVPR · 2023

SimpleNet: A Simple Network for Image Anomaly Detection and Localization

Zilei Wang, Zhikang Liu, Yiming Zhou, Yuansheng Xu

arXiv · PDF · Open in the Atlas

Code that ran

10 of 17 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (10 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 10 have no contract verdict; 0 failures of our instrument; 7 no recorded run), 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/2303.15140.json · badge: /api/ran/2303.15140.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
donaldrr/simplenet marked official in Papers with Code
Papers with Code archive
10 ran · 7 no recorded run
FunctionStatusWhere it lives
Aggregator Ran
ran on a synthesized input · constructed an object; no result was computed
donaldrr/simplenet/simplenet.py
code served (permissive licence) · get_code("678e7187ec61f5fd")
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, Aggregator: 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

torch.manual_seed(0)

# The Aggregator.__init__ takes target_dim as a parameter
# The forward method expects features tensor and reshapes it, applies adaptive_avg_pool1d, then reshapes again
# We need to provide a valid target_dim value and create appropriate input features

# Create a small features tensor
# Shape: (batch_size, feature_dim) where we'll reshape to (batch_size, 1, feature_dim)
# Let's use batch_size=2, feature_dim=8 so we have something to pool down
features = torch.randn(2, 8)

# target_dim is the output dimension after adaptive_avg_pool1d
target_dim = 4

ARGS = {
    'target_dim': target_dim
}
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 Aggregator — 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 Aggregator 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
Discriminator Ran
ran on a synthesized input · constructed an object; no result was computed
donaldrr/simplenet/simplenet.py
code served (permissive licence) · get_code("e55477994bd9693d")
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, Discriminator: 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

torch.manual_seed(0)

ARGS = {
    "in_planes": 16,
    "n_layers": 3,
    "hidden": 12,
}
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 Discriminator — 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 Discriminator 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
ForwardHook Ran
ran on a synthesized input · constructed an object; no result was computed
donaldrr/simplenet/simplenet.py
code served (permissive licence) · get_code("64717f7b5fbd0493")
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, ForwardHook: 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 copy

torch.manual_seed(0)

# Construct the arguments for ForwardHook
hook_dict = {}
layer_name = "conv1"
last_layer_to_extract = "conv1"

ARGS = {
    "hook_dict": hook_dict,
    "layer_name": layer_name,
    "last_layer_to_extract": last_layer_to_extract,
}
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 ForwardHook — 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 ForwardHook 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
MeanMapper Ran
ran on a synthesized input · constructed an object; no result was computed
donaldrr/simplenet/simplenet.py
code served (permissive licence) · get_code("0dfe645218bd3db7")
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, MeanMapper: 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

torch.manual_seed(0)

ARGS = {
    "preprocessing_dim": 4
}
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 MeanMapper — 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 MeanMapper 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
NetworkFeatureAggregator Ran
ran on a synthesized input · constructed an object; no result was computed
donaldrr/simplenet/simplenet.py
code served (permissive licence) · get_code("2e556d6bb822cc58")
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, NetworkFeatureAggregator: 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

torch.manual_seed(0)

class SimpleBackbone(nn.Module):
    """Minimal backbone with named layers for feature extraction."""
    def __init__(self):
        super(SimpleBackbone, self).__init__()
        self.layer1 = nn.Conv2d(3, 8, kernel_size=3, padding=1)
        self.layer2 = nn.Sequential(
            nn.Conv2d(8, 16, kernel_size=3, padding=1),
            nn.ReLU()
        )
        self.layer3 = nn.Linear(16 * 4 * 4, 10)
    
    def forward(self, x):
        x = self.layer1(x)
        x = self.layer2(x)
        x = x.view(x.size(0), -1)
        x = self.layer3(x)
        return x

backbone = SimpleBackbone()

layers_to_extract_from = ["layer1", "layer2", "layer2.1"]

device = "cpu"

train_backbone = False

ARGS = {
    "backbone": backbone,
    "layers_to_extract_from": layers_to_extract_from,
    "device": device,
    "train_backbone": train_backbone,
}
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 NetworkFeatureAggregator — 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 NetworkFeatureAggregator 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
PatchMaker Ran
ran on a synthesized input · constructed an object; no result was computed
donaldrr/simplenet/simplenet.py
code served (permissive licence) · get_code("3e6187f15c3a459e")
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, PatchMaker: 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 numpy as np

torch.manual_seed(0)

ARGS = {
    "patchsize": 3,
    "top_k": 2,
    "stride": 1,
}
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 PatchMaker — 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 PatchMaker 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
Preprocessing Ran
ran on a synthesized input · constructed an object; no result was computed
donaldrr/simplenet/simplenet.py
code served (permissive licence) · get_code("f1988fdd4a9c07c5")
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, Preprocessing: 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

torch.manual_seed(0)

# The Preprocessing class takes:
# - input_dims: a list/tuple of integers representing input dimensions
# - output_dim: an integer representing the output dimension

# Looking at the forward method:
# - It iterates over self.preprocessing_modules and features
# - features is expected to be iterable (list of tensors)
# - Each module processes each feature independently
# - Results are stacked along dim=1

# Create distinct sizes for clarity:
# input_dims will have 3 different input dimensions
input_dims = [8, 6, 4]  # Three different input dimensions
output_dim = 3  # Output dimension after mean pooling

ARGS = {
    "input_dims": input_dims,
    "output_dim": output_dim,
}
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 Preprocessing — 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 Preprocessing 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
Projection Ran
ran on a synthesized input · constructed an object; no result was computed
donaldrr/simplenet/simplenet.py
code served (permissive licence) · get_code("f93cbaa832d322df")
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, Projection: 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

torch.manual_seed(0)

ARGS = {
    'in_planes': 16,
    'out_planes': 32,
    'n_layers': 3,
    'layer_type': 2
}
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 Projection — 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 Projection 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
RescaleSegmentor Ran
ran on a synthesized input · constructed an object; no result was computed
donaldrr/simplenet/simplenet.py
code served (permissive licence) · get_code("e3a23efda4733f5c")
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, RescaleSegmentor: 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 numpy as np

torch.manual_seed(0)

# The function uses:
# - device: passed to .to()
# - target_size: used in F.interpolate as size parameter (needs to be tuple/list of 2 ints)
# - self.smoothing: used in ndimage.gaussian_filter

device = 'cpu'
target_size = (224, 224)

ARGS = {
    'device': device,
    'target_size': target_size,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type RescaleSegmentor — 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 RescaleSegmentor 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
TBWrapper Ran
ran on a synthesized input · constructed an object; no result was computed
donaldrr/simplenet/simplenet.py
code served (permissive licence) · get_code("a1d0858c293ce5ef")
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, TBWrapper: 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 tempfile
from torch.utils.tensorboard import SummaryWriter

torch.manual_seed(0)

# Create a temporary directory for tensorboard logs
log_dir = tempfile.mkdtemp()

ARGS = {
    "log_dir": log_dir
}
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 TBWrapper — 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 TBWrapper 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
LastLayerToExtractReachedException Not yet run
unverified (harvested, no recorded run)
donaldrr/simplenet/simplenet.py
code served (permissive licence) · get_code("4dc045abcd12dc9a")
How it ran

no invocation recorded.

SimpleNet Not yet run
unverified (harvested, no recorded run)
donaldrr/simplenet/simplenet.py
code served (permissive licence) · get_code("09597c93b79f6e3d")
How it ran

no invocation recorded.

compute_imagewise_retrieval_metrics Not yet run
unverified (harvested, no recorded run)
donaldrr/simplenet/simplenet.py
code served (permissive licence) · get_code("552ec33122db4c84")
How it ran

no invocation recorded.

compute_pixelwise_retrieval_metrics Not yet run
unverified (harvested, no recorded run)
donaldrr/simplenet/simplenet.py
code served (permissive licence) · get_code("984ad644f49b9e33")
How it ran

no invocation recorded.

compute_pro Not yet run
unverified (harvested, no recorded run)
donaldrr/simplenet/simplenet.py
code served (permissive licence) · get_code("3f6b6cfd48085e0c")
How it ran

no invocation recorded.

init_weight Not yet run
unverified (harvested, no recorded run)
donaldrr/simplenet/simplenet.py
code served (permissive licence) · get_code("fa8054f2f81a5085")
How it ran

no invocation recorded.

plot_segmentation_images Not yet run
unverified (harvested, no recorded run)
donaldrr/simplenet/simplenet.py
code served (permissive licence) · get_code("7d131a5a97a1dd18")
How it ran

no invocation recorded.

Also present in other papers' code

Of 17 samples lifted from this paper's linked repositories, 17 carry a function identity and 0 do not. Of the 17 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 1 later) and 16 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
compute_pixelwise_retrieval_metrics
brick of this paper's assembly: helper
2 other papers
1 dated earlier, 1 later
2106.08265 (2021-06)
Towards Total Recall in Industrial Anomaly Detection
2608.15277 (2026-08)
Memory-Bounded Continuation of Greedy Sampling for Continual Anomaly Detection

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

Transistor Cable Bottle Metal_nut Hazelnut Pill Wood Carpet Grid Toothbrush Leather Zipper Capsule Tile Figure 1. Visualization of samples in MVTec AD. The produced anomaly maps superimposed on the images. Anomaly region of high anomaly score is colored with orange. The red boundary denotes contours of actual segmentation maps for anomalies.

For agents

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

get_harvested_code_for_paper("2303.15140")
get_code_for_paper("2303.15140")
have("2303.15140")

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

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

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

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

Connect an agent — have() is free.