Foreclassing: From Forecasts to Decisions
Organizations: Department of Statistics and Data Science, Cornell University
Abstract
Time series forecasts are widely used to inform decisions under uncertainty. In many applications, these decisions involve classifying a time series based on outcomes that have yet to be observed. In this paper, we introduce Foreclassing, a new machine learning problem in which the class label of a time series is defined as a function of its future observations. We provide a mathematical formulation of Foreclassing and establish several theoretical results characterizing the problem. These results describe how additional future information affects Bayes classification risk, provide bounds on the classification error of learned Foreclassing models, and demonstrate how future observations used during training can yield finite-sample improvements over conventional classifiers. To provide a benchmark for future research, we propose ForeClassNet, a family of neural network models that jointly perform forecasting and classification while accounting for uncertainty in future outcomes. We investigate a variety of model architectures and evaluate their performance against conventional time series classifiers and forecasting-then-classify approaches. Experiments on datasets spanning weather, energy, and finance demonstrate the potential of Foreclassing to improve classification performance, probabilistic prediction, and downstream decision-making. Together, these theoretical and empirical contributions establish a foundation for future research on Foreclassing.
Figures & tables
| Model | Accuracy | F1 | AUROC | AP |
|---|---|---|---|---|
| ModernTCN | 0.847 | 0.590 | 0.928 | 0.742 |
| ModernTCN Forecast-then-Classify | 0.875 | 0.617 | 0.922 | 0.726 |
| ForeClassNet | 0.897 | 0.621 | 0.929 | 0.754 |
| Transformer Classifier | 0.557 | 0.235 | 0.554 | 0.157 |
| Transformer Forecast-then-Classify | 0.525 | 0.241 | 0.564 | 0.159 |
| ForeClassNet Dynamic | 0.877 | 0.618 | 0.932 | 0.762 |
| Model | Brier | NLL | ECE |
|---|---|---|---|
| ModernTCN | 0.1086 | 0.3429 | 0.1215 |
| ModernTCN Forecast-then-Classify | 0.0887 | 0.2803 | 0.0840 |
| ForeClassNet | 0.0738 | 0.2388 | 0.0685 |
| Transformer Classifier | 0.2472 | 0.6884 | 0.3529 |
| Transformer Forecast-then-Classify | 0.2530 | 0.7004 | 0.3610 |
| ForeClassNet Dynamic | 0.0838 | 0.2629 | 0.0900 |
| Model | Hardware | Runs | Training (min) | Inference (ms/example) |
|---|---|---|---|---|
| ModernTCN | GTX TITAN X | 5 | 2.52 | 0.022 |
| ModernTCN Forecast-then-Classify | GTX TITAN X | 5 | 3.13 | 0.033 |
| ForeClassNet | GTX TITAN X | 2 | 7.42 | 4.817 |
| ForeClassNet | TITAN X (Pascal) | 3 | 5.21 | 4.188 |
| Transformer Classifier | TITAN Xp | 5 | 1.65 | 0.013 |
| Transformer Forecast-then-Classify | TITAN Xp | 5 | 3.17 | 0.049 |
| Model | Accuracy | F1 | AUROC | AP Class 0 | AP Class 1 |
|---|---|---|---|---|---|
| ModernTCN | 0.8636 | 0.8810 | 0.9483 | 0.9276 | 0.9650 |
| ModernTCN Forecast-then-Classify | 0.8670 | 0.8818 | 0.9505 | 0.9327 | 0.9658 |
| ForeClassNet | 0.8665 | 0.8842 | 0.9562 | 0.9426 | 0.9692 |
| Transformer Classifier | 0.6058 | 0.6373 | 0.6460 | 0.6173 | 0.6628 |
| Transformer Forecast-then-Classify | 0.6164 | 0.6593 | 0.6453 | 0.6108 | 0.6594 |
| ForeClassNet Dynamic | 0.8745 | 0.8869 | 0.9584 | 0.9456 | 0.9707 |
| Model | Brier | NLL | ECE |
|---|---|---|---|
| ModernTCN | 0.1014 | 0.3567 | 0.0698 |
| ModernTCN Forecast-then-Classify | 0.0942 | 0.3001 | 0.0523 |
| ForeClassNet | 0.0931 | 0.2944 | 0.0714 |
| Transformer Classifier | 0.2364 | 0.6684 | 0.0937 |
| Transformer Forecast-then-Classify | 0.2351 | 0.6673 | 0.0815 |
| ForeClassNet Dynamic | 0.0851 | 0.2674 | 0.0458 |
| Model | Hardware | Runs | Training (min) | Inference (ms/example) |
|---|---|---|---|---|
| ModernTCN | NVIDIA L4 | 2 | 1.05 | 0.008 |
| ModernTCN | NVIDIA RTX A5000 | 2 | 0.99 | 0.008 |
| ModernTCN | Tesla V100-SXM3-32GB-H | 1 | 2.64 | 0.010 |
| ModernTCN Forecast-then-Classify | NVIDIA RTX A5000 | 3 | 2.25 | 0.025 |
| ModernTCN Forecast-then-Classify | Tesla V100-SXM3-32GB-H | 2 | 3.42 | 0.023 |
| ForeClassNet | NVIDIA RTX A5000 | 5 | 4.11 | 2.581 |
| Model | Accuracy | F1 | AUROC | AP Class 0 | AP Class 1 |
|---|---|---|---|---|---|
| ModernTCN | 0.8335 | 0.5639 | 0.8659 | 0.9606 | 0.6131 |
| ModernTCN Forecast-then-Classify | 0.8365 | 0.5721 | 0.8728 | 0.9632 | 0.6379 |
| ForeClassNet | 0.8512 | 0.5807 | 0.8865 | 0.9686 | 0.6793 |
| Transformer Classifier | 0.7804 | 0.4226 | 0.7490 | 0.9177 | 0.4298 |
| Transformer Forecast-then-Classify | 0.7786 | 0.4368 | 0.7670 | 0.9268 | 0.4518 |
| ForeClassNet Dynamic | 0.8496 | 0.5938 | 0.8843 | 0.9667 | 0.6670 |
| Model | Brier | NLL | ECE |
|---|---|---|---|
| ModernTCN | 0.1176 | 0.3779 | 0.0781 |
| ModernTCN Forecast-then-Classify | 0.1136 | 0.3614 | 0.0755 |
| ForeClassNet | 0.1030 | 0.3283 | 0.0735 |
| Transformer Classifier | 0.1837 | 0.9075 | 0.1733 |
| Transformer Forecast-then-Classify | 0.1878 | 0.9250 | 0.1797 |
| ForeClassNet Dynamic | 0.1043 | 0.3316 | 0.0713 |
| Model | Hardware | Runs | Training (min) | Inference (ms/example) |
|---|---|---|---|---|
| ModernTCN | NVIDIA GeForce RTX 2080 Ti | 10 | 0.39 | 0.038 |
| ModernTCN Forecast-then-Classify | NVIDIA GeForce RTX 2080 Ti | 14 | 0.50 | 0.053 |
| ForeClassNet | NVIDIA GeForce RTX 2080 Ti | 11 | 1.11 | 3.752 |
| Transformer Classifier | NVIDIA GeForce RTX 2080 Ti | 10 | 0.71 | 0.053 |
| Transformer Forecast-then-Classify | NVIDIA GeForce RTX 2080 Ti | 5 | 0.90 | 0.046 |
| ForeClassNet Dynamic | NVIDIA GeForce RTX 2080 Ti | 7 | 1.26 | 4.649 |
| Model | Accuracy | F1 | AUROC | AP Class 0 | AP Class 1 |
|---|---|---|---|---|---|
| ModernTCN | 0.8241 | 0.6192 | 0.8742 | 0.9521 | 0.6985 |
| ModernTCN Forecast-then-Classify | 0.8242 | 0.6227 | 0.8700 | 0.9507 | 0.6925 |
| ForeClassNet | 0.8500 | 0.6665 | 0.8921 | 0.9597 | 0.7441 |
| Transformer Classifier | 0.7254 | 0.4227 | 0.6982 | 0.8626 | 0.4592 |
| Transformer Forecast-then-Classify | 0.7238 | 0.4021 | 0.6959 | 0.8609 | 0.4521 |
| ForeClassNet Dynamic | 0.8458 | 0.6603 | 0.8940 | 0.9610 | 0.7499 |
| Model | Brier | NLL | ECE |
|---|---|---|---|
| ModernTCN | 0.1238 | 0.3940 | 0.0776 |
| ModernTCN Forecast-then-Classify | 0.1243 | 0.4009 | 0.0809 |
| ForeClassNet | 0.1102 | 0.3507 | 0.0755 |
| Transformer Classifier | 0.2359 | 1.2626 | 0.2226 |
| Transformer Forecast-then-Classify | 0.2378 | 1.3102 | 0.2249 |
| ForeClassNet Dynamic | 0.1093 | 0.3460 | 0.0705 |
| Model | Hardware | Runs | Training (min) | Inference (ms/example) |
|---|---|---|---|---|
| ModernTCN | NVIDIA GeForce RTX 2080 Ti | 15 | 0.42 | 0.040 |
| ModernTCN Forecast-then-Classify | NVIDIA GeForce RTX 2080 Ti | 5 | 0.44 | 0.047 |
| ForeClassNet | NVIDIA GeForce RTX 2080 Ti | 7 | 1.11 | 3.821 |
| Transformer Classifier | NVIDIA GeForce RTX 2080 Ti | 3 | 0.74 | 0.047 |
| Transformer Forecast-then-Classify | NVIDIA GeForce RTX 2080 Ti | 10 | 1.03 | 0.054 |
| ForeClassNet Dynamic | NVIDIA GeForce RTX 2080 Ti | 7 | 1.25 | 4.727 |
| Model | Accuracy | F1 | AUROC | AP Class 0 | AP Class 1 |
|---|---|---|---|---|---|
| ModernTCN | 0.8546 | 0.6832 | 0.9171 | 0.9742 | 0.7516 |
| ModernTCN Forecast-then-Classify | 0.8567 | 0.6820 | 0.9255 | 0.9770 | 0.7674 |
| ForeClassNet | 0.8739 | 0.7203 | 0.9340 | 0.9798 | 0.7903 |
| Transformer Classifier | 0.7726 | 0.5207 | 0.8091 | 0.9292 | 0.5511 |
| Transformer Forecast-then-Classify | 0.7663 | 0.5177 | 0.7956 | 0.9231 | 0.5297 |
| ForeClassNet Dynamic | 0.8749 | 0.7208 | 0.9329 | 0.9788 | 0.7883 |
| Model | Brier | NLL | ECE |
|---|---|---|---|
| ModernTCN | 0.1018 | 0.3201 | 0.0791 |
| ModernTCN Forecast-then-Classify | 0.0973 | 0.3016 | 0.0738 |
| ForeClassNet | 0.0883 | 0.2842 | 0.0786 |
| Transformer Classifier | 0.1919 | 0.9450 | 0.1840 |
| Transformer Forecast-then-Classify | 0.1983 | 0.9974 | 0.1905 |
| ForeClassNet Dynamic | 0.0893 | 0.2875 | 0.0750 |
| Model | Hardware | Runs | Training (min) | Inference (ms/example) |
|---|---|---|---|---|
| ModernTCN | NVIDIA GeForce RTX 2080 Ti | 11 | 0.42 | 0.037 |
| ModernTCN Forecast-then-Classify | NVIDIA GeForce RTX 2080 Ti | 6 | 0.66 | 0.065 |
| ForeClassNet | NVIDIA GeForce RTX 2080 Ti | 6 | 1.25 | 3.780 |
| Transformer Classifier | NVIDIA GeForce RTX 2080 Ti | 8 | 0.61 | 0.039 |
| Transformer Forecast-then-Classify | NVIDIA GeForce RTX 2080 Ti | 8 | 1.06 | 0.062 |
| ForeClassNet Dynamic | NVIDIA GeForce RTX 2080 Ti | 15 | 1.43 | 4.942 |
| Model | Annual Return | Sharpe | Avg. Turnover | Max Drawdown |
|---|---|---|---|---|
| ModernTCN | -0.01056 | -0.14626 | 0.01839 | -0.09603 |
| ModernTCN Forecast-then-Classify | -0.00126 | -0.00992 | 0.01647 | -0.08114 |
| ForeClassNet | 0.02478 | 0.64343 | 0.00932 | -0.04303 |
| Transformer Classifier | -0.00111 | 0.30631 | 0.00147 | -0.02170 |
| Transformer Forecast-then-Classify | 0.00789 | 0.53541 | 0.00140 | -0.01255 |
| ForeClassNet Dynamic | 0.00906 | 0.31288 | 0.00976 | -0.04313 |
| Model | Ann. Vol. | Downside Dev. | ES 95 |
|---|---|---|---|
| ModernTCN | 0.052342 | 0.037219 | 0.008711 |
| ModernTCN Forecast-then-Classify | 0.051469 | 0.036497 | 0.008465 |
| ForeClassNet | 0.036850 | 0.024833 | 0.005256 |
| Transformer Classifier | 0.012930 | 0.008373 | 0.001330 |
| Transformer Forecast-then-Classify | 0.011618 | 0.006436 | 0.000344 |
| ForeClassNet Dynamic | 0.037409 | 0.025285 | 0.005826 |
| Model | Hardware | Runs | Training (min) | Inference (ms/example) |
|---|---|---|---|---|
| ModernTCN | NVIDIA GeForce GTX TITAN X | 4 | 4.35 | 0.021 |
| ModernTCN | NVIDIA TITAN Xp | 1 | 3.08 | 0.024 |
| ModernTCN Forecast-then-Classify | NVIDIA TITAN Xp | 5 | 4.52 | 0.028 |
| ForeClassNet | NVIDIA GeForce GTX 1080 Ti | 2 | 10.14 | 4.385 |
| ForeClassNet | NVIDIA TITAN Xp | 2 | 8.66 | 3.400 |
| ForeClassNet | Tesla T4 | 1 | 11.16 | 6.374 |
| Model | Accuracy | F1 | AUROC | AP 1 | Brier | NLL | ECE |
|---|---|---|---|---|---|---|---|
| ForeClassNet | 0.8971 | 0.6207 | 0.9289 | 0.7543 | 0.0738 | 0.2388 | 0.0685 |
| Dropout | 0.8953 | 0.6094 | 0.9214 | 0.7300 | 0.0750 | 0.2389 | 0.0581 |
| Dropout | 0.9131 | 0.6276 | 0.9228 | 0.7452 | 0.0686 | 0.2369 | 0.0633 |
| Temperature | 0.8973 | 0.6160 | 0.9281 | 0.7515 | 0.0726 | 0.2356 | 0.0629 |
| Temperature | 0.9048 | 0.6411 | 0.9304 | 0.7557 | 0.0699 | 0.2291 | 0.0631 |
| Temperature | 0.9037 | 0.6409 | 0.9300 | 0.7565 | 0.0704 | 0.2303 | 0.0647 |
| Model | Accuracy | F1 | AUROC | AP 0 | AP 1 | Brier | NLL | ECE |
|---|---|---|---|---|---|---|---|---|
| ForeClassNet | 0.8665 | 0.8842 | 0.9562 | 0.9426 | 0.9692 | 0.0931 | 0.2944 | 0.0714 |
| Dropout | 0.8802 | 0.8955 | 0.9605 | 0.9488 | 0.9720 | 0.0873 | 0.2745 | 0.0652 |
| Dropout | 0.8624 | 0.8752 | 0.9526 | 0.9373 | 0.9671 | 0.0905 | 0.2892 | 0.0538 |
| Temperature | 0.8693 | 0.8859 | 0.9570 | 0.9434 | 0.9699 | 0.0904 | 0.2839 | 0.0649 |
| Temperature | 0.8689 | 0.8861 | 0.9572 | 0.9438 | 0.9700 | 0.0913 | 0.2868 | 0.0679 |
| Temperature | 0.8702 | 0.8879 | 0.9574 | 0.9439 | 0.9701 | 0.0915 | 0.2868 | 0.0686 |
| Model | Accuracy | F1 | AUROC | AP 0 | AP 1 | Brier | NLL | ECE |
|---|---|---|---|---|---|---|---|---|
| ForeClassNet | 0.8512 | 0.5807 | 0.8865 | 0.9686 | 0.6793 | 0.1030 | 0.3283 | 0.0735 |
| Dropout | 0.8484 | 0.5836 | 0.8861 | 0.9679 | 0.6749 | 0.1035 | 0.3263 | 0.0690 |
| Dropout | 0.8532 | 0.5696 | 0.8830 | 0.9665 | 0.6721 | 0.1055 | 0.3491 | 0.0932 |
| Temperature | 0.8521 | 0.5845 | 0.8874 | 0.9692 | 0.6785 | 0.1028 | 0.3283 | 0.0735 |
| Temperature | 0.8543 | 0.5928 | 0.8881 | 0.9688 | 0.6772 | 0.1026 | 0.3278 | 0.0728 |
| Temperature | 0.8533 | 0.5877 | 0.8899 | 0.9692 | 0.6775 | 0.1017 | 0.3251 | 0.0735 |
| Model | Accuracy | F1 | AUROC | AP 0 | AP 1 | Brier | NLL | ECE |
|---|---|---|---|---|---|---|---|---|
| ForeClassNet | 0.8500 | 0.6665 | 0.8921 | 0.9597 | 0.7441 | 0.1102 | 0.3507 | 0.0755 |
| Dropout | 0.8409 | 0.6488 | 0.8863 | 0.9584 | 0.7298 | 0.1127 | 0.3548 | 0.0682 |
| Dropout | 0.8545 | 0.6647 | 0.8911 | 0.9563 | 0.7486 | 0.1108 | 0.3631 | 0.0899 |
| Temperature | 0.8529 | 0.6720 | 0.8912 | 0.9592 | 0.7438 | 0.1094 | 0.3488 | 0.0730 |
| Temperature | 0.8500 | 0.6675 | 0.8918 | 0.9596 | 0.7439 | 0.1098 | 0.3496 | 0.0752 |
| Temperature | 0.8464 | 0.6625 | 0.8915 | 0.9596 | 0.7426 | 0.1104 | 0.3504 | 0.0731 |
| Model | Accuracy | F1 | AUROC | AP 0 | AP 1 | Brier | NLL | ECE |
|---|---|---|---|---|---|---|---|---|
| ForeClassNet | 0.8739 | 0.7203 | 0.9340 | 0.9798 | 0.7903 | 0.0883 | 0.2842 | 0.0786 |
| Dropout | 0.8745 | 0.7212 | 0.9328 | 0.9789 | 0.7885 | 0.0882 | 0.2811 | 0.0695 |
| Dropout | 0.8737 | 0.7141 | 0.9336 | 0.9798 | 0.7843 | 0.0914 | 0.3050 | 0.0956 |
| Temperature | 0.8757 | 0.7253 | 0.9347 | 0.9801 | 0.7898 | 0.0883 | 0.2844 | 0.0785 |
| Temperature | 0.8750 | 0.7250 | 0.9340 | 0.9797 | 0.7891 | 0.0891 | 0.2871 | 0.0811 |
| Temperature | 0.8769 | 0.7289 | 0.9322 | 0.9791 | 0.7857 | 0.0894 | 0.2877 | 0.0789 |
| Metric | Full Model | MC Off | Concrete Dropout | No Boltzmann | No Forecasting |
|---|---|---|---|---|---|
| Annualized return | 0.02478 | 0.02030 | 0.01057 | 0.00453 | -0.00782 |
| Sharpe ratio | 0.64343 | 0.52480 | 0.38160 | 0.17382 | -0.16144 |
| Average turnover | 0.00932 | 0.00889 | 0.00710 | 0.01061 | 0.01132 |
| Maximum drawdown | -0.04303 | -0.04282 | -0.04327 | -0.05543 | -0.06734 |
| Annualized volatility | 0.03685 | 0.03617 | 0.03383 | 0.04025 | 0.04419 |
| Downside deviation | 0.02483 | 0.02476 | 0.02231 | 0.02933 | 0.03357 |
Time Series Classification
Time series classification assigns labels to sequential data, using temporal patterns to support decisions in health, sensing, science, and industry.
See all 176 papers