1
$\begingroup$

I am trying to do an unsupervised autoencoder based outlier detection for time series using LSTMs. Here, there are multiple time series, and an entire series is to be considered as an outlier. However, I only have around 25-30 time series instances to work on (though each series comprises ~10k points).
I wanted to know whether creating sliding windows for each time series to generate more data is an okay idea for training the autoencoder more accurately. Also, in that case, how does one merge the results to selectively identify which of the original 25-30 time series is an outlier?
I am relatively new at working with LSTMs and would really appreciate suggestions on whether this idea is feasible.

$\endgroup$
  • 1
    $\begingroup$ In my opinion, this question can only be answered with domain knowledge or by experimental testing and does not depend on the fact that you are using LSTM's, but on the nature of the data itself. $\endgroup$ – ncasas Sep 18 at 10:40
  • $\begingroup$ Agreed with ncasas. I think your idea highly depends on how much time points you actually need to see that an outlier is actually an outlier, your windows should be greater than that. In principle your approach seems good enough to at least give it a try $\endgroup$ – mprouveur Sep 18 at 11:59
  • $\begingroup$ You pretty much have to split the time series for an LSTM, certainly, a 10k long sequence probably isn't going to perform well. I suspect the problem you have is if as I understand it you only have 1 label per sequence (i.e. the sequence either contains an anomaly or it doesn't). If this is the case - is the anomaly present for the entire time, or only for a period of time. If the entire series is anomalous splitting it and assigning the same label to each split may work. If the anomaly comes and goes then you may struggle $\endgroup$ – David Waterworth Oct 22 at 0:47
  • $\begingroup$ My current problem is that I have a lot of parameters to tune - window size, stride for the sequencing, and then the actual LSTM architecture itself - like the activations, epochs etc. And then I have to figure out how to combine the results of each individual splits into the combined time series. Because if I just consider that one of the time splits is anomalous, the entire series is anomalous, and so I am getting a lot of series as anomalous (when the data actually has just 1-3). And it's a bit overwhelming because I don't know how to check where I can improve the model. $\endgroup$ – ad123 Oct 22 at 10:59
0
$\begingroup$

Splitting a time-series into analysis windows, usually with overlap, is quite common practice. In anomaly detection, but also in classification or forecasting. It works great as long as your anomalies can be detected by analyzing such windows independently.

In such a setup, the length of the analysis window becomes a critical hyper-parameter - and will be data/task-dependent.

To get an overall anomaly score you can use any standard statistics to merge scores for individual windows. A simple mean would be the first thing to try, but there are more approaches.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.