Finding Time Series Anomalies using Granular-ball Vector Data Description

Lifeng Shen, Liang Peng, Ruiwen Liu, Shuyin Xia, Yi LiuarXiv 2025 · DOI

Abstract

Time series anomaly detection is critical for maintaining complex systems, yet defining "normalcy" remains challenging due to the dynamic and nonlinear nature of real-world data. Traditional methods often rely on rigid clustering or computationally expensive point-based proximity, which struggle with structural continuity and noise. This paper introduces the Granular-ball One-Class Network (GBOC), a novel framework that models normal behavior using adaptive, high-density "granular-balls" in latent space. By employing a density-guided hierarchical splitting process and post-hoc pruning of diffuse regions, GBOC provides a flexible yet summarized representation of normalcy. Evaluations across over ten diverse benchmarks demonstrate that GBOC achieves state-of-the-art performance in accuracy and efficiency, showing particular robustness to distribution drift and noise.

Introduction

Most anomaly detection methods rely on a "one-class" philosophy: learn what is normal, and flag anything else. However, defining "normal" in dynamic, nonlinear time series is incredibly difficult. Traditional approaches usually fall into two traps. First, rigid clustering methods like K-Means assume data lives in a fixed number of well-separated "buckets." In reality, time series data often exhibits structural continuity—patterns transition smoothly into one another, making hard boundaries inappropriate. Second, point-based proximity methods like KNN look at individual neighbors, struggling with "group anomalies" and incurring high computational costs on massive datasets.

To bridge this gap, the authors propose a representation that is more flexible than a cluster but more summarized than a raw data point: the Granular-ball Vector Data Description (GVDD).

The GBOC Framework

The GBOC framework moves away from rigid clusters and nearest-neighbor lookups toward a fluid, "granular" representation of data. The process works in four main stages:

  1. Encoding: A three-layer LSTM (Long Short-Term Memory) network maps sliding windows of time series data into a latent feature space.
  2. Granular-ball Generation: Instead of forcing data into $K$ clusters, the system uses a density-guided hierarchical splitting process. It starts with a coarse partition and recursively splits regions into smaller "granular-balls" only if the split improves the "Distribution Measure" (a ratio of the number of points to the radius).
  3. Pruning and Optimization: To ensure robustness, the model performs "post-hoc pruning." It identifies and removes "diffuse" balls (those with abnormally large radii), which usually represent noise or low-confidence regions.
  4. Joint Learning: The model is trained with a dual-purpose loss function combining reconstruction loss (to preserve information) and alignment loss (to pull latent representations toward their nearest granular-ball centers).
The GBOC framework overview, illustrating the four stages: Time Series Encoding, Granular-ball Vector Data Description, Representation Optimization, and Anomaly Inference.

During inference, the anomaly score is calculated as the Euclidean distance from a new data point to the center of the nearest granular-ball.

Granular-ball Representation vs. Rigid Clustering

A key insight of this work is that the "middle ground" is best for representing complex temporal data. Granular-balls act as a bridge between individual instances and global clusters, preserving the local topological structure of the data without the overhead of point-to-point comparisons.

A comparison between traditional rigid clustering (left) and the proposed granular-ball representation (right), highlighting the latter's ability to capture structural continuity.

Because time series data is often "boundary-free," using overlapping balls rather than hard-edged clusters allows GBOC to model the smooth transitions inherent in temporal data. Furthermore, the pruning mechanism elegantly handles noise: by assuming that "normal" data is dense and "noise" is sparse, the model automatically cleans its representation by deleting large, low-density balls.

Experimental Evaluation

The authors evaluated GBOC on a massive battery of univariate and multivariate benchmarks, including industrial datasets (SMD, SMAP, MSL), web services (IOPS, WSD, YAHOO), healthcare (UCR Medical, LTDB, SVDB), and environmental data (TAO).

Key Results

  • Superior Performance: GBOC consistently achieved the highest scores across VUS-PR, VUS-ROC, and Affiliation-F1 metrics. On the SMD dataset, it achieved a VUS-PR of 0.831, significantly outperforming deep learning baselines like TimesNet (0.680) and THOC (0.272).
  • Robustness to Drift and Noise: In experiments testing model resilience, GBOC remained the top performer in scenarios involving both distribution drift and heavy noise, where traditional methods like KShapeAD saw performance crater.
  • Computational Efficiency: Compared to THOC (a popular hierarchical clustering method), GBOC was 26% faster to train and used 34% less GPU memory, while providing better detection accuracy.

Conclusion

GBOC represents a significant step forward in making time series anomaly detection more "organic" and less reliant on rigid geometric assumptions. While the model shows some sensitivity to window size and relies on standard statistical thresholding (the 3σ rule), its modular encoder and efficient summarization make it a powerful tool for real-world applications. Future work may explore integrating more complex temporal backbones, such as Transformers or State Space Models, to further enhance its capabilities.

Summary updated

BibTeX
@misc{shen2025finding,
  author = {Lifeng Shen and Liang Peng and Ruiwen Liu and Shuyin Xia and Yi Liu},
  title = {{Finding Time Series Anomalies using Granular-ball Vector Data Description}},
  year = {2025},
  eprint = {2511.12147},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2511.12147},
}
Figure