This paper, presented at ICML 2020, challenges the status quo of time series analysis by asking a provocative question: What if we stop treating time series as sequences and start treating them as sets?
Introduction
In the "clean" world of machine learning tutorials, time series are neatly binned into regular intervals. In the "messy" world of clinical medicine, data is chaotic. A patient’s heart rate might be monitored every second, while a lab result for lactate arrives every six hours, and a blood pressure reading is taken only when a nurse is available.
Standard tools like Recurrent Neural Networks (RNNs) struggle here. They typically require "imputation" (filling in the gaps) or "binning" (averaging data into fixed windows), both of which can introduce bias or destroy the very "missingness patterns" that are often clinically informative. While newer models like Latent-ODEs or GRU-D attempt to model these dynamics explicitly, they are often computationally expensive and difficult to scale to long sequences or large populations.
Methods: The SeFT Architecture
The authors introduce SeFT (Set Functions for Time Series). Instead of processing observations one-by-one in a specific order, SeFT treats every observation—regardless of which sensor it came from or when it happened—as an element in a set.
The architecture consists of three main components:
- Time Encoding: To ensure the model doesn't lose the concept of "when" things happened, it uses a variant of the positional encodings found in Transformers. This maps a 1D time value into a high-dimensional vector using trigonometric functions.
- Differentiable Set Function (Deep Sets): The model uses the "Deep Sets" framework, which processes each observation independently through a function $h$, aggregates them (usually via a mean or sum), and then passes the result through a final function $g$. This structure is inherently parallelizable.
- Attention-based Aggregation: Rather than a simple average, SeFT uses multi-head attention to let the model "decide" which observations are most important for the final classification. This allows the model to ignore noise and focus on critical events, like a sudden spike in blood pressure.
Key Results
The model was evaluated on three major healthcare benchmarks: MIMIC-III Mortality (M3-Mortality), Physionet 2012 Mortality (P-Mortality), and Physionet 2019 Sepsis (P-Sepsis).
- Speed: SeFT is significantly faster than its peers. On the M3-Mortality task, it ran in 14.5 seconds per epoch, compared to 133 seconds for GRU-D and over 4,600 seconds for Latent-ODE.
- Performance: Despite its simplicity, SeFT performed competitively or better than complex RNN and Transformer baselines in terms of AUROC and AUPRC across all datasets.
- Scalability: Because the embeddings for each observation are calculated independently, the model scales linearly $O(M)$ with the number of observations, making it ideal for high-frequency monitoring.
Key Insights and Ideas
- Order isn't everything: For many classification tasks, the exact sequential "flow" is less important than the presence of specific patterns or events. By relaxing the "sequentialness prior," the authors unlocked massive gains in speed.
- Avoiding the Imputation Trap: SeFT avoids guessing missing values by only looking at what was actually measured, treating the timing and modality as features themselves.
- The "Future Leakage" Discovery: The authors found that several state-of-the-art competitors (like IP-Nets and Transformers) were accidentally "cheating" in online scenarios by looking at data from the "future" during imputation. SeFT is mathematically structured to avoid this leakage.
- Interpretability: Because of the attention mechanism, SeFT can produce "importance values" for every single observation, allowing clinicians to see exactly which data points triggered a high-risk prediction.
Limitations and Future Work
While SeFT is excellent for classification, it is not designed for forecasting (predicting the next value in a series), where modeling underlying dynamics is more critical. Additionally, for extremely large sets, the summation step can suffer from numerical instability, suggesting a need for more robust aggregation methods like Kahan summation in future iterations.
Summary updated