Skip to main content
QUICK REVIEW

[Paper Review] AD-LLM: Benchmarking Large Language Models for Anomaly Detection

Tiankai Yang, Yi Nian|arXiv (Cornell University)|Dec 15, 2024
Anomaly Detection Techniques and ApplicationsComputer Science3 citations
TL;DR

This paper introduces AD-LLM, the first comprehensive benchmark evaluating large language models (LLMs) for anomaly detection in NLP. It examines LLMs in three roles: zero-shot anomaly detection, data augmentation via synthetic sample generation, and model selection for AD tasks. Results show LLMs achieve strong zero-shot performance and enhance detection through context-aware prompting and synthetic data, though model selection explanations remain challenging.

ABSTRACT

Anomaly detection (AD) is an important machine learning task with many real-world uses, including fraud detection, medical diagnosis, and industrial monitoring. Within natural language processing (NLP), AD helps detect issues like spam, misinformation, and unusual user activity. Although large language models (LLMs) have had a strong impact on tasks such as text generation and summarization, their potential in AD has not been studied enough. This paper introduces AD-LLM, the first benchmark that evaluates how LLMs can help with NLP anomaly detection. We examine three key tasks: (i) zero-shot detection, using LLMs' pre-trained knowledge to perform AD without tasks-specific training; (ii) data augmentation, generating synthetic data and category descriptions to improve AD models; and (iii) model selection, using LLMs to suggest unsupervised AD models. Through experiments with different datasets, we find that LLMs can work well in zero-shot AD, that carefully designed augmentation methods are useful, and that explaining model selection for specific datasets remains challenging. Based on these results, we outline six future research directions on LLMs for AD.

Motivation & Objective

  • To address the lack of systematic evaluation of large language models (LLMs) in natural language processing (NLP) anomaly detection tasks.
  • To investigate how LLMs can enable zero-shot anomaly detection without task-specific fine-tuning.
  • To explore the effectiveness of LLM-generated synthetic data and category descriptions in improving anomaly detection performance.
  • To assess whether LLMs can intelligently recommend unsupervised anomaly detection models based on dataset and task characteristics.
  • To establish a reproducible benchmark for future research on LLMs in anomaly detection, promoting transparency and methodological rigor.

Proposed method

  • Design and implement a unified benchmark framework, AD-LLM, to evaluate LLMs across three core anomaly detection tasks: zero-shot detection, data augmentation, and model selection.
  • For zero-shot detection, prompt LLMs with input text and request anomaly classification with reasoning, leveraging pre-trained knowledge without fine-tuning.
  • For data augmentation, generate synthetic normal and anomalous text samples and descriptive prompts using LLMs to enrich limited or imbalanced datasets.
  • For model selection, prompt LLMs to analyze dataset metadata (e.g., size, text length, category distribution) and model abstracts to recommend the most suitable AD model with justification.
  • Use multiple real-world NLP datasets across domains such as fraud detection, misinformation, and user behavior to evaluate generalization and robustness.
  • Evaluate performance using standard metrics (e.g., F1, AUC) and conduct ablation studies to isolate the impact of prompt design, LLM identity, and augmentation quality.

Experimental results

Research questions

  • RQ1Can LLMs achieve competitive zero-shot anomaly detection performance in NLP without any task-specific fine-tuning?
  • RQ2To what extent does LLM-generated synthetic data and descriptive prompts improve downstream anomaly detection model performance?
  • RQ3Can LLMs effectively recommend unsupervised anomaly detection models for a given dataset based on its characteristics and task context?
  • RQ4How do different LLM architectures and prompting strategies affect the quality and reliability of anomaly detection and model selection outputs?
  • RQ5What are the key limitations and failure modes in LLM-driven anomaly detection, particularly in model selection explainability and context sensitivity?

Key findings

  • LLMs achieve strong zero-shot anomaly detection performance, often outperforming traditional unsupervised baselines without any task-specific training data.
  • Incorporating structured context—such as anomaly category names or descriptive prompts—into LLM inputs significantly improves detection accuracy and consistency.
  • LLM-driven data augmentation enhances downstream anomaly detection performance, especially in low-data regimes, though gains vary with dataset complexity and model choice.
  • LLM-based model selection can identify top-performing AD models with reasonable accuracy, but the interpretability and quality of rationales remain inconsistent and require improvement.
  • The effectiveness of LLMs in anomaly detection is highly sensitive to prompt engineering and model selection, highlighting the need for systematic prompting frameworks.
  • Despite promising results, LLMs struggle to generate reliable, dataset-specific justifications for model recommendations, indicating a key open challenge for future work.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.