Overview
Kawasaki, Japan - Toshiba Corporation has developed counterfactual generation technology for AI-based anomaly detection in infrastructure and manufacturing equipment that explains why AI classifies a case as anomalous by showing the differences between normal and anomalous sensor waveforms.
There is widespread interest in detecting anomalies by applying AI to time-series data obtained from sensors attached to equipment. While high levels of safety and reliability are required in the fields of manufacturing and infrastructure, experts need to understand the reasons behind AI judgments, in addition to judgment accuracy.
This technology takes the concept of counterfactual explanations, one of the “explainable AI” methods that makes it possible for humans to understand the results of AI decisions and the reasons behind them, and applies it to time-series data. It learns normal behavior from a training time-series waveform dataset, and when AI classifies a waveform as anomalous, it generates and visualizes which parts would need to be changed, and how, for the waveform to be classified as normal. This visualization of deviations from normal time-series data as localized waveform differences allows experts to intuitively understand the AI decision-making. In evaluations using public datasets, it was confirmed that the new technology generated higher-quality time-series counterfactuals than previous technologies of this kind. It modified only the areas classified as anomalous more accurately while successfully suppressing unnecessary deformation from the original waveform.
The technology is the result of collaboration between Toshiba Corporation and the Institute of Mathematics for Industry (IMI) at Kyushu University *1. It was presented on May 3 at the International Conference on Artificial Intelligence and Statistics (AISTATS), an international conference on machine learning and statistical science that was held in Tangier, Morocco, from May 2 to 5, 2026 *2.
Development background
The wide use of industrial IoT has spurred growing efforts to advance AI analysis of time-series data obtained from sensors attached to equipment and to more accurately and quickly detect anomalies. Previously, maintenance experts working in infrastructure and manufacturing inspected waveforms visually and determined the presence or absence of anomalies from changes in shape, patterns, and features and other factors *3.
These are fields that require high levels of safety and reliability, and even when AI is used for anomaly detection, there is still a need to visually interpret which parts of a waveform differ from normal behavior, and how, and which parts were the deciding factors in the AI’s judgment of anomaly.
Research into AI-based classification of time-series data as normal or anomalous, and the evaluation of benchmarks, remain active. The developed technologies learn features from the waveform, and the AI infers probabilistically whether the input waveform is in a normal or anomalous state. This is expressed as the “classifier score.”
The final classification of an input as normal or anomalous is based on whether the score exceeds a preset threshold value. Calculation methods include gradient-based methods, such as neural networks, where the score changes continuously in response to small waveform changes, and non-gradient-based methods, where the score changes discretely. Recent research has shown gradient-based methods to be effective for image recognition, while non-gradient-based judgement methods can be superior in terms of accuracy and runtime for time-series classification. However, conventional explainable AI methods often assume gradient-based classifiers, making them difficult to apply to AI models for time-series waveform data.
Another factor is that, in infrastructure and manufacturing equipment, the frequency of anomalies is low, and it can be difficult to collect sufficient anomalous data for training. This is driving demand for AI that can be trained using only normal data but that is also able to detect anomalies and explain the reasons for its decision-making.
Features of the technology
Against time-series waveform data classified as anomalous by AI, the technology generates time-series counterfactuals so that it would be classified as normal.
Figure 1: Example of applying a conventional gradient-based explainable AI method to simulated equipment anomaly data. The horizontal axis is time and the vertical axis is sensor value. The background highlights show areas where the changes between the original anomalous time-series data (orange curve) and the generated time-series counterfactual (blue curve) are large.
The technology performs time-series counterfactual generation to visualize the reasons for anomaly detection in two stages: a training stage and a deployment stage (Figure 2).
In the training stage, the waveform features that cause the AI judgment score to fall within the normal range are used to form clusters in feature space, using normal time-series data, which are relatively easy to collect (Figure 3A). In the deployment stage, the technology identifies how far and to where the feature values of an anomalous waveform should be moved in the feature space, such as to correspond to the feature values of a normal waveform, by moving them toward the centroids of clusters representing normal regions. This can be done even when the AI is non-gradient-based (Figure 3B). More specifically, it changes the feature values of the original anomalous waveform into those of a normal waveform by moving them toward the centroids of the normal-region clusters, thereby generating a waveform with minimal changes from the original - namely, a time-series counterfactual.
In the deployment-stage process, the technology solves an optimization problem that minimizes the number of modified locations, under the constraint that the feature values remain within the learned normal regions in feature space. In general, it is difficult to quickly find the true optimal solution to this kind of optimization problem; the new technology, however, uses an algorithm developed just to do that, and the core algorithm has been shown theoretically to obtain an optimal solution. These techniques allow the technology to be applied to anomaly detection, and also present the reasons for anomaly detection as localized disruptions in the waveform, enabling the fast generation of highly explainable time-series counterfactuals even for non-gradient-based AI. In the research work that obtained these results, IMI at Kyushu University provided theoretical support from a mathematical perspective, while Toshiba proposed, developed, and evaluated the technology.
In benchmark evaluations, the company used QUANT *4, a highly accurate AI-based method for classifying normal and anomalous time-series data, to evaluate the technology on 26 public time-series datasets in both anomaly-detection and classification settings. The results showed that, compared with conventional technologies, the new technology generates high-quality time-series counterfactuals that suppress unnecessary deformation from the original waveform with statistical significance.
Another characteristic of the technology is that it separates the AI that performs judgments from the AI that provides explanations. This realizes more flexible integration with the latest high-performance anomaly detection models based on technologies than with OCLTS *5, a highly explainable AI, announced by Toshiba in 2018, that learns using only normal waveform data and detects anomalies.
Future developments
Toshiba will apply the new technology to anomaly detection for infrastructure and manufacturing equipment, where safety and reliability are required, with the aim of early practical use.
- “Toshiba Corporation Researcher Appointed as Professor at Kyushu IMI Through Cross Appointment System” News Release
https://www.global.toshiba/jp/technology/corporate/rdc/rd/topics/25/2503-02.html (Japanese) - Akihiro Yamaguchi, Shizuo Kaji, Kaname Matsue, Ryusei Shingaki (2026) “Counterfactual Explanations via Latent Structure for Time Series Classification”, The 29th International Conference on Artificial Intelligence and Statistics (AISTATS 2026)
- Information representing features of the sensor waveform. For example, the mean value or magnitude of variations in sensor waveforms.
- A time-series classification method that uses multiple time-series representations consisting of first-order differences, second-order differences, and Fourier coefficients in addition to the raw time-series waveform data, segments these into multiple fixed segments, extracts the quantiles in each segment as feature values, and performs classification using the extra trees classifier. This method was proposed by Dempster et al. (2024) in https://doi.org/10.1007/s10618-024-01036-9.
- “Toshiba Develops Explainable AI for Detecting Anomalies by Training Using Only Normal Time-Series Waveform Data” News Release
https://www.global.toshiba/jp/news/corporate/2018/12/pr1301.html (Japanese)

