Abstract
We build upon time-series classification by leveraging the capabilities of Vision Language Models (VLMs). We find that VLMs produce competitive results after two or less epochs of fine-tuning. We develop a novel approach that incorporates graphical data representations as images in conjunction with numerical data. This approach is rooted in the hypothesis that graphical representations can provide additional contextual information that numerical data alone may not capture. Additionally, providing a graphical representation can circumvent issues such as limited context length faced by LLMs. To further advance this work, we implemented a scalable end-to-end pipeline for training on different scenarios, allowing us to isolate the most effective strategies for transferring learning capabilities from LLMs to Time Series Classification (TSC) tasks. Our approach works with univariate and multivariate time-series data. In addition, we conduct extensive and practical experiments to show how this approach works for time-series classification and generative labels.
Introduction
Time-Series Classification (TSC) is a critical task in domains ranging from medical diagnostics to industrial monitoring. Traditionally, TSC has been addressed using specialized deep learning architectures like InceptionTime or ensemble methods. While Large Language Models (LLMs) have demonstrated significant potential in time-series forecasting, their application to classification is often hindered by context length limitations; long numerical sequences can quickly exceed an LLM's memory and token limits. This research investigates the feasibility of bypassing these constraints by utilizing Vision-Language Models (VLMs), specifically LLaVA, to "see" global patterns through graphical representations alongside raw numerical data.
Methodology
Scalable Pipeline and Multimodal Architecture
The researchers developed a scalable end-to-end pipeline designed to handle various data scenarios, from univariate medical signals to complex multivariate industrial sensor data. The core of this approach is the LLaVA (Large Language-and-Vision Assistant) framework, which integrates a CLIP vision encoder with a Vicuna LLM.
In this multimodal setup, the model is prompted with both a visual plot of the signal and a text prompt containing numerical values. This dual-input strategy allows the model to leverage spatial reasoning for global trends while maintaining access to precise numerical details. To optimize training efficiency, the team utilized Low-Rank Adaptation (LoRA), requiring only 1–2 epochs of fine-tuning on a single A100 GPU to achieve competitive results.
Data Representation and Sampling
Several strategies were tested to enhance performance:
- Multimodal Prompting: Comparing raw numerical baselines against prompts augmented with statistical features (mean, variance, etc.).
- Adaptive Downsampling: To manage high-dimensional data, an adaptive algorithm was implemented to preserve data points in high-variability regions (spikes) while thinning flatter areas, outperforming standard uniform sampling.
- Visual Encoding: A/B testing revealed that line plots significantly outperform scatter plots by preserving temporal continuity, which is essential for the vision encoder to recognize patterns.
Results and Discussion
Performance Benchmarks
The VLM approach yielded impressive results on standard benchmarks from the UCR Time Series Archive:
- High Accuracy: The model achieved 99.1% accuracy on the
TwoLeadECGdataset with minimal tuning. - Context Sensitivity: For complex datasets like
CinCECGTorso, increasing the context length from 2048 to 4096 tokens improved accuracy from 76.4% to 98.3%. - Sampling Efficacy: Adaptive downsampling improved performance on
CinCECGTorsoto 82.4%, compared to the 76.4% achieved with uniform sampling.
Challenges and Limitations
Despite successes in temporal pattern recognition, the model struggled with multi-class generalization in complex datasets like the Free Music Archive (FMA) and the Hydraulic Test Rig. Furthermore, attempts to improve reasoning via "rationale-based" prompting led to overfitting, where the model memorized training explanations rather than learning generalizable features. The study suggests that while VLMs are highly effective for "inherently temporal" data like ECGs, they may be brittle when faced with high intra-class variance or non-temporal spatial data.
Conclusion
This work demonstrates that VLMs are a viable and efficient alternative for time-series classification, offering a unique way to circumvent the context limitations of traditional LLMs. By treating signals as visual objects, models can capture global contexts that numerical data alone might obscure. Future research will focus on refining adaptive sampling for noisy environments and exploring more diverse visual representations, such as heatmaps, to further enhance multi-class classification robustness.
Summary updated