SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2006.10598 · ICLR · 2022

Neural Parameter Allocation Search

Bryan Plummer, Nikoli Dryden, Julius Frost, Torsten Hoefler, Kate Saenko

arXiv · PDF · Open in the Atlas

Code that ran

2 of 4 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 2 have no contract verdict; 0 failures of our instrument; 2 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/2006.10598.json · badge: /api/ran/2006.10598.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
bryanplummer/ssn canonical (classifier label)
classifier basis: classifier_2025
2 ran · 2 no recorded run
FunctionStatusWhere it lives
ParameterCombiner Ran
ran on a synthesized input
bryanplummer/ssn/models/param_bank.py
code served (permissive licence) · get_code("e74fd927ee1d4ef5")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 3, 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 numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F

class ParameterCombiner(nn.Module):

    def __init__(self, learn_groups, num_candidates, layer_shape, num_params, upsample_type, upsample_window, coefficients, init, layer=None):
        super(ParameterCombiner, self).__init__()
        self._learn_groups = learn_groups
        self._upsample_type = upsample_type
        self._upsample_window = upsample_window
        self._out_param_shape = layer_shape
        self.num_candidates = num_candidates
        self.layer = layer
        self.single_dims = list(np.ones(len(layer_shape), np.int32))
        if coefficients is not None:
            coefficients = nn.Parameter(coefficients)
        self.coefficients = coefficients
        if num_candidates > 1:
            self.mask = nn.Parameter(torch.ones(num_candidates), requires_grad=False)
        self._needs_resize = np.prod(layer_shape) * num_candidates > num_params or learn_groups
        if self._needs_resize:
            self._in_param_shape = layer_shape.copy()
            if self._learn_groups:
                in_size = np.prod(layer_shape[1:])
                out_size = layer_shape[0]
                ratio = in_size / float(out_size)
                out_features = int(np.floor(np.sqrt(num_params // num_candidates // ratio)))
                assert out_features > 0
                self._in_param_shape = [out_features, num_params // (out_features * num_candidates)]
                assert upsample_type == 'inter'
            elif self._upsample_type == 'inter':
                p = 0.95
                while num_params < round(layer_shape[0] * p) * (round(layer_shape[1] * p) * np.prod(layer_shape[2:]) * num_candidates):
                    p -= 0.05
                assert p > 0
                self._in_param_shape[0] = int(round(self._in_param_shape[0] * p))
                self._in_param_shape[1] = int(round(self._in_param_shape[1] * p))
                assert self._in_param_shape[0] > 0
            else:
                self.upsample_mult = int(np.ceil(np.prod(self._out_param_shape) / float(num_params))) - 1

    def get_candidate_weights(self):
        coefficients = self.coefficients
        if self.layer is not None:
            coefficients = self.layer(coefficients.view(1, -1))
        if self._learn_groups:
            coefficients = F.softmax(coefficients.view(1, -1), 1)
        coefficients = coefficients.view(self.num_candidates, *self.single_dims)
        return coefficients * self.mask.view(self.num_candidates, *self.single_dims)

    def forward(self, x, upsample_layer=None):
        if self._needs_resize:
            if self._upsample_type == 'inter':
                x = x.view(-1)[:self.num_candidates * np.prod(self._in_param_shape)]
                x = x.view(1, self.num_candidates, self._in_param_shape[0], np.prod(self._in_param_shape[1:]))
                x = F.interpolate(x, [self._out_param_shape[0], np.prod(self._out_param_shape[1:])], mode='bilinear', align_corners=False)
            else:
                assert upsample_layer is not None
                x = upsample_layer(x, self._out_param_shape)
        x = x.view(self.num_candidates, *self._out_param_shape)
        if self.coefficients is not None:
            x = (x * self.get_candidate_weights()).sum(0)
        return x


INIT_ARGS = {
    'learn_groups': False,
    'num_candidates': 2,
    'layer_shape': np.array([8, 6, 4], dtype=np.int32),
    'num_params': 256,
    'upsample_type': 'inter',
    'upsample_window': 3,
    'coefficients': torch.randn(2),
    'init': 'kaiming',
    'layer': None,
}

ARGS = {
    'x': torch.randn(512),
    'upsample_layer': None,
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
SharedParameters Ran
ran on a synthesized input
bryanplummer/ssn/models/param_bank.py
code served (permissive licence) · get_code("58bda0bd90b24dc5")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 2, 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
import numpy as np

def simple_init(tensor):
    """Simple initialization function for 3x3 tensors"""
    if tensor.dim() >= 2:
        nn.init.xavier_uniform_(tensor)
    else:
        nn.init.uniform_(tensor, -0.1, 0.1)

# Define init_blocks: list of ((num_candidates, start, end), layer_shape)
init_blocks = [
    ((2, 0, 24), (3, 4)),      # 2 candidates, indices 0-24, shape (3, 4) -> 12 params each = 24 total
    ((3, 24, 60), (4, 3)),     # 3 candidates, indices 24-60, shape (4, 3) -> 12 params each = 36 total
]

INIT_ARGS = {
    'upsample_type': 'bilinear',
    'emb_size': 8,
    'num_params': 100,
    'init': simple_init,
    'init_blocks': init_blocks,
}

METHOD = 'get_params'

ARGS = {
    'num_candidates': 2,
    'start': 0,
    'end': 24,
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
ParameterBank Not yet run
unverified (harvested, no recorded run)
bryanplummer/ssn/models/param_bank.py
code served (permissive licence) · get_code("c80714ceae8c503e")
How it ran

no invocation recorded.

ParameterUpsampler Not yet run
unverified (harvested, no recorded run)
bryanplummer/ssn/models/param_bank.py
code served (permissive licence) · get_code("79df5f3e2329b5d2")
How it ran

no invocation recorded.

Also present in other papers' code

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

Training neural networks requires increasing amounts of memory. Parameter sharing can reduce memory and communication costs, but existing methods assume networks have many identical layers and utilize hand-crafted sharing strategies that fail to generalize. We introduce Neural Parameter Allocation Search (NPAS), a novel task where the goal is to train a neural network given an arbitrary, fixed parameter budget. NPAS covers both low-budget regimes, which produce compact networks, as well as a novel high-budget regime, where additional capacity can be added to boost performance without increasing inference FLOPs. To address NPAS, we introduce Shapeshifter Networks (SSNs), which automatically learn where and how to share parameters in a network to support any parameter budget without requiring any changes to the architecture or loss function. NPAS and SSNs provide a complete framework for addressing generalized parameter sharing, and can also be combined with prior work for additional performance gains. We demonstrate the effectiveness of our approach using nine network architectures across four diverse tasks, including ImageNet classification and transformers.

For agents

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

get_harvested_code_for_paper("2006.10598")
get_code_for_paper("2006.10598")
have("2006.10598")

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

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

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

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

Connect an agent — have() is free.