SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1605.09304 · 2016

Synthesizing the preferred inputs for neurons in neural networks via deep generator networks

arXiv · PDF · Open in the Atlas

Code that ran

6 of 11 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 5 have no contract verdict; 1 failure of our instrument; 5 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/1605.09304.json · badge: /api/ran/1605.09304.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
ndey96/deep-generator-network community (classifier label)
classifier basis not recorded on the link
4 ran · 2 no recorded run
Evolving-AI-Lab/synthesizing community (classifier label)
classifier basis not recorded on the link
2 ran · 1 no recorded run
copy not recorded community
not in the paper's declared repositories
0 ran · 2 no recorded run
FunctionStatusWhere it lives
compute_loss Ran
ran on a synthesized input
ndey96/deep-generator-network/loss_stub.py
code served (permissive licence) · get_code("b0e6e987c2ef0cfb")
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 tuple, ndim 1, 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 small tensors with distinct dimensions for clarity
batch_size = 2
spatial_dim = 4
feature_dim = 3
output_dim = 5

# y: target image
y = torch.randn(batch_size, output_dim, spatial_dim, spatial_dim)

# x: input image
x = torch.randn(batch_size, feature_dim, spatial_dim, spatial_dim)

# gx: generated image (same shape as y)
gx = torch.randn(batch_size, output_dim, spatial_dim, spatial_dim)

# egx: encoded generated image
egx = torch.randn(batch_size, feature_dim, spatial_dim, spatial_dim)

# cgx: content features of generated image
cgx = torch.randn(batch_size, feature_dim)

# cy: content features of target
cy = torch.randn(batch_size, feature_dim)

# dgx: discriminator output for generated image
dgx = torch.randn(batch_size, 1, 2, 2)

# dy: discriminator output for real image
dy = torch.randn(batch_size, 1, 2, 2)

# t_ones: target ones for adversarial loss
t_ones = torch.ones(batch_size * 4)

# t_zeros: target zeros for discriminator loss
t_zeros = torch.zeros(batch_size * 4)

# Loss functions
bce = nn.BCEWithLogitsLoss()
mse = nn.MSELoss()

# Lambda weights
lambda_feat = 0.1
lambda_adv = 0.01
lambda_img = 1.0

ARGS = {
    'y': y,
    'x': x,
    'gx': gx,
    'egx': egx,
    'cgx': cgx,
    'cy': cy,
    'dgx': dgx,
    'dy': dy,
    't_ones': t_ones,
    't_zeros': t_zeros,
    'bce': bce,
    'mse': mse,
    'lambda_feat': lambda_feat,
    'lambda_adv': lambda_adv,
    'lambda_img': lambda_img
}
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 tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
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
convert Ran
ran; our contract draft was wrong, not the code
ndey96/deep-generator-network/synthesize.py
pointer only (licence: MIT); the stored copy get_code serves, from akatigre/multi2one, is pointer only (licence: NONE) · get_code("4c4cd96456054cfe")
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 akatigre/multi2one, 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_optimizers Ran
ran on a synthesized input
ndey96/deep-generator-network/optimizer_stub.py
code served (permissive licence) · get_code("5f72f9c63bb450a3")
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 tuple, ndim 1, 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)

# Define a minimal generator module
class Generator(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 8)
    
    def forward(self, x):
        return self.linear(x)

