Papers › Self-Supervised Masked Convolutional Transformer Block for Anomaly Detection

Self-Supervised Masked Convolutional Transformer Block for Anomaly Detection

25 Sep 2022arXiv:2209.12148archive 2025-07-28

Neelu Madan, Nicolae-Catalin Ristea, Radu Tudor Ionescu, Kamal Nasrollahi, Fahad Shahbaz Khan, Thomas B. Moeslund, Mubarak Shah

Anomaly detection has recently gained increasing attention in the field of computer vision, likely due to its broad set of applications ranging from product fault detection on industrial production lines and impending event detection in video surveillance to finding lesions in medical scans. Regardless of the domain, anomaly detection is typically framed as a one-class classification task, where the learning is conducted on normal examples only. An entire family of successful anomaly detection methods is based on learning to reconstruct masked normal inputs (e.g. patches, future frames, etc.) and exerting the magnitude of the reconstruction error as an indicator for the abnormality level. Unlike other reconstruction-based methods, we present a novel self-supervised masked convolutional transformer block (SSMCTB) that comprises the reconstruction-based functionality at a core architectural level. The proposed self-supervised block is extremely flexible, enabling information masking at any layer of a neural network and being compatible with a wide range of neural architectures. In this work, we extend our previous self-supervised predictive convolutional attentive block (SSPCAB) with a 3D masked convolutional layer, a transformer for channel-wise attention, as well as a novel self-supervised objective based on Huber loss. Furthermore, we show that our block is applicable to a wider variety of tasks, adding anomaly detection in medical images and thermal videos to the previously considered tasks based on RGB images and surveillance videos. We exhibit the generality and flexibility of SSMCTB by integrating it into multiple state-of-the-art neural models for anomaly detection, bringing forth empirical results that confirm considerable performance improvements on five benchmarks. We release our code and data as open source at: https://github.com/ristea/ssmctb.

PaperPDFCode

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

Code

ristea/ssmctb officialmentioned in papermentioned on GitHubpytorchNOASSERTION report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

Not run by Syntology. Nothing on this page verifies that the listed code works.

Tasks

Anomaly DetectionEvent DetectionFault DetectionOne-Class Classification

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Anomaly Detection CUHK Avenue Background-Agnostic Framework+SSMCTB AUC 93.2% #5 of 35 Archive leaderboard report
Anomaly Detection CUHK Avenue Background-Agnostic Framework+SSMCTB FPS 24 #5 of 35 Archive leaderboard report
Anomaly Detection CUHK Avenue Background-Agnostic Framework+SSMCTB RBDC 66.04 #5 of 35 Archive leaderboard report
Anomaly Detection CUHK Avenue Background-Agnostic Framework+SSMCTB TBDC 65.12 #5 of 35 Archive leaderboard report
Anomaly Detection MVTec AD DRAEM+SSMCTB Detection AUROC 98.7 #53 of 148 Archive leaderboard report
Anomaly Detection MVTec AD DRAEM+SSMCTB Segmentation AUROC 97.2 #53 of 148 Archive leaderboard report
Anomaly Detection MVTec AD NSA+SSMCTB Detection AUROC 97.7 #75 of 148 Archive leaderboard report
Anomaly Detection MVTec AD NSA+SSMCTB Segmentation AUROC 96.7 #75 of 148 Archive leaderboard report
Anomaly Detection ShanghaiTech SSMTL+++SSMCTB AUC 83.6% #11 of 31 Archive leaderboard report
Anomaly Detection ShanghaiTech SSMTL+++SSMCTB RBDC 47.73 #11 of 31 Archive leaderboard report
Anomaly Detection ShanghaiTech SSMTL+++SSMCTB TBDC 85.65 #11 of 31 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections