Abstract
Early classification algorithms help users react faster to their machine learning model's predictions. Early warning systems in hospitals, for example, let clinicians improve their patients' outcomes by accurately predicting infections. While early classification systems are advancing rapidly, a major gap remains: existing systems do not consider irregular time series, which have uneven and often-long gaps between their observations. Such series are notoriously pervasive in impactful domains like healthcare. We bridge this gap and study early classification of irregular time series, a new setting for early classifiers that opens doors to more real-world problems. Our solution, Stop&Hop, uses a continuous-time recurrent network to model ongoing irregular time series in real time, while an irregularity-aware halting policy, trained with reinforcement learning, predicts when to stop and classify the streaming series. By taking real-valued step sizes, the halting policy flexibly decides exactly when to stop ongoing series in real time. This way, Stop&Hop seamlessly integrates information contained in the timing of observations, a new and vital source for early classification in this setting, with the time series values to provide early classifications for irregular time series. Using four synthetic and three real-world datasets, we demonstrate that Stop&Hop consistently makes earlier and more-accurate predictions than state-of-the-art alternatives adapted to this new problem.
Introduction
Early classification of time series (ECTS) is a critical capability for time-sensitive domains. In clinical environments, for instance, an algorithm that predicts sepsis even a few hours early can be the difference between life and death. However, most existing ECTS models are built on a fundamental but flawed assumption: that data arrives at regular, predictable intervals.
In practice, real-world data is often irregular. In an Intensive Care Unit (ICU), a patient’s vitals might be recorded every few minutes during an acute crisis but only once every several hours when the patient is stable. These uneven gaps are not merely "missing data"; the timing of the observations itself carries significant diagnostic signal. Current ECTS models struggle in these scenarios because they typically decide whether to "Stop" (classify) or "Wait" (collect more data) only when a new observation arrives. We introduce Stop&Hop, a framework designed to treat time as a continuous variable, allowing for early classification in the presence of irregular intervals.
The Stop&Hop Framework
Stop&Hop is a modular framework that combines continuous-time representation learning with a reinforcement learning (RL) policy. It consists of three primary components:
1. Prefix Encoder (GRU-D)
To handle irregular gaps, Stop&Hop utilizes a GRU-D (Gated Recurrent Unit with Decay). Unlike standard RNNs that update hidden states at discrete steps, the GRU-D incorporates a continuous-time decay mechanism. It decays the hidden state and input values based on the time elapsed since the last observation. This allows the model to maintain a dense, informative vector representation of the series at any arbitrary point in time, effectively modeling the "silence" between observations.
2. Halting Policy Network
The core innovation of Stop&Hop is its halting policy, trained via the REINFORCE algorithm. The problem is formulated as a Partially-Observable Markov Decision Process (POMDP). At any given time $t'$, the policy makes two sequential decisions:
- Stop: Should the system classify the series right now based on current information?
- Hop: If the system chooses to wait, how much time ($\Delta t$) should it "hop" forward before checking the state again?
This "Hop" mechanism allows the agent to bypass irrelevant periods and focus on moments when a significant signal is likely to emerge. By predicting a real-valued hop size, the model can make decisions between physical observations if the decay of the hidden state suggests a classification threshold has been met.
3. Prefix Classifier
When the halting policy triggers a "Stop" action, the current embedding from the Prefix Encoder is passed to a standard neural network classifier to produce the final label prediction.
Experimental Evaluation
We evaluated Stop&Hop against state-of-the-art baselines, including E-GRU and EARLIEST, across synthetic and real-world benchmarks:
- Synthetic (SimpleSignal): Using four datasets (Uniform, Early, Late, and BiModal), we injected signals at specific times. Stop&Hop demonstrated the ability to learn the specific temporal logic of the data, with its halting distribution closely matching the true signal distribution.
- PhysioNet (2012 Challenge): This healthcare benchmark contains sparse, irregular vitals and lab results from ICU patients. Stop&Hop achieved an AUC of approximately 0.82, matching state-of-the-art performance while requiring significantly less of the 48-hour observation window than competing early classifiers.
- ExtraSensory: Using smartphone accelerometer data for activity recognition, we simulated non-random irregular sampling. Stop&Hop proved robust in maintaining accuracy even when sensor data was sparse.
Key Insights
Stop&Hop demonstrates that irregularity is a feature, not a bug. By learning from the density and timing of observations, the model's hidden state reflects the underlying process's urgency. Furthermore, the "hopping" mechanism leads to more stable RL training. Traditional RL agents for ECTS often face very long trajectories because they must decide at every single observation; by skipping ahead, Stop&Hop shortens these trajectories and improves efficiency.
Conclusion and Future Work
Stop&Hop represents a significant step forward in making early classification practical for real-world, irregular data. While the model currently requires manual tuning of the $\lambda$ parameter (which balances the trade-off between earliness and accuracy), it consistently outperforms adapted discrete-time models. Future research will explore extending this framework to multi-label classification and incorporating the cost of data acquisition—such as the financial or physical cost of ordering a new lab test—into the halting policy's decision-making process.
Summary updated