Unsupervised clustering of series using dynamic programming

Karthigan Sinnathamby, Chang-Yu Hou, Lalitha Venkataramanan, Vasileios-Marios Gkortsas, François FleuretarXiv 2021

TL;DR

This paper introduces a novel unsupervised clustering algorithm for multi-variate time series that leverages dynamic programming to enforce physics-based coherence within clusters. By incorporating constraints on the number of clusters, transitions, and minimum block size, the method effectively segments and groups series data, demonstrating strong performance in a challenging petrophysics application.

What Problem Does This Paper Address?

Clustering time series data is a common task in machine learning, but existing unsupervised methods often struggle with series that exhibit inherent temporal or spatial correlations. These methods can lead to overly fragmented clusters, failing to capture meaningful segments. Furthermore, in many scientific domains, data points within a cluster are expected to adhere to a specific physical model with consistent parameters. This paper addresses the challenge of unsupervised clustering for multi-variate series where the goal is not only to group similar data points but also to ensure that these groups are coherent with an underlying physics model, while respecting the sequential nature of the data.

Methods

The core contribution is a new unsupervised clustering algorithm that combines dynamic programming with physics-based coherence. The algorithm is inspired by K-means but extends it significantly. Key aspects include:

  • Physics Coherence: Instead of simply using cluster centroids (like in K-means), the algorithm uses a "characterization function" ($M_{char}$) to learn model parameters (e.g., physics parameters) for each cluster. A "affiliation function" ($f$) then measures how well individual data points fit a cluster's learned model.
  • Dynamic Programming for Sequential Constraints: To handle the temporal nature of series data and avoid fragmentation, the algorithm employs dynamic programming. This allows for explicit constraints on:
  • The total number of clusters ($C$).
  • The maximum number of transitions between clusters ($N$).
  • The minimum size of any data block within a cluster ($Min\phi$).
  • Recurrence Relation: A crucial part of the dynamic programming approach is a derived recurrence relation that efficiently computes the optimal clustering assignment by considering all valid paths through the series, respecting the defined constraints.
  • Grid-Search for Hyperparameters: Since the optimal number of clusters ($C$) and transitions ($N$) are often unknown, the paper proposes a grid-search strategy. A criterion based on the density of the cost distribution and diversity of $N$ and $C$ values is used to select the most plausible clustering pattern.

Datasets

The paper introduces a simulated dataset for the petrophysics application. This dataset is generated based on the Waxman-Smits (WS) equation, a known physics model in the field. The simulation involves generating multi-variate logs (porosity, water saturation, conductivity, etc.) with added noise and varying levels of "smoothness" in transitions between formation layers. The authors do not explicitly mention using publicly available datasets for this specific application.

Key Insights and Ideas

  • Physics-Guided Clustering is Powerful: By incorporating domain-specific physics models into the clustering objective, the algorithm can achieve more meaningful and interpretable results, especially in scientific applications.
  • Dynamic Programming for Temporal Series: The application of dynamic programming with explicit constraints on transitions and block sizes is a novel way to enforce sequential coherence and prevent over-fragmentation in time series clustering.
  • Balancing Cost and Structure: The grid-search strategy, combined with the ARI metric, provides a principled way to select hyperparameters ($N$ and $C$) that balance minimizing the clustering cost with achieving a desired level of structural interpretability (avoiding overly fragmented or overly simplistic clusters).
  • Petrophysics as a Strong Use Case: The Waxman-Smits equation provides a concrete and challenging example where physics-based clustering can reveal distinct geological formations based on their electrical properties.

Key Results

The algorithm demonstrates strong performance on simulated petrophysics data, achieving high Adjusted Rand Index (ARI) scores across various datasets (WS-1, WS-2, WS-3, and their "smooth" variants). For instance, in Table 2, ARI scores range from 0.68 to 0.91, with the "most common" prediction (selected via the grid-search criterion) often yielding higher ARI than the "lowest cost" prediction, indicating that the chosen criterion effectively balances cost with structural validity. The paper also shows that the algorithm can effectively identify transitions and cluster assignments that align well with the ground truth, even in the presence of significant noise.

Limitations and Future Work

  • Subjectivity in Grid-Search Criterion: The authors acknowledge that the criterion for selecting the "most dense region" in the grid-search can be subjective and depends on the grid size. They suggest that prior geological information can help constrain the grid to more realistic ranges.
  • Computational Cost: While dynamic programming is used, the grid-search over $N$ and $C$ can still be computationally intensive, especially for large datasets or wide search ranges.
  • Generalizability of Physics Models: The effectiveness of the algorithm is tied to the availability and accuracy of the physics model used for cluster characterization. Applying it to domains without well-defined physics models might require different characterization approaches.
  • Future Work: The paper implicitly suggests exploring more sophisticated methods for hyperparameter selection and potentially extending the algorithm to handle more complex temporal dependencies or different types of physics models.

Summary updated

Abstract

We are interested in clustering parts of a given single multi-variate series in an unsupervised manner. We would like to segment and cluster the series such that the resulting blocks present in each cluster are coherent with respect to a known model (e.g. physics model). Data points are said to be coherent if they can be described using this model with the same parameters. We have designed an algorithm based on dynamic programming with constraints on the number of clusters, the number of transitions as well as the minimal size of a block such that the clusters are coherent with this process. We present an use-case: clustering of petrophysical series using the Waxman-Smits equation.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
WS-1 (simulated data)Proposed dynamic-programming clustering — most common answerARI (Adjusted Rand Index)0.76Time Series Clustering · C_grid=10 · N_grid=14 · answer-selection=most-common
Source quote
L298: WS-1 │ Most common │ 0.170 │ 0.170 │ 0.76
WS-2 (simulated data)Proposed dynamic-programming clustering — most common answerARI (Adjusted Rand Index)0.91Time Series Clustering · C_grid=8 · N_grid=14 · answer-selection=most-common
Source quote
L301: WS-2 │ Most common │ 0.161 │ 0.165 │ 0.91
WS-2-smooth (simulated data)Proposed dynamic-programming clustering — most common answerARI (Adjusted Rand Index)0.82Time Series Clustering · C_grid=6 · N_grid=13 · answer-selection=most-common
Source quote
L304: WS-2-smooth │ Most common │ 0.164 │ 0.163 │ 0.82
WS-3 (simulated data)Proposed dynamic-programming clustering — most common answerARI (Adjusted Rand Index)0.81Time Series Clustering · C_grid=6 · N_grid=8 · answer-selection=most-common
Source quote
L307: WS-3 │ Most common │ 0.170 │ 0.166 │ 0.81
WS-3-smooth (simulated data)Proposed dynamic-programming clustering — most common answerARI (Adjusted Rand Index)0.71Time Series Clustering · C_grid=7 · N_grid=16 · answer-selection=most-common
Source quote
L310: WS-3-smooth │ Most common │ 0.173 │ 0.164 │ 0.71
WS-3-smooth (simulated data)Proposed dynamic-programming clustering — lowest-cost answerARI (Adjusted Rand Index)0.84Time Series Clustering · answer-selection=lowest-cost
Source quote
L311: Lowest cost │ 0.167 │ 0.164 │ 0.84
BibTeX
@misc{sinnathamby2021unsupervised,
  author = {Karthigan Sinnathamby and Chang-Yu Hou and Lalitha Venkataramanan and Vasileios-Marios Gkortsas and François Fleuret},
  title = {{Unsupervised clustering of series using dynamic programming}},
  year = {2021},
  eprint = {2101.09512},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2101.09512},
}
Figure