Skip to content

Supported models

tslens is architecture-agnostic. It attributes any callable that maps (batch, seq_len, n_features) — or a tuple of tensors — to predictions. There is no model registry and nothing to subclass: if the forward pass is a differentiable-or-not PyTorch computation, it can be explained.

That said, real forecasting/classification models rarely take a single clean tensor. The tables below are the models this package (and its baselines) have actually been run against, and exactly how to wire each calling convention into .attribute(...).

Single-inputmodels
TSlib-stylemodels
Multiplearchitecture families
Growinglist of tested architectures

Not listed?

The tables record tested integrations, not a compatibility limit. If your callable accepts tensors and returns predictions, start with the integration cookbook.

Single-input models

Pass the series straight through — nothing to split.

Model Family Paper
DLinear Linear Zeng et al., AAAI 2023
LightTS Linear/MLP Zhang et al., arXiv:2207.01186
TiDE Linear/MLP Das et al., TMLR 2023
FiLM Linear/MLP Zhou et al., NeurIPS 2022
TSMixer MLP-Mixer Chen et al., TMLR 2023
FreTS Frequency-domain MLP Yi et al., NeurIPS 2023
MICN Convolutional Wang et al., ICLR 2023
Crossformer Transformer Zhang & Yan, ICLR 2023
PatchTST Transformer Nie et al., ICLR 2023
Pyraformer Transformer Liu et al., ICLR 2022
SegRNN Recurrent Lin et al., arXiv:2308.11200
Koopa Koopman operator Liu et al., NeurIPS 2023
LSTM Recurrent Hochreiter & Schmidhuber, Neural Computation 1997
TCN Convolutional Bai et al., arXiv:1803.01271
CALF LLM-backed foundation model Liu et al., arXiv:2403.07300
OFA (GPT4TS) LLM-backed foundation model Zhou et al., NeurIPS 2023
TimeLLM LLM-backed foundation model Jin et al., ICLR 2024
attr = WinTSR(model).attribute(inputs=x_enc, baselines=torch.zeros_like(x_enc))

Dual-input (TSlib) models

These TSlib models consume every forward argument themselves (x_enc, x_mark_enc, x_dec, x_mark_dec), so the calendar features get attributed alongside the series. tslens.attr.tsr.DUAL_INPUT_USERS is the canonical list — pass dual_input_users=[...] to TSR if you're explaining a model not on it.

Model Family Paper
Transformer Transformer Vaswani et al., NeurIPS 2017
Informer Transformer Zhou et al., AAAI 2021
Autoformer Transformer Wu et al., NeurIPS 2021
FEDformer Transformer Zhou et al., ICML 2022
ETSformer Transformer Woo et al., arXiv:2202.01381
Nonstationary Transformer Transformer Liu et al., NeurIPS 2022
Reformer Transformer Kitaev et al., ICLR 2020
iTransformer Transformer Liu et al., ICLR 2024
TimeXer Transformer Wang et al., NeurIPS 2024
TimeMixer MLP-Mixer Wang et al., ICLR 2024
TimesNet Convolutional Wu et al., ICLR 2023
RNN Recurrent Hochreiter & Schmidhuber, Neural Computation 1997
attr_enc, attr_mark = WinTSR(model).attribute(
    inputs=(x_enc, x_mark_enc),
    baselines=(torch.zeros_like(x_enc), torch.zeros_like(x_mark_enc)),
    additional_forward_args=(x_dec, x_mark_dec),
)

See the integration cookbook for the full walkthrough, or the TSlib models notebook to run it.

Pretrained foundation models

Timer

Timer is a generative pretrained Transformer for zero-shot time-series forecasting. The Pretrained Timer notebook loads the public 84M-parameter checkpoint, forecasts ETTh2, and adapts its generate() interface for perturbation-based WinTSR attribution.

MOMENT

MOMENT is an open foundation-model family for forecasting and other time-series tasks. The Pretrained MOMENT notebook loads MOMENT-1-small, forecasts ETTh2, and bridges its channel-first 512-step input to WinTSR's time-first attribution interface.

Tiny Time Mixers (TTM)

TTM is IBM's compact pretrained model family for zero- and few-shot forecasting. The Pretrained TTM notebook loads the Granite TTM-R2 512/96 checkpoint, attributes its native time-first input, and visualizes how WinTSR's relevance threshold changes the result.

GPT4TS / One Fits All

GPT4TS adapts a mostly frozen pretrained GPT-2 backbone to time-series tasks through trainable input and output layers. The Pretrained GPT4TS notebook fits those forecasting layers on ETTh2, verifies a held-out forecast, and explains the result through GPT4TS's single-input convention.

Model zoo and training harness

Trained checkpoints, dataset loaders, and experiment scripts for all of the above live in WinTSR-research — the paper's training/interpretation harness, which depends on this package the same way any user would (pip install tslens). This repository ships the attribution methods only; it does not vendor model code.