[KongchangAI]
· 2 min read· 1,321 words

Loki Framework: Decoupling Event Effects for 11.7% Lower Time Series Forecasting Error

Loki Framework: Decoupling Event Effects for 11.7% Lower Time Series Forecasting Error

Loki uses a shared event response function to decouple historical attribution from future generation for better event-aware forecasts.

The article presents Loki (Lift Out, Kick In), an event-aware time series forecasting framework built on a shared Event Response Function (ERF). It lifts out event-induced deviations from history, performs temporal forecasting, then kicks in known future event effects with the same ERF, decoupling event modeling from temporal prediction while coupling history and future. Loki achieves the best normalized MAE on five benchmarks, cutting error 2.2%-11.7% versus the strongest baseline; ablations confirm each component's role.

Real-world time series are often affected by exogenous events, whose effects are superimposed on the system's intrinsic temporal dynamics. Historical observations therefore entangle persistent dynamics with event-induced deviations, making it difficult to determine which patterns should be extrapolated and which should be attributed to specific event contexts. Although existing event-aware forecasting methods can incorporate event information or model event-related changes, they typically handle historical event attribution and future event generation separately, which limits forecasting accuracy.

Loki framework diagram

To address this challenge, researchers propose Loki (Lift Out, Kick In)—a general event-aware forecasting framework based on a shared Event Response Function (ERF). The core idea of the framework is to decouple event response modeling from temporal forecasting while coupling historical attribution and future generation through a shared mechanism.

Core Innovation: Shared Event Response Function

The key component of Loki is the Event Response Function (ERF), which models event effects based on event type and relative temporal position and is shared between the historical window and the forecast window. Specifically, Loki first "lifts out" the estimated event-induced deviation from historical observations, then performs temporal forecasting, and finally uses the same ERF to "kick in" the response to known future events. This design separates event response modeling from temporal forecasting while maintaining consistency through the shared ERF mechanism.

According to the paper, the shared nature of the ERF is an important advantage that distinguishes Loki from existing methods. Traditional methods often handle historical event attribution and future event generation independently, severing the connection between the two. In contrast, Loki uses a unified ERF to let event response patterns learned from history directly guide the prediction of future event effects, thereby improving the coherence and accuracy of forecasts.

Exogenous events are a core concept in econometrics and time series analysis, referring to variables or shocks generated outside the system and not driven by the series' own dynamics, such as promotional campaigns, policy announcements, and extreme weather. In contrast, endogenous dynamics refer to the series' own trend, seasonality, autoregressive structure, and so on. In event-aware forecasting, the key difficulty is that observations are the superposition of the two, and direct modeling will mistakenly extrapolate event effects as sustainable patterns. Traditional approaches such as ARIMAX incorporate exogenous variables as regression terms into the model but struggle to characterize how event effects decay or lag with relative temporal position; Loki's ERF takes event type and relative time as inputs and parameterizes this shape, thereby supporting explicit separation and re-injection.

Experimental Performance: Leading Across Five Major Datasets

The researchers evaluated Loki on five forecasting benchmark datasets. The results show that Loki achieved the best normalized MAE (Mean Absolute Error) on all five datasets, reducing error by approximately 2.2% to 11.7% compared with the strongest non-Loki baseline. This improvement is meaningful in the field of time series forecasting, especially in scenarios where events occur frequently.

In addition to the main experimental results, the paper further validates the role of each component of Loki through ablation experiments and controlled analyses. Specifically, Lift Out (extracting historical event deviations), Kick In (injecting future event responses), shared response modeling, and compatibility across forecasting backbones are all supported by experiments. This shows that Loki is not only an effective standalone framework but can also be combined with different forecasting backbones, demonstrating strong generality.

