Learning the Optimal Stopping for Early Classification within Finite Horizons via Sequential Probability Ratio Test

Akinori F. Ebihara, Taiki Miyagawa, Kazuyuki Sakurai, Hitoshi Imaoka

Abstract

Time-sensitive machine learning benefits from Sequential Probability Ratio Test (SPRT), which provides an optimal stopping time for early classification of time series. However, in finite horizon scenarios, where input lengths are finite, determining the optimal stopping rule becomes computationally intensive due to the need for backward induction, limiting practical applicability. We thus introduce FIRMBOUND, an SPRT-based framework that efficiently estimates the solution to backward induction from training data, bridging the gap between optimal stopping theory and real-world deployment. It employs density ratio estimation and convex function learning to provide statistically consistent estimators for sufficient statistic and conditional expectation, both essential for solving backward induction; consequently, FIRMBOUND minimizes Bayes risk to reach optimality. Additionally, we present a faster alternative using Gaussian process regression, which significantly reduces training time while retaining low deployment overhead, albeit with potential compromise in statistical consistency. Experiments across independent and identically distributed (i.i.d.), non-i.i.d., binary, multiclass, synthetic, and real-world datasets show that FIRMBOUND achieves optimalities in the sense of Bayes risk and speed-accuracy tradeoff. Furthermore, it advances the tradeoff boundary toward optimality when possible and reduces decision-time variance, ensuring reliable decision-making.

Introduction

In critical domains such as medical diagnosis, autonomous driving, and fraud detection, the timing of a decision is as vital as its accuracy. This challenge, known as Early Classification of Time Series (ECTS), requires balancing the cost of waiting for more data against the risk of an incorrect premature decision. While the Sequential Probability Ratio Test (SPRT) offers an optimal stopping rule for infinite horizons, real-world applications are constrained by a finite horizon or deadline.

Finding the optimal stopping rule under a deadline requires solving backward induction, a recursive process that is traditionally computationally prohibitive and requires precise knowledge of data distributions. FIRMBOUND (FInite-horizon average a posteriori Risk Minimizer for optimal BOUNDary) addresses these limitations by approximating backward induction directly from data.

Optimal decision boundary tapering and Pareto front advancement.

Methodology

FIRMBOUND bridges the gap between theory and practice through a three-step framework:

  1. Sufficient Statistic Estimation: Since true distributions are unknown, FIRMBOUND utilizes sequential Density Ratio Estimation (DRE) to estimate log-likelihood ratios (LLRs) from raw input sequences.
  2. Continuation Risk Learning: The core of the framework involves estimating the "continuation risk"—the expected future risk of delaying a decision. The authors prove this risk function is concave, allowing them to employ Convex Function Learning (CFL) for statistically consistent estimation.
  3. Efficient Approximation: To reduce training overhead, a Gaussian Process (GP) regression alternative is provided. While CFL ensures theoretical consistency, the GP approach offers a 30x speedup in training with comparable performance in practice.

The optimal decision boundary is determined by the intersection of the estimated continuation risk and the immediate stopping risk.

Estimation of continuation risk using GP and CFL.

Experimental Evaluation

The framework was rigorously tested across diverse datasets, including synthetic i.i.d. Gaussian and Damped Oscillating LLR (DOL) datasets, as well as real-world vision tasks like face anti-spoofing (SiW) and action recognition (HMDB51, UCF101). It was also tested on the FordA dataset for continuous signal classification.

Key Results

  • Bayes Optimality: FIRMBOUND consistently minimized the Average A Posteriori Risk (AAPR) more effectively than heuristic baselines like EARLIEST, TCN-Transformer, or LSTMms.
  • Pareto Front Advancement: On datasets like HMDB51, FIRMBOUND pushed the boundary of the best possible speed-accuracy tradeoff further than existing methods.
  • Reduced Variance: Beyond accuracy, FIRMBOUND significantly reduced the variance of decision times, leading to more predictable and reliable system behavior.

Discussion and Conclusion

A defining characteristic of FIRMBOUND is the "tapering boundary"—a decision threshold that naturally narrows as the deadline approaches. By leveraging the mathematical property of concavity in risk functions, the framework achieves high data efficiency and stability.

While FIRMBOUND represents a significant step forward, some limitations remain. The framework assumes a match between training and testing distributions; significant domain shifts may necessitate recalibration. Additionally, changing the relative "cost" of time versus accuracy currently requires retraining. Future work may explore more dynamic cost-adjustment mechanisms and formal minimax bounds for the combined DRE-CFL approach.

Summary updated

BibTeX
@inproceedings{ebihara2025learning,
  author = {Akinori F. Ebihara and Taiki Miyagawa and Kazuyuki Sakurai and Hitoshi Imaoka},
  title = {{Learning the Optimal Stopping for Early Classification within Finite Horizons via Sequential Probability Ratio Test}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=SRghq20nGU},
}
Figure