Source-linked AI summary

CEDAR: Controlled and Event-Driven Demand Forecasting via Residual Decomposition

Junjie Meng, Ranxu Zhang, Zi-an Zhang, Shujun Liu, Xiaoning Qi, Xiaozhou Xu, Yanyong Zhang, Hui Xiong, Chao Wang

arXiv:2608.25871v1cs.LG

TL;DR

CEDAR addresses the gap between passive time-series forecasting and merchant need for counterfactual sales simulation under planned actions. It combines an action-conditioned transition model with event-driven residual correction, and experiments report improved simulation accuracy and practical budget-planning gains.

  • Problem

    Existing TSF methods are largely passive or treat merchant actions as covariates, limiting reliable simulation under counterfactual schedules and mixing decision-induced dynamics with external shocks.

  • Method

    CEDAR uses a two-stage framework: an Action-Interleaved Transformer models action-conditioned state transitions, while a Residual Correction Module uses external event signals to correct deviations.

  • Results

    CEDAR significantly outperforms state-of-the-art baselines in simulation accuracy and delivers substantial efficiency gains in real-world budget planning.

  • Takeaways & Limitations

    Explicit action-conditioned modeling and external-shock disentanglement support more reliable what-if analysis and budget planning in e-commerce.

  • Takeaways & Limitations

    On a public retail dataset, the experiment tests transfer of event-aware residual decomposition but does not fully reproduce the counterfactual budget-planning task.

Abstract

from arXiv · show

Forecasting in large-scale e-commerce marketplaces is increasingly required to support planning: merchants need to evaluate sales outcomes under future action sequences such as budget schedules, rather than passively predicting what happens next. However, most existing time series forecasting (TSF) approaches remain inherently passive. Even when incorporating operational decisions as auxiliary covariates, they typically optimize for correlation-based extrapolation under historical policies. This design suffers from autoregressive inertia and conflates endogenous market evolution with decision-induced transitions, leading to policy-insensitive rollouts and unreliable counterfactual analysis. To bridge this gap, we propose CEDAR (Controlled and Event-Driven Demand forecasting via Action-aware Residual decomposition), a two-stage framework for robust decision-conditioned simulation. In Stage I, an Action-Interleaved Transformer learns controllable action-conditioned state transitions for rollout under planned interventions. In Stage II, a Residual Correction Module leverages external event signals and LLM-assisted text representations to align noisy event descriptions with product context and correct event-driven deviations. Our study is enabled by a large-scale real-world dataset from Alibaba 1688, comprising approximately 32 million product trajectories with paired state-action sequences and aligned event signals. Extensive offline experiments and online controlled experiments in production demonstrate that CEDAR consistently improves simulation accuracy over strong TSF baselines and delivers practical gains for real-world budget planning.

1 Introduction

CEDAR reframes merchant sales forecasting as decision-conditioned simulation: evaluating future demand under planned interventions rather than passively extrapolating. It addresses passive-model inertia and confounding by combining action-conditioned transitions with separate event-shock correction.

  • Problem: Merchant forecasting asks what demand trajectory would result from a particular future budget schedule and other planned actions.This shifts the task from predicting what happens next to rolling out future demand under a specified action sequence.
  • Problem: Passive TSF models extrapolate historical trends and cannot reliably respond to counterfactual action schedules.State-only baselines show poor performance when action data is missing.
  • Problem: Covariate-fusion methods often improve short-horizon prediction under historical policies but conflate endogenous evolution, decision-induced transitions, and external shocks.Treating actions as ordinary covariates captures historical correlations rather than explicit intervention effects.
  • Design Requirement: Robust what-if analysis requires an explicit action-conditioned transition mechanism plus a separate component for non-stationary exogenous shocks.This separation is intended to support rollout stability under novel action sequences and avoid misattributing demand changes.
  • Approach and Validation: CEDAR uses a two-stage action-aware framework and validates it on 32 million trajectories with online A/B testing in production.The framework combines an Action-Interleaved Transformer with an event-driven residual module and reports improved simulation accuracy and budget-planning efficiency.

2 Related Work

Prior forecasting and sequence-modeling approaches generally treat actions as covariates or infer policies, rather than explicitly learning controllable transitions for merchant what-if simulation. CEDAR instead models action-conditioned dynamics and separates controllable effects from external fluctuations.

  • Time Series Forecasting: Transformer-based TSF methods have advanced temporal representation learning, but standard forecasting remains centered on passive extrapolation.The related work includes sparse attention, decomposition, frequency-domain learning, patch tokenization, and dimension inversion.
  • Covariate-Based Forecasting: Covariate-conditioned models such as TFT fuse historical observations, future inputs, and static features rather than explicitly modeling intervention-driven transitions.This paradigm represents actions through feature-level fusion.
  • Action-Conditioned Modeling: Most multivariate TSF models treat controllable variables as auxiliary covariates, whereas CEDAR models the transition operator s_t+1 = f(s_t, a_t+1).Interleaved state and action tokens encode the ordering s_t−1 → a_t → s_t.
  • Offline Reinforcement Learning: Decision Transformer-style methods model implicit policies for return optimization, while merchant planning requires comparing multiple candidate strategies through sales-trajectory simulation.The distinction is between policy discovery and explicit controllable state-transition modeling.
  • CEDAR: CEDAR focuses on stable multi-step rollout by separating controllable effects from latent external fluctuations.This supports trajectory simulation under diverse intervention plans in non-stationary e-commerce environments.

