1
$\begingroup$

I’m currently working on my master thesis and I’m looking for some inputs for the following situation:

I have data of 2-20 sensors all measuring the same variable at 1-3 different locations in 15mins-interval (=96 obs/day), so I expect all measurements to be almost the same (if same location) or relatively similar (if different location). In my thesis, I introduced an approach/algorithm which performs anomaly detection using pairwise regression of sensor data (of same location) and (in my opinion 😉) smart tracking of the coefficients, and it seems to perform quite alright. Evaluation is done using artificial errors which have been added in collaboration with domain experts, since generally no ground truth is available. An error always affects only one sensor, but it’s possible that multiple errors are active at the same time independently. (While I definitely appreciate your comments about this, this should not be the main point of my post)

For scientific reasons I need 1-2 other techniques to compare my approach to, which is why I’m asking for your advice here. Generally, it would be nice to have fundamentally different approaches (e.g. my algorithm with regression, something DL-based, something completely different) but this is not too important, I only need a way for a scientific and objective comparison. Since the method described above should be the main focus of the work, the additional methods should not be super much work. I have 1,5 fulltime-months left so I can (and will) definitely implement sophisticated approaches and do not need to take something “out of the box” (in case that exists), but implementing the other methods should not be another master thesis. 😉

I was looking into Matrix Profile (https://www.cs.ucr.edu/~eamonn/MatrixProfile.html) since it seems to be a quite promising technique, however its main focus points seem to be univariate time series and my problem needs to be considered multivariate, since the behavior of the data can change quite a lot (which is fine if they all show the same). I tried applying MP to one single sensor data and it only found the most obvious errors and also many false positives. There are some papers about extending to multivariate case (e.g. https://epubs.siam.org/doi/pdf/10.1137/1.9781611977653.ch77), but it does not seem to be very fitting in my situation where errors usually only show on one sensor, not on k out of n. So I don’t really know how to best apply MP in this case.

Beside that, I thought about Deep Learning based approaches and found DAEMON (https://ieeexplore.ieee.org/document/9458835) and USAD (https://dl.acm.org/doi/10.1145/3394486.3403392). However, they seem to be quite experimental and I don’t want to spend weeks to rebuild a NN from the written description not knowing if it is even suitable in my case.

So I would be really grateful for recommendations of methods (or other advices) for my situation, and feel free to ask if something about my problem description is unclear.

Thanks a lot!

Update about the data: It is about data from irradiance sensors, so while the behaviour during the day can vary a lot (seasons, sunny/cloudy day, first sunny, then thunderstorm, ....), it generally follows a pattern and is somehow periodic. I can attach sample data tomorrow.

$\endgroup$
3
  • $\begingroup$ Before you give up on the Matrix Profile... " only show on one sensor, not on k out of n. ". Of course, one sensor is K out of N, it is just 1 out of N. May I ask how you choose the subsequence length for the MP? It is pretty robust, but much too long or too short will give poor results. If you want good advice here, you really need to share some sample data. Best wishes, eamonn $\endgroup$
    – Eamonn
    Commented Jun 13 at 16:32
  • $\begingroup$ @Eamonn Thanks a lot for your reply! I added some info about the data. Since the data is day-periodic and i have 96obs/day, I set the subseq. length to 96. I also added NaNs between all days so that only same time periods are compared with each other, not comparing midnight-midnigh with noon-noon. However, my main problems with MP are: - due to scaling it can't detect if a sensor generally has correct behaviour, but measures only 10% of other sensors. - often days with strange weather (e.g. first half clear sky, then heavy clouds) get detected as anomaly. $\endgroup$
    – Alexander
    Commented Jun 16 at 17:37
  • $\begingroup$ @Eamonn So what I'm missing is a proper connection between the different Matrix Profiles, or some ways to compute a common one. $\endgroup$
    – Alexander
    Commented Jun 16 at 17:41

1 Answer 1

0
$\begingroup$

Here are some go-to's for anomaly detection.

  1. Isolation forest
  2. One Class Support Vector Machine
  3. Auto Encoder, you have a time series so an RNN based auto encoder makes sense
  4. Mahalanobis Distance (or Hotelling T^2)

I'd be interested to see how well item 4 works for your application. It is the simplest of the techniques but might do quite well based on how you've described your problem.

$\endgroup$
2
  • $\begingroup$ Thanks a lot for the response! I will take a look at the approaches tomorrow. However, a question already now: What would you feed those methods? Assume I have 10 sensors facing to 2 different directions (5 each), so for every day, my data has the shape 96x10. Would you consider it sensor wise (10 data points of length 96) or timestamp-wise (96 data points of length 10), or something different? $\endgroup$
    – Alexander
    Commented Jun 16 at 17:42
  • $\begingroup$ It depends on the model and library you choose. For something that is intended for a time series such as an RNN each input should be a multivariate time series. Computational burden increases with the length of the series. How long you make each series and the amount you shift the starting point between subsequent series is really up to you. For something like item 4 you estimate a mean and covariance of your sensor data (ignoring time/autocorrelation) from your training data and apply a chi-squared test to data you are evaluating. $\endgroup$
    – noNameTed
    Commented Jul 9 at 13:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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