What if Tomorrow is the World Cup Final? Counterfactual Time Series Forecasting with Textual Conditions

Shuqi Gu, Yongxiang Zhao, Baoyu Jing, Kan Ren

TL;DR

This paper introduces TADIFF, a multimodal diffusion framework designed for "what-if" time series forecasting based on natural language descriptions. By disentangling a time series' intrinsic patterns from its external environment, the model can generate accurate forecasts for hypothetical scenarios—like a sudden rainstorm or a major sporting event—even when no historical ground truth for that specific scenario exists.

What Problem Does This Paper Address?

Traditional time series forecasting is largely "rear-view mirror" modeling: it looks at historical patterns to predict the future. While some modern methods incorporate future "factual" conditions (like a scheduled holiday), they struggle with counterfactuals—hypothetical "what if" scenarios that deviate from the observed path.

Furthermore, most existing models rely on rigid, categorical inputs (e.g., a "1" for a holiday, "0" for a workday). Real-world conditions are far more nuanced and are best described in text (e.g., "A rainstorm at 5:00 PM damaged the road, but repairs finished by 9:00 PM"). The authors identify three core challenges in this space:

  1. Balancing Act: How do you respect historical trends while strictly adhering to new, hypothetical future conditions?
  2. Adaptability: How can a model trained on factual data generalize to "unseen" counterfactual combinations?
  3. Evaluation: If a scenario is counterfactual, there is no "ground truth" to compare against. How do we know if the forecast is actually good?

Methods

The authors propose the Text-Attributive time series Diffusion model (TADIFF). Its architecture is built on two clever innovations:

  • Text-Attribution Mechanism: Instead of starting the diffusion process from random Gaussian noise (the standard approach), TADIFF uses an "inverse" diffusion process. It takes the historical sequence and its corresponding text description to "strip away" external influences, leaving behind the intrinsic features of the series. These intrinsic features then serve as the starting point for the forecast.
  • Two-Stage Inference:
    1. Attribution: Extract the "core" of the history by accounting for historical text.
  • Forecasting: Combine that core with the new counterfactual text to generate the future sequence.
  • DTTC Evaluation Metric: To solve the "no ground truth" problem, they developed Disentangled Time Series and Text Consistency (DTTC). Inspired by CLIP, this metric uses contrastive learning to measure two things: how well the forecast aligns with historical patterns (DTTC-I) and how well it matches the future textual description (DTTC-E).

Datasets

The researchers evaluated TADIFF across five datasets:

  • Synth: A newly introduced synthetic dataset where the authors control the generation process, allowing them to create "ground truth" for counterfactual scenarios to verify the model's accuracy.
  • Weather: A multimodal dataset containing atmospheric variables and real-world captions.
  • ETTm1, Traffic, and Exchange: Three standard unimodal time series datasets. To make these work for this task, the authors used an automated pipeline to extract features and generate synthetic textual descriptions (e.g., describing trend directions and peaks).

Key Insights and Ideas

  • Disentanglement is the Secret Sauce: You cannot simply "add" text to a time series model. By explicitly separating what a series is (intrinsic) from what the environment does to it (extrinsic), the model gains the flexibility to swap out environments (textual conditions) while keeping the underlying signal consistent.
  • Optimizing the Noise Space: Most diffusion models start with pure randomness. This paper proves that starting with "attributed" noise—noise that already contains the "ghost" of the historical pattern—leads to much more stable and accurate denoising.
  • Evaluating Semantics over Points: In counterfactual settings, point-wise accuracy (like MSE) is impossible. The shift toward "semantic alignment" (checking if the graph looks like what the text says) is a significant step forward for the field.

Key Results

  • Superior Accuracy: On factual data, TADIFF outperformed state-of-the-art baselines (like PatchTST and TimesNet) across almost all datasets, often by significant margins in MAE and MSE.
  • Robust Counterfactuals: In "what-if" scenarios, TADIFF consistently achieved the highest DTTC scores, proving it is better at following textual instructions than existing multimodal models like VerbalTS or TimeMMD.
  • Ablation Success: Removing the "Text-Attribution" component caused performance to tank, confirming that the disentanglement process is the primary driver of the model's success.
  • Qualitative Alignment: Visualizations show that TADIFF successfully captures complex instructions, such as reversing a trend or adding specific "local shapelets" (like a double peak) described in the text.

Limitations and Future Work

While TADIFF is powerful, the authors note a few areas for growth:

  • Inference Speed: As a diffusion-based model, TADIFF is computationally heavier and slower than simple linear or transformer-based forecasters. While the authors argue the accuracy trade-off is worth it, it may limit real-time applications.
  • Text Dependency: The model’s performance is tied to the quality and granularity of the textual descriptions. If the text is vague, the forecast's "alignment" becomes harder to measure.
  • Scaling: Future work could involve scaling the model to even larger, more diverse datasets to see if it can act as a "foundation model" for counterfactual reasoning across entirely different domains.

Summary updated

Abstract

Time series forecasting has become increasingly critical in real-world scenarios, where future sequences are influenced not only by historical patterns but also by forthcoming events. In this context, forecasting must dynamically adapt to complex and stochastic future conditions, which introduces fundamental challenges in both forecasting and evaluation. Traditional methods typically rely on historical data or factual future conditions, while overlooking counterfactual scenarios. Furthermore, many existing approaches are restricted to simple structured conditions, limiting their ability to generalize to the real-world complexities. To address these gaps, we introduce the task of counterfactual time series forecasting with textual conditions, enabling more flexible and condition-aware forecasting. We propose a comprehensive evaluation framework that encompasses both factual and counterfactual settings, even in the absence of ground truth time series. Additionally, we present a novel text-attribution mechanism that distinguishes mutable from immutable factors, thereby improving forecast accuracy under sophisticated and stochastic textual conditions.
BibTeX
@inproceedings{gu2026what,
  author = {Shuqi Gu and Yongxiang Zhao and Baoyu Jing and Kan Ren},
  title = {{What if Tomorrow is the World Cup Final? Counterfactual Time Series Forecasting with Textual Conditions}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=B8bAYc4COx},
}
Figure