A blog cover of LLMs in Time Series Analysis
Generative AI
Touchapon Kraisingkorn
2
min read
June 10, 2024

Performance of Large Language Models in Time Series Analysis

Time series analysis refers to data that changes over time and is collected continuously at regular intervals—hourly, daily, monthly, or yearly. Examples of such data include stock prices, sales figures, temperatures, and the number of website visitors each day.

Time series analysis is a critical component in various fields, including finance, healthcare, and environmental science. The ability to detect anomalies and predict future trends can significantly impact decision-making processes. Recently, Large Language Models (LLMs) like GPT-4 and Claude 3 have shown promise in handling complex data analysis tasks. This article delves into the performance of these LLMs in analyzing time series data, focusing on their accuracy and reliability.

What is Spike Analysis?

Spike analysis in the context of time series data involves identifying sudden and significant changes in the data points over a period. These spikes can indicate anomalies, such as unexpected events or errors in the data collection process. In financial markets, for example, a spike might represent a sudden increase or decrease in stock prices due to market events. Detecting these spikes accurately is crucial for timely decision-making and anomaly detection.

Two types of Spike Analysis are performed: In the context of time series analysis, 50% Spike Analysis and 90% Spike Analysis, each denoting the magnitude of the spike value compared to the rest of the time series data points.

50% Spike Analysis

50% Spike Analysis typically involves identifying points in the time series where the value has increased by at least 50% compared to the previous value or a baseline value. This method is useful for detecting moderate but significant changes that could indicate important events or trends. For example, in stock price data, a 50% spike might indicate a substantial but not extreme change in the stock's price.

90% Spike Analysis

90% Spike Analysis involves identifying points where the value has increased by at least 90% compared to the previous value or a baseline value. This technique is used to detect more extreme changes or anomalies in the data. Such large spikes often indicate very significant events, such as major economic shifts, natural disasters, or significant changes in consumer behavior.

Test Results

Model Accuracy by Time Series and Spike Analysis of Claude3 and GPT-4 Turbo
Time Series and Spike Analysis of Claude3 and GPT-4 Turbo

Comparative Insights:

  • Claude 3 performs consistently better than GPT-4 Turbo in both 50% and 90% Spike scenarios.
  • Claude 3 shows improvement in accuracy with an increased number of datasets under the 50% Spike scenario up to a point (208 datasets), while GPT-4 Turbo shows a significant drop in accuracy as the dataset size increases.
  • Under the 90% Spike scenario, Claude 3 maintains high accuracy across different dataset sizes, whereas GPT-4 Turbo remains stagnant at 40.5% accuracy, showing no benefit from increased data.
  • Claude 3’s performance is more stable and better overall, particularly in the 90% Spike scenario, while GPT-4 Turbo’s performance is highly variable and generally lower.

In summary, Claude 3 demonstrates superior and more consistent performance across different dataset sizes and spike conditions compared to GPT-4 Turbo.

Conclusion

The research conducted by Arize provides valuable insights into the performance of LLMs in time series analysis. Claude 3 demonstrated superior accuracy and robustness compared to GPT-4 Turbo, particularly in detecting significant anomalies. While both models show promise, further improvements are needed to enhance their mathematical capabilities and ensure their reliability in real-world applications - especially when these analyses can be done by traditional algorithms with 100% accuracy. As LLMs continue to evolve, their potential in time series analysis and other complex data tasks will undoubtedly expand, offering new opportunities for innovation and decision-making.

Consult with our experts at Amity Solutions for additional information on generative AI here