用有序交叉熵替代MSE,让时间序列预测同时输出概率和鲁棒性。
Beyond MSE: Ordinal Cross-Entropy for Probabilistic Time Series Forecasting

- 将数值预测转为有序分类,用概率分布表示预测结果。
- 在7个数据集上优于5种基线模型,对异常值更稳定。
- 适合需要不确定性估计的金融、气象等场景。
时间序列预测需分析历史数据中的趋势、周期性和季节性等模式以预测未来值。当前基于深度学习的模型多采用均方误差(MSE)损失进行回归建模,虽能直接预测数值,但缺乏不确定性估计且对异常值敏感。为此,本文提出OCE-TS,一种基于有序交叉熵(OCE)损失的新方法,通过将观测值离散化为有序区间,并利用参数化分布作为监督信号,构建预测概率分布。采用简单线性模型逐时预测概率分布,以累积分布间的OCE损失优化模型,显式保持预测值的序关系。理论分析表明,交叉熵损失相比MSE具有更强的稳定性与抗异常值能力。实验在7个公开数据集上对比了Autoformer、DLinear、iTransformer、TimeXer、TimeBridge五种基线模型,使用MSE和平均绝对误差(MAE)评估,结果表明OCE-TS表现持续领先。代码已开源:https://github.com/Shi-hm/OCE-TS。
原文摘要 · Abstract (English)
Time series forecasting is an important task that involves analyzing temporal dependencies and underlying patterns (such as trends, cyclicality, and seasonality) in historical data to predict future values or trends. Current deep learning-based forecasting models primarily employ Mean Squared Error (MSE) loss functions for regression modeling. Despite enabling direct value prediction, this method offers no uncertainty estimation and exhibits poor outlier robustness. To address these limitations, we propose OCE-TS, a novel ordinal classification approach for time series forecasting that replaces MSE with Ordinal Cross-Entropy (OCE) loss, preserving prediction order while quantifying uncertainty through probability output. Specifically, OCE-TS begins by discretizing observed values into ordered intervals and deriving their probabilities via a parametric distribution as supervision signals. Using a simple linear model, we then predict probability distributions for each timestep. The OCE loss is computed between the cumulative distributions of predicted and ground-truth probabilities, explicitly preserving ordinal relationships among forecasted values. Through theoretical analysis using influence functions, we establish that cross-entropy (CE) loss exhibits superior stability and outlier robustness compared to MSE loss. Empirically, we compared OCE-TS with five baseline models-Autoformer, DLinear, iTransformer, TimeXer, and TimeBridge-on seven public time series datasets. Using MSE and Mean Absolute Error (MAE) as evaluation metrics, the results demonstrate that OCE-TS consistently outperforms benchmark models. The codeis publicly available at: https://github.com/Shi-hm/OCE-TS.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。