Hyper-FSAD: Training-Free and Language-Free Few-Shot Anomaly Detection via Sparse Hyper Matching
About
Few-shot anomaly detection (FSAD) is particularly valuable when only a few normal images are available in a new target domain, while anomalous cases are rare, diverse, and difficult to enumerate in advance. However, existing methods often still require task-specific fitting or language prompts, and their patch-level retrieval commonly relies on brittle nearest-neighbor or fixed Top-$p$ rules. We propose \textbf{Hyper-FSAD}, a training-free and language-free framework that performs support-only inference with a frozen visual encoder. We formulate FSAD as support-only scoring in frozen feature space and establish the selective stability of sparse retrieval and sufficient conditions for normal--anomaly separation. Guided by this analysis, \textbf{Sparse Hyper Matching} uses \textit{sparsemax} to adaptively select support patches for each query patch, exactly suppressing below-threshold distractors without a manually specified retrieval hyperparameter. \textbf{Dual-Branch Image Scoring} further combines local reconstruction discrepancies with support-conditioned global <CLS> deviation. Across four industrial and two medical benchmarks, Hyper-FSAD achieves the best overall performance across the 1/2/4-shot settings, while requiring only 52.6\,ms per image and 0.89\,GB GPU memory. The code will be released.