LLM-Assisted Logic Rule Learning: Scaling Human Expertise for Time Series Anomaly Detection
Abstract
Time series anomaly detection is critical for supply chain management to take proactive operations, but faces challenges: classical unsupervised anomaly detection based on exploiting data patterns often yields results misaligned with business requirements and domain knowledge, while manual expert analysis cannot scale. We propose a framework that leverages large language models (LLMs) to systematically encode human expertise into interpretable, logic-based rules for detecting anomalies in supply chain time series data. Distinct from direct LLM deployment, our approach utilizes LLMs to generate and iteratively optimize deterministic rules offline. Deployed at Amazon for monitoring millions of individual products, our approach achieves detection accuracy comparable to state-of-the-art multimodal LLMs while delivering 1) orders of magnitude faster execution with 2) zero inference API costs in production. This establishes a scalable paradigm for bridging expert-driven decision-making with automated production systems, eliminating the latency and stochasticity barriers of direct LLM deployment.