SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2606.13277 · 2026

ProtoX-AD: Self-Explainable Time Series Anomaly Detection and Characterization

Michael Kampffmeyer, Robert Jenssen, Kristoffer Wickstrøm, Aitor Sánchez-Ferrera, Elisabeth Wetzer

arXiv · PDF · Open in the Atlas

Code that ran

6 of 8 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (6 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 6 have no contract verdict; 0 failures of our instrument; 2 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/2606.13277.json · badge: /api/ran/2606.13277.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
Aitorzan3/ProtoX-AD community
Papers with Code archive
6 ran · 2 no recorded run
FunctionStatusWhere it lives
ConvBlock Ran
ran on a synthesized input · constructed an object; no result was computed
Aitorzan3/ProtoX-AD/src/models.py
code served (permissive licence) · get_code("ce55595ad1e2edc9")
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 an instance of its own class, ConvBlock: the run constructed the object and did not call it, so no result was computed. 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

torch.manual_seed(0)

ARGS = {
    'in_channels': 4,
    'out_channels': 8,
    'kernel_size': 3,
    'dilation': 1,
    'final': False,
}
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 ConvBlock — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ConvBlock 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
DilatedConvDecoder Ran
ran on a synthesized input · constructed an object; no result was computed
Aitorzan3/ProtoX-AD/src/models.py
code served (permissive licence) · get_code("28e317c6496c322f")
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 an instance of its own class, DilatedConvDecoder: the run constructed the object and did not call it, so no result was computed. 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
import torch.nn.functional as F

torch.manual_seed(0)

class SamePadConv(nn.Module):
    def __init__(self, in_channels, out_channels, kernel_size, dilation=1, groups=1):
        super().__init__()
        self.receptive_field = (kernel_size - 1) * dilation + 1
        padding = self.receptive_field // 2
        self.conv = nn.Conv1d(in_channels, out_channels, kernel_size, padding=padding, dilation=dilation, groups=groups)
        self.remove = 1 if self.receptive_field % 2 == 0 else 0

    def forward(self, x):
        out = self.conv(x)
        if self.remove > 0:
            out = out[:, :, :-self.remove]
        return out

class ConvBlock(nn.Module):
    def __init__(self, in_channels, out_channels, kernel_size, dilation, final=False):
        super().__init__()
        self.conv1 = SamePadConv(in_channels, out_channels, kernel_size, dilation=dilation)
        self.conv2 = SamePadConv(out_channels, out_channels, kernel_size, dilation=dilation)
        self.projector = nn.Conv1d(in_channels, out_channels, 1) if in_channels != out_channels or final else None

    def forward(self, x):
        residual = x if self.projector is None else self.projector(x)
        x = F.gelu(x)
        x = self.conv1(x)
        x = F.gelu(x)
        x = self.conv2(x)
        return x + residual

class DilatedConvDecoder(nn.Module):
    def __init__(self, out_channels, channels, kernel_size):
        super().__init__()
        reversed_channels = list(reversed(channels))
        self.net = nn.Sequential(*[ConvBlock(reversed_channels[i - 1] if i > 0 else out_channels, reversed_channels[i], kernel_size=kernel_size, dilation=2 ** (len(reversed_channels) - 1 - i), final=i == len(reversed_channels) - 1) for i in range(len(reversed_channels))])

    def forward(self, x):
        return self.net(x)

ARGS = {
    "out_channels": 8,
    "channels": [16, 32, 64],
    "kernel_size": 3,
}
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 DilatedConvDecoder — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a DilatedConvDecoder 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
DilatedConvEncoder Ran
ran on a synthesized input · constructed an object; no result was computed
Aitorzan3/ProtoX-AD/src/models.py
code served (permissive licence) · get_code("bf1676e0bcd138d3")
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 an instance of its own class, DilatedConvEncoder: the run constructed the object and did not call it, so no result was computed. 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
import torch.nn.functional as F

torch.manual_seed(0)

class SamePadConv(nn.Module):
    def __init__(self, in_channels, out_channels, kernel_size, dilation=1, groups=1):
        super().__init__()
        self.receptive_field = (kernel_size - 1) * dilation + 1
        padding = self.receptive_field // 2
        self.conv = nn.Conv1d(in_channels, out_channels, kernel_size, padding=padding, dilation=dilation, groups=groups)
        self.remove = 1 if self.receptive_field % 2 == 0 else 0

    def forward(self, x):
        out = self.conv(x)
        if self.remove > 0:
            out = out[:, :, :-self.remove]
        return out

class ConvBlock(nn.Module):
    def __init__(self, in_channels, out_channels, kernel_size, dilation, final=False):
        super().__init__()
        self.conv1 = SamePadConv(in_channels, out_channels, kernel_size, dilation=dilation)
        self.conv2 = SamePadConv(out_channels, out_channels, kernel_size, dilation=dilation)
        self.projector = nn.Conv1d(in_channels, out_channels, 1) if in_channels != out_channels or final else None

    def forward(self, x):
        residual = x if self.projector is None else self.projector(x)
        x = F.gelu(x)
        x = self.conv1(x)
        x = F.gelu(x)
        x = self.conv2(x)
        return x + residual

class DilatedConvEncoder(nn.Module):
    def __init__(self, in_channels, channels, kernel_size):
        super().__init__()
        self.net = nn.Sequential(*[ConvBlock(channels[i - 1] if i > 0 else in_channels, channels[i], kernel_size=kernel_size, dilation=2 ** i, final=i == len(channels) - 1) for i in range(len(channels))])

    def forward(self, x):
        return self.net(x)

ARGS = {
    'in_channels': 3,
    'channels': [4, 8, 16],
    'kernel_size': 3
}
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 DilatedConvEncoder — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a DilatedConvEncoder 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
SamePadConv Ran
ran on a synthesized input · constructed an object; no result was computed
Aitorzan3/ProtoX-AD/src/models.py
code served (permissive licence) · get_code("a31cbb317f35ad9d")
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 an instance of its own class, SamePadConv: the run constructed the object and did not call it, so no result was computed. 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

torch.manual_seed(0)

# Create a tiny input tensor for testing
# Shape: (batch=2, in_channels=4, length=8)
x = torch.randn(2, 4, 8)

# Define the arguments for SamePadConv
ARGS = {
    'in_channels': 4,
    'out_channels': 3,
    'kernel_size': 3,
    'dilation': 1,
    'groups': 1,
}
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 SamePadConv — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a SamePadConv 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
TSDecoder Ran
ran on a synthesized input · constructed an object; no result was computed
Aitorzan3/ProtoX-AD/src/models.py
code served (permissive licence) · get_code("528f3bd1f4a6d18b")
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 an instance of its own class, TSDecoder: the run constructed the object and did not call it, so no result was computed. 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
import torch.nn.functional as F

torch.manual_seed(0)

# Define the helper classes that are used by TSDecoder
class SamePadConv(nn.Module):
    def __init__(self, in_channels, out_channels, kernel_size, dilation=1, groups=1):
        super().__init__()
        self.receptive_field = (kernel_size - 1) * dilation + 1
        padding = self.receptive_field // 2
        self.conv = nn.Conv1d(in_channels, out_channels, kernel_size, padding=padding, dilation=dilation, groups=groups)
        self.remove = 1 if self.receptive_field % 2 == 0 else 0

    def forward(self, x):
        out = self.conv(x)
        if self.remove > 0:
            out = out[:, :, :-self.remove]
        return out

class ConvBlock(nn.Module):
    def __init__(self, in_channels, out_channels, kernel_size, dilation, final=False):
        super().__init__()
        self.conv1 = SamePadConv(in_channels, out_channels, kernel_size, dilation=dilation)
        self.conv2 = SamePadConv(out_channels, out_channels, kernel_size, dilation=dilation)
        self.projector = nn.Conv1d(in_channels, out_channels, 1) if in_channels != out_channels or final else None

    def forward(self, x):
        residual = x if self.projector is None else self.projector(x)
        x = F.gelu(x)
        x = self.conv1(x)
        x = F.gelu(x)
        x = self.conv2(x)
        return x + residual

class DilatedConvDecoder(nn.Module):
    def __init__(self, out_channels, channels, kernel_size):
        super().__init__()
        reversed_channels = list(reversed(channels))
        self.net = nn.Sequential(*[ConvBlock(reversed_channels[i - 1] if i > 0 else out_channels, reversed_channels[i], kernel_size=kernel_size, dilation=2 ** (len(reversed_channels) - 1 - i), final=i == len(reversed_channels) - 1) for i in range(len(reversed_channels))])

    def forward(self, x):
        return self.net(x)

class TSDecoder(nn.Module):
    def __init__(self, latent_dims, seq_len, input_dims, hidden_dims=64, depth=10):
        super().__init__()
        self.seq_len = seq_len
        channels = [hidden_dims] * depth + [latent_dims]
        self.latent_dims = latent_dims
        self.fc = nn.Sequential(nn.Linear(latent_dims, 2 * latent_dims), nn.GELU(), nn.Linear(2 * latent_dims, seq_len * latent_dims))
        self.feature_restorer = DilatedConvDecoder(latent_dims, channels, kernel_size=3)
        self.output_fc = nn.Linear(hidden_dims, input_dims)

    def forward(self, x, y):
        x = self.fc(x).view(-1, self.seq_len, self.latent_dims)
        x = x.transpose(1, 2)
        x = self.feature_restorer(x)
        x = x.transpose(1, 2)
        x = self.output_fc(x)
        return x

# Create arguments for TSDecoder
latent_dims = 5
seq_len = 8
input_dims = 3
hidden_dims = 7
depth = 3

# Create the TSDecoder instance
decoder = TSDecoder(
    latent_dims=latent_dims,
    seq_len=seq_len,
    input_dims=input_dims,
    hidden_dims=hidden_dims,
    depth=depth
)

# Create input tensors for forward pass
# x: latent vector with shape (batch_size, latent_dims)
x = torch.randn(2, latent_dims)

# y: dummy target tensor (used in forward but not actually used in the code)
y = torch.randn(2, seq_len, input_dims)

ARGS = {
    "latent_dims": latent_dims,
    "seq_len": seq_len,
    "input_dims": input_dims,
    "hidden_dims": hidden_dims,
    "depth": depth,
}
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 TSDecoder — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a TSDecoder 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
TSEncoder Ran
ran on a synthesized input · constructed an object; no result was computed
Aitorzan3/ProtoX-AD/src/models.py
code served (permissive licence) · get_code("8ef6522d2fd19af8")
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 an instance of its own class, TSEncoder: the run constructed the object and did not call it, so no result was computed. 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

torch.manual_seed(0)

# Define ARGS dictionary with all TSEncoder parameters
ARGS = {
    "input_dims": 4,
    "seq_len": 5,
    "latent_dims": 8,
    "hidden_dims": 16,
    "depth": 3,
}
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 TSEncoder — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a TSEncoder 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
Network Not yet run
unverified (harvested, no recorded run)
Aitorzan3/ProtoX-AD/src/models.py
code served (permissive licence) · get_code("0cc9c5efd81d3b79")
How it ran

no invocation recorded.

ProtoXAD Not yet run
unverified (harvested, no recorded run)
Aitorzan3/ProtoX-AD/src/models.py
code served (permissive licence) · get_code("b1b0ad33f6c6d577")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 0 later) and 5 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
ConvBlock
brick of this paper's assembly: helper
4 other papers
4 dated earlier · 1 only as an assembly brick
2309.13378 (2023-09)
Deciphering Spatio-Temporal Graph Forecasting: A Causal Lens and Treatment
2310.04486 (2023-10)
T-Rep: Representation Learning for Time Series using Time-Embeddings
2310.14017 (2023-10)
Contrast Everything: A Hierarchical Contrastive Framework for Medical Time-Series
and 1 more not named here
SamePadConv
brick of this paper's assembly: helper
4 other papers
4 dated earlier · 3 only as an assembly brick
2309.13378 (2023-09)
Deciphering Spatio-Temporal Graph Forecasting: A Causal Lens and Treatment
2310.04486 (2023-10)
T-Rep: Representation Learning for Time Series using Time-Embeddings
2310.14017 (2023-10)
Contrast Everything: A Hierarchical Contrastive Framework for Medical Time-Series
and 1 more not named here
DilatedConvEncoder
brick of this paper's assembly: model
3 other papers
3 dated earlier · 1 only as an assembly brick
2310.04486 (2023-10)
T-Rep: Representation Learning for Time Series using Time-Embeddings
2310.14017 (2023-10)
Contrast Everything: A Hierarchical Contrastive Framework for Medical Time-Series
2601.07550 (2026-01)
TFEC: Multivariate Time-Series Clustering via Temporal-Frequency Enhanced Contrastive Learning

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

Recent advances in time series anomaly detection (TSAD) have highlighted the effectiveness of self-supervised classification-based approaches. These methods apply transformations to normal training samples, training a classifier to recognize transformation-specific patterns that help identify anomalies through increased classification errors. Despite their strong performance, a significant challenge is their lack of explainability, as they provide limited insight into the characteristics of flagged anomalies. To address this limitation, we propose ProtoX-AD, a prototype-based self-explainable framework for self-supervised TSAD. ProtoX-AD learns transformation-aware latent representations alongside interpretable prototypes, enabling both accurate anomaly detection and the identification of distinct anomalous profiles through prototype-based explanations. Additionally, it allows for systematic analysis of how transformation design impacts detection performance and explainability. Experimental results on synthetic and real-world datasets demonstrate that ProtoX-AD achieves detection performance comparable to its black-box counterparts while offering more consistent and semantically meaningful explanations than existing explainable baselines. Our code is publicly available at https://github.com/Aitorzan3/ProtoX-AD

For agents

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

get_harvested_code_for_paper("2606.13277")
get_code_for_paper("2606.13277")
have("2606.13277")

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

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

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

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

Connect an agent — have() is free.