--- title: "Remaining Cycle Time Prediction: Temporal Loss Functions and Prediction Consistency" type: source tags: [ppm, remaining-time, lstm, loss-function, earliness, temporal-consistency, evaluation] authors: [Riess, Mike] year: 2023 venue: "Nordic Machine Intelligence 3:12–26. DOI: 10.5617/nmi.10141" kind: paper raw_path: "raw/Riess/Riess 2023.pdf" sources: ["[[sources/2023-riess-phd-thesis-ppm]]"] key_claims: - "For LSTM-based remaining-cycle-time models, adding temporal decay to the L1 (MAE) loss improves earliness performance on some event logs; exponential decay (MAEEtD) produces statistically significant improvements on Sepsis and Traffic Fines (α=0.05) but not on Helpdesk or Hospital Billing." - "Introduces Temporal Consistency (TC) as a new model-evaluation criterion: the degree to which successive predictions of remaining time are monotonically decreasing, as real remaining time must be." - "No evaluated loss — neither unweighted MAE nor the three temporally weighted variants — produced strictly monotonically decreasing predictions; temporal inconsistency peaks at specific prefixes for long traces with low support." - "Apparent trade-off between earliness-oriented temporal decay and temporal consistency; motivates evaluating remaining-time models simultaneously on accuracy, earliness, and temporal consistency." - "Temporal decay should be treated as a hyper-parameter: optimal peak and slope depend on training-data distribution and other hyper-parameters (units, layers, optimiser, batch size, learning rate)." - "Three proposed loss variants: MAEEtD (exponential decay e^(-t)), MAEPtD (power decay ((T_i - t)/T_i)), MAEMtD (moderate decay 1/t)." created: 2026-04-20 updated: 2026-04-20 --- # Riess 2023 — Temporal Loss Functions for Remaining Cycle-Time Prediction Single-authored paper in Nordic Machine Intelligence, open-access. Corresponds to Paper I of [[sources/2023-riess-phd-thesis-ppm|Riess's PhD thesis]]. ## Summary The usefulness of [[concepts/remaining-time-prediction|remaining-cycle-time]] models for operational decision support (queue prioritisation, dynamic resource planning) depends not only on accuracy but on **earliness** — predictions should be as accurate as possible as early as possible in a case, when information is minimal and prediction is hardest. Two research questions drive the paper: (RQ1) how do temporally weighted loss functions influence earliness of LSTM-based remaining-time models? (RQ2) do such models satisfy the criterion of temporal consistency (monotonically decreasing predictions)? Method: the paper adopts the now-standard LSTM-with-prefix-log approach of [[sources/2017-tax-lstm-process-prediction|Tax et al. 2017]] and [[sources/2017-navarin-lstm-data-aware-remaining-time|Navarin et al. 2017]], then swaps in three L1 losses with different temporal-decay functional forms: - **MAEEtD** — exponential decay: `|y-ŷ| + |y-ŷ|/e^t`. - **MAEPtD** — power decay: `|y-ŷ| + |y-ŷ|·((T_i - t)/T_i)`. - **MAEMtD** — moderate decay: `|y-ŷ| + |y-ŷ|/t`. All three upweight early-prefix residuals relative to late-prefix residuals, but by different amounts. The three losses are compared to unweighted MAE on four public event logs: Sepsis, Helpdesk, BPIC 2012 Traffic Fines, Hospital Billing. Prefix logs are truncated to length 20; per-log hyper-parameters (units, layers, optimiser, batch size, learning rate) are tuned separately and then held fixed across loss variants. Results: MAEEtD gives statistically significant earliness improvements on Sepsis (F=3.94, p=0.026) and Traffic Fines (F=4.03, p=0.024); MAEPtD and MAEMtD do not reach significance. Average MAE improvement at early prefixes is up to ~4% on Traffic Fines within the first five events. The paper then introduces **Temporal Consistency (TC)** — operationalised as an average difference-in-direction metric over consecutive predictions — and finds that **none** of the four loss functions produce monotonically decreasing predictions; TC errors spike at specific prefixes, particularly for long traces with low support. Conclusion: temporal decay is useful as a hyper-parameter, not a universal improvement, and comes with a potential trade-off against temporal consistency. The field should evaluate remaining-time models on all three dimensions: **accuracy, earliness, and temporal consistency**. ## Connections - Paper I of [[sources/2023-riess-phd-thesis-ppm]]. - Feeds [[concepts/remaining-time-prediction]] as the canonical Riess citation on earliness/consistency. - Builds directly on [[sources/2017-tax-lstm-process-prediction]], [[sources/2017-navarin-lstm-data-aware-remaining-time]], [[sources/2019-verenich-survey-ppm]] (Verenich et al.'s cross-benchmark survey) and [[sources/2020-rama-maneiro-deep-learning-ppm-review]] (Rama-Maneiro et al.'s DL-PPM review). - Related to [[sources/2018-difrancescomarino-genetic-hpo-ppm]] (GA-based HPO with earliness term in fitness) and [[sources/2018-dumas-fundamentals-of-bpm]] (BPM fundamentals). - Concepts: [[concepts/remaining-time-prediction]], [[concepts/lstm-ppm]], [[concepts/predictive-process-monitoring]], [[concepts/trace-encoding]]. - Author: [[entities/mike-riess]].