


MIT's latest masterpiece: using GPT-3.5 to solve the problem of time series anomaly detection
Picture
Paper title: Large language models can be zero-shot anomaly detectors for time series?
Download address: https: //arxiv.org/pdf/2405.14755v1
1. Overall introduction to this article from
, based on LLM (such as GPT-3.5-turbo, MISTRAL, etc.) for time series anomaly detection . The core lies in the design of the pipeline, which is mainly divided into two parts.
Time series data processing: Convert the original time series into LLM understandable input through discretization and other methods;
LM-based anomaly detection Pipeline has designed two prompt-based anomaly detection pipeline, one is a prompt-based method that asks the large model for the abnormal location, and the large model gives the index of the abnormal location; the other is a prediction-based method that allows the large model to perform time series predictions based on the difference between the predicted value and the actual value. Perform abnormal location.
Picture
2. Time series data processing
In order to adapt the time series to the LLM input, the article converts the time series into numbers, by Numbers serve as input to LLM. The core here is how to retain as much original time series information as possible with the shortest length.
First, uniformly subtract the minimum value from the original time series to prevent the occurrence of negative values. Negative value indexes will occupy a token. At the same time, the decimal points of the values are uniformly moved back, and each value is retained to a fixed number of digits (such as 3 decimal places). Since GPT has restrictions on the maximum length of input, this paper adopts a dynamic window strategy to divide the original sequence into overlapping subsequences and input them into the large model.
Due to different LLM tokenizers, in order to prevent the numbers from being completely separated, a space is added in the middle of each number in the text to force the distinction. Subsequent verification of the effect also showed that the method of adding spaces is better than not adding spaces. The following example is the processing result:
Picture
Different data processing methods, used for different large models, will produce different results, as shown in the figure below Show.
Picture
3. Anomaly detection Pipeline
The article proposes two anomaly detection pipelines based on LLM, the first one is PROMPTER , convert the anomaly detection problem into a prompt and input it into the large model, and let the model directly give the answer; the other is DETECTOR, which allows the large model to perform time series prediction, and then determine the abnormal points through the difference between the prediction result and the real value.
Picture
PROMPTER: The following table is the process of prompt iteration in the article. Starting from the simplest prompt, we continue to find problems with the results given by LLM. And improved the prompt, and after 5 versions of iteration, the final prompt was formed. Using this prompt, the model can directly output the index information of the abnormal location.
Picture
DETECTOR: There has been a lot of previous work using large models for time series forecasting. The processed time series in this article can directly allow large models to generate prediction results. Take the median of multiple results generated by different windows, and then use the difference between the predicted results and the real results as the basis for anomaly detection.
4. Experimental results
Through experimental comparison, it is found that the anomaly detection method based on large models can improve the effect by 12.5% due to the anomaly detection model based on Transformer. AER (AER: Auto-Encoder with Regression for Time Series Anomaly Detection) is the most effective deep learning-based anomaly detection method and is still 30% better than the LLM-based method. In addition, the pipeline method based on DIRECTOR is better than the method based on PROMTER.
Picture
In addition, the article also visualizes the anomaly detection process of the large model, as shown below.
picture
The above is the detailed content of MIT's latest masterpiece: using GPT-3.5 to solve the problem of time series anomaly detection. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











The performance of i77700 is completely sufficient to run win11, but users find that their i77700 cannot be upgraded to win11. This is mainly due to restrictions imposed by Microsoft, so they can install it as long as they skip this restriction. i77700 cannot be upgraded to win11: 1. Because Microsoft limits the CPU version. 2. Only the eighth generation and above versions of Intel can directly upgrade to win11. 3. As the 7th generation, i77700 cannot meet the upgrade needs of win11. 4. However, i77700 is completely capable of using win11 smoothly in terms of performance. 5. So you can use the win11 direct installation system of this site. 6. After the download is complete, right-click the file and "load" it. 7. Double-click to run the "One-click

