Masked Auto-Encoder Reconstruction for Zero-Shot Anomaly Detection
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Anomaly detection is challenging due to the rarity of anomalies and their unpredictable forms, making supervised training less feasible, and existing methods struggle with zero-shot and few-shot scenarios, especially in foreign object detection.
Innovation Solution
A masked auto-encoder (MAE) system that randomly masks tokens using different masks, processes these subsets via a pretrained encoder and decoder to output intermediate representations, and compares input images with reconstructed images to generate anomaly scores, enabling both zero-shot and few-shot anomaly detection.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If supervised training is used for anomaly detection, then detection accuracy for common anomalies can be improved, but the method becomes infeasible for rare and unpredictable anomalies
Solution Approach 1:
The patent inverts the traditional supervised training approach by using unsupervised learning on normal data only. Instead of training the model to recognize anomalies directly, the system trains it to reconstruct normal patterns, and anomalies are detected by measuring reconstruction errors. This inversion enables the system to handle rare and unpredictable anomalies without requiring supervised training data.
Solution Approach 2:
The patent uses a masked autoencoder to create reconstructed copies of normal input data. The model learns to copy normal patterns by reconstructing masked portions of normal data, and any significant deviation in reconstruction error indicates the presence of an anomaly. This copying mechanism allows the system to generalize to unseen anomaly types.
2Reliability
If existing anomaly detection methods are used, then some detection capability can be achieved, but performance in zero-shot and few-shot scenarios remains insufficient
Solution Approach 1:
The patent performs preliminary unsupervised training on normal data before actual anomaly detection. The masked autoencoder is pre-trained to learn normal patterns and reconstruction capabilities, which prepares the model for zero-shot and few-shot anomaly detection without requiring anomaly examples during training. This preliminary action on normal data alone enables high performance in scenarios with limited anomaly data.
3Ease of operation
If traditional anomaly detection approaches are used, then general detection can be performed, but effectiveness in foreign object detection is limited
Solution Approach 1:
The patent applies local quality analysis by using patch-based processing and computing reconstruction errors at local regions. The masked autoencoder processes local patches independently, and reconstruction errors are calculated for each patch to identify foreign objects. This local analysis approach enables precise detection of foreign objects while maintaining general detection capability through the overall reconstruction error aggregation.
Data Source
AI summary
An example system includes a processor that can randomly mask tokens using different masks to generate different subsets of masked tokens. The processor can process the different sets of masked tokens via a pretrained masked auto-encoder (MAE) encoder to output intermediate representations. The processor can process the intermediate representations via a pretrained MAE decoder to output reconstructed images. The processor can further compare input image with the output reconstructed images to generate an anomaly score.


