A subscription to JoVE is required to view this content. Sign in or start your free trial.

Research Article

RareCode: An Unsupervised Deep Learning Framework for Anomaly Detection in Colorectal Cancer Histopathological Images

3 views

⸱

DOI:

10.3791/72303

⸱

September 22nd, 2026

 ,  ,  ,  ,  ,  ,  ,  , 

In This Article

Summary

This study presents RareCode, an unsupervised deep learning framework that detects anomalies in colorectal cancer histopathological images by analyzing Codebook Activation Rarity (CAR), with the potential to assist pre-screening without labeled training data.

Abstract

Unsupervised anomaly detection in histopathological images has been widely explored using reconstruction-based approaches that measure reconstruction errors, yet these methods often fail to capture subtle, semantic-level pathological variations due to the inherent heterogeneity of tissue textures. To address this limitation, this study presents RareCode, a vector quantization-based framework that extends the detection paradigm beyond pixel-level reconstruction to incorporate semantic-level codebook activation analysis. The core innovation is Codebook Activation Rarity (CAR) scoring, which profiles the activation frequency of each codebook entry during training on exclusively normal samples and flags infrequent activations as anomaly indicators at inference time, thereby complementing reconstruction errors with semantic-level discrimination. Building upon this single-scale CAR mechanism, a Multi-scale Hierarchical Codebook (MHC) module is further introduced, employing codebooks of varying sizes with learnable fusion weights to capture pathological patterns spanning from coarse tissue-level structures to fine cellular-level details. Leveraging the multi-scale design, hierarchical anomaly heatmaps are generated at each codebook granularity, providing pathologists with interpretable, multi-dimensional visual localization cues indicating both where and at what structural level anomalies occur. Five-fold cross-validation on a clinically annotated colorectal cancer histopathological image dataset obtained from Shenzhen People's Hospital demonstrates that RareCode achieves an area under the curve (AUC) of 96.82%, outperforming baseline methods. Per-class analysis showed stronger performance for cancer detection (AUC = 99.44%, specificity = 94.21%) than for inflammation detection (AUC = 94.30%, specificity = 60.44%). These findings suggest that CAR analysis may offer a promising unsupervised approach for histopathological anomaly detection, potentially aiding clinical pre-screening in colorectal cancer diagnosis.

Introduction

Reliable histopathological screening for colorectal cancer remains constrained by expert annotation and manual review, particularly when inflammatory lesions and malignancies show overlapping morphology1,2. These constraints motivate unsupervised computational approaches that learn from normal tissue without requiring exhaustive abnormal annotations3,4.

The clinical urgency of automated histopathological screening is underscored by the growing imbalance between diagnostic demand and available pathology expertise, with the diagnostic workload per US pathologist rising by over 40% in a single decade as the pathologist workforce continued to shrink5. In colorectal cancer (CRC), organized screening programs have been associated with mortality reductions of 29-68%6, yet the capacity for manual pathological review remains limited by workforce availability. An automated pre-screening system that reliably identifies suspicious cases for priority review could help alleviate this burden and improve diagnostic turnaround times. However, deploying such systems requires both high sensitivity to avoid missing true positives and adequate specificity to prevent excessive false alarms7.

Unsupervised anomaly detection (UAD) has become increasingly relevant in medical image analysis8 because it can model normal tissue distributions without requiring abnormal training labels3,9,10. Reconstruction-based models, including autoencoders, variational autoencoders, generative adversarial networks, and memory-augmented variants, identify anomalies through reconstruction errors, but high-capacity decoders may still reconstruct abnormal regions with high fidelity11,12,13,14,15,16,17. Feature-based methods such as PatchCore and PaDiM use pretrained representations, although features learned from natural images may not fully capture microscopic atypia in histopathology18,19,20,21. Pathology-specific foundation models and diffusion-based anomaly detectors provide powerful alternatives, but their data requirements or computational costs may limit their direct use in high-throughput screening22,23. Recent automated and evolutionary methods, such as EvoAAE24 and MoARNN-AM25, further illustrate the value of adaptive model optimization for anomaly detection, although their application contexts differ from histopathological image analysis. In contrast, vector quantization (VQ)-based methods impose discrete codebook constraints that can reduce identity mapping; however, existing VQ-based approaches still rely primarily on spatial reconstruction errors and underuse the semantic information contained in codebook activation patterns26,27.