# Define a minimal discriminator module
class Discriminator(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(8, 1)
    
    def forward(self, x):
        return self.linear(x)

# Define a minimal wrapper module with G and D attributes
class GANModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.G = Generator()
        self.D = Discriminator()
    
    def forward(self, x):
        return self.G(x), self.D(x)

# Create the GAN module
gan_module = GANModule()

# Create a DataParallel-like wrapper that has a .module attribute
class DataParallelWrapper(nn.Module):
    def __init__(self, module):
        super().__init__()
        self.module = module
    
    def forward(self, x):
        return self.module(x)

DS = DataParallelWrapper(gan_module)

# Define arguments
ARGS = {
    "DS": DS,
    "lr": 0.0002
}
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 tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
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
normalize Ran
ran on a synthesized input
Evolving-AI-Lab/synthesizing/patchShow.py
code served (permissive licence) · get_code("74a74b343c22fd81")
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 ndarray, ndim 3, dtype family float, shape (2, 2, 3) 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 numpy as np

# Create a small test image array
img = np.array([
    [[10, 20, 30], [40, 50, 60]],
    [[70, 80, 90], [100, 110, 120]]
], dtype=np.float32)

ARGS = {
    "img": img,
    "out_range": (0.0, 1.0),
    "in_range": None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family float, shape (2, 2, 3) — shape (2, 2, 3) 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
patchShow_single Ran
ran on a synthesized input
Evolving-AI-Lab/synthesizing/patchShow.py
code served (permissive licence) · get_code("c9dfeeed15b41474")
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 ndarray, ndim 3, dtype family float, shape (4, 5, 3) 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 numpy as np

# Create a small test image batch with shape (num, channels, height, width)
# num=2, channels=3, height=4, width=5
images = np.random.rand(2, 3, 4, 5) * 255  # Random values in range [0, 255)

# Define arguments for patchShow_single
ARGS = {
    "images": images,
    "out_range": (0.0, 1.0),
    "in_range": None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family float, shape (4, 5, 3) — shape (4, 5, 3) 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
process_img Ran
ran on a synthesized input
ndey96/deep-generator-network/gen_init_compare.py
code served (permissive licence) · get_code("d73ff14130ee6a57")
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 ndarray, ndim 3, dtype family float, shape (4, 4, 3) 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 numpy as np

torch.manual_seed(0)

# Create a small tensor with batch size 1, 3 channels, 4x4 spatial dimensions
# The function expects img to have .detach() and .numpy() methods (a torch tensor)
# It processes img[0] and moves axis 0 to -1, so shape should be (batch, channels, height, width)
img = torch.randn(1, 3, 4, 4)

ARGS = {
    "img": img
}
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 ndarray, ndim 3, dtype family float, shape (4, 4, 3) — shape (4, 4, 3) 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
generate_image Not yet run
unverified (harvested, no recorded run)
this paper's copy was not recorded; identical code first harvested from KamitaniLab/cnnpref
pointer only · get_code("b43d90577686455e")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

generate_image Not yet run
unverified (harvested, no recorded run)
this paper's copy was not recorded; identical code first harvested from KamitaniLab/cnnpref
pointer only · get_code("f4b8e2487402d23c")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

get_data_tools Not yet run
unverified (harvested, no recorded run)
ndey96/deep-generator-network/data_stub.py
code served (permissive licence) · get_code("3c30dcac42056712")
How it ran

no invocation recorded.

load_checkpoint Not yet run
unverified (harvested, no recorded run)
ndey96/deep-generator-network/checkpoint_stub.py
code served (permissive licence) · get_code("a50752815479c30b")
How it ran

no invocation recorded.

patchShow Not yet run
unverified (harvested, no recorded run)
Evolving-AI-Lab/synthesizing/patchShow.py
code served (permissive licence) · get_code("c4c6fdc763e9b844")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 4 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 2 later) and 7 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
generate_image 3 other papers
3 dated earlier
1312.6034 (2013-12)
Deep Inside Convolutional Networks: Visualising Image Classification Models and Saliency Maps
1506.06579 (2015-06)
Understanding Neural Networks Through Deep Visualization
1602.02644 (2016-02)
Generating Images with Perceptual Similarity Metrics based on Deep Networks
generate_image 2 other papers
2 dated earlier
1506.06579 (2015-06)
Understanding Neural Networks Through Deep Visualization
1602.02644 (2016-02)
Generating Images with Perceptual Similarity Metrics based on Deep Networks
convert 1 other paper
1 later
2302.13331 (2023-02)
Learning Input-agnostic Manipulation Directions in StyleGAN with Text Guidance
normalize 1 other paper
1 later
1612.00005 (2016-12)
Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space

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

Deep neural networks (DNNs) have demonstrated state-of-the-art results on many pattern recognition tasks, especially vision classification problems. Understanding the inner workings of such computational brains is both fascinating basic science that is interesting in its own right - similar to why we study the human brain - and will enable researchers to further improve DNNs. One path to understanding how a neural network functions internally is to study what each of its neurons has learned to detect. One such method is called activation maximization (AM), which synthesizes an input (e.g. an image) that highly activates a neuron. Here we dramatically improve the qualitative state of the art of activation maximization by harnessing a powerful, learned prior: a deep generator network (DGN). The algorithm (1) generates qualitatively state-of-the-art synthetic images that look almost real, (2) reveals the features learned by each neuron in an interpretable way, (3) generalizes well to new datasets and somewhat well to different network architectures without requiring the prior to be relearned, and (4) can be considered as a high-quality generative method (in this case, by generating novel, creative, interesting, recognizable images).

For agents

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

get_harvested_code_for_paper("1605.09304")
get_code_for_paper("1605.09304")
have("1605.09304")

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

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

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

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

Connect an agent — have() is free.