Manuscript Offprint

arXiv:2611.07720

Evaluating Language Model Features for Zero-Shot Time-Series Anomaly Detection Under Isolation Assumption

Romain Hermary, Nesryne Mejri, Djamila Aouada

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Time-Series Anomaly Detection (TSAD) is a fundamentally challenging task: it is unsupervised, requires high local precision capabilities, and suffers from limited labelled data. Recent work has explored adapting Large Language Models (LLMs) to time-series via cross-modal transfer. However, existing approaches are poorly suited to Multivariate TSAD (MTSAD), as tokenisation often obscures fine-grained temporal and variables structures, and most methods optimise auxiliary objectives such as forecasting or reconstruction. We posit that these surrogate objectives become unreliable as model capacity increases. Highly expressive models risk reconstructing or forecasting anomalies, undermining the foundations of both strategies. Instead, we propose to use LLMs purely as feature extractors and directly analyse their induced feature spaces. In this work, investigate the ability of LLMs to provide useful representations for MTSADs in a zero-shot setting through classification. To this end, we study the separability of the extracted features, under the assumption that anomalous features should be isolated from normal ones. We analyse their temporal and contextual discriminative ability using simple step-wise tokenisation schemes, with one time-step per token, which preserve fine-grained local information. Their usability for MTSAD is assessed using an unsupervised Isolation Forest, enabling a direct evaluation of the resulting representation quality. We further investigate whether the observed performance can be attributed to the language-related pre-training of the LLMs or arises independently of it. Our results provide empirical insight into the ability of LLMs to represent multivariate time-series for anomaly detection and highlight broader applications of cross-modal foundation models.

1 Introduction

Time-series analysis is inherently challenging due to the high heterogeneity and domain dependence of available datasets, compounded by their limited sizes. These constraints hinder the development of general-purpose Time-Series Foundation Models (TSFMs) capable of addressing core tasks such as classification, forecasting, and anomaly detection.

Recent work has explored the use of Large Language Models (LLMs) for time-series processing (Zhang et al., 2024; Jiang et al., 2024). Trained on large-scale textual corpora, LLMs possess strong sequential modelling capabilities and have demonstrated notable cross-modal adaptability (Lu et al., 2022). Leveraging pre-trained LLMs as processors for time-series data is therefore an appealing direction, benefiting from the maturity and scale of language modelling research.

The code will be made publicly available.

A central challenge lies in the mismatch between time-series data and textual representations. Unlike natural language, time-series consist of continuous numerical values with precise temporal and inter-variable relationships. Prior work has identified several directions to address this mismatch, including learned projections, model adaptation, and specialised tokenisers (Spathis & Kawsar, 2024); however, only a few strategies allow the use of LLMs for time-series analysis in a zero-shot manner. The popular direct tokenisation of Gruver et al. (2023) converts numbers to text characters but compromises numerical precision and can fragment values across multiple tokens, disrupting temporal dependencies. These issues are exacerbated in multivariate settings, where serialisation destroys the multivariate structure, hinders dependencies between variables, and drastically inflates token count (Chatzigeorgakidis et al., 2024).

A deeper issue lies in how existing approaches prioritise general representation learning, overlooking the specific demands of Time-Series Anomaly Detection (TSAD). In particular, TSAD poses additional difficulties, as it requires high local sensitivity and is typically formulated in an unsupervised setting due to the absence of anomalies in the training data (Darban et al., 2025; Mejri et al., 2024). Common processing strategies, particularly tokenisation schemes such as patching or quantisation, can obscure fine-grained temporal patterns and attenuate anomalies. Furthermore, most methods rely on auxiliary objectives, notably forecasting or reconstruction; while effective for broad evaluation, these objectives are not aligned with anomaly detection: sufficiently expressive models risk reconstructing or forecasting anomalous patterns as faithfully as normal data, thereby suppressing residual scores and leaving anomalies undetected by design (Gong et al., 2019; Yoon et al., 2026). Consequently, higher model capacity and reconstruction fidelity do not guarantee superior anomaly detection; on the contrary, excessive reconstruction capability can actively degrade performance by absorbing anomalous signals.

To circumvent these limitations, we consider anomaly detection through the lens of One-Class Classification (OCC) (Schölkopf et al., 2001), where normal patterns define the data distribution and anomalies correspond to deviations from it. This perspective naturally favours approaches that operate directly on feature representations to estimate abnormality (Hermary et al., 2026). In this context, we investigate features extracted from pre-trained foundation models such as LLMs: as these models continue to scale, assessing their ability to transfer to new modalities in a zero-shot setting becomes increasingly relevant.

In this direction, we propose to evaluate the extent to which LLM-induced representations isolate anomalous from normal patterns. We therefore investigate simple, zero-shot-compatible tokenisation strategies, with an emphasis on step-wise tokenisation where each time-step is mapped to a single token. This design limits the effect of local information erasure, making it particularly suitable for detecting point anomalies while not compromising the detection of other anomaly types, and allowing for a focus on the temporal processing of LLMs.

