Synergizing Large Language Models and Task-specific Models for Time Series Anomaly Detection

Feiyi Chen, Leilei Zhang, Guansong Pang, Roger Zimmermann, Shuiguang Deng · DOI

Introduction

Detecting anomalies in complex industrial systems—ranging from aircraft sensor arrays to cloud server clusters—is a critical yet challenging task. Traditionally, this domain has been dominated by Task-Specific Anomaly Detection Models (TSADMs). These small, efficient models are adept at learning "normal" patterns from historical training data. However, they are often "blind" to the high-level expert rules found in technical manuals and struggle when faced with unseen data distributions.

Conversely, the rise of Large Language Models (LLMs) offers a new paradigm. LLMs can ingest professional documentation and apply sophisticated expert knowledge to reasoning tasks. Yet, LLMs are frequently "numb" to fine-grained numerical fluctuations and interpret anomaly scores on a scale entirely different from traditional models. Simply averaging the outputs of these two model types leads to misalignment and error accumulation, where the mistakes of both models compound rather than cancel out.

To address these challenges, we present CoLLaTe (Collaboration between a Large Language model and a Task-specific model), a framework inspired by the human nervous system that synergizes the "expert knowledge" of the brain with the "reflexive" pattern-matching of the spinal cord.

The CoLLaTe Framework

The CoLLaTe architecture is designed to overcome the "apples-to-oranges" scoring problem and the pitfalls of standard model merging. It introduces three key technical innovations to facilitate effective collaboration.

The CoLLaTe framework architecture, illustrating the synergy between the Large Model (brain) and TSADM (reflex) through alignment and conditional networking.

1. Model Alignment Module

To fix the scoring discrepancy, the framework fits LLM scores to a half-Gaussian distribution. It then employs a mapping function to transform TSADM scores into the same "expression domain." This ensures that a specific score value represents a similar level of anomaly across both models, preventing one from overshadowing the other due to scale differences.

2. Conditional Network

Rather than a simple weighted average, CoLLaTe utilizes a synthesis layer known as the Conditional Network. This layer takes the aligned scores and the raw data representation as inputs to produce a final, unified anomaly score. This allows the system to weigh the contributions of each model based on the specific context of the data.

3. Collaborative Loss Function

A significant contribution of this work is the theoretical proof that standard loss functions, such as Mean Squared Error (MSE), cause errors to accumulate in collaborative systems. To solve this "MSE Trap," the authors introduced a novel loss function using local data metrics: $D_{intra}$ (distance within a data patch) and $D_{inter}$ (distance between patches). This allows the system to dynamically trust the LLM more for "point anomalies" and the TSADM more for "contextual anomalies."

Experimental Evaluation

The researchers evaluated CoLLaTe on four diverse datasets: Mustang (cloud computing slowdowns), MGAB (chaotic Mackey-Glass series), and Flight 1 & 2 (proprietary aircraft monitoring data).

CoLLaTe consistently outperformed both standalone models and state-of-the-art baselines. On the Mustang dataset, CoLLaTe achieved an F1 score of 0.967, significantly higher than GPT-4 (0.448) or the best standalone TSADM (0.935).

Comparison of anomaly scores across CoLLaTe, TSADM, and LLM. The visualization demonstrates how CoLLaTe successfully integrates the strengths of both models to identify anomalies with higher precision.

Key Insights

  • Complementary Strengths: The evaluation revealed a clear division of labor. LLMs are significantly better at spotting "point anomalies" (sudden, sharp spikes), while TSADMs excel at "contextual anomalies" (sustained, subtle shifts in behavior). CoLLaTe effectively bridges these two capabilities.
  • Robustness and Generalization: Because the LLM is primed with "expert knowledge" via a set-up pitch prompt, the system maintains high performance even on unseen data distributions. In tests on out-of-distribution data, CoLLaTe maintained an F1 score above 0.93, while traditional models like TranAD saw sharp performance drops.

Limitations and Future Work

While powerful, the current implementation of CoLLaTe relies on LLM APIs (like GPT-4), which introduces a latency of approximately 1.27 seconds per request. This makes it currently unsuitable for ultra-high-frequency real-time applications. Future research will focus on deploying smaller, locally-hosted LLMs to reduce latency and refining "expert prompts" to handle even more specialized industrial domains.

Summary updated

BibTeX
@misc{chen2025synergizing,
  author = {Feiyi Chen and Leilei Zhang and Guansong Pang and Roger Zimmermann and Shuiguang Deng},
  title = {{Synergizing Large Language Models and Task-specific Models for Time Series Anomaly Detection}},
  year = {2025},
  eprint = {2501.05675},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2501.05675},
}
Figure