Intermediate Representations in I-JEPA Encoders Match Discriminatively Trained Baselines for Unsupervised Anomaly Detection: A Layer-Wise Mechanistic Study

Pretrained vision models are highly transferable to downstream tasks. What is less determined is the exact encoder depths at which these models form optimally useful representations. For unsupervised anomaly detection (UAD), the field has assumed that optimal representations reside in final-layer features. This paper challenges that assumption with respect to I-JEPA, an image joint-embedding predictive architecture whose pretraining task differs structurally from the discriminative models that UAD research has settled on. We evaluated six transformer blocks (8, 16, 20, 24, 28, and 32) of I-JEPA ViT-H/14 on MVTec AD (15 categories) and VisA (12 categories) using a frozen k-nearest-neighbour memory bank scorer throughout. The final block of DINOv2 ViT-L/14 serves as a reference. Three geometric metrics—within-class variance (WCV), effective rank, and normal-class separation ratio—are computed at each layer and category to characterise what actually happens to feature structure with encoder depth. The results are conclusive. Intermediate I-JEPA layers significantly outperform the final block. The optimal intermediate layer achieves a mean image-level AUROC of 0.977 on MVTec AD and 0.956 on VisA; Block 32 reaches only 0.905 and 0.752 respectively—a 7.2 pp and 20.4 pp difference driven entirely by probe-layer choice. At the optimal layer, I-JEPA surpasses DINOv2 on both benchmarks by 1.1 pp on MVTec AD and 2.2 pp on VisA. The geometry explains the pattern. Block 32 shows a 23.0-fold increase in WCV and a 2.50-fold decrease in effective rank relative to Block 24. I-JEPA’s predictive objective compresses local patch diversity into a globally coherent manifold at the final block—precisely what latent-space prediction requires, and precisely what k-NN anomaly scoring cannot use. The optimal probe depth is category-specific and tracks the spatial frequency of discriminative features: Blocks 8–16 for high-frequency textures (macaroni, PCBs), Block 24 for semantically complex objects. The effective rank profile over depth provides a practical unsupervised guide to layer selection. The performance gap between I-JEPA and DINOv2 reported in prior literature is an artifact of layer selection, not a property of the architecture.

Authors

Institutions

Publication Details

Journal
Research Square
Published
2026-12-03
DOI
https://doi.org/10.21203/rs.3.rs-9701984/v1
Primary Topic
Anomaly Detection Techniques and Applications
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

Intermediate Representations in I-JEPA Encoders Match Discriminatively Trained Baselines for Unsupervised Anomaly Detection: A Layer-Wise Mechanistic Study

Shilpi Kulshrestha, Chidera Elijah Achinike
Research Square
Anomaly Detection Techniques and Applications
preprint

Intermediate Representations in I-JEPA Encoders Match Discriminatively Trained Baselines for Unsupervised Anomaly Detection: A Layer-Wise Mechanistic Study

Shilpi Kulshrestha, Chidera Elijah Achinike
preprint en

Abstract

Pretrained vision models are highly transferable to downstream tasks. What is less determined is the exact encoder depths at which these models form optimally useful representations. For unsupervised anomaly detection (UAD), the field has assumed that optimal representations reside in final-layer features. This paper challenges that assumption with respect to I-JEPA, an image joint-embedding predictive architecture whose pretraining task differs structurally from the discriminative models that UAD research has settled on. We evaluated six transformer blocks (8, 16, 20, 24, 28, and 32) of I-JEPA ViT-H/14 on MVTec AD (15 categories) and VisA (12 categories) using a frozen k-nearest-neighbour memory bank scorer throughout. The final block of DINOv2 ViT-L/14 serves as a reference. Three geometric metrics—within-class variance (WCV), effective rank, and normal-class separation ratio—are computed at each layer and category to characterise what actually happens to feature structure with encoder depth. The results are conclusive. Intermediate I-JEPA layers significantly outperform the final block. The optimal intermediate layer achieves a mean image-level AUROC of 0.977 on MVTec AD and 0.956 on VisA; Block 32 reaches only 0.905 and 0.752 respectively—a 7.2 pp and 20.4 pp difference driven entirely by probe-layer choice. At the optimal layer, I-JEPA surpasses DINOv2 on both benchmarks by 1.1 pp on MVTec AD and 2.2 pp on VisA. The geometry explains the pattern. Block 32 shows a 23.0-fold increase in WCV and a 2.50-fold decrease in effective rank relative to Block 24. I-JEPA’s predictive objective compresses local patch diversity into a globally coherent manifold at the final block—precisely what latent-space prediction requires, and precisely what k-NN anomaly scoring cannot use. The optimal probe depth is category-specific and tracks the spatial frequency of discriminative features: Blocks 8–16 for high-frequency textures (macaroni, PCBs), Block 24 for semantically complex objects. The effective rank profile over depth provides a practical unsupervised guide to layer selection. The performance gap between I-JEPA and DINOv2 reported in prior literature is an artifact of layer selection, not a property of the architecture.

Research Square
Vivekananda Global University (IN)
Anomaly Detection Techniques and Applications
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon