Unified Anomaly Detection methods on Edge Device using Knowledge Distillation and Quantization

Read original: arXiv:2407.02968 - Published 7/4/2024 by Sushovan Jena, Arya Pulkit, Kajal Singh, Anoushka Banerjee, Sharad Joshi, Ananth Ganesh, Dinesh Singh, Arnav Bhavsar
Total Score

0

Unified Anomaly Detection methods on Edge Device using Knowledge Distillation and Quantization

Sign in to get full access

or

If you already have an account, we'll log you in

Overview

This research paper presents a unified approach for anomaly detection on edge devices using knowledge distillation and quantization techniques. The key ideas include:

  • Designing a single model that can perform multi-class anomaly detection, addressing the limitations of previous work that focused on binary classification.
  • Leveraging knowledge distillation to transfer knowledge from a larger, more accurate model to a smaller, more efficient model for deployment on edge devices.
  • Exploring different quantization-aware training methods to further optimize the model for deployment, including ADAQAT and AMED.

Plain English Explanation

The paper tackles the problem of detecting anomalies or unusual events in data using machine learning models. Traditionally, these models have been designed for binary classification, where they can only identify if something is "normal" or "anomalous." However, in many real-world scenarios, there can be multiple types of anomalies or abnormal events that need to be recognized.

To address this, the researchers developed a single model that can identify different kinds of anomalies, making it more versatile and useful in practice. They used a technique called "knowledge distillation" to transfer the knowledge from a larger, more accurate model to a smaller, more efficient model. This allows the smaller model to perform well while being suitable for deployment on edge devices, like smartphones or IoT sensors, where computational resources are limited.

Additionally, the researchers explored methods to further optimize the model for deployment, such as ADAQAT and AMED. These techniques, known as "quantization," help reduce the model's size and complexity without significantly impacting its performance.

Technical Explanation

The paper proposes a unified approach for multi-class anomaly detection on edge devices, leveraging knowledge distillation and quantization techniques. The authors first design a large, accurate model for multi-class anomaly detection, inspired by the Absolute Unified Multi-class Anomaly Detection via and DinoMALY: Less is More Philosophy for Multi-class methods.

To deploy this model on edge devices, the researchers use knowledge distillation to transfer the knowledge from the large model to a smaller, more efficient model. This helps preserve the multi-class detection capabilities while reducing the model's size and complexity.

Furthermore, the paper explores the use of quantization-aware training techniques, including ADAQAT and AMED, to further optimize the model for deployment on resource-constrained edge devices. These methods help reduce the model's memory footprint and inference time without significantly compromising its detection performance.

Critical Analysis

The paper addresses an important problem in the field of anomaly detection, particularly in the context of edge computing, where efficient and accurate models are crucial. The authors' approach of designing a unified multi-class anomaly detection model and leveraging knowledge distillation and quantization techniques is a promising solution.

However, the paper does not provide detailed discussions on the potential limitations or caveats of the proposed approach. For example, it would be valuable to understand how the unified model performs on a wider range of anomaly types and datasets, and whether there are any limitations in the types of anomalies it can effectively detect.

Additionally, while the quantization techniques mentioned, such as ADAQAT and AMED, are promising, the paper does not provide a comprehensive comparison of these methods or discuss their trade-offs in terms of model accuracy, inference speed, and memory footprint.

Further research could explore the robustness of the unified model to different types of anomalies, as well as a more in-depth evaluation of the quantization techniques and their impact on model performance in various edge device scenarios.

Conclusion

This research paper presents a unified approach for multi-class anomaly detection on edge devices, leveraging knowledge distillation and quantization techniques. The key contributions include:

  • Designing a single model capable of detecting multiple types of anomalies, addressing the limitations of previous binary classification-focused methods.
  • Using knowledge distillation to transfer knowledge from a larger, more accurate model to a smaller, more efficient model for deployment on edge devices.
  • Exploring quantization-aware training techniques, such as ADAQAT and AMED, to further optimize the model for edge device deployment.

This work has the potential to significantly impact the field of anomaly detection, especially in scenarios where efficient and accurate models are required on resource-constrained edge devices, such as IoT applications and mobile platforms.



This summary was produced with help from an AI and may contain inaccuracies - check out the links to read the original source documents!

Follow @aimodelsfyi on 𝕏 →

Related Papers

Unified Anomaly Detection methods on Edge Device using Knowledge Distillation and Quantization
Total Score

0

Unified Anomaly Detection methods on Edge Device using Knowledge Distillation and Quantization

Sushovan Jena, Arya Pulkit, Kajal Singh, Anoushka Banerjee, Sharad Joshi, Ananth Ganesh, Dinesh Singh, Arnav Bhavsar

