MADJEPA: Enhanced Multi-Stage Joint-Embedding Predictive Architecture for Medical Anomaly Detection

Ioana-Sabina Stoian, Florinel-Alin Croitoru, Vlad Hondru, Andreea Iuliana Ionescu, Andrei Paun, Radu Tudor IonescuarXiv 2026 · arXiv

TL;DR

MADJEPA is a novel multi-stage framework for medical anomaly detection that leverages "world models" to learn the structural priors of healthy tissue. By combining self-supervised latent feature prediction (I-JEPA) with target encoder distillation and VLM-guided pseudo-anomaly classification, it achieves state-of-the-art performance across diverse medical imaging domains, including MRI, CT, and histopathology.

What Problem Does This Paper Address?

Medical Anomaly Detection (MAD) is a classic "needle in a haystack" problem. Unlike standard classification, where you have labeled examples of every disease, MAD usually operates in an unsupervised or self-supervised regime. The goal is to train a model on "normal" (healthy) anatomy so that it can flag anything that deviates from that norm as a potential pathology.

This is exceptionally difficult in medicine because "normal" is highly variable across patients and imaging modalities. Furthermore, traditional methods often rely on reconstruction: they try to rebuild an image and flag areas where the reconstruction error is high. However, medical images are full of high-frequency noise and irrelevant artifacts. A model might fail to reconstruct a pixel perfectly simply because of sensor noise, leading to false positives, or it might be too good at generalizing and accidentally reconstruct a tumor perfectly, leading to false negatives.

Methods

The authors propose MADJEPA, which moves away from pixel reconstruction toward predicting abstract semantic features. The architecture is built on the Image-based Joint-Embedding Predictive Architecture (I-JEPA) and refined through a three-stage pipeline:

Figure 1. Overview of MADJEPA. Our pipeline is divided into three training stages: 1⃝self-supervised training via I-JEPA; 2⃝target encoder distillation to a randomly-initialized student; 3⃝A: prompt-based pseudo-anomaly generation, and B: normal vs. pseudo-anomaly classification. Together, these training stages build a strong and calibrated representation of normal data. Best viewed in color.
  1. Stage 1: I-JEPA Training: The model learns by masking parts of an image (the "target") and tasking a predictor to guess the target's latent representations based on the surrounding "context." Because it predicts features in an abstract latent space rather than raw pixels, it ignores low-level noise and focuses on the underlying anatomical structure.
  2. Stage 2: Target Encoder Distillation: To prevent the model from becoming too flexible (over-generalizing to anomalies), the authors distill the knowledge of the I-JEPA target encoder into a "student" model trained from scratch only on normal data. When presented with an anomaly, the student—having no prior "world knowledge" of such structures—will produce a representation that diverges significantly from the teacher, providing a clear anomaly signal.
  3. Stage 3: Pseudo-anomaly Calibration: The authors use a Vision-Language Model (VLM), specifically Qwen-Image, to generate realistic-looking synthetic anomalies via prompted inpainting. A classifier is then trained to distinguish these "pseudo-anomalies" from real healthy tissue, tightening the decision boundary around the normal data manifold.

During inference, anomaly scores from all three stages are weighted and combined to produce both image-level and pixel-level (localization) results.

Datasets

The authors evaluated MADJEPA on the BMAD benchmark, a comprehensive suite of six datasets covering five distinct medical domains:

  • BraTS2021: Brain MRI (Tumors).
  • BTCV + LiTS: Liver CT (Lesions).
  • RESC & OCT2017: Retinal Optical Coherence Tomography.
  • RSNA: Chest X-ray (Pneumonia).
  • CAMELYON16: Digital Histopathology (Metastases).

