OCE-TS
November 17, 2025 ยท View on GitHub
Beyond MSE: Ordinal Cross-Entropy for Probabilistic Time Series Forecasting
OCE-TS is a novel probabilistic time series forecasting framework that replaces traditional Mean Squared Error (MSE) regression with an Ordinal Cross-Entropy (OCE) classification paradigm. The method provides more stable optimization, improved robustness, and inherent uncertainty estimation across multiple benchmark datasets.
๐ Features
- Probabilistic forecasting with uncertainty estimation
- Ordinal Cross-Entropy (OCE) loss to preserve temporal ordering
- Robust to noise and outliers
- Supports multiple datasets (ETTh, ETTm, Exchange, Weather, ILI, etc.)
- Lightweight backbone based on DLinear
๐ฆ Environment & Requirements
This project was implemented in the following environment:
- Python 3.8.20
- PyTorch 2.0.0 (CUDA 11.8)
- GPU: NVIDIA RTX 4060
- CPU: Intel i7-14700F
- RAM: 16 GB
Install dependencies:
pip install -r requirements.txt
๐ Usage
Run (Train + Test)
Running the script below will automatically perform both training and testing:
python run_longExp.py
MyLinear/
โโโ Da/ # Data augmentation or auxiliary data
โโโ data_provider/ # Data loading and preprocessing
โโโ dataset/ # Dataset files and utilities
โโโ exp/ # Experiment manager (training/testing)
โโโ layers/ # Model layers
โโโ logs/ # Training logs
โโโ loss/ # Loss functions (OCE, CE, Gaussian, etc.)
โโโ models/ # Forecasting models (DLinear, OCE-TS modules)
โโโ results/ # Result figures, MAE/MSE plots, tables
โโโ scripts/ # Helper scripts / run scripts
โโโ test_results/ # Saved test outputs
โโโ utils/ # Utility functions (Gaussian, noise, lookback, etc.)
โ
โโโ distribution.py
โโโ Gaussian.py
โโโ lookback.py
โโโ loss_compare.py
โโโ ModelComparisonPlot.py
โโโ noise.py
โโโ OCE vs CE.py
โโโ Parameter.py
โโโ Probability Distribution Comparison.py
โโโ run_longExp.py # Main entry script (train+test)
โโโ sh.py
โโโ result.txt
โโโ *.png # Visualization images
---
## ๐ Results
Our method (OCE-TS) consistently outperforms strong baselines such as
Autoformer, DLinear, iTransformer, TimeXer, and TimeBridge across multiple datasets.
For detailed experimental results, tables, and comparisons,
**please refer to the paper**.
## ๐ Citation
If you use this repository, please cite:
```bibtex
@misc{wang2025mseordinalcrossentropyprobabilistic,
title={Beyond MSE: Ordinal Cross-Entropy for Probabilistic Time Series Forecasting},
author={Jieting Wang and Huimei Shi and Feijiang Li and Xiaolei Shang},
year={2025},
eprint={2511.10200},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2511.10200},
}
๐ License
MIT License