Thanks for conveying your interest!

You will get notified on the email you provided.
twitter Connect with us on linkedin

AI in manufacturing: anomaly detection

Jure Brence, October 2021

White, fluorescent lighting brightly illuminates a quality control hall, filled with workers at their stations. They lift up and carefully inspect each manufactured item, scanning for tiny defects in the production that only an experienced eye can discern. Unfortunately, the task is repetitive and stressful, and the employee turnover is high.

Within the bowels of a massive-forming factory, a hydraulic press produces wheel rims. The press consists of eight pumps, designed to compensate for each other should one malfunction, thus eliminating interruptions in manufacture. However, the additional stress on the overloaded pumps causes them to wear out faster. The machine is equipped with dozens of sensors, but it is very difficult for humans to spot issues in the wide collections of data the system records.

These are examples of problems in manufacturing, where anomaly detection can make a big impact. As methods of machine learning and artificial intelligence, anomaly detection models are trained to recognize examples or patterns that stand out from the norm. In some cases, the advantage of AI over humans lies in its speed, reliability and immunity to the issues related to performing menial work. In many other cases, the reason for adopting AI is its ability to search for needles in haystacks, that is, to recognize patterns in data that humans simply cannot.

Condition monitoring is a widespread practice in manufacturing today, with a huge variety of sensors measuring different physical parameters of machines and equipment. Machine learning methods are positioned perfectly to leverage the collected data, chiefly through the process of predictive maintenance. For many use cases, however, training machine learning models for prediction requires a large amount of labelled data, which largely must be constructed by human experts.

This is where modern methods of anomaly detection enter the stage. Thanks to advances in unsupervised and representation learning, these approaches can be trained on unlabeled data to recognize examples that don’t belong. Most commonly, anomaly detection relies on variational autoencoders – a type of neural network that is trained to reconstruct its input. A bottleneck in the architecture of the network ensures that the reconstruction can never be perfect, but merely a good approximation, provided we feed it familiar data. If an example is significantly different from the data the autoencoder was trained on, the reconstruction error will be large, indicating a potential anomaly.

Detecting malfunction in hydraulic press pumps

A study by B. Lindemann and others1,2 details an application of anomaly detection to the problem of detecting malfunctioning pumps in a hydraulic press. Each second, the sensors record between 100 and 2000 samples of no less than 86 different physical parameters of the machine, forming a stream of data that is indeed inaccessible to human operators. Traditional approaches to fault detection might set tolerances for the values of individuals parameters or groups of parameters, which would allow for the detection of simpler anomalies. In practice, however, successful identification of faults requires a consideration of collective behavior of several components, and even more importantly, an examination of the neighborhood of each particular data point – in other words, its context.

Neural networks have been shown to excel at learning meaningful features and taking context into consideration. In the case of time dependent data, such as the measurements of the sensors in our example, a neural network model needs some capacity for memory. Accordingly, the researchers in the study employed LSTM networks, a type of recurrent neural networks.

The models developed in the study were shown to detect anomalies in the function of the hydraulic press approximately 3.5 months before failure, early enough to be able to prevent abrupt failure of the system, as well as considerably extend the lifetime of the components.

Visual quality control

As an example of the use of anomaly detection for product inspection, let us consider a study by N. Kozamernik and D. Bračun3, in which the surface defects of metal coatings are detected through machine vision.

Traditional approaches for defect identification struggle with this problem due to high variation among coated parts and the positioning of the objects, as well as the complex 3D shape of the parts and the glossy black color of the coating. Once again, variational autoencoders are the method of choice. Since the data are images, the employed models consisted of convolutional neural networks, specifically designed to deal with visual data.

The study found that the use of autoencoders significantly improved anomaly detection, chiefly by enabling better background removal.

In both examples, models were trained on existing, archived data that required no human labelling. As such, the development of anomaly detection for these applications in practice would incur very little overhead in terms of gathering and preparing data.

Today, it is clear that automation is finding its way into many different domains, with artificial intelligence taking the central stage. Anomaly detection is certain to be part of this process.


  • Lindemann B., Fesenmayr F., Jazdi N., Weyrich M. Anomaly detection in discrete manufacturing using self-learning approaches. 12th CIRP Conference on Intelligent Computation in Manufacturing Engineering, 18-20 July 2018, Gulf of Naples, Italy.
  • Lindemann B., Maschler B., Sahlab N., Weyrich M. Survey on Anomaly Detection for Technical Systems using LSTM Networks. Computers in Industry. Volume 131, October 2021, 103498.
  • Kozamernik N., Bračun D. Visual Inspection System for Anomaly Detection on KTL Coatings Using Variational Autoencoders. Procedia CIRP. Volume 93, 2020, Pages 1558-1563.