SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2103.16547 · NeurIPS · 2021

The Elastic Lottery Ticket Hypothesis

Zhangyang Wang, Yu Cheng, Zhe Gan, Jingjing Liu, Shuohang Wang, Xiaohan Chen

arXiv · PDF · Open in the Atlas

Code that ran

3 of 3 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 2 failures of our instrument; 0 no recorded run), measured 2026-11-22; 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/2103.16547.json · badge: /api/ran/2103.16547.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
VITA-Group/ElasticLTH marked official in Papers with Code
Papers with Code archive
3 ran · 0 no recorded run
FunctionStatusWhere it lives
change_depth_cifar_resnet Ran
ran; our contract draft was wrong, not the code
VITA-Group/ElasticLTH/lottery/branch/morphism.py
code served (permissive licence) · get_code("d6495148ce3a46d2")
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) and returned dict. 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)

# Build minimal state dicts that match the expected structure
# The function expects keys like 'blocks.{id}.{param}' and 'shortcut' patterns

def build_state_dict(num_blocks, num_stages=2):
    """Build a minimal state dict matching ResNet CIFAR structure."""
    sd = {}
    
    # Add some initial layers (non-blocks)
    sd['conv1.weight'] = torch.randn(3, 3, 3, 3)
    sd['bn1.weight'] = torch.randn(4)
    sd['bn1.bias'] = torch.randn(4)
    
    # Add blocks with shortcuts at stage boundaries
    block_id = 0
    for stage in range(num_stages):
        stage_len = num_blocks // num_stages
        for local_id in range(stage_len):
            # Add shortcut at the start of each stage
            if local_id == 0:
                sd[f'blocks.{block_id}.shortcut.weight'] = torch.randn(4, 4, 1, 1)
                sd[f'blocks.{block_id}.shortcut.bias'] = torch.randn(4)
            
            # Add regular block parameters
            sd[f'blocks.{block_id}.conv1.weight'] = torch.randn(4, 4, 3, 3)
            sd[f'blocks.{block_id}.conv1.bias'] = torch.randn(4)
            sd[f'blocks.{block_id}.bn1.weight'] = torch.randn(4)
            sd[f'blocks.{block_id}.bn1.bias'] = torch.randn(4)
            
            block_id += 1
    
    # Add final layers
    sd['fc.weight'] = torch.randn(10, 4)
    sd['fc.bias'] = torch.randn(10)
    
    return sd

# Source: 2 stages, 4 blocks total (2 per stage)
src_sd = build_state_dict(num_blocks=4, num_stages=2)

# Destination: 2 stages, 6 blocks total (3 per stage)
dst_sd = build_state_dict(num_blocks=6, num_stages=2)

# Mappings: how to map source local block ids to destination local block ids
# For each source local id, provide a list of destination local ids
# Source has 2 blocks per stage, destination has 3 blocks per stage
mappings = {
    0: [0],      # source block 0 -> dest block 0
    1: [1, 2],   # source block 1 -> dest blocks 1 and 2
}

ARGS = {
    'src_sd': src_sd,
    'dst_sd': dst_sd,
    'mappings': mappings,
    'seed': 42,
    'permute_copy': True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
perm Ran
ran, honoured the contract we drafted
VITA-Group/ElasticLTH/lottery/branch/morphism.py
code served (permissive licence) · get_code("4b8c5008ed857625")
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 1, dtype family int, shape (5,) 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

torch.manual_seed(0)

ARGS = {
    "N": 5,
    "seed": 42
}
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 1, dtype family int, shape (5,) — shape (5,) 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
shuffle_tensor Ran
ran; our contract draft was wrong, not the code
VITA-Group/ElasticLTH/lottery/branch/morphism.py
code served (permissive licence) · get_code("9adab30bd63676ec")
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 2, dtype family float, shape (2, 4) 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

torch.manual_seed(0)

# Create a small tensor with distinct dimensions (2x4) for testing
test_tensor = torch.randn(2, 4)

ARGS = {
    "tensor": test_tensor,
    "seed": 42
}
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 2, dtype family float, shape (2, 4) — shape (2, 4) 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

Also present in other papers' code

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

Lottery Ticket Hypothesis (LTH) raises keen attention to identifying sparse trainable subnetworks, or winning tickets, which can be trained in isolation to achieve similar or even better performance compared to the full models. Despite many efforts being made, the most effective method to identify such winning tickets is still Iterative Magnitude-based Pruning (IMP), which is computationally expensive and has to be run thoroughly for every different network. A natural question that comes in is: can we "transform" the winning ticket found in one network to another with a different architecture, yielding a winning ticket for the latter at the beginning, without re-doing the expensive IMP? Answering this question is not only practically relevant for efficient "once-for-all" winning ticket finding, but also theoretically appealing for uncovering inherently scalable sparse patterns in networks. We conduct extensive experiments on CIFAR-10 and ImageNet, and propose a variety of strategies to tweak the winning tickets found from different networks of the same model family (e.g., ResNets). Based on these results, we articulate the Elastic Lottery Ticket Hypothesis (E-LTH): by mindfully replicating (or dropping) and re-ordering layers for one network, its corresponding winning ticket could be stretched (or squeezed) into a subnetwork for another deeper (or shallower) network from the same family, whose performance is nearly the same competitive as the latter's winning ticket directly found by IMP. We have also extensively compared E-LTH with pruning-at-initialization and dynamic sparse training methods, as well as discussed the generalizability of E-LTH to different model families, layer types, and across datasets. Code is available at https://github.com/VITA-Group/ElasticLTH.

For agents

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

get_harvested_code_for_paper("2103.16547")
get_code_for_paper("2103.16547")
have("2103.16547")

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

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

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

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

Connect an agent — have() is free.