SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2104.10745 · 2021

PocketNet: A Smaller Neural Network for Medical Image Analysis

arXiv · PDF · Open in the Atlas

Code that ran

7 of 10 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, 2 violated it and 0 have no contract verdict; 5 failures of our instrument; 3 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/2104.10745.json · badge: /api/ran/2104.10745.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
aecelaya/MIST canonical (classifier label)
classifier basis: census
7 ran · 3 no recorded run
FunctionStatusWhere it lives
average_fold_weights Ran
ran; our contract draft was wrong, not the code
aecelaya/MIST/mist/models/model_loader.py
code served (permissive licence) · get_code("1adf43c0b9ad10ee")
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 OrderedDict. 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
import os
from collections import OrderedDict

torch.manual_seed(0)

# Create temporary checkpoint files with sample state dicts
temp_dir = tempfile.mkdtemp()

# Create 3 sample checkpoints with identical keys but different weight values
checkpoint_paths = []
for fold_idx in range(3):
    state_dict = OrderedDict({
        'layer1.weight': torch.randn(4, 3),
        'layer1.bias': torch.randn(4),
        'layer2.weight': torch.randn(5, 4),
        'layer2.bias': torch.randn(5),
    })
    checkpoint_path = os.path.join(temp_dir, f'fold_{fold_idx}.pt')
    torch.save(state_dict, checkpoint_path)
    checkpoint_paths.append(checkpoint_path)

# Define output path (None for this test, or provide a temp path)
output_checkpoint_path = os.path.join(temp_dir, 'averaged.pt')

ARGS = {
    'weights_paths': checkpoint_paths,
    'output_path': output_checkpoint_path,
}
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 OrderedDict — a OrderedDict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a OrderedDict 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
compare_headers Ran
ran, violated the contract we drafted
aecelaya/MIST/mist/analyze_data/analyzer_utils.py
code served (permissive licence) · get_code("baeb0f95ed7c4367")
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 bool, ndim 0, dtype family float, shape () 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 matching headers
header1 = {
    'dimensions': (128, 256, 512),
    'origin': (0.0, 0.0, 0.0),
    'spacing': (1.0, 1.0, 2.0),
    'direction': np.array([
        [1.0, 0.0, 0.0],
        [0.0, 1.0, 0.0],
        [0.0, 0.0, 1.0]
    ])
}

header2 = {
    'dimensions': (128, 256, 512),
    'origin': (0.0, 0.0, 0.0),
    'spacing': (1.0, 1.0, 2.0),
    'direction': np.array([
        [1.0, 0.0, 0.0],
        [0.0, 1.0, 0.0],
        [0.0, 0.0, 1.0]
    ])
}

ARGS = {
    'header1': header1,
    'header2': header2
}
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 bool, ndim 0, dtype family float, shape () — shape () 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
get_one_hot Ran
ran; our contract draft was wrong, not the code
aecelaya/MIST/mist/loss_functions/loss_utils.py
code served (permissive licence) · get_code("ebd28ad03ab13f04")
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 5, dtype family float, shape (2, 5, 4, 3, 2) 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 torch.nn.functional as F

torch.manual_seed(0)

# Create a small 3D label tensor of shape (batch_size=2, 1, height=4, width=3, depth=2)
# Values should be class indices (integers) from 0 to n_classes-1
y_true = torch.randint(0, 5, size=(2, 1, 4, 3, 2))

# Number of classes
n_classes = 5

ARGS = {
    "y_true": y_true,
    "n_classes": n_classes,
}
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 5, dtype family float, shape (2, 5, 4, 3, 2) — shape (2, 5, 4, 3, 2) 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
get_resampled_image_dimensions Ran
ran; our contract draft was wrong, not the code
aecelaya/MIST/mist/analyze_data/analyzer_utils.py
code served (permissive licence) · get_code("0b42f79ddf203136")
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 int; 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 numpy as np

# Set seeds for reproducibility
np.random.seed(0)

# Define arguments for get_resampled_image_dimensions
dimensions = (128, 256, 64)
spacing = (1.0, 1.0, 2.0)
target_spacing = (0.5, 0.5, 1.0)

ARGS = {
    "dimensions": dimensions,
    "spacing": spacing,
    "target_spacing": target_spacing,
}
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 tuple, ndim 1, dtype family int — 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
is_image_3d Ran
ran, violated the contract we drafted
aecelaya/MIST/mist/analyze_data/analyzer_utils.py
code served (permissive licence) · get_code("303af9990cadb6f0")
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 bool, ndim 0, dtype family float, shape () 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

# The function checks if header['dimensions'] has length 3
# So we need to construct a header dict with a 'dimensions' key

