TL;DR
This paper introduces HDP-Flow, a novel Bayesian nonparametric model for discovering underlying states in dynamic, non-stationary time series data. By combining the flexibility of nonparametric models with the power of deep generative normalizing flows, HDP-Flow can adapt to evolving patterns and learn transferable states across datasets, outperforming existing methods in state identification and offering scalable inference.
What Problem Does This Paper Address?
Many real-world time series, such as physiological signals or human activity, are characterized by dynamic and non-stationary underlying states that can change over time. Traditional methods often assume a fixed number of states or static state descriptions, which limits their ability to capture these evolving patterns. While Bayesian nonparametric (BNP) models can handle an unknown number of states, they often rely on simplistic assumptions for state descriptions and can be computationally expensive for inference, especially on long time series. This paper addresses the need for a flexible, scalable, and accurate model that can discover and adapt to unknown, evolving latent states in complex time series data.
Methods
HDP-Flow builds upon the Hierarchical Dirichlet Process Hidden Markov Model (HDP-HMM), specifically incorporating the "sticky" variant to encourage state persistence. The key innovation lies in integrating this with conditional normalizing flows (NFs). NFs are powerful deep generative models that can learn complex data distributions by transforming a simple distribution into a target one through a series of invertible functions. In HDP-Flow, NFs are used to model the emission distribution of observations within each state, allowing for rich, state-specific patterns. Crucially, these NFs are made state-dependent and time-conditioned, meaning their parameters are learned based on the current state and the duration spent in that state, enabling the model to capture non-stationarity within states.
For inference, which is notoriously challenging for complex BNP models, HDP-Flow employs stochastic variational inference (SVI). This approach, specifically a black-box variational inference (BBVI) method, allows for scalable approximate inference, overcoming the limitations of traditional sampling-based methods that struggle with long time series.
Datasets
The paper evaluates HDP-Flow on a variety of datasets:
- Simulated Dataset I (static): A 3D time series with 4 underlying states governed by a fixed HMM. Observations are drawn from a Gaussian distribution.
- Simulated Dataset II (dynamic): A 4D time series with 6 underlying states generated from a sticky HDP-HMM. This dataset features non-stationary emissions within states.
- Simulated Dataset III (dynamic): A dataset generated from a model similar to HDP-Flow, with finite states and fixed latent variables, designed to test temporal dynamics.
- CPAP Pressure and Flow Dataset: Real-world data from CPAP breathing masks, measuring differential pressure.
- Human Activity Recognition (HAR): A dataset from wearable sensors on 30 individuals performing six basic activities, resulting in 12 underlying states.
- Wearable Datasets (Crohn's and Bump): Longitudinal health data from wearable devices (Oura ring) for patients with Crohn's disease and pregnant women. These datasets are characterized by high variability, sensor noise, and lack of clear state definitions, making them challenging for analysis.
Key Insights and Ideas
- Bridging BNP and Deep Generative Models: HDP-Flow successfully marries the theoretical flexibility of BNP models (unbounded states, adaptive learning) with the expressive power of deep generative models (normalizing flows) for complex emission modeling.
- Capturing Non-Stationarity Within States: By conditioning emission models on state duration, HDP-Flow can model how patterns evolve within a given state, a crucial aspect of many real-world time series.
- Transferable States: The model demonstrates the ability to learn states that generalize across different populations and datasets, a significant step towards building reusable knowledge repositories for time series analysis.
- Scalable Inference is Key: The adoption of SVI is critical, enabling the model to handle long time series where traditional sampling methods fail, making it practical for large-scale applications.
Key Results
- Superior State Identification: HDP-Flow consistently outperforms other nonparametric baselines (S-HDP, DS-HDP) in learning latent states across various simulated and real-world datasets, often achieving accuracy comparable to or exceeding models with prior knowledge of the number of states.
- Accurate Emission Modeling: Generated samples from HDP-Flow more accurately match the data distribution of each state compared to other BNP baselines.
- Scalability: The SVI algorithm allows HDP-Flow to scale to large datasets (e.g., HAR70+ with ~5K time steps per sample), where sampling-based methods fail.
- Calibrated Uncertainty: Reliability plots show that HDP-Flow's posterior state probabilities are well-calibrated, providing trustworthy estimates of state uncertainty.
- Clinical Relevance: In wearable health data, HDP-Flow successfully extracts meaningful states that generalize across cohorts, correlating with subjective measures and offering insights into physiological changes.
Limitations and Future Work
- State Granularity: The authors acknowledge that determining the optimal state granularity for structured tasks remains a common challenge in BNP models. Careful prior tuning is needed to balance model complexity and avoid overfitting.
- Computational Intensity: While SVI offers scalability, HDP-Flow is still computationally more intensive than standard deterministic neural networks.
- Future Work: The paper suggests that future work could explore more sophisticated inference techniques beyond mean-field assumptions to further improve accuracy. Additionally, extending the model to handle more complex temporal dependencies or incorporating explicit mechanisms for state transition modeling could be valuable.
Summary updated