Learning from Points and Patches: A Pre-trained Hybrid Attention Transformer for Time Series Analysis
Peiwang Tang, Cheng HE, Yupeng Ye, Weitai Zhang, Qinghua Sun, Defu Lian
Key points
From the paper's conclusion- We propose TimeHAT (Hybrid Attention Transformer), a general-purpose pre-training framework for time-series analysis that addresses two complementary questions: what to learn and how to learn.
Abstract
Time-series data generated by Web services and connected systems support applications such as user activity analysis, service monitoring, and resource management. However, learning transferable representations from heterogeneous time series remains challenging due to diverse temporal patterns, variable sequence lengths, and limited high-quality annotations. Despite the success of pre-training in natural language processing and computer vision, effective time-series pre-training requires strategies tailored to temporal data. We propose TimeHAT (Hybrid Attention Transformer), a general-purpose pre-training framework for time-series analysis that addresses two complementary questions: what to learn and how to learn. For what to learn, we introduce a Unified Point-Patch Masking Strategy (UPPMS) that integrates point-level and patch-level supervision within a unified framework for contextual reconstruction and causal extrapolation, enabling the model to capture both fine-grained temporal variations and broader temporal patterns. For how to learn, we develop a Hybrid Attention Encoder (HAE) that combines prefix-constrained bidirectional attention in initial layers with directional hybrid attention in deeper layers, aiming to preserve effective contextual interactions while mitigating rank degeneration. We evaluate TimeHAT across real-world datasets and four downstream tasks: classification, long-term forecasting, imputation, and anomaly detection. Experiments cover fine-tuning, few-shot, and zero-shot transfer settings, demonstrating competitive performance across diverse time-series analysis tasks. Code is available at https://github.com/TangPeiwang/TimeHAT.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- TimeFormer: Transformer with attention modulation empowered by temporal characteristics for time series forecastingExpert Systems with Applications · 2025
- Scaling transformers for time series forecasting: do pretrained large models outperform small-scale alternatives?Artificial Intelligence Review · 2026
- WinoTS: Wavelet-based Self-Distillation for Time Series ModelsarXiv · 2026
- Beyond Static Positional Encoding: Bayesian Time-aware Attention for Non-Stationary Long-term Time Series ForecastingarXiv · 2026
- TimeSeek: Multi-Task and Multi-Domain Pretraining for Generalized Time Series Analytics.IEEE transactions on pattern analysis and machine intelligence · 2026
- Every Locale Has Its Rhythm: Endow Time-Series Transformers with Spatial Insights for Long-term Spatio-Temporal ForecastingACM Transactions on Intelligent Systems and Technology · 2026