Text Anomaly Detection with Simplified Isolation Kernel
Yang Cao, Sikun Yang, Yujiu Yang, Lianyong Qi, Ming Liu
TL;DR
This work tackles the challenge of text anomaly detection when leveraging high-dimensional embeddings from large language models. It introduces the Simplified Isolation Kernel (SIK), a boundary-focused, low-dimensional sparse representation that preserves crucial anomaly characteristics while achieving linear time and space complexity. The authors prove SIK is a valid kernel and demonstrate through extensive experiments on seven datasets that SIK often outperforms 11 SOTA methods, especially when paired with OpenAI embeddings, while offering substantial scalability benefits over prior IK/IDK approaches. The results imply strong practical impact for fast, memory-efficient anomaly detection in large-scale text corpora, with publicly available code for reproducibility.
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. All code and demonstrations are available at https://github.com/charles-cao/SIK.
