Table of Contents
Fetching ...

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.

DBLoss: Decomposition-based Loss Function for Time Series Forecasting

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.

Paper Structure

This paper contains 32 sections, 12 equations, 6 figures, 10 tables, 1 algorithm.

Figures (6)

  • Figure 1: Limitations of MSE loss in capturing seasonality or trend within the forecasting horizon.
  • Figure 2: Overview of the proposed DBLoss.
  • Figure 3: Training and testing MSE loss curves across all training epochs for the iTransformer model trained with MSE loss and DBLoss on the ETTh1, ETTm2, Weather, and Solar datasets. Notably, the model trained with DBLoss exhibits higher training errors but achieves lower testing errors. This highlights the effectiveness of DBLoss in enhancing generalization and mitigating overfitting.
  • Figure 4: The impact of the hyperparameter on ETTh2 and Traffic based DLinear (horizon 96).
  • Figure 5: Forecasting visualization comparing DBLoss and MSE loss as objective functions.
  • ...and 1 more figures