SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1509.08985 · 2015

Generalizing Pooling Functions in Convolutional Neural Networks: Mixed, Gated, and Tree

arXiv · PDF · Open in the Atlas

Code that ran

7 of 12 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, 1 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/1509.08985.json · badge: /api/ran/1509.08985.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
BeanGreen247/Python-AI-Arts community (classifier label)
classifier basis not recorded on the link
7 ran · 5 no recorded run
FunctionStatusWhere it lives
combine_patches_grid Ran
ran on a synthesized input
BeanGreen247/Python-AI-Arts/MRFNetwork.py
code served (permissive licence) · get_code("41aedb19007e222e")
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, 15, 10) 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
from sklearn.feature_extraction.image import reconstruct_from_patches_2d

# Create small patch data
# Shape: (rows, cols, channels, patch_row, patch_col)
# Let's use: 2 rows of patches, 3 cols of patches, 4 channels, 5x5 patches
num_rows = 2
num_cols = 3
num_channels = 4
patch_size = 5

in_patches = np.random.rand(num_rows, num_cols, num_channels, patch_size, patch_size).astype(np.float64)

# The output shape should be compatible with the patches
# When reconstructing from patches, the output image shape is typically
# (height, width, channels). Since we have 2x3 patches of size 5x5,
# the reconstructed image will be roughly (10, 15, 4) in (height, width, channels)
# But the function transposes at the end, so we need to think about what shape makes sense
# The function reshapes to (num_patches, channels, patch_row, patch_col)
# then transposes to (num_patches, patch_row, patch_col, channels)
# then calls reconstruct_from_patches_2d which expects (n_patches, patch_height, patch_width, n_channels)
# and out_shape should be (image_height, image_width, n_channels)
out_shape = (10, 15, num_channels)

ARGS = {
    "in_patches": in_patches,
    "out_shape": out_shape,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — 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, 15, 10) — shape (4, 15, 10) 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
fromimage Ran
ran on a synthesized input
BeanGreen247/Python-AI-Arts/utils.py
code served (permissive licence) · get_code("a2702526a751fd71")
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, 3, 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 LAB image (3D array with shape (height, width, channels))
# The function expects either LAB or RGB format depending on mode
lab_img = np.random.rand(4, 3, 3).astype(np.float64)