Although the aforementioned methods demonstrate promising performance in general domains, their application to complex histopathological scenarios faces specific challenges. Histopathological images are characterized by complex tissue heterogeneity across multiple structural levels28. In practice, image analysis typically operates on local image patches extracted from tissue sections, and pathological diagnosis is inherently cross-scale: pathologists assess glandular and tissue morphology at low magnification while examining nuclear pleomorphism and mitotic figures at high magnification29. We identify three key limitations of current approaches: First, pathological anomalies and normal tissues exhibit high similarity in low-level visual features such as staining styles and local textures, causing reconstruction-based methods to fail in detecting subtle anomalies, as both normal and anomalous samples may produce similar reconstruction quality at the semantic level. Second, most existing methods employ single-scale feature extraction, making it challenging to simultaneously capture anomalous features at both tissue and cellular levels30,31. Third, although mainstream methods can generate pixel-level heatmaps, they often fail to intuitively capture the hierarchical attributes of anomalies, limiting the usefulness of such models as clinical diagnostic aids.

To address the above challenges, we propose RareCode, a UAD framework that explores codebook activation patterns and hierarchical feature representation at multiple levels of abstraction. The framework introduces three main components: (1) Codebook Activation Rarity (CAR) Scoring Mechanism, which computes rarity scores based on entry activation frequencies trained exclusively on normal samples, distinguishing normal from anomalous samples at the semantic level and providing complementary discriminative signals to traditional spatial reconstruction errors. (2) Multi-scale Hierarchical Codebook (MHC) Fusion Architecture, which captures pathological features at multiple levels of granularity—from coarse structural patterns to fine-grained cellular details—by employing codebooks with varying capacities, with adaptive fusion achieved through learnable weights. (3) Hierarchical Interpretable Localization Module, which leverages the multi-scale architecture to generate anomaly heatmaps at different granularities, providing pathologists with multi-scale semantically interpretable diagnostic references.

The primary hypothesis of this study was that codebook activation-frequency profiles derived from codebooks trained exclusively on normal colorectal histopathological images would encode anomaly-relevant semantic information beyond pixel-level reconstruction error, and that multi-scale integration of these complementary signals would improve the discrimination of images containing cancerous or inflammatory tissue from normal images relative to representative UAD methods, as assessed primarily by AUC. To test this hypothesis, we evaluated RareCode using 5-fold cross-validation on a clinically annotated CRC dataset and performed ablation and localization analyses to examine the contributions and interpretability of its core components.

Access restricted. Please log in or start a trial to view this content.

Protocol

This study was approved by the Clinical Research Ethics Committee of Shenzhen People's Hospital (Approval No. LL-KY-2025300-01). The requirement for informed consent was waived by the ethics committee because this retrospective study used existing histopathological images and clinical materials without direct patient contact or intervention. All clinical data and histopathological images were de-identified before analysis, and no personally identifiable information was used in this study. All data used in this research were handled in accordance with the ethical standards of the institutional and national research committees.

Framework overview
The overall architecture of the proposed UAD framework, RareCode, is illustrated in Figure 1. The framework employs a parallel dual-branch architecture. For each 512 x 512 input image, non-overlapping 32 x 32 and 64 x 64 patches are extracted as fine- and coarse-scale inputs, respectively. The 64 x 64 patches are resized to 32 x 32 before being passed to the network so that both branches share the same encoder-decoder input size while preserving different receptive fields. Encoders in each branch map the extracted features into a latent space, where the MHC module imposes discretization constraints. Subsequently, decoders reconstruct the image from quantized features to compute spatial-domain reconstruction errors. The CAR mechanism then measures the degree of semantic-level anomaly by profiling codebook activation frequencies. Finally, the model fuses reconstruction scores and CAR scores through a weighted combination to obtain image-level anomaly scores. The RareCode framework is trained end-to-end using only normal samples, requiring no anomaly annotations. The dual-branch design was used to capture both local cellular features and broader glandular structures. The MHC module was used to model these features with codebooks of different capacities.

