SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2603.12916 · 2026

Surprised by Attention: Predictable Query Dynamics for Time Series Anomaly Detection

Markus Enzweiler, Kadir-Kaan Özer, René Ebeling

arXiv · PDF · Open in the Atlas

Code that ran

10 of 13 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; 4 failures of our instrument; 3 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/2603.12916.json · badge: /api/ran/2603.12916.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
iis-esslingen/AxonAD community
Papers with Code archive
10 ran · 3 no recorded run
FunctionStatusWhere it lives
CausalConv1d Ran
ran on a synthesized input · constructed an object; no result was computed
iis-esslingen/AxonAD/TSB_AD/models/AxonAD.py
code served (permissive licence) · get_code("206e0d113e593356")
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, CausalConv1d: 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 the arguments for CausalConv1d
in_channels = 3
out_channels = 5
kernel_size = 3
dilation = 1

# Create a sample input tensor for testing
# Shape: (batch_size, in_channels, sequence_length)
x = torch.randn(2, in_channels, 4)

ARGS = {
    "in_ch": in_channels,
    "out_ch": out_channels,
    "kernel_size": kernel_size,
    "dilation": dilation,
}
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 CausalConv1d — 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 CausalConv1d 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
EarlyStoppingTorch Ran
ran on a synthesized input · constructed an object; no result was computed
iis-esslingen/AxonAD/TSB_AD/models/AxonAD.py
code served (permissive licence) · get_code("9e3b15c51fde54ce")
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, EarlyStoppingTorch: 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 tempfile
import os

torch.manual_seed(0)

# Create a minimal model that has state_dict() method
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

# Create a temporary directory for saving checkpoints
temp_dir = tempfile.mkdtemp()

# Instantiate the model
model = SimpleModel()

# Define ARGS dict with all parameters
ARGS = {
    "save_path": temp_dir,
    "patience": 7,
    "verbose": False,
    "delta": 0.0001
}
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 EarlyStoppingTorch — 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 EarlyStoppingTorch 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
PredictiveAttention Ran
ran on a synthesized input · constructed an object; no result was computed
iis-esslingen/AxonAD/TSB_AD/models/AxonAD.py
code served (permissive licence) · get_code("f9a81b2c6223d532")
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, PredictiveAttention: 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 math

torch.manual_seed(0)

# Define ARGS dict with all parameters for PredictiveAttention.__init__
ARGS = {
    "d_model": 4,
    "num_heads": 2,
    "forecast_steps": 1,
}

# Verify the module can be instantiated
if __name__ == "__main__":
    model = nn.Module()
    # Just verify ARGS has the right keys
    assert "d_model" in ARGS
    assert "num_heads" in ARGS
    assert "forecast_steps" in ARGS
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 PredictiveAttention — 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 PredictiveAttention 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
ReconstructDataset Ran
ran on a synthesized input · constructed an object; no result was computed
iis-esslingen/AxonAD/TSB_AD/models/AxonAD.py
code served (permissive licence) · get_code("99ed6974c684dca1")
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, ReconstructDataset: 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 numpy as np
import torch

torch.manual_seed(0)

# Create a small synthetic time series dataset
# Shape: (time_steps, features)
data = np.random.randn(10, 3).astype(np.float32)

ARGS = {
    'data': data,
    'window_size': 4,
    'stride': 1,
    'normalize': True,
}
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 ReconstructDataset — 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 ReconstructDataset output the recorded ndim 4 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
TCNQueryPredictor Ran
ran on a synthesized input · constructed an object; no result was computed
iis-esslingen/AxonAD/TSB_AD/models/AxonAD.py
code served (permissive licence) · get_code("7aa30aa728785327")
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, TCNQueryPredictor: 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)

