Expert Systems are the ASCIs of AI – Machine Learning the CPUs

Machine Learning

One of my colleagues led a workshop on AI in manufacturing recently and a comment of one of the participants deserves a deep dive. “We don’t need expensive ML servers,” she said, “we can just code this up in SQL.”

At the heart of this comment is a fundamental misconception that artificial intelligence equals expert systems when in reality we have far advanced beyond those by now. Sophisticated machine learning algorithms have replaced expert systems for all but a few limited, easy, and highly structured applications.

In this blog, we’ll take a look at what expert systems are and how they compare to machine learning algorithms.

What are expert systems?

Expert systems are essentially coded up decision trees that are informed by human experts. They are useful for processes where distinct decisions need to be made in sequential order and there are no “shades of grey” to the answers. Another important condition is that the expert knowledge can be translated into a measurable input, e.g. certain temperature, color, shape, etc. However, these models don’t work very well with ambiguous, nonquantifiable information. A doctor saying “patients have unusual muscle tics in their faces that I recognize from experience” is not useful when developing an expert system.

In a sense, expert systems are like ASIC chips: they perform a limited set of functions and they do that very well, but it’s impossible to coax them into exceeding their programming.

Expert systems are quite useful; one great example of an application of expert systems are diagnostic applications – for humans as well as machines. For an extremely simple example, think of an engine that occasionally overheats and needs to be turned off. The expert would determine the critical temperature at which the engine needs to shut off, say 80 degrees Celsius. A programmer then writes an algorithm and the decision to shut the engine off when the temperature – as measured by a thermometer – exceeds the critical threshold that is hardcoded into the expert system.

machine learning

Things can get a lot more complicated quickly as this example from a scientific publication [1] shows were a decision tree is used to make health predictions about hepatitis B patients.

Machine Learning

Looking at these examples, it becomes clear that expert systems run into problems as soon as variability and uncertainty are introduced.

These are the situations where machine learning shines.

Machine learning algorithms: learning like a human

Machine learning algorithms learn like humans, by “seeing” examples and being told what they see. Based on this training, the algorithms learn to identify and categorize objects. In one of the earliest and most well-known examples, machine learning was used to correctly tell cats and dogs or chihuahuas and blueberry muffins apart.

So rather than developing and coding up a highly structured decision process, learning is done in an unstructured way that relies on the algorithm “getting” the difference between a chihuahua’s nose and eyes and blueberries in dough.

ML is more like a CPU, powerful and best suited for situations where flexibility is needed.

In manufacturing, examples that call for decision making in an unstructured process are abundant in quality inspection and predictive maintenance.

Straight labels and …

Labels on a can are a great example of visual inspection. There are many ways to get a label on wrong: it can be too low or high, it can be crooked, upside down, wrinkled or ripped, it can be any combination or all of the above or it can be missing entirely. The great variability in parameters is highly challenging for expert systems. While the first step “Label Attached” vs. “Label Not Attached” is binary and easily codable, crookedness is already laborious to establish and “wrinkledness” or “has a tear” are pretty much impossible to describe mathematically.

Additionally, relying on accurate measurements such as “Is the bottom edge of the label no less than 1/8 of an inch and no more than 3/16 of an inch from the bottom of the can” to make decisions requires expensive, very high-performance cameras that are nevertheless susceptible to external factors, such as changing light conditions or the slightest of movements.

ML algorithms, in contrast, learn to identify what a perfect or at least good enough (as determined by the manufacturer) can looks like by seeing 1,000s of good and defective ones. They then flag those units that fall outside of their “understanding” of good. In a second step, the algorithm can be trained to categorize defects. While it might not be crucial to know whether a label is slightly tilted to the right or left, understanding how often these various defects occur can help with root cause analysis and defect avoidance in the future.

… working pumps

Equipment maintenance is often performed strictly on a schedule which leads to 1) waste due to servicing the equipment too early or 2) interruptions to production due to equipment failure. While expert systems can support maintenance using decisions trees (Maintenance performed within the last 6 months? Yes/No? Pump pressure exceeds threshold? Yes/No?), this approach is still fairly coarse.

Using ML can help to identify critical variables and – comparing data over time – identify tell-tale warning indicators and calculate the remaining useful life of the equipment. We have seen this first hand with one of our customers; after being fed months of data from various sensors the customers in-house experts had identified as potentially relevant, the ML algorithms returned amperage as the most critical and useful indicator of impending pump failure. As the pump ages, it has to work harder and harder to do its job and amperage increases noticeably. The customer now monitors this indicator and services the pump when needed rather than on a set schedule.

As ML algorithms can’t do without expert knowledge, experts need to annotate the input (such as pictures) as good or defective (and/or the defect category) to allow the algorithms to learn. In the case of predictive maintenance, experts are critical in identifying an array of possible critical factors that are then measured and fed into the algorithms for them to determine the most critical ones. But once the experts have provided that input, the algorithms learn flexibly and adjust as new information becomes available.

Twenty years ago expert systems where the best artificial intelligence had to offer. They still serve a useful purpose but for many manufacturing applications machine learning delivers superior performance and higher cost savings.

Do you have any questions about how you can use machine learning on your shopfloor? Just contact us, we are happy to discuss.

References

[1] A. Albu, “From logical inference to decision trees in medical diagnosis,” 2017 E-Health and Bioengineering Conference (EHB), 2017, pp. 65-68, doi: 10.1109/EHB.2017.7995362.