Statistical process monitoring of artificial neural networks
Malinovskaya, A., Mozharovskyi, P., Otto, P. (2023): Statistical process monitoring of artificial neural networks. Technometrics (DOI)
Abstract
The rapid advancement of models based on artificial intelligence demands innovative monitoring techniques which can operate in real time with low computational costs. In machine learning, especially if we consider artificial neural networks (ANNs), the models are often trained in a supervised manner. Consequently, the learned relationship between the input and the output must remain valid during the model’s deployment. If this stationarity assumption holds, we can conclude that the ANN provides accurate predictions. Otherwise, the retraining or rebuilding of the model is required. We propose considering the latent feature representation of the data (called "embedding") generated by the ANN to determine the time when the data stream starts being nonstationary. In particular, we monitor embeddings by applying multivariate control charts based on the data depth calculation and normalized ranks. The performance of the introduced method is compared with benchmark approaches for various ANN architectures and different underlying data formats.
Background
Artificial neural networks (ANNs) achieve impressive performance in many applications, but once deployed, their accuracy can deteriorate if the data distribution changes (a phenomenon known as concept drift or nonstationarity). Traditional statistical process monitoring (SPM) uses control charts to detect changes in manufacturing and other processes. This paper connects the two worlds: it introduces a monitoring framework that supervises ANN reliability in real time.
Key takeaways
- Innovation: Monitoring focuses not on raw inputs or outputs, but on embeddings — the latent features generated in hidden layers of ANNs.
- Method: These embeddings are tracked using data depth-based control charts, which are nonparametric and distribution-free.
- Benefit: Enables early detection of changes in input distributions that compromise ANN predictions.
- Applications: Tested across image, text, and signal data with different ANN architectures (CNN, LSTM, FNN).
- Performance: Asymmetric projection depth performed best, reliably flagging changes while keeping false alarms low.
Main idea
Every time an ANN processes data, it produces an internal representation in its hidden layers. These embeddings condense the essential structure of the data. The core idea is to monitor these embeddings with multivariate control charts. If the embeddings drift away from the reference distribution (built from training data), the monitoring system signals that the ANN is operating in a changed environment and may need retraining or adjustment.
Intuition and interpretation
Think of embeddings as a compressed “fingerprint” of the input. When data come from the same distribution as in training, fingerprints look familiar. When the environment changes (new data types, unobserved classes, or omitted variables), the fingerprints deviate. Control charts based on data depth quantify this deviation in real time.
Applications
- Manufacturing: monitoring sensor-based AI models for predictive maintenance.
- Health: detecting distribution shifts in diagnostic models when new patient populations are encountered.
- Finance: ensuring stable ANN forecasts when market conditions change suddenly.
- Computer vision and NLP: spotting out-of-distribution images or texts early in deployment.
Practical advice
- Use embeddings rather than raw inputs or outputs for monitoring — they balance dimensionality and information.
- Nonparametric data depth functions are robust choices, with asymmetric projection depth performing particularly well.
- Once a change is detected, investigate whether retraining, updating the reference sample, or rebuilding the model is the most cost-effective action.