TimeXer: Empowering Transformers for Time Series Forecasting with Exogenous Variables

Yuxuan Wang, Haixu Wu, Jiaxiang Dong, Yong Liu, Yunzhong Qiu, Haoran Zhang, Jianmin Wang, Mingsheng Long

arXiv:2402.19072 · 2026-07-27 공개 · arXiv · PDF

transformer cross-attention self-attention time-series-forecasting scalability exogenous-variables patch-wise endogenous-variables

Abstract

Deep models have demonstrated remarkable performance in time series forecasting. However, due to the partially-observed nature of real-world applications, solely focusing on the target of interest, so-called endogenous variables, is usually insufficient to guarantee accurate forecasting. Notably, a system is often recorded into multiple variables, where the exogenous variables can provide valuable external information for endogenous variables. Thus, unlike well-established multivariate or univariate forecasting paradigms that either treat all the variables equally or ignore exogenous information, this paper focuses on a more practical setting: time series forecasting with exogenous variables. We propose a novel approach, TimeXer, to ingest external information to enhance the forecasting of endogenous variables. With deftly designed embedding layers, TimeXer empowers the canonical Transformer with the ability to reconcile endogenous and exogenous information, where patch-wise self-attention and variate-wise cross-attention are used simultaneously. Moreover, global endogenous tokens are learned to effectively bridge the causal information underlying exogenous series into endogenous temporal patches. Experimentally, TimeXer achieves consistent state-of-the-art performance on twelve real-world forecasting benchmarks and exhibits notable generality and scalability. Code is available at this repository: https://github.com/thuml/TimeXer.

한국어 요약

한 줄 요약

TimeXer는 외부 변수를 효과적으로 통합하여 Transformer 기반 시계열 예측 성능을 향상시키는 새로운 모델이다.

핵심 기여도

핵심 아이디어

기존 시계열 예측 모델은 내부 변수(endogenous variables)만을 고려하거나, 외부 변수를 단순히 결합하는 방식을 사용하여 외부 정보의 구조적 통합을 제대로 반영하지 못하였다. TimeXer는 이 문제를 해결하기 위해, **patch-wise self-attention**을 통해 내부 시계열 패턴을, **variate-wise cross-attention**을 통해 외부 변수와의 상관관계를 동시에 모델링한다. 또한, **global endogenous tokens**을 도입하여 외부 변수의 인과 정보를 내부 패치에 전달함으로써, 외부 정보가 내부 예측에 어떻게 영향을 미치는지를 명확히 포착한다. 이는 기존 Transformer 기반 모델에서 외부 변수를 단순히 결합하는 방식과는 구별된다.

기술적 접근법

주요 결과

의의 및 한계

TimeXer는 외부 변수를 구조적으로 통합하는 새로운 패러다임을 제시하며, 실제 시계열 예측 문제에서 **고도의 유연성과 확장성**을 보인다. 특히, **값 누락, 시간 비정렬, 주파수 불일치** 등의 문제를 처리할 수 있어 실용적 가치가 높다. 그러나, 외부 변수의 **질적 품질**이나 **시간 지연**에 따라 성능이 달라질 수 있는 점은 한계로 지적된다. 또한, 모델의 **복잡도**가 증가함에 따라, 더 큰 규모의 데이터셋에서는 **추가 최적화가 필요**할 수 있다.

실용적 활용

TimeXer는 전력망, 기상 예측, 교통량 예측 등 외부 요인이 중요한 역할을 하는 다양한 분야에서 활용 가능하다. 특히, **경제 지표, 사회적 이벤트, 인구 통계** 등의 외부 정보를 포함한 예측 시스템 구축에 적합하며, **실시간 예측 및 대규모 데이터 처리**에도 유리하다.