SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2602.02763 · ICML · 2026

Exposing Vulnerabilities in Explanation for Time Series Classifiers via Dual-Target Attacks

Bohan Wang, Wei Jin, Li Xiong, Ming Jin, Lu Lin, Hui Liu, Zewen Liu

arXiv · PDF · Open in the Atlas

Code that ran

5 of 7 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 3 have no contract verdict; 2 failures of our instrument; 2 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/2602.02763.json · badge: /api/ran/2602.02763.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
Bohan7/TSEF community
Papers with Code archive
5 ran · 2 no recorded run
FunctionStatusWhere it lives
CNN Ran
ran on a synthesized input
Bohan7/TSEF/experiments/evaluation/tsef_attack.py
code served (permissive licence) · get_code("d6cccad4740ee81e")
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 numpy as np

# INIT_ARGS: parameters for CNN.__init__
INIT_ARGS = {
    'd_inp': 5,        # input feature dimension
    'n_classes': 3,    # number of output classes
    'dim': 16          # hidden dimension (keeping it small)
}

# ARGS: parameters for CNN.forward
# The forward method expects: x, _times, get_embedding=False, captum_input=False, show_sizes=False
# We need to construct x with appropriate shape based on how forward processes it

# Based on forward logic:
# - If captum_input=False and len(x.shape)==2, it does x.unsqueeze(1) then x.permute(1, 2, 0)
#   So x shape (seq_len, d_inp) -> (seq_len, 1, d_inp) -> (1, d_inp, seq_len)
# - If captum_input=False and len(x.shape)==3, it does x.permute(1, 2, 0)
#   So x shape (batch, seq_len, d_inp) -> (seq_len, d_inp, batch)
# - The encoder expects (batch, d_inp, seq_len) format for Conv1d

# Let's use the 3D input case: (batch, seq_len, d_inp)
# After permute(1, 2, 0): (seq_len, d_inp, batch)
# This doesn't match Conv1d expectation... Let me re-read

# Actually looking more carefully:
# captum_input=False, shape=(batch, seq_len, d_inp):
#   x.permute(1, 2, 0) -> (seq_len, d_inp, batch)
# This seems wrong for Conv1d which expects (batch, channels, length)

# Let's try captum_input=True path:
# shape=(batch, seq_len, d_inp) -> x.permute(0, 2, 1) -> (batch, d_inp, seq_len)
# This matches Conv1d format!

batch_size = 2
seq_len = 10  # needs to be >= 8 based on padding logic
d_inp = 5     # must match INIT_ARGS['d_inp']

x = torch.randn(batch_size, seq_len, d_inp)
_times = torch.randn(batch_size, seq_len)  # placeholder for _times parameter

ARGS = {
    'x': x,
    '_times': _times,
    'get_embedding': False,
    'captum_input': True,  # Using this path for correct Conv1d input format
    'show_sizes': False
}
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)
ConnectLoss_Mt Ran
ran on a synthesized input
Bohan7/TSEF/experiments/evaluation/tsef_attack.py
code served (permissive licence) · get_code("f9da26ccd71bd8ac")
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 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 torch
import torch.nn as nn

class ConnectLoss_Mt(nn.Module):

    def __init__(self):
        super(ConnectLoss_Mt, self).__init__()

    def forward(self, logits):
        diff = logits[1:, :, :] - logits[:-1, :, :]
        per_sample = diff.pow(2).mean(dim=(0, 2)).sqrt()
        return per_sample.mean()


INIT_ARGS = {}

ARGS = {
    'logits': torch.randn(3, 2, 4)
}

if __name__ == '__main__':
    model = ConnectLoss_Mt(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Output: {output}")
    print(f"Output shape: {output.shape}")
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 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
GSATLoss Ran
ran on a synthesized input
Bohan7/TSEF/experiments/evaluation/tsef_attack.py
code served (permissive licence) · get_code("1325a4e60ddb9d38")
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 0, 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

class GSATLoss(nn.Module):

    def __init__(self, r):
        super(GSATLoss, self).__init__()
        self.r = r

    def forward(self, att):
        if torch.any(torch.isnan(att)):
            print('ALERT - att has nans')
            exit()
        if torch.any(att < 0):
            print('ALERT - att less than 0')
            exit()
        assert (att < 0).sum() == 0
        info_loss = (att * torch.log(att / self.r + 1e-06) + (1 - att) * torch.log((1 - att) / (1 - self.r + 1e-06) + 1e-06)).mean()
        if torch.any(torch.isnan(info_loss)):
            print('INFO LOSS NAN')
            exit()
        return info_loss


INIT_ARGS = {
    'r': 0.5
}

ARGS = {
    'att': torch.rand(2, 4)
}

if __name__ == '__main__':
    model = GSATLoss(**INIT_ARGS)
    output = model(**ARGS)
    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 0, 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)