How to solve the Java thread interrupt timeout exception (ThreadInterruptedTimeoutException). In Java multi-thread programming, we often encounter situations where the thread execution time is too long. In order to prevent threads from occupying too many system resources, we usually set a timeout. When the thread execution time exceeds the timeout, we hope to be able to interrupt the execution of the thread. Java provides a thread interruption mechanism. By calling the thread's interrupt() method, you can

The abnormality in the pool is a side task in the game. Many players want to know how to complete the abnormality in the pool task. It is actually very simple. First, we must master the technique of shooting in the water before we can accept the task and investigate the source of the stench. Later, we discovered It turns out that there are a lot of corpses under the pool. Let’s take a look at this graphic guide for the unusual tasks in the pool in Rise of Ronin. Guide to unusual missions in the Ronin Rise Pool: 1. Talk to Iizuka and learn the technique of shooting in the water. 2. Go to the location in the picture below to receive the abnormal task in the pool. 3. Go to the mission location and talk to the NPC, and learn that there is a foul smell in the nearby pool. 4. Go to the pool to investigate. 5. Swim to the location in the picture below, dive underwater, and you will find a lot of corpses. 6. Use a camera to take pictures of the corpse. 7

What is the strength of Google Gemini? Carnegie Mellon University conducted a professional and objective third-party comparison. To ensure fairness, all models use the same prompts and generation parameters, and provide reproducible code and fully transparent results. It will not use CoT@32 to compare 5-shot like Google’s official press conference. Results in one sentence: The GeminiPro version is close to but slightly inferior to GPT-3.5Turbo, and GPT-4 is still far ahead. During the in-depth analysis, we also found some strange characteristics of Gemini, such as choosing D for multiple-choice questions... Many researchers said that Gemini was tested in great detail just a few days after its release, which is a great achievement. In-depth testing of six major tasks This test is more specific than

Methods to solve Java reflection exceptions (ReflectiveOperationException) In Java development, reflection (Reflection) is a powerful mechanism that allows programs to dynamically obtain and operate classes, objects, methods, properties, etc. at runtime. Through reflection, we can implement some flexible functions, such as dynamically creating objects, calling private methods, obtaining class annotations, etc. However, using reflection also brings some potential risks and problems, one of which is reflection anomalies (

Practical tips for efficiently resolving large file read exceptions in Java require specific code examples. Overview: When processing large files, Java may face problems such as memory overflow and performance degradation. This article will introduce several practical techniques to effectively solve Java large file reading exceptions, and provide specific code examples. Background: When processing large files, we may need to read the file contents into memory for processing, such as searching, analyzing, extracting and other operations. However, when the file is large, the following problems are often encountered: Memory overflow: trying to copy the entire file at once

Today I would like to introduce to you an article published by MIT last week, using GPT-3.5-turbo to solve the problem of time series anomaly detection, and initially verifying the effectiveness of LLM in time series anomaly detection. There is no finetune in the whole process, and GPT-3.5-turbo is used directly for anomaly detection. The core of this article is how to convert time series into input that can be recognized by GPT-3.5-turbo, and how to design prompts or pipelines to let LLM solve the anomaly detection task. Let me introduce this work to you in detail. Image paper title: Largelanguagemodelscanbezero-shotanomalydete

Exception handling and unit testing are important practices to ensure the soundness of C++ code. Exceptions are handled through try-catch blocks, and when the code throws an exception, it jumps to the catch block. Unit testing isolates code testing to verify that exception handling works as expected under different circumstances. Practical case: The sumArray function calculates the sum of array elements and throws an exception to handle an empty input array. Unit testing verifies the expected behavior of a function under abnormal circumstances, such as throwing an std::invalid_argument exception when an array is empty. Conclusion: By leveraging exception handling and unit testing, we can handle exceptions, prevent code from crashing, and ensure that the code behaves as expected under abnormal conditions.