3 Method

CEDAR decomposes decision-conditioned simulation into action-conditioned dynamics and event-driven residual correction. Its AIT interleaves states and actions for controllable rollouts, while the second stage uses external signals and product-context alignment to model deviations.

  • Problem Formulation: The task simulates future product states from historical state-action sequences and a planned future action sequence under alternative merchant policies.The formulation supports operational planning, strategy evaluation, and budget scheduling.
  • Controlled Dynamics: CEDAR replaces ordinary covariate fusion with an explicit transition model designed for stable long-horizon simulation under hypothetical actions.This addresses the conflation of endogenous evolution and decision-induced dynamics in conventional TSF.
  • Stage I: Action-Interleaved Transformer: AIT treats states and actions as first-class tokens and interleaves them in causal temporal order to model directed action-to-state influence.A causal Transformer uses only past and present information, while the interleaving provides a structural bias toward controllable transitions.
  • Stage I: Action-Interleaved Transformer: AIT’s self-attention captures hierarchical funnel dependencies among behavioral signals while modeling their modulation by merchant actions.This supports fine-grained transition learning across heterogeneous product-state signals.
  • Stage II: Residual Correction: Because external news, trends, seasons, and macroeconomic shocks perturb sales beyond state-action history, CEDAR adds a Residual Correction Module.Stage I models controllable dynamics, while Stage II estimates latent external perturbations.
  • Stage II: Residual Correction: The residual module aligns external event representations with item titles, tags, predicted states, and recent history through cross-attention before estimating corrections.An LLM extracts product-level keywords from news, while holidays and seasonal events provide additional signals.
  • Discussion: Explicit standalone temporal embeddings were ineffective for aligning periodic signals with semantic representations of bursty external events and degraded predictive performance.The experiments also found that this design substantially increased network learning complexity.
  • Residual Modeling: Prior residual correction used simple MLPs that processed external covariates independently, overlooking semantic alignment between shocks and specific products.CEDAR instead aligns event descriptions with product context, such as matching seasonal demand to relevant items.

4 Experiments

Experiments evaluate CEDAR across offline forecasting, trajectory rollouts, external-shock correction, public-data transfer, and online budget planning. Results consistently support improved simulation accuracy, responsiveness to interventions, robustness to bursty events, and business outcomes.

  • Evaluation scope: The evaluation addresses baseline accuracy, action modeling, residual correction, and real-world budget-planning impact through offline, qualitative, ablation, public-benchmark, and online experiments.Together, these experiments examine both simulation fidelity and practical business value.
  • Offline forecasting: CEDAR consistently achieves the best performance across metrics and forecasting horizons, outperforming representative TSF baselines.At next 5, its MSE is 0.182 versus 0.424 for PatchTST and 0.434 for PETFormer; at next 10, it achieves MSE 0.414 and NMSE 0.189.
  • Action-conditioned rollout: CEDAR responds more accurately to advertising interventions, capturing traffic declines after reduced expenditure instead of propagating historical trends.This responsiveness supports stable multi-step rollouts under dynamically changing action plans.
  • External-shock correction: The Residual Correction Module modestly improves MSE while substantially reducing MAE, strengthening short-horizon robustness to bursty external fluctuations.Its diagnostic role also preserves trajectory diversity and product-specific dynamics that otherwise become homogenized across similar products.
  • Public-data generalization: Event-aware residual correction transfers to the Kaggle Store Sales benchmark, reducing MSE from 0.6321 to 0.5819 against PETFormer under next 5.The benchmark lacks explicit merchant actions and budget-planning semantics, so it tests transfer of event-aware decomposition rather than the full counterfactual task.

5 Conclusion

CEDAR combines action-conditioned state-transition modeling with external-shock disentanglement for decision-conditioned sales simulation. Experiments and online tests report consistent baseline improvements and practical gains for e-commerce planning.

  • CEDAR decouples endogenous market dynamics from latent external shocks while treating merchant actions and product states as first-class modalities.
  • The framework uses an Action-Interleaved Transformer for action-conditioned transitions and a Residual Correction Module for event-driven forecast discrepancies.
  • CEDAR’s two-stage training strategy stabilizes long-horizon rollout and improves robustness under volatile market conditions.
  • CEDAR consistently improves over state-of-the-art baselines on E-Comm 15-Week and yields significant merchant lifetime-value and store-level return-on-investment gains online.
  • The findings highlight explicit action-conditioned modeling and external-shock disentanglement as important for reliable what-if analysis and budget planning.

