BayPrAnoMeta: Bayesian Proto-MAML for Few-Shot Industrial Image Anomaly Detection
Soham Sarkar, Tanmay Sen, Sayantan Banerjee
TL;DR
BayPrAnoMeta reframes few-shot industrial anomaly detection by replacing deterministic prototypes with task-specific probabilistic normality models, using a Normal-Inverse-Wishart prior to obtain a multivariate Student-$t$ predictive for robust, uncertainty-aware scoring. The method extends Proto-MAML to a Bayesian inner-loop and a likelihood-based outer-loop objective, enabling well-defined performance even when the support size is smaller than the embedding dimension. The authors further extend the framework to a federated setting with supervised contrastive regularization to handle heterogeneous, privacy-constrained clients, and prove convergence to stationary points under standard assumptions. Empirical results on MVTec AD show consistent AUROC improvements over MAML, Proto-MAML, and PatchCore, with additional gains when combining federated learning and contrastive regularization, highlighting practical benefits for safe, scalable industrial anomaly detection.
Abstract
Industrial image anomaly detection is a challenging problem owing to extreme class imbalance and the scarcity of labeled defective samples, particularly in few-shot settings. We propose BayPrAnoMeta, a Bayesian generalization of Proto-MAML for few-shot industrial image anomaly detection. Unlike existing Proto-MAML approaches that rely on deterministic class prototypes and distance-based adaptation, BayPrAnoMeta replaces prototypes with task-specific probabilistic normality models and performs inner-loop adaptation via a Bayesian posterior predictive likelihood. We model normal support embeddings with a Normal-Inverse-Wishart (NIW) prior, producing a Student-$t$ predictive distribution that enables uncertainty-aware, heavy-tailed anomaly scoring and is essential for robustness in extreme few-shot settings. We further extend BayPrAnoMeta to a federated meta-learning framework with supervised contrastive regularization for heterogeneous industrial clients and prove convergence to stationary points of the resulting nonconvex objective. Experiments on the MVTec AD benchmark demonstrate consistent and significant AUROC improvements over MAML, Proto-MAML, and PatchCore-based methods in few-shot anomaly detection settings.