Key Insights and Ideas

  • Latent Space is King: By avoiding pixel-level reconstruction, MADJEPA filters out "irrelevant" variations like background noise or imaging artifacts that often trip up simpler autoencoders.
  • The "Dumb Student" Strategy: One of the most clever aspects is using distillation to limit generalization. A powerful foundation model might be too good at representing a tumor it has never seen. By forcing a smaller student model to mimic it only on healthy data, the authors create a "discrepancy signal" that naturally spikes when something abnormal appears.
  • VLM-Powered Hallucinations: Using a VLM to generate pseudo-anomalies allows the model to see "plausible" pathologies during training. This helps the model learn a tighter, more accurate boundary for what constitutes "healthy" tissue.
  • Synergy Matters: The ablation studies showed that while I-JEPA is a strong base, it isn't enough on its own. The combination of all three stages is what allows the model to remain robust across wildly different imaging modalities.

Key Results

MADJEPA demonstrated impressive consistency, ranking first on three of the six datasets and second on another. Notably, it was the only method to surpass the 80% AUROC threshold across all six benchmarks.

  • Liver CT (BTCV+LiTS): Achieved an image-level AUROC of 84.1%, a massive +11.8% improvement over the previous state-of-the-art (SimpleNet).
  • Histopathology (CAMELYON16): Reached 82.0% AUROC, outperforming the next best baseline (MKD) by 4.5%.
  • Qualitative Localization: As shown in Figure 2, MADJEPA provides a balanced visual correspondence with ground truth, avoiding the common pitfalls of underestimating lesion size or over-activating on healthy tissue.
Figure 2. Qualitative visualizations of anomaly maps for the three benchmarks that have ground-truth segmentation maps: BTCV+LiTs, BraTS2021 and RESC. We employ the exact examples selected by Bao et al. [5] from the BMAD original paper. Best viewed in color.

Limitations and Future Work

  • Inference Latency: The inference process involves sampling $N$ target blocks (the authors used $N=30$) to generate the anomaly map. This increases the computational cost compared to single-pass methods.
  • Pseudo-anomaly Quality: The effectiveness of Stage 3 depends on the VLM's ability to generate realistic medical perturbations. If the VLM's "hallucinations" are too far from real pathologies, the calibration might be less effective.
  • Hyperparameter Sensitivity: The weights for combining the three stages ($\lambda_1, \lambda_2, \lambda_3$) currently require tuning for different datasets to achieve optimal performance. Future work could explore automated ways to balance these components.

Summary updated

Abstract

Anomaly detection in medical images is a complex task, requiring the development of a robust model using only healthy patient data. Without access to labeled data, modern approaches typically employ self-supervised learning to obtain a model of normality. Since world models promise to build strong internal representations of their environment, we consider them as suitable candidates for the medical anomaly detection environment, namely medical investigations of healthy patients. To this end, we propose MADJEPA, a medical anomaly detector based on an enhanced multi-stage joint-embedding predictive architecture (JEPA). We design a multi-stage training pipeline to produce a robust detector: (1) image-based JEPA (I-JEPA) training aims to learn a strong representation of normal training data; (2) target encoder distillation aims to modulate over-generalization of I-JEPA representations to abnormal data; (3) pseudo-anomaly classification aims to calibrate anomaly predictions by learning a tight boundary around the normal data manifold. To demonstrate our design, we carry out comprehensive experiments on six datasets covering various medical image domains (e.g.~MRI, OCT, X-ray, histopathology), comparing our MADJEPA with numerous state-of-the-art methods. The results show that our carefully designed world model, MADJEPA, attains competitive results, ranking first on three datasets. Our ablation studies further confirm the utility of each training stage, indicating that I-JEPA alone is not sufficient to obtain competitive results in medical anomaly detection. We publicly release our code at https://github.com/Sabina085/madjepa.
BibTeX
@misc{stoian2026madjepa,
  author = {Ioana-Sabina Stoian and Florinel-Alin Croitoru and Vlad Hondru and Andreea Iuliana Ionescu and Andrei Paun and Radu Tudor Ionescu},
  title = {{MADJEPA: Enhanced Multi-Stage Joint-Embedding Predictive Architecture for Medical Anomaly Detection}},
  year = {2026},
  eprint = {2611.25194},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.25194},
}
Figure