SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2605.06943 · 2026

ProtoSSL: Interpretable Prototype Learning from Unlabeled Time-Series Data

Brett Beaulieu-Jones, Steven Song, Sahil Sethi, Robert Grossman

arXiv · PDF · Open in the Atlas

Code that ran

5 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, 0 violated it and 2 have no contract verdict; 3 failures of our instrument; 7 no recorded run), measured 2026-11-23; 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/2605.06943.json · badge: /api/ran/2605.06943.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
StevenSong/ProtoSSL community
Papers with Code archive
5 ran · 7 no recorded run
FunctionStatusWhere it lives
BasicBlock Ran
ran on a synthesized input
StevenSong/ProtoSSL/protossl/models/_prototype_classifier.py
code served (permissive licence) · get_code("047872e250d7d4d1")
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 torch
import torch.nn as nn

INIT_ARGS = {
    'in_channels': 3,
    'out_channels': 8,
    'ratio': 0.5,
    'kernel_size': 5,
    'stride': 2,
    'groups': 1,
    'downsample': True,
    'is_first_block': False,
    'use_bn': True,
    'use_do': True
}

# Create input tensor: (n_sample, in_channels, n_length)
x = torch.randn(2, 3, 16)

ARGS = {
    'x': x
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 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)
MyMaxPool1dPadSame Ran
ran on a synthesized input
StevenSong/ProtoSSL/protossl/models/_prototype_classifier.py
code served (permissive licence) · get_code("31a45c2f788e96ff")
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, shape (2, 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 torch.nn as nn
import torch.nn.functional as F

class MyMaxPool1dPadSame(nn.Module):
    """
    extend nn.MaxPool1d to support SAME padding

    params:
        kernel_size: kernel size
        stride: the stride of the window. Default value is kernel_size

    input: (n_sample, n_channel, n_length)
    """

    def __init__(self, kernel_size):
        super(MyMaxPool1dPadSame, self).__init__()
        self.kernel_size = kernel_size
        self.max_pool = torch.nn.MaxPool1d(kernel_size=self.kernel_size)

    def forward(self, x):
        net = x
        p = max(0, self.kernel_size - 1)
        pad_left = p // 2
        pad_right = p - pad_left
        net = F.pad(net, (pad_left, pad_right), 'constant', 0)
        net = self.max_pool(net)
        return net


INIT_ARGS = {
    'kernel_size': 3
}

ARGS = {
    'x': torch.randn(2, 4, 8)
}

if __name__ == '__main__':
    module = MyMaxPool1dPadSame(**INIT_ARGS)
    output = module(**ARGS)
    print(f"Input shape: {ARGS['x'].shape}")
    print(f"Output shape: {output.shape}")
    print(f"Output: {output}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 3, dtype family float, shape (2, 4, 3) — shape (2, 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
match_whitelist_with_wildcard Ran
ran; our contract draft was wrong, not the code
StevenSong/ProtoSSL/protossl/models/_prototype_classifier.py
code served (permissive licence) · get_code("b2d14c9514a3d61d")
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 list, 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 numpy as np
from collections.abc import Iterable

torch.manual_seed(0)

# The function takes:
# 1. keys: Iterable[str] - a collection of string keys to filter
# 2. whitelist: Iterable[str] - a collection of wildcard patterns to match against

# Create sample keys - various string identifiers
keys = [
    "layer1.weight",
    "layer1.bias",
    "layer2.weight",
    "layer2.bias",
    "attention.query",
    "attention.key",
    "attention.value",
    "output.dense"
]

# Create whitelist with wildcard patterns
whitelist = [
    "layer*.weight",
    "attention.*",
    "output.dense"
]

ARGS = {
    "keys": keys,
    "whitelist": whitelist
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list 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
pairwise_cosine_similarity Ran
ran; our contract draft was wrong, not the code
StevenSong/ProtoSSL/protossl/models/_prototype_classifier.py
code served (permissive licence) · get_code("39e13ad9ee67b106")
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 Tensor, ndim 2, dtype family float, shape (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 torch
import torch.nn.functional as F

torch.manual_seed(0)

# Create two small tensors with distinct dimensions
# X: (batch_size=2, features=4)
# Y: (batch_size=3, features=4)
X = torch.randn(2, 4)
Y = torch.randn(3, 4)

ARGS = {
    "X": X,
    "Y": Y,
}
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 Tensor, ndim 2, dtype family float, shape (2, 3) — shape (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
patchwise_cosine_similarity_2d Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
StevenSong/ProtoSSL/protossl/models/_prototype_classifier.py
code served (permissive licence) · get_code("85fea75e8943f70c")
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 tuple. 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.functional as F

torch.manual_seed(0)

# Parameters for patchwise_cosine_similarity_2d
B = 2  # batch size
C = 4  # channels
H = 6  # feature map height
W = 5  # feature map width
prototype_h = 3
prototype_w = 2
P = 8  # number of prototypes
D = C * prototype_h * prototype_w  # prototype dimension

# Create feature_map: (B, C, H, W)
feature_map = torch.randn(B, C, H, W)

# Create prototypes: (P, D)
prototypes = torch.randn(P, D)

ARGS = {
    'feature_map': feature_map,
    'prototypes': prototypes,
    'prototype_h': prototype_h,
    'prototype_w': prototype_w,
}
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 tuple — a tuple output has no array shape of its own; none is 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
BaseClassifier Not yet run
unverified (harvested, no recorded run)
StevenSong/ProtoSSL/protossl/models/_prototype_classifier.py
code served (permissive licence) · get_code("52fc95798fa77887")
How it ran

no invocation recorded.

BaseEncoder Not yet run
unverified (harvested, no recorded run)
StevenSong/ProtoSSL/protossl/models/_prototype_classifier.py
code served (permissive licence) · get_code("aaa345bbe9bb7e30")
How it ran

no invocation recorded.

BasicStage Not yet run
unverified (harvested, no recorded run)
StevenSong/ProtoSSL/protossl/models/_prototype_classifier.py
code served (permissive licence) · get_code("06f47724cdc92f24")
How it ran

no invocation recorded.

Net1D Not yet run
unverified (harvested, no recorded run)
StevenSong/ProtoSSL/protossl/models/_prototype_classifier.py
code served (permissive licence) · get_code("594495ef8d103c04")
How it ran

no invocation recorded.

PretrainedMixin Not yet run
unverified (harvested, no recorded run)
StevenSong/ProtoSSL/protossl/models/_prototype_classifier.py
code served (permissive licence) · get_code("ba290a7627c2cc33")
How it ran

no invocation recorded.

PrototypeClassifier Not yet run
unverified (harvested, no recorded run)
StevenSong/ProtoSSL/protossl/models/_prototype_classifier.py
code served (permissive licence) · get_code("20ac2361aace4f1b")
How it ran

no invocation recorded.

PrototypeEncoder Not yet run
unverified (harvested, no recorded run)
StevenSong/ProtoSSL/protossl/models/_prototype_classifier.py
code served (permissive licence) · get_code("591a335829a354ac")
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, 2 are also present in other papers whose code we hold (2 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.

FunctionAlso present inEarliest-datedOthers named
MyMaxPool1dPadSame
brick of this paper's assembly: helper
2 other papers
2 dated earlier · 1 only as an assembly brick
1611.05431 (2016-11)
Aggregated Residual Transformations for Deep Neural Networks
2603.18714 (2026-03)
Holter-to-Sleep: AI-Enabled Repurposing of Single-Lead ECG for Sleep Phenotyping
BasicStage
brick of this paper's assembly: helper
1 other paper
1 dated earlier
2603.18714 (2026-03)
Holter-to-Sleep: AI-Enabled Repurposing of Single-Lead ECG for Sleep Phenotyping

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-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

In time-series domains where both predictive performance and interpretability are essential, deep neural networks achieve strong results but provide limited insight into how their predictions are made. Projection-based prototype networks address this limitation by grounding predictions in similarity to representative training examples, enabling case-based explanations and global prototype inspection. However, existing approaches rely on label supervision, tying prototypes to a specific task and requiring large labeled datasets. We introduce ProtoSSL, a novel framework for learning interpretable, projection-based prototypes from unlabeled time-series data and adapting them to downstream tasks. Our key idea is to separate motif discovery from label alignment. ProtoSSL first learns a reusable prototype bank using a self-supervised objective applied directly to prototype activations, and then aligns these prototypes to downstream tasks through an efficient assignment procedure. Across six electrocardiography (ECG) datasets, ProtoSSL improves label efficiency, outperforming supervised prototype baselines in low-data regimes with as few as 256 labeled examples; with fine-tuning, ProtoSSL outperforms supervised prototype baselines at full dataset scale. In a human evaluation study, ProtoSSL produces prototypes and prototype-based explanations that are judged more favorably than those learned with direct label supervision. We further show that the framework extends to audio classification. Thus, ProtoSSL enables both learning generalizable prototypes from unlabeled data before the downstream label space is known, and subsequent assignment of interpretable, projection-grounded prototypes to new time-series tasks.

For agents

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

get_harvested_code_for_paper("2605.06943")
get_code_for_paper("2605.06943")
have("2605.06943")

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

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

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

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

Connect an agent — have() is free.