Lune

EMNLP Findings2025

Can LLMs Find a Needle in a Haystack? A Look at Anomaly Detection Language Modeling

Leslie Barrett, Vikram Sunil Bajaj, Robert J. Kingan

Abstract

Anomaly detection (AD), also known as Outlier Detection, is a longstanding problem in machine learning, which has recently been applied to text data. In these datasets, a textual anomaly is a part of the text that does not fit the overall topic of the text. Some recent approaches to textual AD have used transformer models, achieving positive results but with trade-offs in pre-training time and inflexibility with respect to new domains. Others have used linear models which are fast and more flexible but not always competitive on certain datasets. We introduce a new approach based on Large Pretrained Language Models in three modalities. Our findings indicate that LLMs beat baselines when AD is presented as an imbalanced classification problem regardless of the concentration of anomalous samples. However, their performance is markedly worse on unlabeled AD, suggesting that the concept of "anomaly" may somehow elude the LLM reasoning process.

Ask Lune

Ask anything. The answer quotes the paper.

Lune reads all of it and the papers around it, then shows you the passages behind every answer.

Questions to start from

Lune answers from

the full paper · related work

Get the answer

Free to start. No credit card required.

Builds on3

  1. Text Classification via Large Language ModelsXiaofei Sun, Xiaoya Li, Jiwei Li, Fei Wu et al.EMNLP Findings 2023 · 218 citations
  2. Can Large Language Models Identify Authorship?Baixiang Huang, Canyu Chen, Kai ShuEMNLP Findings 2024 · 30 citations
  3. AD-LLM: Benchmarking Large Language Models for Anomaly DetectionTiankai Yang, Yi Nian, Li Li, Ruiyao Xu et al.ACL Findings 2025 · 11 citations

Related papers

  1. AnoLLM: Large Language Models for Tabular Anomaly DetectionChe-Ping Tsai, Ganyu Teng, Phillip Wallis, Wei DingICLR 2025
  2. MMR-AD: A Large-Scale Multimodal Dataset for Benchmarking General Anomaly Detection with Multimodal Large Language ModelsXincheng Yao, Zefeng Qian, Chao Shi, Jiayang Song et al.CVPR 2026 · 2 citations
  3. ICAD-LLM: One-for-All Anomaly Detection via In-Context Learning with Large Language ModelsZhongyuan Wu, Jingyuan Wang, Zexuan Cheng, Yilong Zhou et al.AAAI 2026 · 1 citation
  4. Harnessing Large Language Models for Training-Free Video Anomaly DetectionLuca Zanella, Willi Menapace, Massimiliano Mancini, Yiming Wang et al.CVPR 2024 · 57 citations
  5. AnomalyGPT: Detecting Industrial Anomalies Using Large Vision-Language ModelsZhaopeng Gu, Bingke Zhu, Guibo Zhu, Yingying Chen et al.AAAI 2024 · 312 citations
Dusk over the sea between two cliffs drawn in fine vertical lines