Encoder-decoder architecture
RareCode constructs structurally independent encoders and decoders for the fine- and coarse-scale branches. Each branch uses the same encoder-decoder design but does not share parameters. The encoder consists of four convolutional blocks, each including a 3 x 3 convolution, batch normalization, ReLU activation, and dropout. The channel width increases from 64 to 128, then to 256, and the final feature map is flattened and projected into a 64-dimensional latent embedding. The decoder mirrors the encoder with a fully connected projection layer followed by four transposed convolution layers, reconstructing each patch to the original input size of the network. Reconstruction error is calculated as the mean squared error between the input and reconstructed patches. By combining this encoder-decoder structure with discrete codebook constraints, RareCode learns compact representations of normal tissue and measures deviations during inference.

Multi-scale hierarchical codebook
To capture pathological features at multiple levels of abstraction—from broad tissue patterns to localized cellular variations—the MHC module employs K discrete codebooks Set notation {Ck} from k=1 to K; mathematical sequence; formula representation. with varying capacities n1, n2, ..., nK. In the final FourScales configuration, each branch contains four codebooks with 64, 128, 256, and 512 entries, respectively, and each codebook entry has a 64-dimensional embedding. For each encoded patch feature, the nearest codebook entry is selected according to Euclidean distance. The quantized outputs from different codebooks are then fused using learnable weights normalized across codebooks. Smaller codebooks, due to stronger compression constraints, are expected to encode coarse-grained prototypical patterns that abstract away local variations, whereas larger codebooks preserve finer-grained features that capture more specific structural characteristics. For each codebook Matrix clustering equation C_k={e_k^{(i)}}_{i=1}^{n_k}, diagram for data segmentation analysis., where ek(i) Static equilibrium diagram, ΣFx=0, force vectors, educational physics concept, free-body analysis. Rd denotes the i-th embedding vector in the k-th codebook, continuous features are mapped to the discrete codebook space via nearest neighbor lookup (Eq. 1 and 2):

Mathematical optimization, formula \( q_k(z) = \arg\min \|z - e_k^{(i)}\|_2^2 \), equation image.

Equation showing Z-statistics calculation with exponential function for data analysis model.

To achieve adaptive fusion of multi-scale features, we introduce learnable weights . After softmax normalization, weighted summation is performed over the quantized outputs from each codebook (Eq. 3):

Equation for weighted sum with activation function in neural network, mathematical formula.

where σ(·) denotes the softmax function, ensuring that weights satisfy Σk σ(wk) = 1. This design enables the model to automatically adjust the contribution ratios of codebooks at different granularities based on the semantic content of the input features.

To optimize codebook learning, we adopt the standard VQ loss function (Eq. 4):

Variational quantization, equation Lvq, mathematical derivation, research study.

where sg[·] denotes the stop-gradient operation, and β = 0.25 is the commitment loss weight coefficient. The first term encourages codebook vectors to move toward encoder outputs, while the second term encourages encoder outputs to remain consistent with their corresponding codebook vectors. The complete mechanism of multi-scale VQ is illustrated in Figure 2.

Codebook activation rarity scoring
CAR measures semantic-level anomalies based on codebook activation statistics estimated from normal training samples. After model training, all normal training images were passed through the encoder and MHC module without data augmentation. For each branch and each codebook, the assignment index of every patch feature was recorded, and the number of assignments to each codebook entry was counted. The counts were then normalized to obtain the activation-frequency distribution for that codebook (Eq. 5):

Equation illustrating frequency distribution formula in statistical analysis.

During inference, each test image was processed through the same patch extraction, encoding, and nearest-neighbor codebook assignment procedure. For each assigned codebook entry, the rarity score is calculated as the negative logarithm of its activation frequency in the normal training set (Eq. 6):

Equation: Relative risk calculation \(R_k(z)=-\log(f_{X|k}(z)+\epsilon)\); mathematical analysis.

where ε is a small constant used for numerical stability. A low-frequency codebook entry, therefore, receives a higher rarity score, suggesting that the corresponding patch feature is less consistent with the learned normal-tissue distribution. Patch-level rarity scores were averaged within each image and across the fine- and coarse-scale branches to obtain an image-level rarity response.

To complement activation-frequency rarity, we also compute a percentile-based quantization distance score (Eq. 7):

Percentile function equation; used in statistical analysis; mathematical formula.

