DBLoss: Decomposition-based Loss Function for Time Series Forecasting
Xiangfei Qiu, Xingjian Wu, Hanyin Cheng, Xvyuan Liu, Chenjuan Guo, Jilin Hu, Bin Yang
TL;DR
DBLoss tackles the limitation of Mean Squared Error in horizon-aware forecasting by explicitly decomposing both predictions and ground truth into seasonal and trend components within the forecasting horizon using Exponential Moving Averages. It computes separate losses for each component and combines them with a tunable weight, enabling independent optimization of seasonality and trend. The method is model-agnostic and demonstrates consistent gains across eight real-world datasets and multiple backbones, including foundation models, illustrating improved generalization and training stability. The work provides a practical, scalable direction for loss design in time series forecasting and releases code for reproducibility.
Abstract
Time series forecasting holds significant value in various domains such as economics, traffic, energy, and AIOps, as accurate predictions facilitate informed decision-making. However, the existing Mean Squared Error (MSE) loss function sometimes fails to accurately capture the seasonality or trend within the forecasting horizon, even when decomposition modules are used in the forward propagation to model the trend and seasonality separately. To address these challenges, we propose a simple yet effective Decomposition-Based Loss function called DBLoss. This method uses exponential moving averages to decompose the time series into seasonal and trend components within the forecasting horizon, and then calculates the loss for each of these components separately, followed by weighting them. As a general loss function, DBLoss can be combined with any deep learning forecasting model. Extensive experiments demonstrate that DBLoss significantly improves the performance of state-of-the-art models across diverse real-world datasets and provides a new perspective on the design of time series loss functions.
