Abstract
Change-point detection (CPD) is essential for identifying shifts in time-series behavior, yet it faces significant challenges in model selection and differentiability for deep learning. We present a novel structured loss function that enables end-to-end training of deep neural networks specifically for CPD. By treating segmentation as a global optimization problem rather than a point-wise classification task, our approach, DeepCPD, avoids spurious detections and the need for manual post-processing. Experimental results on simulated data and human activity recognition datasets demonstrate that DeepCPD is significantly more robust to noise and achieves superior F1-scores compared to traditional and binary classification baselines.
Introduction
Change-point detection (CPD) aims to find the timestamps where the statistical properties of a signal change abruptly. It is a cornerstone of time-series analysis with applications in sleep stage monitoring, DNA sequencing, and human activity recognition. Traditional algorithms often require tedious manual calibration of hyperparameters. Supervised approaches, while promising, often treat CPD as a binary classification task—predicting whether each sample is a change point. This "point-wise" approach is prone to class imbalance and produces "spurious" changes, requiring ad-hoc peak-finding or smoothing. Furthermore, the discrete nature of selecting change points makes standard gradient-based optimization difficult.
Methods
DeepCPD addresses these issues by combining deep representation learning with a structured loss function designed for segmentation. A neural network transforms the raw input into a latent space where changes are more discernible (e.g., mean shifts). Instead of penalizing individual points, the structured loss evaluates the entire segmentation by comparing the score of the ground-truth segmentation against the score of the best possible segmentation the model can currently produce.
To overcome the non-differentiability of discrete segmentation, the authors utilize an analytical formula for the gradient of the loss. This allows error signals to flow back through the discrete optimization step into the neural network parameters. This holistic approach ensures the model learns to produce signals that are inherently easy to segment without requiring post-processing.
Results
The framework was evaluated on simulated 50-dimensional signals and four real-world human activity recognition (HAR) datasets (HASC, WISDM, SHOAIB1, and SHOAIB2). In simulations, DeepCPD proved remarkably robust to varying signal lengths and noise levels. On the HASC dataset, which features transitions between activities like "stairs up" and "walking," DeepCPD achieved an F1-score of 0.91, significantly outperforming binary classification baselines.
Key insights from the experiments suggest that optimizing for global structure is superior to point-wise classification. Additionally, the results indicated that knowing specific activity labels does not necessarily improve the detection of the change points themselves, highlighting CPD as a distinct signal processing task.
Conclusion
DeepCPD introduces a robust, end-to-end trainable framework for change-point detection by integrating structured loss into deep learning. By bypassing the limitations of point-wise classification and manual tuning, it provides a scalable solution for complex time-series segmentation. Future research will explore making the objective function fully differentiable through "soft" optimization techniques and extending the loss function to detect changes in variance and frequency.
Summary updated