This score is derived from the Euclidean distance between each encoded feature vector and its nearest codebook entry. The distance distribution is estimated from normal training samples, and test-sample distances are converted into percentile scores. Larger percentile scores indicate that the encoded feature is more difficult to represent using the learned normal codebook prototypes.

The final CAR score combines activation rarity and quantization distance across all codebooks using the learnable codebook weights (Eq. 8):

Static equilibrium equation, Σσ(wk)·(Rk+Dk), in formula analysis diagram.

The same normalized codebook weights used for multi-scale feature fusion are applied to score-level fusion, maintaining consistency between representation learning and anomaly scoring. The resulting CAR score is calculated at the image level and is then combined with the reconstruction score to obtain the final anomaly score. The overall CAR scoring mechanism is illustrated in Figure 3.

Final anomaly score computation
We fuse spatial-domain reconstruction errors with semantic-level CAR scores. Before fusion, both scores are separately normalized using percentile-based min-max normalization to reduce the influence of extreme outliers. The final image-level anomaly score is then defined as (Eq. 9):

Static equilibrium equation; formula: S_final=(1−α)·S_recon+α·S_CLEAR; research method.

where Srecon denotes the normalized mean squared reconstruction error, reflecting sample reconstruction quality in pixel space; SCAR is the CAR score described above, capturing degrees of semantic-level anomaly. The hyperparameter α Static equilibrium diagram, ΣFx=0, force vectors, educational physics concept, free-body analysis. [0,1] controls the relative weighting between the two components, with optimal values determined on validation sets.

Training objective
The RareCode framework is trained end-to-end using only normal samples. The total training loss comprises the following components (Eq. 10):

Equation on loss function components: \( L = L_{\text{recon}}^{\text{small}} + L_{\text{recon}}^{\text{large}} + L_{\text{VQ}} \).

Each term is defined as follows: Reconstruction Loss: Reconstruction loss equation \(L_{recon}=\|p-D(z_q)\|_2^2\), mathematical formula for data analysis., measuring the mean squared error between input patches p and reconstructed patches D(zq) after quantization. This loss is applied separately to the 32 × 32 patch branch (Static equilibrium concept; ΣFx=0; equations; educational diagram; physics mechanics principles) and 64 × 64 patch branch (Static equilibrium formula L<sub>recon</sub><sup>large</sup> equation; educational diagram.) to ensure effective learning of features at both spatial scales. 

Dataset description
To evaluate RareCode, experiments were conducted on a clinically annotated CRC histopathological image dataset comprising images of colorectal tissue sections stained with hematoxylin and eosin (H&E), obtained from Shenzhen People's Hospital. All images in this dataset originate from real clinical cases. Images were digitized at 40x magnification with an original resolution of 1024 × 1024 pixels. To ensure annotation reliability and quality, all sample category labels were jointly reviewed and confirmed by two or more senior professional pathologists following a double-blind protocol.

Based on histopathological characteristics, the dataset was categorized into three classes: normal tissue (1,226 images), cancer (1,215 images), and inflammation (1,214 images). In the binary UAD setting, cancer and inflammation samples were treated as anomalous, while normal samples served as the reference distribution. This formulation reflects the intended triage task of separating cases requiring further pathological review from those that are morphologically normal.

All H&E-stained images were resized to 512 × 512 pixels before being used as network input. Stratified 5-fold cross-validation was used for evaluation. In each fold, the normal samples were first divided into training, validation, and held-out test subsets. RareCode was trained only on the training normal samples. The validation subset, which also contained only normal samples, was used for model selection, hyperparameter tuning, and selection of the fusion weight α. The held-out test set, consisting of unseen normal samples and anomalous samples including cancer and inflammation, was used only for final performance evaluation and was not used for model training, hyperparameter selection, or α selection. The representative categories, dataset structure, and validation protocol are shown in Figure 4.

Implementation details
The proposed RareCode framework and comparison baselines were implemented using PyTorch. All experiments were conducted on a workstation equipped with a single NVIDIA GeForce RTX 4060 Ti GPU (16 GB). For network architecture configuration, to capture features at different spatial extents, the dual-branch architecture processes non-overlapping patches at two scales: 32 × 32 pixels (smaller receptive field, capturing local texture patterns) and 64 × 64 pixels (larger receptive field, capturing broader spatial context), respectively. The continuous feature embedding dimension produced by both branch encoders is uniformly set to 64. In the MHC module, we configure four codebooks with different capacities for each branch, with discrete prototype quantities of 64, 128, 256, and 512, respectively.

