Text Anomaly Detection with Simplified Isolation Kernel

Yang Cao, Sikun Yang, Yujiu Yang, Lianyong Qi, Ming Liu · DOI · OpenReview

Abstract

Two-step approaches combining pre-trained large language model embeddings and anomaly detectors demonstrate strong performance in text anomaly detection by leveraging rich semantic representations. However, high-dimensional dense embeddings extracted by large language models pose challenges due to substantial memory requirements and high computation time. To address this challenge, we introduce the Simplified Isolation Kernel (SIK), which maps high-dimensional dense embeddings to lower-dimensional sparse representations while preserving crucial anomaly characteristics. SIK has linear time complexity and significantly reduces space complexity through its innovative boundary-focused feature mapping. Experiments across 7 datasets demonstrate that SIK achieves better detection performance than 11 state-of-the-art (SOTA) anomaly detection algorithms while maintaining computational efficiency and low memory cost.

Introduction

Modern text anomaly detection (TAD) typically follows a two-step process: converting text into dense vectors using pre-trained models like BERT or OpenAI’s embeddings, and then applying an anomaly detection algorithm. While effective, these embeddings are often massive (ranging from 768 to 3,072 dimensions). Traditional isolation-based detectors, such as the Isolation Kernel (IK), attempt to identify outliers by measuring how easily a point can be isolated via random partitions. However, IK increases dimensionality during this process, leading to prohibitive memory usage and slow processing times that hinder real-world scalability.

The Simplified Isolation Kernel (SIK)

The Simplified Isolation Kernel (SIK) addresses these efficiency bottlenecks by fundamentally changing how feature mapping is handled. Standard IK creates multiple "hyperspheres" around random data points and generates a massive binary vector where each bit represents whether a point falls into a specific bubble. For example, 200 sets of 256 bubbles result in a 51,200-dimensional feature vector.

SIK’s core innovation is the realization that for anomaly detection, the specific bubble a point falls into is less important than whether it falls outside the "normal" boundary entirely. SIK collapses these high-dimensional mappings into a compact representation (e.g., 200 dimensions), focusing solely on the boundary-focused feature mapping. If a point consistently falls outside these boundaries across many random partitions, it is flagged as an anomaly.

Comparison of feature mapping between Isolation Kernel (IK) and Simplified Isolation Kernel (SIK).

Experimental Results

The researchers evaluated SIK using the NLP-ADBench benchmark, which includes seven diverse datasets covering spam detection, topic outliers, and sentiment anomalies. SIK was tested against 11 state-of-the-art methods using both BERT and OpenAI text-embedding-3-large embeddings.

Performance and Efficiency

SIK achieved the highest AUROC on several datasets, particularly when paired with high-dimensional OpenAI embeddings. Statistical comparisons using Critical Difference (CD) diagrams show that SIK consistently ranks as the top-performing algorithm across different embedding types.

Critical Difference (CD) diagrams comparing SIK against state-of-the-art methods across different embedding types.

Beyond accuracy, SIK demonstrates remarkable efficiency gains:

  • Speed: In head-to-head tests on the SMSSpam dataset, SIK was 14 times faster to train than the original Isolation Kernel.
  • Memory: The memory footprint during training dropped from 1,235 MB (IK) to just 0.5 MB (SIK), enabling deployment on memory-constrained edge devices.
  • Comparison to End-to-End Models: SIK significantly outperformed specialized end-to-end neural networks like CVDD and FATE, validating the effectiveness of the two-step approach when using optimized kernels.

Conclusion

By focusing on the relationship between data points and the boundary of "normal" data, the Simplified Isolation Kernel (SIK) achieves massive compression without sacrificing diagnostic power. Its dimensionality independence makes it uniquely suited for the ultra-high-dimensional vectors produced by modern LLMs, offering a scalable and high-performance solution for real-world text anomaly detection tasks.

Summary updated

BibTeX
@misc{cao2025text,
  author = {Yang Cao and Sikun Yang and Yujiu Yang and Lianyong Qi and Ming Liu},
  title = {{Text Anomaly Detection with Simplified Isolation Kernel}},
  year = {2025},
  eprint = {2510.13197},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.13197},
}
Figure