Mojtaba Nafez
· 6 previous affiliations
- Idiap Research InstituteSince 2026
- Research Assistant · Since 2026
- Graduate Research Assistant · 2022–2026
- Doctor of Philosophy - PhD, EDEE · 2026
- Sharif University of Technology2022–2025
- Master's degree, Computer Science · 2022–2025
- Head Teaching Assistant · 2024
- Teaching Assistant · 2023–2024
- Undergrad student · 2017–2022
- Research Assistant · 2021
- Aimedic MMT Co., Ltd. (Japan)2021
- Machine Learning Engineer · 2021
Research Overview
Mojtaba Nafez focuses on the trustworthiness and reliability of machine learning models, with a particular emphasis on adversarial robustness and anomaly detection in computer vision. His trajectory spans from identifying backdoor vulnerabilities in neural networks to developing robust defenses for video and image anomaly detection. Recent work investigates the use of synthetic pseudo-anomalies and contrastive learning to fortify vision transformers against adversarial attacks.
Research Trajectory
The early focus of his published research centers on analyzing and mitigating vulnerabilities in deep neural networks, particularly concerning hidden backdoors and out-of-distribution (OOD) data. With collaborators, he investigated methods to identify compromised models without requiring prior knowledge of the specific attack type. In Scanning Trojaned Models Using Out-of-Distribution Samples, he participated in the development of TRODO, a detection framework that hunts for "blind spots" in a model's decision boundaries. The study demonstrated that backdoored models exhibit jagged decision boundaries around OOD samples, a structural flaw that can be leveraged for detection even when models have undergone adversarial training or when the original training data is unavailable. This work contributed to the broader area of The Mechanics of Backdoor Persistence in Neural Networks.
Building on this foundational interest in model robustness, his research shifted toward securing anomaly detection systems, particularly in the complex domain of video analysis. Weakly Supervised Video Anomaly Detection (WSVAD) models are notoriously vulnerable to adversarial attacks, and standard defenses often fail under weak supervision. To address this, he introduced FrameShield: Adversarially Robust Video Anomaly Detection, an end-to-end adversarial training pipeline. Central to this approach is a novel synthetic anomaly generator called Spatiotemporal Region Distortion (SRD), which creates temporally consistent distortions. By combining frame-level pseudo-labels with these synthetic anomalies, the method reduces pseudo-label noise and enables effective adversarial training, significantly improving robustness across major benchmarks without sacrificing performance on clean data.
Expanding the scope of anomaly detection to handle benign environmental variations, he contributed to A Contrastive Teacher-Student Framework for Novelty Detection under Style Shifts. Standard detectors frequently fail when confronted with "style shifts"—minor environmental changes such as lighting or weather variations. This research addresses the problem by crafting auxiliary OOD samples that distort core object features while preserving the environmental style. Utilizing a contrastive teacher-student strategy, the framework achieves substantial improvements in robust detection across diverse real-world and synthetic datasets. This methodology advances the research direction of Knowledge Distillation for Anomaly Detection and explores challenges related to The Synthetic to Real Anomaly Generalization Gap.
Further investigating the intersection of contrastive learning and adversarial defense, he co-developed the COBRA framework in Adversarially Robust Anomaly Detection through Spurious Negative Pair Mitigation. This work addresses challenges in the area of The Adversarial Vulnerability of Out-of-Distribution Detectors by generating high-quality pseudo-anomalies directly from normal training data. A key innovation of this research is the introduction of a novel contrastive loss designed to ignore "spurious negative pairs"—normal samples that are erroneously pushed apart during training. By mitigating issues found in the area of Semantic Collision and False Negatives in Contrastive Learning, the approach prevents the degradation of the learned representation, thereby tightening decision boundaries and improving detection accuracy under adversarial attacks. This aligns with his ongoing contributions to the broader direction of Tightening Decision Boundaries via Synthetic Outlier Generation.
Most recently, his research has extended these robustness principles to Vision Transformer (ViT) architectures, focusing on both the detection and precise localization of anomalies. He introduced PatchGuard: Adversarially Robust Anomaly Detection and Localization through Vision Transformers and Pseudo Anomalies, a framework designed to secure industrial and medical image analysis systems against adversarial perturbations. By leveraging foreground-aware pseudo-anomalies and a custom loss function, PatchGuard enhances the resilience of attention mechanisms within ViTs, demonstrating that synthetic anomaly generation can effectively harden complex transformer-based localization systems.
Current Directions
The most recent papers in the evidence address the adversarial vulnerabilities of complex anomaly detection and localization systems, particularly those utilizing Vision Transformers. Current work investigates the generation of synthetic pseudo-anomalies to simulate out-of-distribution data, enabling more effective adversarial training without requiring labeled anomalous samples. This involves refining contrastive learning objectives to avoid spurious negative pairs and ensuring that models remain robust to both malicious perturbations and benign environmental style shifts. A major ongoing theme is the development of end-to-end pipelines that can maintain high accuracy on clean data while providing strong theoretical and empirical defenses against adversarial attacks in both image and video domains.
Profile updated
Loading new papers…
Other researchers whose papers cluster into the same research directions — a proxy for overlapping technical interests and shared intellectual neighborhoods.
See something wrong? Report a mistake