During optimization, the network was trained end-to-end for 50 epochs with a batch size of 8. We employ the AdamW optimizer for weight updates, with an initial learning rate of 5 × and weight decay of to prevent overfitting. Additionally, to ensure smooth training convergence, a cosine annealing learning rate schedule was used, enabling finer optimization in later training stages. Patch sizes and codebook sizes were selected to balance multi-scale representation and computational cost. The final FourScales configuration was supported by ablation analysis, and α was selected on the validation set before test-set evaluation.

For the decoder-complexity ablation, a complex-decoder variant was implemented based on the FourScales configuration. This variant used the same data split, codebook sizes, training epochs, optimizer, learning rate, validation-based α selection, and evaluation metrics as the FourScales model. The basic decoder was replaced with an EMCAD-style decoder containing multi-scale depthwise convolution blocks and Convolutional Block Attention Modules (CBAM). After each of the first three transposed-convolution upsampling stages, parallel 3 × 3, 5 × 5, and 7 × 7 depthwise convolutions were applied, followed by 1 × 1 pointwise fusion, batch normalization, ReLU activation, a residual connection, and CBAM attention. CBAM included channel attention based on average- and max-pooling descriptors and spatial attention using a 7 × 7 convolution. The final stage used transposed convolution and sigmoid activation to reconstruct 32 × 32 patches.

Access restricted. Please log in or start a trial to view this content.

Results

