Abstract
Selecting the optimal forecasting model for a new time series dataset typically involves exhaustive testing or computationally expensive meta-learning. This paper proposes a lightweight, zero-shot alternative using Large Language Models (LLMs) to perform model selection. By prompting models like Llama 3.2 and GPT-4o with raw data and statistical meta-features, the framework achieves superior selection accuracy compared to traditional methods while drastically reducing inference time by up to 89x.
Introduction: The Model Selection Problem
In time series forecasting, the "no free lunch" theorem holds true: no single algorithm—whether Prophet, DeepAR, or ARIMA—consistently outperforms others across all datasets. Practitioners are thus faced with a critical selection problem: identifying the best model and hyperparameter configuration for a given dataset.
Traditional approaches suffer from significant drawbacks. Exhaustive search is computationally prohibitive for large-scale applications, while meta-learning requires the creation of a massive "performance matrix"—a pre-evaluated table of every candidate model on every historical dataset. This paper investigates whether the latent reasoning of LLMs can bypass these costs and select optimal models instantly.
Methodology: A Zero-Shot Framework
The authors introduce a zero-shot framework where an LLM serves as the primary decision-maker. The process is structured into three distinct phases:
- Prompt Construction: A prompt is generated containing the "Role and Objective," the "Model Space" (comprising 322 possible model/hyperparameter combinations), and the "Input" (raw data values and/or statistical meta-features).
- LLM Querying: The prompt is processed by a candidate LLM (e.g., Llama 3.2-3B, GPT-4o, or Gemini 2.0 Flash). The model provides a structured JSON response detailing its reasoning and recommended configuration.
- Evaluation: The recommended model is executed on the target dataset to validate its performance against ground truth benchmarks.
Experimental Setup
The study utilized a benchmark collection of 321 forecasting datasets across domains such as finance, IoT, energy, and weather. The model space included 322 unique configurations of popular algorithms like DeepAR and Prophet. The researchers tested various prompt variations, including raw data only, data plus meta-features (e.g., entropy, trend), and the inclusion of Chain-of-Thought (CoT) instructions.
Results and Key Insights
Selection Accuracy
Experimental results indicate that LLMs can effectively internalize the relationship between data patterns and model strengths. Notably, Llama 3.2 achieved the highest hit@1 accuracy, outperforming traditional meta-learning baselines like ISAC and MLP. The inclusion of statistical meta-features significantly enhanced performance for both Llama and GPT models.
Efficiency and the CoT Paradox
The LLM approach demonstrated remarkable efficiency. Compared to a naive exhaustive search, Gemini 2.0 Flash achieved an 89x reduction in inference time, while Llama 3.2 provided a 14x reduction. Furthermore, the LLM method requires zero training time, unlike traditional meta-learners.
Interestingly, the study revealed a "CoT Paradox": adding Chain-of-Thought reasoning often degraded performance and increased hallucinations. This suggests that for model selection tasks, direct pattern recognition may be more reliable than forced logical over-analysis.
Conclusion and Future Work
This research demonstrates that LLMs are powerful zero-shot meta-learners for time series forecasting. While smaller models like Llama 3.2 showed surprising efficacy, they also exhibited higher rates of invalid outputs (hallucinations). Future work will focus on expanding the framework to multivariate time series, addressing hallucination issues, and further investigating the underlying mechanisms that enable LLMs to excel at this structured reasoning task.
Summary updated