compute_alpha_for_theta_f Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Bohan7/TSEF/experiments/evaluation/tsef_attack.py
code served (permissive licence) · get_code("1564c9603f6433e2")
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

torch.manual_seed(0)

# Define dimensions with distinct sizes
T = 5  # Time dimension
B = 2  # Batch dimension
D = 4  # Feature/channel dimension
Fbins = 3  # Frequency bins (rfft output size for T=5)

# Create ori_X: [T, B, D]
ori_X = torch.randn(T, B, D, dtype=torch.float32)

# Create Mt_used: [T, B, D] - temporal mask
Mt_used = torch.rand(T, B, D, dtype=torch.float32)

# Create theta_f: [Fbins, B, D] - frequency mask parameters
theta_f = torch.randn(Fbins, B, D, dtype=torch.float32)

# Create eps_prime: epsilon budget (scalar)
eps_prime = 0.5

ARGS = {
    'ori_X': ori_X,
    'Mt_used': Mt_used,
    'theta_f': theta_f,
    'eps_prime': eps_prime,
    'gamma': 0.98,
    'max_alpha': 5.0,
    'per_channel': True,
    'tiny': 1e-12,
    'norm': 'ortho',
}
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
gumbel_sigmoid Ran
ran; our contract draft was wrong, not the code
Bohan7/TSEF/experiments/evaluation/tsef_attack.py
code served (permissive licence) · get_code("3c8da9125fcb3655")
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, 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
import torch.nn.functional as F

torch.manual_seed(0)

# Create a small probability mask tensor
# Shape: (2, 4) - batch size 2, 4 elements
total_mask = torch.rand(2, 4)

# Define ARGS dict with all parameters
ARGS = {
    "total_mask": total_mask,
    "tau": 1.0,
    "hard": 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 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
LSTM Not yet run
unverified (harvested, no recorded run)
Bohan7/TSEF/experiments/evaluation/tsef_attack.py
code served (permissive licence) · get_code("97a59fb232f0fc1d")
How it ran

no invocation recorded.

tsef_mask_attack Not yet run
unverified (harvested, no recorded run)
Bohan7/TSEF/experiments/evaluation/tsef_attack.py
code served (permissive licence) · get_code("a387c5b5db9345ff")
How it ran

no invocation recorded.

Also present in other papers' code

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

FunctionAlso present inEarliest-datedOthers named
CNN
brick of this paper's assembly: helper
1 other paper
1 dated earlier
2306.02109 (2023-06)
Encoding Time-Series Explanations through Self-Supervised Model Behavior Consistency
GSATLoss
brick of this paper's assembly: helper
1 other paper
1 dated earlier
2306.02109 (2023-06)
Encoding Time-Series Explanations through Self-Supervised Model Behavior Consistency
LSTM
brick of this paper's assembly: helper
1 other paper
1 dated earlier
2306.02109 (2023-06)
Encoding Time-Series Explanations through Self-Supervised Model Behavior Consistency

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

Interpretable time series deep learning systems are often assessed by checking temporal consistency on explanations, implicitly treating this as evidence of robustness. We show that this assumption can fail: Predictions and explanations can be adversarially decoupled, enabling targeted misclassification while the explanation remains plausible and consistent with a chosen reference rationale. We propose TSEF (Time Series Explanation Fooler), a dual-target attack that jointly manipulates the classifier and explainer outputs. In contrast to single-objective misclassification attacks that disrupt explanation and spread attribution mass broadly, TSEF achieves targeted prediction changes while keeping explanations consistent with the reference. Across multiple datasets and explainer backbones, our results consistently reveal that explanation stability is a misleading proxy for decision robustness and motivate coupling-aware robustness evaluations for trustworthy time series tasks. The code is available at https://github.com/Bohan7/TSEF.

For agents

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

get_harvested_code_for_paper("2602.02763")
get_code_for_paper("2602.02763")
have("2602.02763")

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

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

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

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

Connect an agent — have() is free.