🤖 AI Summary
Existing time-series forecasting methods struggle to effectively integrate heterogeneous, multimodal external contexts—such as news, sentiment, and policy data—leading to suboptimal prediction accuracy. To address this, we propose ContextFormer, a plug-and-play framework introducing “contextual surgical fusion”: a novel mechanism enabling end-to-end distillation and task-specific representation learning from misaligned, unstructured, multi-source textual, categorical, and dynamic features. ContextFormer comprises three core components: a multimodal attention encoder, a context–history cross-modulation module, and a lightweight prediction-aware adapter. Evaluated on real-world datasets across energy, transportation, environmental science, and finance domains, ContextFormer achieves up to 30% improvement in MAE and RMSE over state-of-the-art models. It significantly enhances external contextual modeling capability and cross-domain generalizability while preserving architectural modularity and inference efficiency.
📝 Abstract
Time series forecasts are often influenced by exogenous contextual features in addition to their corresponding history. For example, in financial settings, it is hard to accurately predict a stock price without considering public sentiments and policy decisions in the form of news articles, tweets, etc. Though this is common knowledge, the current state-of-the-art (SOTA) forecasting models fail to incorporate such contextual information, owing to its heterogeneity and multimodal nature. To address this, we introduce ContextFormer, a novel plug-and-play method to surgically integrate multimodal contextual information into existing pre-trained forecasting models. ContextFormer effectively distills forecast-specific information from rich multimodal contexts, including categorical, continuous, time-varying, and even textual information, to significantly enhance the performance of existing base forecasters. ContextFormer outperforms SOTA forecasting models by up to 30% on a range of real-world datasets spanning energy, traffic, environmental, and financial domains.