PPC_code
Code underlying the publication: Anomalous Change Point Detection Using Probabilistic Predictive Coding
Description
This is the code base underlying the publication: Anomalous Change Point Detection Using Probabilistic Predictive Coding. It contains the base implementation of Probabilistic Predictive Coding (PPC) and three example experiments to demonstrate the capabilities and performance of PPC.
Abstract
Change point detection (CPD) and anomaly detection (AD) are essential techniques in various fields to identify abrupt changes or abnormal data instances. However, existing methods are often constrained to univariate data, face scalability challenges with large datasets due to computational demands, and experience reduced performance with high-dimensional or intricate data, as well as hidden anomalies. Furthermore, they often lack interpretability and adaptability to domain-specific knowledge, which limits their versatility across different fields. In this work, we propose a deep learning-based CPD/AD method called Probabilistic Predictive Coding (PPC) that jointly learns to encode sequential data to low dimensional latent space representations and to predict the subsequent data representations as well as the corresponding prediction uncertainties. The model parameters are optimized with maximum likelihood estimation by comparing these predictions with the true encodings. At the time of application, the true and predicted encodings are used to determine the probability of confor- mity, an interpretable and meaningful anomaly score. Furthermore, our approach has linear time complexity, scalability issues are prevented, and the method can easily be adjusted to a wide range of data types and intricate applications. We demonstrate the effectiveness and adaptability of our proposed method across synthetic time series experiments, image data, and real-world magnetic resonance spectroscopic imaging data.
Contents
PPC.py: base implementation and helper classes for Probabilistic Predictive CodingLICENSE: license fileREADME.md: information about this softwarerequirements.txt: Python packages required for this softwareproportionality_test/tools.py: models, data helpers, and training callbacks for the proportionality test (section 4.1 of publication)proportionality_test/train.py: training script for the proportionality testproportionality_test/test.py: evaluation script for models trained by the train.py filesine_frequency/tools.py: models, data helpers, training callbacks, and visualization tools for the sine wave frequency experiment (section 4.2 of publication)sine_frequency/generate_datasets.py: data-generating script as preparation for the training and evaluationsine_frequency/train.py: training script for the sine wave frequency experimentsine_frequency/test.py: evaluation script for models trained by the train.py file.mnist_sequence/tools.py: models, data (augmentation) helpers, training callbacks, and visualization tools for the MNIST sequence experiment (section 4.3 of publication)mnist_sequence/train.py: training script for the MNIST sequence experimentmnist_sequence/test.py: evaluation script for models trained by the train.py file
Usage
Please refer to the README.md file for instructions on setting up and running the experiments.
- MIT