Normalized MAE (normalized Mean Absolute Error) is a commonly used evaluation metric in time series forecasting. It usually divides absolute error by a scale measure of the series (such as the mean, median, or training-set MAE) before averaging, to eliminate incomparability caused by differences in units and magnitudes across datasets. Compared with raw MAE, normalized error can be compared across heterogeneous datasets and is also more convenient for aggregating average rankings across multiple benchmarks. Note that the choice of normalization affects the numerical values, so when reporting relative reductions of 2.2% to 11.7%, one should confirm that the same normalization protocol is used across datasets and focus on relative improvement rather than absolute values to accurately judge the practical significance of the improvement.

Technical Details and Implementation Logic

The Loki workflow can be summarized in two stages. The first stage is Lift Out: separating event-induced deviations from the historical observation sequence to obtain a purer representation of temporal dynamics. The key to this step is accurately estimating event effects, and the ERF provides a parameterized modeling approach based on event type and relative temporal position. The second stage is Kick In: after obtaining the base forecast, the same ERF is used to superimpose the effects of known future events to generate the final forecast.

The benefit of this two-stage design is flexibility: event response modeling can be optimized independently of temporal forecasting, while the shared ERF ensures consistency between history and future. The paper mentions that the inputs to the ERF include event type and relative temporal position, and the output is the corresponding event effect; this design enables the model to generalize to different event patterns.

Ablation study is a standard method in machine learning for verifying the necessity of each model component: removing or replacing a module one at a time (such as removing Lift Out, disabling ERF sharing, or switching to independent event modeling) and observing performance changes to determine that component's contribution to the final result. Cross-backbone compatibility testing is another type of controlled analysis, referring to grafting Loki's event handling mechanism onto different forecasting backbones (such as Transformer, MLP, or temporal convolutional models) to test whether the gain persists consistently. If the gain appears consistently across multiple backbones, it indicates that the improvement comes from the event modeling mechanism itself rather than a specific network architecture, which is crucial to the framework's generality claim and an important basis for evaluating whether it can be deployed.

Significance for the Time Series Forecasting Field

Loki addresses a fundamental question in event-aware forecasting: how to reasonably distinguish persistent dynamics from event effects. By decoupling event effects from temporal dynamics, Loki provides a clear direction for future research—namely, connecting historical attribution and future generation through a shared mechanism rather than treating them as independent tasks.

From an application perspective, Loki's generality makes it promising for fields affected by events, such as finance, retail, and meteorology. For example, in sales forecasting, the effects of events such as promotions and holidays can be explicitly modeled; in traffic forecasting, the effects of weather events or special activities can also be better incorporated. However, the paper has so far validated the framework only on five benchmark datasets, and complex event types and noise interference in real-world deployment still require further testing.

Overall, Loki achieves event effect decoupling through a shared ERF and delivers significant error reductions across multiple datasets, offering a new paradigm for event-aware time series forecasting. Its code and implementation details are worth attention, and future validation and improvements in more real-world scenarios can be expected.

One-line Summary

Loki uses a shared event response function to decouple historical attribution from future generation, improving event-aware forecasting accuracy.

Paragraph Summary

This article introduces Loki (Lift Out, Kick In), an event-aware time series forecasting framework whose core is a shared Event Response Function (ERF): it first extracts event-induced deviations from historical observations, completes temporal forecasting, and then uses the same ERF to inject the effects of known future events, thereby decoupling event response modeling from temporal forecasting while coupling historical attribution with future generation. On five benchmark datasets, Loki achieves the best normalized MAE across the board, reducing error by about 2.2% to 11.7% compared with the strongest baseline; ablation and controlled analyses validate the roles of Lift Out, Kick In, shared response modeling, and cross-backbone compatibility. The article argues that the framework offers a new paradigm for distinguishing persistent dynamics from event effects and is expected to be applied in finance, retail, meteorology, and other fields, although complex events and noise in real-world deployment still need to be tested.

#Loki framework#event-aware time series forecasting#Event Response Function#time series prediction#normalized MAE#ablation study
Share:

Related articles