LLMs Detect Tabular Anomalies via In-Context Learning

Tu Anh Hoang Nguyen, Dang Nguyen, Thuc Duy Le, Trung Le, Sunil Gupta· August 21, 2026 View original

Key takeaways

  • LLM-Detector uses in-context learning for tabular anomaly detection.
  • It converts normal data into structured knowledge for prompt-conditioned scoring.
  • The method avoids LLM fine-tuning, reducing computational costs.
  • It consistently outperforms SOTA baselines across various tabular datasets.

Who benefits

BFSICybersecurityManufacturingHealthcareRetail

Summary

LLM-Detector is a new framework that leverages the in-context learning capabilities of large language models for tabular anomaly detection. It converts normal training data into structured knowledge (summaries, dependencies, prototypes) within a prompt, enabling the LLM to generate a scoring engine that identifies anomalies without fine-tuning or neural network training.

Anomaly detection in tabular data presents significant challenges, particularly because anomalies often manifest as violations of complex cross-feature dependencies rather than simple deviations. Current anomaly detectors typically rely on geometric or reconstruction-based signals. While some prior approaches have used LLMs, they often involve fine-tuning the models with normal samples or generating synthetic anomalies. This research introduces LLM-Detector, a novel framework that harnesses the in-context learning abilities of Large Language Models for tabular anomaly detection. Instead of fine-tuning, LLM-Detector transforms normal training data into structured knowledge, including statistical summaries, causal dependencies, and distilled prototypes. This structured knowledge is then organized into a prompt, which guides the LLM to synthesize a scoring engine. The generated scoring engine evaluates statistical deviation, structural inconsistency, and density-based abnormality to compute an anomaly score for each test sample. Evaluated across 24 tabular datasets and compared against 15 state-of-the-art baselines, LLM-Detector consistently shows improved performance in both mixed-type and continuous-only settings. A significant advantage of this design is the elimination of LLM fine-tuning or neural network training, which substantially reduces computational costs and makes practical anomaly detection more feasible in real-world tabular systems.

Why it matters

For data professionals and engineers, detecting anomalies in tabular data is crucial for fraud detection, system monitoring, and quality control. This method offers a computationally efficient and effective approach using LLMs, potentially simplifying deployment and reducing resource needs.

How to implement this in your domain

  1. 1Experiment with converting your normal tabular data into statistical summaries, causal dependencies, and prototypes.
  2. 2Design prompts that incorporate this structured knowledge to guide an LLM in generating anomaly detection logic.
  3. 3Evaluate the LLM-generated scoring engine on your specific tabular datasets for anomaly detection.
  4. 4Consider integrating this fine-tuning-free LLM approach into your existing data monitoring or fraud detection systems.

Original post by Tu Anh Hoang Nguyen, Dang Nguyen, Thuc Duy Le, Trung Le, Sunil Gupta

"arXiv:2608.19463v1 Announce Type: new Abstract: Anomaly detection in tabular data is challenging because abnormal samples often arise as violations of cross-feature dependencies rather than simple marginal deviations. Existing detectors rely on geometric or reconstruction signals…"

View on X

Originally posted by Tu Anh Hoang Nguyen, Dang Nguyen, Thuc Duy Le, Trung Le, Sunil Gupta on X · view source

Want to go deeper?

Turn these trends into skills with Learnijoy's hands-on AI & tech courses.

Explore courses