ARGS = {
    'img': lab_img,
    'mode': 'RGB'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, skimage — 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, 3, 3) — shape (4, 3, 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
imread Ran
ran on a synthesized input
BeanGreen247/Python-AI-Arts/utils.py
code served (permissive licence) · get_code("8ac86cd34d9cb372")
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 int, shape (4, 3, 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
import tempfile
import os
from PIL import Image

# Create a temporary test image file
temp_dir = tempfile.mkdtemp()
test_image_path = os.path.join(temp_dir, "test_image.png")

# Create a small test image (4x3 RGB)
img_array = np.random.randint(0, 256, size=(4, 3, 3), dtype=np.uint8)
img = Image.fromarray(img_array, mode='RGB')
img.save(test_image_path)

ARGS = {
    'path': test_image_path,
    'mode': 'RGB'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, imageio, 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 int, shape (4, 3, 3) — shape (4, 3, 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
imresize Ran
ran on a synthesized input
BeanGreen247/Python-AI-Arts/utils.py
code served (permissive licence) · get_code("d39af5f660f0b9c8")
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 int, shape (8, 6, 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
from PIL import Image

# Create a small test image as a numpy array
# Image dimensions: 4 height x 3 width x 3 channels (RGB)
img_array = np.random.randint(0, 256, size=(4, 3, 3), dtype=np.uint8)

# Define target size as (H, W) format
target_size = (8, 6)

# Define interpolation method
interp_method = 'bilinear'

ARGS = {
    'img': img_array,
    'size': target_size,
    'interp': interp_method
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, 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 int, shape (8, 6, 3) — shape (8, 6, 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
make_patch_grid Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
BeanGreen247/Python-AI-Arts/MRFNetwork.py
code served (permissive licence) · get_code("d5963a56a4dda917")
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 5, dtype family float, shape (3, 4, 3, 3, 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

# x is expected to be a numpy array with shape (num_channels, rows, cols)
# The function transposes it to (cols, rows, num_channels) for patch extraction
# Then extracts patches and reshapes them

# Create a small test array with shape (num_channels, rows, cols)
# Using distinct dimensions: 3 channels, 5 rows, 6 cols
x = np.random.randn(3, 5, 6).astype(np.float32)

patch_size = 3
patch_stride = 1

ARGS = {
    "x": x,
    "patch_size": patch_size,
    "patch_stride": patch_stride,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 5, dtype family float, shape (3, 4, 3, 3, 3) — shape (3, 4, 3, 3, 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
match_histograms Ran
ran on a synthesized input
BeanGreen247/Python-AI-Arts/color_transfer.py
code served (permissive licence) · get_code("efc212198f55fd61")
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 2, dtype family float, shape (3, 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 two small grayscale images with different histograms
source = np.array([
    [10, 20, 30],
    [40, 50, 60],
    [70, 80, 90]
], dtype=np.float64)

template = np.array([
    [100, 120],
    [140, 160]
], dtype=np.float64)

ARGS = {
    "source": source,
    "template": template
}
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 2, dtype family float, shape (3, 3) — shape (3, 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
str_to_bool Ran
ran, violated the contract we drafted
BeanGreen247/Python-AI-Arts/INetwork.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from PARC/intricate-art-neural-transfer, is pointer only (licence: NONE) · get_code("caa3066795ecd99b")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from PARC/intricate-art-neural-transfer, 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.

addpackage Not yet run
unverified (harvested, no recorded run)
BeanGreen247/Python-AI-Arts/lib/python2.7/site.py
code served (permissive licence) · get_code("e3164ec1c604910c")
How it ran

no invocation recorded.

addsitedir Not yet run
unverified (harvested, no recorded run)
BeanGreen247/Python-AI-Arts/lib/python2.7/site.py
code served (permissive licence) · get_code("ef0da9bf156b9164")
How it ran

no invocation recorded.

addsitepackages Not yet run
unverified (harvested, no recorded run)
BeanGreen247/Python-AI-Arts/lib/python2.7/site.py
code served (permissive licence) · get_code("0fe179cb1754e095")
How it ran

no invocation recorded.

congrid Not yet run
unverified (harvested, no recorded run)
BeanGreen247/Python-AI-Arts/MRFNetwork.py
code served (permissive licence) · get_code("2a960a7560d97987")
How it ran

no invocation recorded.

preprocess_image Not yet run
unverified (harvested, no recorded run)
BeanGreen247/Python-AI-Arts/improved_neural_doodle.py
code served (permissive licence) · get_code("73b9ec5be97f7803")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 3 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 2 later) and 9 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
addsitedir 1 other paper
1 later
2005.01575 (2020-05)
StackGenVis: Alignment of Data, Algorithms, and Models for Stacking Ensemble Learning Using Performance Metrics
make_patch_grid 1 other paper
1 later
1601.04589 (2016-01)
Combining Markov Random Fields and Convolutional Neural Networks for Image Synthesis
str_to_bool 1 other paper
1 dated earlier
1508.06576 (2015-08)
A Neural Algorithm of Artistic Style

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

We seek to improve deep neural networks by generalizing the pooling operations that play a central role in current architectures. We pursue a careful exploration of approaches to allow pooling to learn and to adapt to complex and variable patterns. The two primary directions lie in (1) learning a pooling function via (two strategies of) combining of max and average pooling, and (2) learning a pooling function in the form of a tree-structured fusion of pooling filters that are themselves learned. In our experiments every generalized pooling operation we explore improves performance when used in place of average or max pooling. We experimentally demonstrate that the proposed pooling operations provide a boost in invariance properties relative to conventional pooling and set the state of the art on several widely adopted benchmark datasets; they are also easy to implement, and can be applied within various deep neural network architectures. These benefits come with only a light increase in computational overhead during training and a very modest increase in the number of model parameters.

For agents

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

get_harvested_code_for_paper("1509.08985")
get_code_for_paper("1509.08985")
have("1509.08985")

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

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

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

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

Connect an agent — have() is free.