Support for autoencoders

I’ve had some luck using autoencoders for anomaly detection, and they sometimes performed better than other methods (like the Mahalanobis Distance). I would love to see autoencoders added as another possible option for clustering and anomaly detection.


@ShawnHymel I’d be interested to hear more about your setup, we’ve been experimenting over the summer with anomaly detection using autoencoders (mostly on spectrograms) and were underimpressed with results (@04rlowe did the research) - which is why we opted to keep it out for now. If you have an interesting usecase and some data that shows better results would be very interested in adding it - autoencoders have always striken me as something that would fit anomaly detection very well.

1 Like

@janjongboom It’s a pretty small dataset and not scientific at all, but I tinkered with autoencoders earlier this year to make an anomaly detection system for motors (specifically, my ceiling fan). Here is my setup with links to the write-ups and videos I made for Digi-Key:

I was taking simple FFT slices over time and feeding them to the anomaly detection system. I found that the Mahalanobis distance was better (and more efficient) when you could guarantee that the fan was in the same position in deployment as in training. However, the autoencoder was a more robust model that could easily find anomalies if the fan had been moved. I’m sure there are some things that could be done to the data (filtering, dropping some FFT bins) to make the Mahalanobis distance work better, but both seemed to have the strengths and weaknesses.

@dansitu could you take a look ^

1 Like

I’d love to add a similar simple autoencoder like this as a learn block and see what the community can build with it :mechanical_arm:


Any news with the autoencoder block?

I am experimenting with sound anomaly detection using an autoencoder. Simple stuff, take an fft from a short audio sample then feed a simple autoencoder. Looks very promising at least for my use case.

I was trying a custom training block following this [GitHub - edgeimpulse/example-custom-ml-block-keras: Custom Keras ML block example for Edge Impulse] link however the training block is associated with a classifier and of course I am geting an error because the classifier expects at least two classes in input.

Can you recommend a workaround with my custom training block?