# TCNQueryPredictor parameters
ARGS = {
    "d_model": 4,
    "dilations": (1, 2, 4, 8),
    "dropout": 0.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 TCNQueryPredictor — 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 TCNQueryPredictor 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
TCNTransformerModel Ran
ran on a synthesized input · constructed an object; no result was computed
iis-esslingen/AxonAD/TSB_AD/models/AxonAD.py
code served (permissive licence) · get_code("ab2e60649257cae1")
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, TCNTransformerModel: 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 = {
    "feats": 3,
    "seq_len": 5,
    "d_model": 8,
    "num_heads": 2,
    "forecast_steps": 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 TCNTransformerModel — 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 TCNTransformerModel 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
_pprint Ran
ran; our contract draft was wrong, not the code
iis-esslingen/AxonAD/TSB_AD/models/AxonAD.py
code served (permissive licence) · get_code("0647abc1cca56498")
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 str. 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 numpy as np

# Construct a simple dictionary with various types of values
params = {
    'alpha': 0.5,
    'beta': 1.2,
    'gamma': 3.14159,
    'delta': 2.71828,
    'epsilon': 0.00001,
    'name': 'model_v1',
    'threshold': 0.95,
    'config': {'layer1': 64, 'layer2': 128},
    'array': np.array([1, 2, 3, 4, 5]),
    'matrix': np.array([[1.1, 2.2], [3.3, 4.4]]),
}

ARGS = {
    'params': params,
    'offset': 0,
    'printer': repr,
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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_gpu Ran
ran; our contract draft was wrong, not the code
iis-esslingen/AxonAD/TSB_AD/models/AxonAD.py
code served (permissive licence) · get_code("01e6a0a62c1579c4")
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 device. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 numpy as np

torch.manual_seed(0)

# The function takes one parameter: cuda (a boolean)
# It checks if cuda is True and whether CUDA/MPS is available
# Then returns a torch.device object

ARGS = {
    'cuda': False
}
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 device — a device output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a device 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_label_n Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
iis-esslingen/AxonAD/TSB_AD/models/AxonAD.py
code served (permissive licence) · get_code("62e2847dc6b59704")
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 ndarray, ndim 1, dtype family int, shape (8,) 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

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

# Create ground truth labels (binary: 0 for inliers, 1 for outliers)
y = np.array([0, 1, 1, 0, 0, 1, 0, 0])

# Create raw outlier scores
y_pred = np.array([0.1, 0.5, 0.3, 0.2, 0.7, 0.6, 0.15, 0.25])

# Define n as None to infer from ground truth
n = None

ARGS = {
    "y": y,
    "y_pred": y_pred,
    "n": n
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family int, shape (8,) — shape (8,) 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
precision_n_scores Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
iis-esslingen/AxonAD/TSB_AD/models/AxonAD.py
code served (permissive licence) · get_code("7d0b13d77094c2ef")
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 float, 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

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

# Create sample data for ground truth labels (binary: 0 for inliers, 1 for outliers)
y = np.array([0, 1, 1, 0, 0, 1, 0, 1])

# Create sample raw outlier scores
y_pred = np.array([0.1, 0.5, 0.3, 0.2, 0.7, 0.6, 0.15, 0.8])

# Optional: define n (number of outliers to flag)
n = 3

ARGS = {
    "y": y,
    "y_pred": y_pred,
    "n": n
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, 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
BaseDetector Not yet run
unverified (harvested, no recorded run)
iis-esslingen/AxonAD/TSB_AD/models/AxonAD.py
code served (permissive licence) · get_code("ff98834dc74659ef")
How it ran

no invocation recorded.

TCNTransformer Not yet run
unverified (harvested, no recorded run)
iis-esslingen/AxonAD/TSB_AD/models/AxonAD.py
code served (permissive licence) · get_code("9dea0e697accb8e5")
How it ran

no invocation recorded.

min_memory_id Not yet run
unverified (harvested, no recorded run)
iis-esslingen/AxonAD/TSB_AD/models/AxonAD.py
code served (permissive licence) · get_code("5b2704b756512448")
How it ran

no invocation recorded.

Also present in other papers' code

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

Multivariate time series anomalies often manifest as shifts in cross-channel dependencies rather than simple amplitude excursions. In autonomous driving, for instance, a steering command might be internally consistent but decouple from the resulting lateral acceleration. Residualbased detectors can miss such anomalies when flexible sequence models still reconstruct signals plausibly despite altered coordination. We introduce AxonAD, an unsupervised detector that treats multihead attention query evolution as a short horizon predictable process. A gradient-updated reconstruction pathway is coupled with a history-only predictor that forecasts future query vectors from past context. This is trained via a masked predictor-target objective against an exponential moving average (EMA) target encoder. At inference, reconstruction error is combined with a tail-aggregated query mismatch score, which measures cosine deviation between predicted and target queries on recent timesteps. This dual approach provides sensitivity to structural dependency shifts while retaining amplitude-level detection. On proprietary in-vehicle telemetry with interval annotations and on the TSB-AD multivariate suite (17 datasets, 180 series) with threshold-free and range-aware metrics, AxonAD improves ranking quality and temporal localization over strong baselines. Ablations confirm that query prediction and combined scoring are the primary drivers of the observed gains. Code is available at the URL https://github.com/iis-esslingen/AxonAD.

For agents

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

get_harvested_code_for_paper("2603.12916")
get_code_for_paper("2603.12916")
have("2603.12916")

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

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

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

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

Connect an agent — have() is free.