[Paper Review] anomaly : Detection of Anomalous Structure in Time Series Data
This paper introduces the R package 'anomaly' for detecting both point and collective anomalies in univariate and multivariate time series. It implements advanced methods like CAPA (Collective and Point Anomaly detection), PASS (Proportion Adaptive Segment Selection), and BARD (Bayesian Abnormal Region Detector), which use likelihood-based evidence fusion and penalized likelihood or higher criticism to detect structural changes, with demonstrated performance on simulated and real-world data including machine temperature and microarray datasets.
One of the contemporary challenges in anomaly detection is the ability to detect, and differentiate between, both point and collective anomalies within a data sequence or time series. The anomaly package has been developed to provide users with a choice of anomaly detection methods and, in particular, provides an implementation of the recently proposed Collective And Point Anomaly family of anomaly detection algorithms. This article describes the methods implemented whilst also highlighting their application to simulated data as well as real data examples contained in the package.
Motivation & Objective
- Address the challenge of detecting both point and collective anomalies in time series data, which are often overlooked by traditional outlier detection methods.
- Provide a unified R software package that implements recent statistical methods for anomaly detection, particularly tailored for structural changes in data sequences.
- Improve detection robustness in the presence of autocorrelation and misaligned anomalies across components in multivariate time series.
- Enable uncertainty quantification through Bayesian inference via the BARD method, offering posterior samples for anomaly locations and component involvement.
- Demonstrate practical utility through real data applications, including machine temperature monitoring and genomics data, with parameter tuning for autocorrelation adjustment.
Proposed method
- Implement CAPA (Collective and Point Anomaly detection) for univariate and multivariate time series, using a penalized likelihood approach to detect segments with anomalous mean or variance changes.
- Apply PASS (Proportion Adaptive Segment Selection) for multivariate data, fusing component-specific anomaly evidence via higher criticism to detect collective anomalies when only a few components are affected.
- Use BARD (Bayesian Abnormal Region Detector) as a Bayesian alternative that models anomaly regions with prior distributions and returns posterior samples, enabling uncertainty quantification.
- Adjust for autocorrelation by inflating penalty parameters based on estimated autocorrelation (rho_hat), reducing false positives in dependent data.
- Integrate preprocessing steps such as detrending and deseasonalization to improve detection accuracy on non-stationary time series.
- Provide visualization and summary functions to interpret results, including detection of anomaly start/end points and test statistics for each segment.
Experimental results
Research questions
- RQ1How can a single method effectively detect both point and collective anomalies in time series data?
- RQ2How does the penalized likelihood approach in CAPA compare to higher criticism in PASS when detecting collective anomalies, especially when only a few components are anomalous?
- RQ3To what extent does accounting for autocorrelation through penalty inflation improve detection performance in real-world time series?
- RQ4Can Bayesian inference via BARD provide more interpretable uncertainty quantification for anomaly detection compared to frequentist methods?
- RQ5How do these methods perform on real-world datasets such as machine temperature and microarray genomics data with known anomalies?
Key findings
- CAPA successfully detected four collective anomalies in the machine temperature dataset, with the second, third, and fourth anomalies aligning well with known events, while the first may be a false positive or undetected event.
- After adjusting penalty parameters using estimated autocorrelation (rho_hat), CAPA reduced false positives, demonstrating improved robustness in autocorrelated data.
- The test statistic in CAPA is defined as the product of the mean change and segment duration, which explains why a segment with a smaller mean shift but longer duration can yield a higher test statistic.
- PASS and CAPA both use likelihood-based evidence fusion across components, but PASS uses higher criticism, which can lose power when only one or a few components are anomalous.
- BARD provides posterior samples for anomaly locations and component involvement, offering a flexible, uncertainty-aware output that supports deeper inference.
- The package's implementation supports both univariate and multivariate anomaly detection, with clear functionality for model selection, parameter tuning, and result visualization.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.