arXiv:2608.01857cs.LGcs.AI2026-08

提出方向感知损失CosDir,提升时间序列预测的涨跌判断准确率。

Beyond Magnitude and Shape: A Direction-Aware Loss for Time Series Forecasting

论文配图:Beyond Magnitude and Shape: A Direction-Aware Loss for Time Series Forecasting
图 1 · 摘自论文原文
  • 用余弦相似度对齐预测与真实值的差异向量,关注变化方向。
  • 在小幅度变动上显著提升方向准确率,且不牺牲数值精度。
  • 无需调参即可自适应调整方向与幅度权重,适合各类时序数据。

在风险管理和金融预测等决策场景中,序列的变动方向(上升或下降)常与具体数值同样重要。然而,现有大多数损失函数仅优化点值大小或形状频率结构,未显式关注方向。本文发现,使用MSE训练的模型在小幅度变动的方向判断上表现不佳。为此,我们提出CosDir——一种轻量级、可插拔的方向感知损失,通过余弦相似度对齐预测与目标的差分向量。该方法具有尺度不变性,在小变动上仍能保持方向梯度,重新注入了MSE忽略的学习信号。进一步提出CosDir-UW,通过学习自动适配方向与幅度项的混合比例,实现无需超参数的最优权重。在超过10万次实验中,方法一致显著提升方向准确率,同时保持数值精度,并优于多种现有损失函数。代码已开源。

原文摘要 · Abstract (English)

The direction of change --- whether a series will move up or down --- is often as important as its exact value in decisiondriven applications such as risk management and financial forecasting. However, most forecasting losses optimize either point magnitude or shape and frequency structure, and none explicitly targets the direction of change. In this paper, we find that MSE-trained forecasters fail on the direction of small moves. To address this, we propose CosDir, a simple yet effective direction-aware loss that aligns the difference vectors of the prediction and the target via cosine similarity. Being scale-invariant, CosDir keeps a directional gradient on small moves, re-injecting learning signal exactly where MSE neglects it. CosDir is a lightweight, plug-in term that attaches to any backbone without architectural modification. Since the best ratio for mixing the directional and magnitude terms differs across datasets, we further propose CosDir-UW, an extension that makes this ratio adaptive by learning it during training, matching a per-dataset tuned weight with no hyperparameter. We conduct over 100K experiments, demonstrating that our method consistently and significantly improves directional accuracy while preserving magnitude accuracy, and that it outperforms various loss functions. Code is available at: https://github.com/seunghan96/cosdir.

时间序列方向预测损失函数金融预测

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。