Abstract
Early Time Classification (ETC) enables models to process data streams efficiently by stopping as soon as a reliable prediction can be made. However, standard methods often only control marginal risk, which can lead to high error rates for early-stopping instances. We present a rigorous statistical framework that introduces conditional risk control, ensuring that the accuracy gap remains within a user-defined tolerance regardless of the stopping time. By leveraging the Learn-then-Test (LTT) calibration framework, our method provides distribution-free, finite-sample guarantees, significantly improving the reliability of "fast" AI models in sensitive applications.
Introduction
In domains ranging from medical monitoring to real-time natural language processing, waiting for a complete data stream is often impractical. Early Time Classification (ETC) addresses this by labeling feature streams as quickly as possible. The core challenge lies in the accuracy-speed trade-off: stopping early typically sacrifices accuracy.
Existing "guaranteed" methods primarily focus on marginal risk, which controls the error rate averaged over all possible stopping times. This is problematic because a model might be highly inaccurate for early exits, provided it compensates with high accuracy on later exits. This "reckless" behavior early in the sequence can be dangerous in high-stakes environments. We propose a conditional risk control approach that regulates the accuracy gap at every possible timestep, ensuring consistent reliability.
Methods
Our approach builds upon the Learn-then-Test (LTT) calibration framework, utilizing a two-stage process to determine optimal stopping thresholds.
1. Candidate Screening
Using a portion of a holdout calibration set, we employ a greedy algorithm to identify a "threshold vector." This vector specifies the confidence level required at each timestep $t$ for the model to halt and emit a prediction.
2. Testing and Verification
To prevent overfitting to the calibration data, we apply Fixed Sequence Testing on a second independent holdout set. This provides a distribution-free, finite-sample guarantee. Specifically, it ensures that the accuracy gap—the difference between the accuracy of the early-stopped model and the model using the full sequence—remains below a user-defined level ($\alpha$) with high probability ($1-\delta$).
We contrast two variants:
- The Marginal Method: Controls the average accuracy gap across all samples.
- The Conditional Method: Controls the accuracy gap conditional on the specific accumulated halt times, providing a much stricter safety guarantee.
Key Insights: Marginal vs. Conditional Control
The primary contribution of this work is the shift from marginal to conditional guarantees. Marginal control can be misleading; it may allow the model to stop too early and produce errors, "knowing" it can balance the average by being more conservative later. In contrast, conditional control forces the model to be reliable at every possible exit point.
As shown in Figure 1, the marginal method often fails to respect the $\alpha$ threshold for early-stopping samples. The conditional method, while potentially stopping later on average, ensures that the accuracy gap is strictly controlled for all groups of samples, regardless of when they halted.
Experimental Results
We evaluated the framework across diverse datasets, including long-document reading comprehension (QuALITY) and various structured time-series tasks (e.g., satellite imagery, energy usage, and sensor data).
- Efficiency Gains: In sensor-based tasks like
WalkingSittingStanding, the model achieved the required accuracy using only 6% of the available timesteps. - Rigorous Reliability: In NLP tasks using Vicuna-13B, the marginal method frequently exceeded the 10% allowed accuracy gap for early stoppers. Our proposed conditional method successfully maintained the error below the 10% threshold across all timesteps.
- Customizable Risk: The framework allows users to explicitly define their "risk appetite." For instance, a user can specify a maximum 5% accuracy drop to achieve a 50% reduction in compute time, and the algorithm will identify the optimal stopping rules to satisfy this constraint.
Limitations and Future Work
While providing strong guarantees, the current framework has limitations:
- The i.i.d. Assumption: The proofs assume that calibration and test data are identically and independently distributed. Real-world "concept drift" in streaming data remains an open challenge.
- Binary Loss Constraint: Current p-value calculations are optimized for binary "correct/incorrect" losses. Extending this to continuous losses (e.g., regression) requires further statistical development.
- Setup Complexity: The two-stage calibration process adds initial computational overhead, though inference remains extremely fast.
Conclusion
This work provides a vital safety rail for deploying early-exit models. By moving to conditional risk control, we ensure that "mostly accurate on average" is replaced by "guaranteed accurate whenever it stops," making ETC viable for sensitive, real-world deployments.
Summary updated