Adapting Spatial Organization Consistency for Cross-Modal Medical Anomaly Detection
Abstract
Medical anomaly detection in zero- and few-shot scenarios remains challenging due to significant domain shifts across imaging modalities and anatomical regions, where models trained on one setting often fail to generalize to unseen domains. While recent approaches leverage vision-language alignment for cross-modal adaptation, they primarily focus on semantic consistency and overlook the intrinsic stability of spatial organization in normal medical images. In this work, we introduce a Hypergraph-based Spatial Organization Module that represents image patches as nodes and captures group-wise structural dependencies through high-order hyperedges encoding spatial locality and structural similarity. To enforce structural regularity, we design a spatial consistency loss that promotes hyperedge-level coherence for normal samples while remaining tolerant to abnormal variations, and further incorporate cross-modal alignment to enhance generalization to unseen modalities. During inference, anomaly scores are derived from hypergraph deviation energy at both image and pixel levels and can be seamlessly integrated with zero-shot text-based comparison and few-shot memory mechanisms. Extensive experiments on multiple benchmarks demonstrate improved cross-domain performance in both classification and segmentation, highlighting spatial organization consistency as a powerful inductive bias for medical anomaly detection.