Comparison with baseline methods
To evaluate the RareCode framework, multiple representative UAD methods were selected as baselines, spanning reconstruction-based methods (CAE32, VAE12, SAE33, MAE34, PatchSAE35), memory-augmented reconstruction (MemAE36), knowledge distillation (STFPM37), synthetic anomaly generation (DRAEM

Access restricted. Please log in or start a trial to view this content.

Discussion

The results suggest that codebook activation patterns may provide complementary information to spatial reconstruction errors. The improvement from NoCAR to the full FourScales model supports the potential contribution of CAR scoring, while the selected fusion weights indicate that semantic rarity may play an important role in the final anomaly score. One possible explanation is that CRC-related abnormalities can span different morphological scales, from nuclear atypia to glandular architectural disruption, and therefore ...

Access restricted. Please log in or start a trial to view this content.

Disclosures

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper. During the preparation of this work, we used ChatGPT to improve the language and readability of the manuscript and to assist with generating data visualization code. After using this tool, we reviewed and edited the content as needed and take full responsibility for the published article.

Acknowledgements

This research was supported by the Yong Dai Academician's Workstation (Diagnostic Technology for Autoimmune Diseases) (Wan Ke Science and Technology [2023] No. 317), the Graduate Innovation Fund Project of Hefei National Research Center for Health Science and Technology Joint Research Center for Occupational Medicine and Health Open Fund (No.OMH-2023-04), the Clinical and Translational Research Project of Anhui Province (No.202427610020132).

Access restricted. Please log in or start a trial to view this content.

Materials

List of materials used in this article
NameCompanyCatalog NumberComments
GeForce RTX 4060 Ti GPUNVIDIAN/A16 GB VRAM; single GPU used for all experiments (RRID:SCR_022858)
MatplotlibMatplotlib Development TeamVersion 3.8.4Data visualization and figure generation (RRID:SCR_008624)
NumPyNumPy DevelopersVersion 1.26.4Numerical computing and array operations (RRID:SCR_008633)
pandaspandas Development TeamVersion 2.2.3Data organization and tabular result processing (RRID:SCR_018214)
PillowPython Imaging Library / Pillow ContributorsVersion 10.3.0Image loading and preprocessing
PythonPython Software FoundationVersion 3.12.3Programming language used for model development and data analysis (RRID:SCR_008394)
PyTorchMeta Platforms, Inc.Version 2.7.0+cu118Deep learning framework used for model implementation and training (RRID:SCR_018536)
scikit-learnscikit-learn DevelopersVersion 1.4.2Cross-validation, train-test splitting, and evaluation metrics (RRID:SCR_002577)
SciPySciPy DevelopersVersion 1.13.1Statistical analysis (RRID:SCR_008058)
torchvisionPyTorch ProjectVersion 0.22.0+cu118Image preprocessing and data transformation
tqdmtqdm DevelopersVersion 4.66.4Training and evaluation progress monitoring

References

  1. Fan J, Sun Q, Di Y, et al. DIPathMamba: A domain-incremental weakly supervised state space model for pathology image segmentation. Med Image Anal. 2025;103:103563.
  2. Nan T, Zheng S, Qiao S, et al. Deep learning quantifies pathologists' visual patterns for whole slide image diagnosis. Nat Commun. 2025;16(1):5493.
  3. Lagogiannis I, Meissen F, Kaissis G, et al. Unsupervised pathology detection: a deep dive into the state of the art. IEEE Trans Med Imaging. 2024;43(1):241-252.
  4. Tian Y, Liu F, Pang G, et al. Self-supervised pseudo multiclass pre-training for unsupervised anomaly detection and segmentation in medical images. Med Image Anal. 2023;90:102930.
  5. Metter DM, Colgan TJ, Leung ST, et al. Trends in the US and Canadian pathologist workforces from 2007 to 2017. JAMA Netw Open. 2019;2(5):e194337.
  6. Shaukat A, Levin TR. Current and future colorectal cancer screening strategies. Nat Rev Gastroenterol Hepatol. 2022;19(8):521-531.
  7. Ancker JS, Edwards A, Nosal S, et al. Effects of workload, work complexity, and repeated alerts on alert fatigue in a clinical decision support system. BMC Med Inform Decis Mak. 2017;17(1):36.
  8. Litjens G, Kooi T, Ehteshami Bejnordi B, et al. A survey on deep learning in medical image analysis. Med Image Anal. 2017;42:60-88.
  9. Stepec D, Skocaj D. Unsupervised detection of cancerous regions in histology imagery using image-to-image translation. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops. 2021:3785-3792.
  10. Li Y, Lao Q, Kang Q, et al. Self-supervised anomaly detection, staging and segmentation for retinal images. Med Image Anal. 2023;87:102805.
  11. Hinton GE, Salakhutdinov RR. Reducing the dimensionality of data with neural networks. Science. 2006;313(5786):504-507.
  12. Kingma DP, Welling M. Auto-encoding variational Bayes. In: Proceedings of the 2nd International Conference on Learning Representations (ICLR). 2014.
  13. Goodfellow IJ, Pouget-Abadie J, Mirza M, et al. Generative adversarial nets. In: Advances in Neural Information Processing Systems. 2014;27:2672-2680.
  14. Lu S, Zhang W, Zhao H, et al. Anomaly detection for medical images using heterogeneous auto-encoder. IEEE Trans Image Process. 2024;33:2770-2782.
  15. Yang Z, Zhang T, Soltani Bozchalooi I, et al. Memory-augmented generative adversarial networks for anomaly detection. IEEE Trans Neural Netw Learn Syst. 2022;33(6):2324-2334.
  16. Huyan N, Quan D, Zhang X, et al. Unsupervised outlier detection using memory and contrastive learning. IEEE Trans Image Process. 2022;31:6440-6454.
  17. Jézéquel L, Beaudet J, Histace A, et al. Unified anomaly detection via multi-scale contrasted memory. IEEE Trans Image Process. 2026;35:2802-2815.
  18. Roth K, Pemula L, Zepeda J, et al. Towards total recall in industrial anomaly detection. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2022:14298-14308.
  19. Defard T, Setkov A, Loesch A, et al. PaDiM: a patch distribution modeling framework for anomaly detection and localization. In: International Conference on Pattern Recognition. Cham: Springer; 2021:475-489.
  20. Zingman I, Stierstorfer B, Lempp C, et al. Learning image representations for anomaly detection: application to discovery of histological alterations in drug development. Med Image Anal. 2024;92:103067.
  21. Jiang Y, Cao Y, Shen W. Prototypical learning guided context-aware segmentation network for few-shot anomaly detection. IEEE Trans Neural Netw Learn Syst. 2025;36(7):12016-12026.
  22. Wang X, Zhao J, Marostica E, et al. A pathology foundation model for cancer diagnosis and prognosis prediction. Nature. 2024;634(8035):970-978.
  23. Frotscher A, Kapoor J, Wolfers T, et al. Unsupervised anomaly detection in medical imaging using aggregated normative diffusion. Med Image Anal. 2026;109:103895.
  24. Zeng GQ, Yang YW, Lu KD, et al. Evolutionary adversarial autoencoder for unsupervised anomaly detection of industrial Internet of Things. IEEE Trans Reliab. 2025;74(3):3454-3468.
  25. Lu KD, Zhang BX, Xu Y, et al. MoARNN-AM: multi-objective automated recurrent neural network with attention mechanism for cyber-attack detection of UAV. IEEE Trans Consum Electron. 2026;72(1):1738-1749.
  26. van den Oord A, Vinyals O, Kavukcuoglu K. Neural discrete representation learning. In: Advances in Neural Information Processing Systems. 2017;30:6306-6315.
  27. Ghafourian A, Shui H, Upadhyay D, et al. Targeted collapse regularized autoencoder for anomaly detection: black hole at the center. IEEE Trans Neural Netw Learn Syst. 2025;36(6):10348-10358.
  28. Gao Z, Mao A, Dong Y, et al. SMMILe enables accurate spatial quantification in digital pathology using multiple-instance learning. Nat Cancer. 2025;6(12):2025-2041.
  29. Wang X, Liu H, Zhang Y, et al. Joint modeling histology and molecular markers for cancer classification. Med Image Anal. 2025;102:103505.
  30. Jin H, Shen J, Cui L, et al. Dynamic graph based weakly supervised deep hashing for whole slide image classification and retrieval. Med Image Anal. 2025;101:103468.
  31. Schmitz R, Madesta F, Nielsen M, et al. Multi-scale fully convolutional neural networks for histopathology image segmentation: from nuclear aberrations to the global tissue architecture. Med Image Anal. 2021;70:101996.
  32. Masci J, Meier U, Ciresan D, et al. Stacked convolutional auto-encoders for hierarchical feature extraction. In: International Conference on Artificial Neural Networks. Berlin: Springer; 2011:52-59.
  33. Ng A. Sparse autoencoder. CS294A Lecture Notes. 2011;72:1-19.
  34. He K, Chen X, Xie S, et al. Masked autoencoders are scalable vision learners. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2022:16000-16009.
  35. Lim H, Choi J, Choo J, et al. Sparse autoencoders reveal selective remapping of visual concepts during adaptation. In: Proceedings of the 13th International Conference on Learning Representations (ICLR). 2025.
  36. Gong D, Liu L, Le V, et al. Memorizing normality to detect anomaly: memory-augmented deep autoencoder for unsupervised anomaly detection. In: Proceedings of the IEEE/CVF International Conference on Computer Vision. 2019:1705-1714.
  37. Wang G, Han S, Ding E, et al. Student-teacher feature pyramid matching for anomaly detection. In: Proceedings of the 32nd British Machine Vision Conference (BMVC). 2021.
  38. Zavrtanik V, Kristan M, Skocaj D. DRAEM: a discriminatively trained reconstruction embedding for surface anomaly detection. In: Proceedings of the IEEE/CVF International Conference on Computer Vision. 2021:8330-8339.
  39. Niazi MKK, Parwani AV, Gurcan MN. Digital pathology and artificial intelligence. Lancet Oncol. 2019;20(5):e253-e261.
  40. Raab SS, Grzybicki DM, Janosky JE, et al. Clinical impact and frequency of anatomic pathology errors in cancer diagnoses. Cancer. 2005;104(10):2205-2213.
  41. Schömig-Markiefka B, Pryalukhin A, Hulla W, et al. Quality control stress test for deep learning-based diagnostic model in digital pathology. Mod Pathol. 2021;34(12):2098-2108.
  42. Steiner DF, MacDonald R, Liu Y, et al. Impact of deep learning assistance on the histopathologic review of lymph nodes for metastatic breast cancer. Am J Surg Pathol. 2018;42(12):1636-1646.

Access restricted. Please log in or start a trial to view this content.

Reprints and Permissions

Explore More Articles

Unsupervised LearningCodebook ActivationVector QuantizationMulti-Scale CodebookCancer DetectionSemantic Analysis