With the rapid advances in deep learning and smart manufacturing in Industry 4.0, there is an imperative for high-throughput, high-performance, and fully integrated visual inspection systems. Most anomaly detection approaches using defect detection datasets, such as MVTec AD, employ one-class models that require fitting separate models for each class. On the contrary, unified models eliminate the need for fitting separate models for each class and significantly reduce cost and memory requirements. Thus, in this work, we experiment with considering a unified multi-class setup. Our experimental study shows that multi-class models perform at par with one-class models for the standard MVTec AD dataset. Hence, this indicates that there may not be a need to learn separate object/class-wise models when the object classes are significantly different from each other, as is the case of the dataset considered. Furthermore, we have deployed three different unified lightweight architectures on the CPU and an edge device (NVIDIA Jetson Xavier NX). We analyze the quantized multi-class anomaly detection models in terms of latency and memory requirements for deployment on the edge device while comparing quantization-aware training (QAT) and post-training quantization (PTQ) for performance at different precision widths. In addition, we explored two different methods of calibration required in post-training scenarios and show that one of them performs notably better, highlighting its importance for unsupervised tasks. Due to quantization, the performance drop in PTQ is further compensated by QAT, which yields at par performance with the original 32-bit Floating point in two of the models considered.

Read more

7/4/2024

Absolute-Unified Multi-Class Anomaly Detection via Class-Agnostic Distribution Alignment
Total Score

0

Absolute-Unified Multi-Class Anomaly Detection via Class-Agnostic Distribution Alignment

Jia Guo, Haonan Han, Shuai Lu, Weihang Zhang, Huiqi Li

Conventional unsupervised anomaly detection (UAD) methods build separate models for each object category. Recent studies have proposed to train a unified model for multiple classes, namely model-unified UAD. However, such methods still implement the unified model separately on each class during inference with respective anomaly decision thresholds, which hinders their application when the image categories are entirely unavailable. In this work, we present a simple yet powerful method to address multi-class anomaly detection without any class information, namely textit{absolute-unified} UAD. We target the crux of prior works in this challenging setting: different objects have mismatched anomaly score distributions. We propose Class-Agnostic Distribution Alignment (CADA) to align the mismatched score distribution of each implicit class without knowing class information, which enables unified anomaly detection for all classes and samples. The essence of CADA is to predict each class's score distribution of normal samples given any image, normal or anomalous, of this class. As a general component, CADA can activate the potential of nearly all UAD methods under absolute-unified setting. Our approach is extensively evaluated under the proposed setting on two popular UAD benchmark datasets, MVTec AD and VisA, where we exceed previous state-of-the-art by a large margin.

Read more

4/17/2024

🤷

Total Score

0

Dinomaly: The Less Is More Philosophy in Multi-Class Unsupervised Anomaly Detection

Jia Guo, Shuai Lu, Weihang Zhang, Huiqi Li

Recent studies highlighted a practical setting of unsupervised anomaly detection (UAD) that builds a unified model for multi-class images, serving as an alternative to the conventional one-class-one-model setup. Despite various advancements addressing this challenging task, the detection performance under the multi-class setting still lags far behind state-of-the-art class-separated models. Our research aims to bridge this substantial performance gap. In this paper, we introduce a minimalistic reconstruction-based anomaly detection framework, namely Dinomaly, which leverages pure Transformer architectures without relying on complex designs, additional modules, or specialized tricks. Given this powerful framework consisted of only Attentions and MLPs, we found four simple components that are essential to multi-class anomaly detection: (1) Foundation Transformers that extracts universal and discriminative features, (2) Noisy Bottleneck where pre-existing Dropouts do all the noise injection tricks, (3) Linear Attention that naturally cannot focus, and (4) Loose Reconstruction that does not force layer-to-layer and point-by-point reconstruction. Extensive experiments are conducted across three popular anomaly detection benchmarks including MVTec-AD, VisA, and the recently released Real-IAD. Our proposed Dinomaly achieves impressive image AUROC of 99.6%, 98.7%, and 89.3% on the three datasets respectively, which is not only superior to state-of-the-art multi-class UAD methods, but also surpasses the most advanced class-separated UAD records.

Read more

5/30/2024

🏋️

Total Score

0

AdaQAT: Adaptive Bit-Width Quantization-Aware Training

C'edric Gernigon (TARAN), Silviu-Ioan Filip (TARAN), Olivier Sentieys (TARAN), Cl'ement Coggiola (CNES), Mickael Bruno (CNES)

Large-scale deep neural networks (DNNs) have achieved remarkable success in many application scenarios. However, high computational complexity and energy costs of modern DNNs make their deployment on edge devices challenging. Model quantization is a common approach to deal with deployment constraints, but searching for optimized bit-widths can be challenging. In this work, we present Adaptive Bit-Width Quantization Aware Training (AdaQAT), a learning-based method that automatically optimizes weight and activation signal bit-widths during training for more efficient DNN inference. We use relaxed real-valued bit-widths that are updated using a gradient descent rule, but are otherwise discretized for all quantization operations. The result is a simple and flexible QAT approach for mixed-precision uniform quantization problems. Compared to other methods that are generally designed to be run on a pretrained network, AdaQAT works well in both training from scratch and fine-tuning scenarios.Initial results on the CIFAR-10 and ImageNet datasets using ResNet20 and ResNet18 models, respectively, indicate that our method is competitive with other state-of-the-art mixed-precision quantization approaches.

Read more

4/29/2024