Our contributions are summarised as follows:

  • We discuss the limitations of current foundation model approaches applied to Multivariate Time-Series Anomaly Detection (MTSAD) and propose investigating language model features as an alternative approach, treating anomaly detection as a central objective.
  • We propose a unified evaluation protocol designed for imbalanced, unsupervised anomaly detection settings, based on an isolation prior for anomalies.
  • We provide an extensive empirical study across multiple LLM architectures, tokenisation methods, datasets and context sizes, offering insight into the zero-shot applicability of LLMs for MTSAD. We further investigate whether language knowledge is leveraged through trivial tokenisation strategies.

References (65)

  • Practical approach to asynchronous multivariate time series anomaly detection and localization
  • WADI: a water distribution testbed for research in the design of secure cyber physical systems
  • Can large language models be anomaly detectors for time series? In DSAA, pp. 1–10
  • Chronos-2: From univariate to universal forecasting (opens arXiv in a new tab)
  • Multi-patch prediction: Adapting language models for time series representation learning
  • Multicast: Zero-shot multivariate time series forecasting using llms
  • Deep learning for time series anomaly detection: A survey
  • Can llms serve as time series anomaly detectors? CoRR, abs/2408.03475, 2024 (opens arXiv in a new tab)
  • Time series anomaly detection for cyber-physical systems via neural system identification and bayesian filtering
  • Units: A unified multi-task time series model
  • Memorizing normality to detect anomaly: Memory-augmented deep autoencoder for unsupervised anomaly detection
  • MOMENT: A family of open time-series foundation models
  • Large language models are zero-shot time series forecasters
  • Harnessing vision-language models for time series anomaly detection
  • Removing geometric bias in one-class anomaly detection with adaptive feature perturbation
  • Aster: Latent pseudo-anomaly generation for unsupervised time-series anomaly detection
  • Context-alignment: Activating and enhancing llms capabilities in time series
  • Mistral 7B
  • Empowering time series analysis with large language models: A survey
  • Foundation models for time series analysis: A tutorial and survey
  • Large language model guided knowledge distillation for time series anomaly detection
  • Isolation forest
  • Large language models can deliver accurate and interpretable time series anomaly detection
  • A survey on large language models for medical time series
  • Frozen pretrained transformers as universal computation engines
  • Enhancing foundation models for time series forecasting via wavelet-based tokenization
  • Mathur and Nils Ole Tippenhauer
  • Unsupervised anomaly detection in time-series: An extensive evaluation and analysis of state-of-the-art methods
  • Benchmarking time series foundation models for short-term household electricity load forecasting
  • Phi-3 Technical Report: A Highly Capable Language Model Locally on Your Phone
  • TAB: unified benchmarking of time series anomaly detection methods
  • Technical report, 2019
  • AAD-LLM: adaptive anomaly detection using large language models
  • Estimating the support of a high-dimensional distribution
  • The first step is the hardest: pitfalls of representing and tokenizing temporal data for large language models
  • TEST: text prototype aligned embedding to activate llm's ability for time series
  • MADLLM: multivariate anomaly detection via pre-trained llms
  • Qwen2-VL: Enhancing Vision-Language Model's Perception of the World at Any Resolution
  • Frank Wilcoxon. Individual comparisons by ranking methods. Biometrics Bulletin, 1(6):80–83, 1945. doi: 10.2307/3001968. (opens the publisher in a new tab)
  • HuggingFace's Transformers: State-of-the-art Natural Language Processing
  • Timesnet: Temporal 2d-variation modeling for general time series analysis
  • Current time series anomaly detection benchmarks are flawed and are creating the illusion of progress
  • Anomaly transformer: Time series anomaly detection with association discrepancy
  • Can multimodal llms perform time series anomaly detection? In WWW, pp. 5392–5403
  • Qwen2 Technical Report
  • Patch-based memory gate model in time series foundation model
  • Trip-llm: A tri-branch patch-wise large language model framework for time-series anomaly detection
  • Large language models for time series: A survey
  • Label-free multivariate time series anomaly detection
  • One fits all: Power general time series analysis by pretrained LM. In NeurIPS, 2023
  • See it, think it, sorted: Large multimodal models are few-shot time series anomaly analyzers (opens arXiv in a new tab)
  • We set the target dimension to 512, and retained on average close to 98% of explained variance; we thus reduced the complexity of the study without compromising the results
  • All of them were trained on the full train sets, with parameters matching the published configurations, over 5 different seeds, with a window size set to a 100 time-steps
  • Only one evaluation with a fixed seed (42) was required, since there is no randomised process
  • Experiments were conducted on NVIDIA RTX A6000 (550.163.01) GPUs and an AMD EPYC 7742 64-Core processor
  • We report the effective ratio changes in Table 5
  • ><tr><td rowspan=
  • coverage (Table 6) and centroid (Table 7)
  • The Raw and Control results are in Table 9 to Table 11
  • AUPR is less stable throughout the datasets, with especially high or increased standard deviation on SWaT for most models
  • We compute the signed rank-biserial effect size as:
  • Since all pairwise comparisons are performed over the same $N=24$ configurations, the magnitudes of $r$ are directly comparable across model pairs
  • Since multiple pairwise Wilcoxon tests are conducted, considering each test independently at the 0.05 significance level would inflate the probability of making at least one false rejection of the null hypothesis
  • Each model has a different vocabulary, and time-steps of a dataset will be converted to various token values and meanings
  • The Control path of the Padding strategy and the Raw path have the same properties, with 0-variance dimensions ignored, and thus the same results