Data-Aware Optimization for Dual-Frozen ViT Distillation in Unsupervised Anomaly Detection*
Abstract
Teacher-student distillation based on normal samples has been widely adopted in Unsupervised Anomaly Detection (UAD). Incorporating Vision Transformers (ViTs) into this task enhances global representation capability; however, existing methods still suffer from feature instability caused by pseudo-activation phenomena and the high optimization cost of full-parameter fine-tuning. To address these issues, this paper proposes a Dual-Frozen ViT Distillation (DFVD) framework, which freezes both teacher and student backbones. The teacher branch introduces a test-time register mechanism to suppress pseudo-activations and provide stable targets, while the student branch integrates learnable prompt tokens and lightweight adapters for feature alignment. By optimizing only lightweight modules, the framework enables parameter-efficient adaptation while preserving the representation capability of pretrained ViTs. Experiments on the MVTec AD benchmark demonstrate the effectiveness of the proposed method for anomaly detection and localization.