ARGS = {
    'header': {
        'dimensions': (256, 256, 128)  # 3D image: width, height, depth
    }
}
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 bool, ndim 0, dtype family float, shape () — shape () 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
load_pretrained_encoder Ran
ran; our contract draft was wrong, not the code
aecelaya/MIST/mist/models/model_loader.py
code served (permissive licence) · get_code("3bacea1040f6e48e")
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
from collections import OrderedDict
import tempfile
import os

torch.manual_seed(0)

# Create a minimal model that implements get_encoder_state_dict()
class MinimalMISTModel(nn.Module):
    def __init__(self, in_channels=3):
        super().__init__()
        # Encoder: simple conv layers
        self.encoder_conv1 = nn.Conv2d(in_channels, 8, kernel_size=3, padding=1)
        self.encoder_conv2 = nn.Conv2d(8, 16, kernel_size=3, padding=1)
        
        # Decoder: simple conv layers
        self.decoder_conv1 = nn.Conv2d(16, 8, kernel_size=3, padding=1)
        self.decoder_conv2 = nn.Conv2d(8, 4, kernel_size=3, padding=1)
        
        # Output head
        self.output_head = nn.Conv2d(4, 1, kernel_size=1)
    
    def get_encoder_state_dict(self):
        """Return only encoder weights as an OrderedDict."""
        encoder_dict = OrderedDict()
        for name, param in self.named_parameters():
            if 'encoder' in name:
                encoder_dict[name] = param.data
        return encoder_dict
    
    def forward(self, x):
        # Simple forward pass
        x = self.encoder_conv1(x)
        x = self.encoder_conv2(x)
        x = self.decoder_conv1(x)
        x = self.decoder_conv2(x)
        x = self.output_head(x)
        return x


# Create a source checkpoint with matching encoder structure
def create_source_checkpoint(path, in_channels=3):
    """Create a source checkpoint file for testing."""
    source_model = MinimalMISTModel(in_channels=in_channels)
    checkpoint = OrderedDict()
    
    # Add encoder weights to checkpoint
    for name, param in source_model.named_parameters():
        if 'encoder' in name:
            checkpoint[name] = param.data.clone()
    
    torch.save(checkpoint, path)


# Create temporary checkpoint file
temp_dir = tempfile.mkdtemp()
checkpoint_path = os.path.join(temp_dir, 'pretrained_encoder.pt')
create_source_checkpoint(checkpoint_path, in_channels=3)

# Create target model with same in_channels
target_model = MinimalMISTModel(in_channels=3)

# Set up arguments
ARGS = {
    'model': target_model,
    'weights_path': checkpoint_path,
    'in_channel_strategy': 'average'
}
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
register_model Ran
ran; our contract draft was wrong, not the code
aecelaya/MIST/mist/models/model_registry.py
code served (permissive licence) · get_code("8ca7abd6421cb932")
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 function. 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
from collections.abc import Callable

# Initialize the model registry (this would normally exist in the module)
MODEL_REGISTRY = {}

# Define a simple test function to register
def simple_model_fn():
    """A simple model building function."""
    return nn.Linear(10, 5)

# Define ARGS with the parameter for register_model
ARGS = {
    "name": "test_model",
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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_alpha_scheduler Not yet run
unverified (harvested, no recorded run)
aecelaya/MIST/mist/loss_functions/alpha_schedulers.py
code served (permissive licence) · get_code("9c46300a1eb0ae3e")
How it ran

no invocation recorded.

get_default_scheduler_config Not yet run
unverified (harvested, no recorded run)
aecelaya/MIST/mist/loss_functions/alpha_schedulers.py
code served (permissive licence) · get_code("c51f3c6a41028abe")
How it ran

no invocation recorded.

get_model_from_registry Not yet run
unverified (harvested, no recorded run)
aecelaya/MIST/mist/models/model_registry.py
code served (permissive licence) · get_code("94ab7944ba89d1de")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 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 10 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

Medical imaging deep learning models are often large and complex, requiring specialized hardware to train and evaluate these models. To address such issues, we propose the PocketNet paradigm to reduce the size of deep learning models by throttling the growth of the number of channels in convolutional neural networks. We demonstrate that, for a range of segmentation and classification tasks, PocketNet architectures produce results comparable to that of conventional neural networks while reducing the number of parameters by multiple orders of magnitude, using up to 90% less GPU memory, and speeding up training times by up to 40%, thereby allowing such models to be trained and deployed in resource-constrained settings.

For agents

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

get_harvested_code_for_paper("2104.10745")
get_code_for_paper("2104.10745")
have("2104.10745")

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

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

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

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

Connect an agent — have() is free.