VaelstmDetector
Detect anomalies in time series using combined variational autoencoder (VAE) and long short-term memory (LSTM) networks
Since R2025a
Description
Add-On Required: This feature requires the Time Series Anomaly Detection for MATLAB add-on.
The VaelstmDetector object uses a deep learning network
architecture that contains both VAE and LSTM networks to implement a
detector model capable of being trained to detect anomalies in time
series data using only normal data. You create this object with the vaelstmAD
function. This detector requires Deep Learning Toolbox™
By comparing forecasted values with measured data within a detection window, the detector identifies anomalies as significant differences between forecasted and measured observations. You can control the sensitivity of the detector by modifying a set of threshold and window-sizing properties.
Creating a VaelstmDetector object is the first step in a workflow that
includes creation, training, testing, assessing, and, if necessary, modifying the detector.
For information on the workflow for developing a Predictive Maintenance Toolbox™ anomaly detector, see Detecting Anomalies in Time Series.
This anomaly detector model was inspired by the architecture proposed in the paper in [1].
For more information on the functions this workflow uses, see Object Functions.
Creation
Create a VaelstmDetector object by using the vaelstmAD
function.
Properties
Object Functions
train | Train deep learning anomaly detector and obtain detection threshold |
detect | Detect anomalies in time series using trained deep learning detector model |
plot | Plot detected anomalies and anomaly scores generated from deep learning anomaly detectors |
plotHistogram | Plot histogram of anomaly scores and detection threshold for trained deep learning anomaly detector |
updateDetector | Update settings of a trained deep learning anomaly detector and recompute detection threshold |
References
[1] Lin, Shuyu, Ronald Clark, Robert Birke, Sandro Schonborn, Niki Trigoni, and Stephen Roberts. “Anomaly Detection for Time Series Using VAE-LSTM Hybrid Model.” In ICASSP 2020 - 2020 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), 4322–26. Barcelona, Spain: IEEE, 2020. https://doi.org/10.1109/ICASSP40776.2020.9053558.