Introduction to Anomaly Detection with a Convolutional Auto-Encoder on Time Series transformed into Images

Tutorial
Introduction to Anomaly Detection with a Convolutional Auto-Encoder on Time Series transformed into Images

Posted Aug 4, 2020, 11:37 AM UTC

389
AstroTheseOP•

To continue the tutorial I had presented here: First Tutorial

Here is a notebook to understand how to detect anomalies on time series.

https://github.com/JulienAu/Anomaly_Detection_Tuto/blob/master/AD_ConvAE_English.ipynb

You can view the notebook on: NbViewer

I'll continue to improve the github in the future. Feel free to ask questions or comment.

6
nbviewerbot•

I see you've posted a GitHub link to a Jupyter Notebook! GitHub doesn't render large Jupyter Notebooks, so just in case, here is an nbviewer link to the notebook:

https://nbviewer.jupyter.org/url/github.com/JulienAu/Anomaly_Detection_Tuto/blob/master/AD_ConvAE_English.ipynb

Want to run the code yourself? Here is a binder link to start your own Jupyter server and try it out!

https://mybinder.org/v2/gh/JulienAu/Anomaly_Detection_Tuto/master?filepath=AD_ConvAE_English.ipynb


^(I am a bot.) ^(Feedback) ^(|) ^(GitHub) ^(|) ^(Author)

3
AsapBam•

Nice work, I'm looking forward to hear about your next steps and results !

3
AstroTheseOP•

Thanks a lot !

2
bernhard-lehner•

Nice work, however, I'm not sure about the image transformation...What is the benefit compared to just using 1d convolutions? Turning the time series into an image doesn't add any information.

3
AstroTheseOP•

Thank you. That's a very good question, in the example of the notebook, the transformation into an image is not very interesting indeed. It's more of a tutorial to learn Pytorch, CNN and auto-encoder. However, the first intuition is that the time series transformation into images allows to use all the methods of anomaly detection in images (which is a very active field of research at the moment). The transformation into images could perhaps help with interpretability ?

Finally, it would seem that image transformation is useful for non-linear time series :

https://www.researchgate.net/publication/338103205_Convolutional_Neural_Network_Analysis_of_Recurrence_Plots_for_Anomaly_Detection

1
mk1817•

Nice work. I am currently working on a project to detect anomalies in time series data. I have done it using LSTM auto encoders. I look forward to your approach to compare two different methods. I am also looking into VAEs. Let me know if you’d like to further talk about it.

2
AstroTheseOP•

Thank you, I'd be happy to discuss it.

1
guiguiom83•

Such a great idea ! Good job man ! I'm curious to see the future of your thesis and your next conclusions ;)

1