A Details of LLM-based Hotspot Information Extraction

The Hotspot Information Extraction module uses a two-stage LLM prompting pipeline to convert noisy social-media trends into commerce-relevant semantic representations.

  • The module filters noisy social-media trends and extracts commerce-relevant tags before synthesizing them with calendar events.

A.1 Stage 1: Noise Filtering and Tag Extraction

Stage 1 uses an LLM to filter recent social-media trends and retain concise product-demand indicators. The result is a set of filtered commerce tags for downstream synthesis.

  • For each forecasting window, raw trending lists from the previous week are collected from major social platforms.
  • The LLM discards irrelevant news and extracts keywords indicating potential product demand.
  • The extraction prompt excludes entertainment gossip, celebrity news, and non-commercial events.
  • The prompt identifies purchase-triggering trends and outputs concise product tags or categories.
  • The filtered commerce tags are denoted as K_t.

A.2 Stage 2: Semantic Synthesis with Calendar Events

Stage 2 combines filtered product tags with upcoming calendar events and uses an LLM to produce a coherent market-demand narrative. A pretrained encoder converts that narrative into an exogenous context embedding.

  • The method fuses filtered product tags K_t with calendar events E_t occurring within the target window.
  • An LLM synthesizes the tags and events into semantically complete sentences S_t describing market demand drivers.
  • The synthesis prompt first discusses upcoming events and holidays, then summarizes overarching demand drivers for the next week.
  • The resulting sentences encapsulate macro-environmental factors and market dynamics.
  • A pretrained text encoder transforms S_t into a dense hotspot vector h_t used as global exogenous context.
  • The embedding dimension is denoted by d_h.

B Causal Identifiability and Structural Invariance Analysis of CEDAR

CEDAR formalizes demand evolution as endogenous state transitions driven by merchant interventions plus exogenous event and noise terms. Its two-stage decomposition uses action-conditioned transitions and residual correction to support structurally invariant counterfactual simulation.

  • Structural formulation: The structural equation separates endogenous states, merchant interventions, observed exogenous events, and unobserved noise in next-state generation.It represents the transition as S_t+1 := f_θ(S_≤t,A_t+1) + E(Z_t+1,U_t).
  • Action-conditioned transitions: The AIT module approximates the endogenous mechanism through an interleaved sequence structure for action-conditioned transition learning.This approximation relies on Sequential Ignorability, conditioning potential outcomes on the historical state and event history.
  • Exogenous residual correction: The residual correction module captures exogenous shocks using LLM-enhanced event semantics and addresses latent market-trend confounding.It is designed to model the exogenous term separately from the endogenous transition mechanism.
  • Structural invariance: Separating endogenous mechanisms from exogenous perturbations is presented as ensuring structural invariance during counterfactual simulation.The framework is intended to support robust estimation of marginal causal effects for hypothetical budget strategies.

C Time Cost Analysis

CEDAR adds computational cost through two-stage training and one-time LLM-based event embedding preprocessing, with the preprocessing cost reusable across downstream workloads.

  • Training cost: CEDAR requires approximately 234 minutes of training: 154 minutes for Stage I and 80 minutes for Stage II.The total is higher than PatchTST but lower than PETFormer in the reported implementation.
  • Preprocessing cost: LLM-based event embedding generation takes around 4 hours but is performed once offline and reused across products, time windows, and model updates.The paper describes this preprocessing cost as amortized across downstream training and inference.
  • Deployment trade-off: The reported computational overhead is judged acceptable for large-scale industrial deployment because simulation quality matters in budget-planning scenarios.This assessment is made alongside consistent short-horizon and long-horizon forecasting improvements.

D Long-horizon Performance Comparison

CEDAR maintains lower long-horizon rollout error than strong baselines as the evaluation horizon extends to 25 steps. The comparison uses 10 weeks of historical observations and MSE.

  • Long-horizon degradation: All evaluated models incur larger errors at longer horizons, consistent with autoregressive error accumulation.The evaluation extends from next-5 and next-10 to next-15, next-20, and next-25 using the same historical input.
  • Rollout stability: CEDAR degrades more gracefully than the strongest baselines across the extended rollout horizons.The passage reports this pattern qualitatively before giving the next-25 comparison.
  • Next-25 comparison: At next-25, CEDAR achieves MSE 1.612 versus PatchTST 2.847 and PETFormer 2.561.All settings use 10 weeks of historical observations as input.
Loading 2608.25871v1…