cs.LGOct 27, 2026

Learning from Points and Patches: A Pre-trained Hybrid Attention Transformer for Time Series Analysis

Authors: Peiwang Tang, Cheng HE, Yupeng Ye, Weitai Zhang, Qinghua Sun, Defu Lian

Organizations: University of Science and Technology of China, Hefei, Anhui, China · State Key Laboratory of Cognitive Intelligence, Hefei, Anhui, China · Shanghai Black Wing Asset Management, Shanghai, China · iFLYTEK Research, Hefei, Anhui, China

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.

Figures & tables

Appendix figures & tables5 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. A Hybrid Attention Model Learning Unified Time-aware Patch Representation for Irregular Multivariate Time Series Forecasting

    Sep 19, 2026Li Lin, Zhihao Lin, Qi Zhang +3Irregular Time-Series ModelingMultivariate Time Series Forecasting

  2. IPatch: A Multi-Resolution Transformer Architecture for Robust Time-Series Forecasting

    Mar 25, 2026Aymane Harkati, Moncef Garouani, Olivier Teste +2Robust Time Series ForecastingTime Series Forecasting

  3. Tabby: An Open Pretraining Recipe for Time Series Foundation Models

    Sep 12, 2026Shifeng Xie, Bahaeddine Abdessalem, Zehao Xiao +9Time-Series Foundation ModelsTime Series Transformers