aiqbench analysis
This research introduces CosDir, a novel loss function designed to explicitly optimize the direction of change in time series forecasting rather than just magnitude or shape. By leveraging cosine similarity on difference vectors, the method effectively addresses MSE's tendency to neglect small directional moves while remaining lightweight enough for any model backbone. The study validates this approach across 100K experiments, demonstrating significant improvements in decision-driven tasks like risk management without sacrificing overall accuracy.
Beyond Magnitude and Shape: A Direction-Aware Loss for Time Series Forecasting
arXiv:2608.01857v1 Announce Type: cross Abstract: 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.
Abstract: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: this https URL.
Machine Learning (cs.LG); Artificial Intelligence (cs.AI)
arXiv:2608.01857 [cs.LG]
(or arXiv:2608.01857v1 [cs.LG] for this version)
https://doi.org/10.48550/arXiv.2608.01857 Focus to learn more arXiv-issued DOI via DataCite (pending registration)
arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.
Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.
Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.
Full text under the publisher's open licence · 294 words
Related coverage
The current bottleneck is political will, not research
AI Alignment Forum · Jul 11, 2026
Dropless MoE Training in JAX with Primus-Turbo
AMD · Jun 10, 2026

The art and science of hyperparameter optimization on Amazon Nova Forge
AWS · Jun 2, 2026

Building Blocks for Foundation Model Training and Inference on AWS
Hugging Face · May 11, 2026