Papers
Topics
Authors
Recent
Search
2000 character limit reached

MammoFormer: Explainable Mammography AI

Updated 8 July 2026
  • MammoFormer is an explainable clinical framework combining transformer and CNN architectures for accurate breast cancer detection.
  • It systematically evaluates multiple image enhancement methods such as AHE and HOG to optimize model performance.
  • The framework integrates various XAI techniques to provide interpretable results that align with clinical annotations.

Searching arXiv for MammoFormer and closely related mammography transformer work. MammoFormer is an explainable deep learning framework for breast cancer detection from mammography that combines transformer-based architectures, architecture-specific image enhancement, and multiple explainable AI (XAI) techniques within a single comparative and deployment-oriented system (Peter et al., 8 Aug 2025). In the source paper, the name does not denote one fixed transformer network alone; rather, it refers to a unified framework that systematically compares multiple model families and enhancement pipelines, integrates interpretability methods, and culminates in a tiered ensemble workflow for clinical use (Peter et al., 8 Aug 2025). The framework is motivated by two stated limitations of conventional CNN-based mammography systems: difficulty in jointly capturing local image evidence and broad contextual structure, and insufficient interpretability for clinical adoption (Peter et al., 8 Aug 2025).

1. Definition and scope

MammoFormer is presented as a clinically oriented framework for breast cancer detection in mammography, with explicit emphasis on subtle abnormalities such as architectural distortions, microcalcifications, and spiculated masses, as well as on inter-reader variability in radiologic interpretation (Peter et al., 8 Aug 2025). The paper argues that mammography is a setting in which long-range spatial dependencies and global tissue context can matter, and therefore motivates the use of transformer architectures alongside CNN baselines (Peter et al., 8 Aug 2025).

A central point of definition is that MammoFormer is not merely a single end-to-end transformer. The framework comprises three coordinated elements: a comparative evaluation across multiple architectures, a comparative evaluation across multiple enhancement methods, and an explainability layer spanning several XAI techniques (Peter et al., 8 Aug 2025). The deployment recommendation is likewise not transformer-exclusive. The paper explicitly proposes a three-tier ensemble workflow in which ResNet-50 on original mammograms serves as the primary screening model, with ViT + AHE and Swin + HOG acting as contextual validators for more complex cases, followed by weighted voting and human-review escalation in cases of disagreement (Peter et al., 8 Aug 2025).

This framing distinguishes MammoFormer from mammography models that are transformer-centric in a narrower architectural sense. A plausible implication is that the term functions more as the name of a clinical AI framework than as the label of a single canonical backbone.

2. Data basis and task formulation

The experiments in MammoFormer use CBIS-DDSM as the sole explicitly reported dataset (Peter et al., 8 Aug 2025). The paper reports the following dataset characteristics: 6,775 studies, 6,775 series, 1,566 participants, and 10,239 images, with JPEG images converted from original DICOM and a total image size of 6 GB in JPG format, compared with an original dataset size of 163 GB (Peter et al., 8 Aug 2025). Standard mammographic views are present, specifically CC and MLO, and the dataset includes metadata on breast characteristics, abnormality descriptions, assessment classifications, and pathology labels (Peter et al., 8 Aug 2025).

The dataset is also described as containing calcifications and masses, as well as full mammograms: 2,794, cropped ROI images: 3,247, and segmentation masks: 3,567 (Peter et al., 8 Aug 2025). The paper states that normal, benign, and malignant cases are present with pathological verification, but its final label formulation is not fully consistent across sections (Peter et al., 8 Aug 2025). The clearest formal definition appears in the loss-function section, where labels are specified as yi=0y_i = 0 for benign and yi=1y_i = 1 for malignant, indicating a binary image-classification task centered on benign vs malignant discrimination (Peter et al., 8 Aug 2025). The paper also notes that it does not clearly explain how normal cases were handled in the final training labels (Peter et al., 8 Aug 2025).

Several aspects of cohort construction remain underspecified. The study reports preprocessing steps, training and validation monitoring, and test-case evaluation metrics, but does not explicitly provide train/validation/test proportions, whether patient-level splitting was enforced, or whether synthetic data were confined to training only (Peter et al., 8 Aug 2025). The paper further states that preprocessing involved the creation of artificial testing samples, that balancing and augmentation produced a final dataset containing one thousand images from each specified group, and that synthetic mammogram images were generated to mimic benign and malignant patterns; however, it does not specify the exact final sample count, the precise class counts in each split, or the synthetic-versus-real composition (Peter et al., 8 Aug 2025). This ambiguity is a material feature of the reported methodology rather than a secondary omission.

3. Pipeline, preprocessing, and enhancement strategy

The MammoFormer pipeline begins with CBIS-DDSM mammograms and applies preprocessing that includes metadata CSV path correction, exploratory data analysis, image formatting standardization, resizing to 224 × 224 pixels, conversion to RGB, and generation of enhanced image variants (Peter et al., 8 Aug 2025). The framework then constructs four input representations: original image, negative transformation, adaptive histogram equalization (AHE), and histogram of oriented gradients (HOG) (Peter et al., 8 Aug 2025). Each representation is passed through multiple architectures under a common training protocol using cross-entropy loss, AdamW, step-decay learning rate, 10 epochs, and selection of the best model by validation accuracy (Peter et al., 8 Aug 2025).

The augmentation set is explicitly defined as horizontal flipping, vertical flipping, rotation, brightness adjustment, and contrast adjustment, summarized by

T(x)={fi(x)fiF,  i=1,2,,n}T(x) = \{ f_i(x) \mid f_i \in F,\; i = 1,2,\ldots,n \}

where xx is the original image and FF is the set of augmentation functions (Peter et al., 8 Aug 2025).

Among the four enhancement strategies, only the negative transform is formalized mathematically in the paper: Ineg=255IoriginalI_{\text{neg}} = 255 - I_{\text{original}} with the stated purpose of inverting brightness to reveal subtle density variations (Peter et al., 8 Aug 2025). AHE is described as optimizing contrast in dense tissue regions, while HOG is described as extracting gradient features associated with architectural distortions in malignant conditions; the paper does not provide equations for either method (Peter et al., 8 Aug 2025).

A core empirical claim of MammoFormer is that enhancement should be architecture-specific rather than generic (Peter et al., 8 Aug 2025). Reported results show markedly different enhancement sensitivities across models. For ViT, performance is reported as 94.0% on original images, 54.3% with negative preprocessing, 98.3% with AHE, and 99.0% with HOG (Peter et al., 8 Aug 2025). For Swin Transformer, the corresponding values are 83.3%, 91.3%, 51.7%, and 96.3% (Peter et al., 8 Aug 2025). For Dense Transformer, the best reported result is with negative preprocessing: 99.9%, compared with 91.7% on original images, 94.0% with AHE, and 95.0% with HOG (Peter et al., 8 Aug 2025). The paper also states that HOG yielded the highest average performance overall, with 98.4% average accuracy across models (Peter et al., 8 Aug 2025).

This enhancement-centric design is one of the framework’s defining properties. Unlike mammography systems that treat preprocessing as a fixed front-end, MammoFormer makes preprocessing-model pairing itself an object of systematic optimization.

4. Architecture families and optimization protocol

The paper evaluates multiple architecture families, but the architecture inventory is not entirely consistent across sections (Peter et al., 8 Aug 2025). Table 4 emphasizes seven architectures: CNN, ResNet, ViT, Swin, Dense Trans, ConvMixer, and ConvNeXt (Peter et al., 8 Aug 2025). Elsewhere, Table 2 lists a partially overlapping set, including ResNet50, ViT, DenseNet121, EfficientNetB3, MobileNetV2, Hybrid ViT-CNN, and ConvMixer (Peter et al., 8 Aug 2025). The paper does not reconcile these inventories into a single canonical taxonomy.

The reported baseline CNN is a four-convolutional-block model followed by fully connected layers (Peter et al., 8 Aug 2025). ResNet-50 is described as a 50-layer residual network with input size 224 × 224 × 3, approximately 23.5M parameters, and a final fully connected layer modified for binary classification, with residual learning expressed as

F(x)+xF(x) + x

(Peter et al., 8 Aug 2025). ViT is described as processing images as a sequence of 16 × 16 patches, with 12 transformer blocks, 768-dimensional embeddings, and approximately 86M parameters (Peter et al., 8 Aug 2025). The self-attention equation given is the standard scaled dot-product form: Attention(Q,K,V)=softmax(QKTdk)V\mathrm{Attention}(Q, K, V) = \mathrm{softmax}\left(\frac{QK^T}{\sqrt{d_k}}\right)V (Peter et al., 8 Aug 2025). Swin Transformer is characterized as a hierarchical vision transformer operating with shifted windows, but the paper does not report explicit window sizes, stage counts, head counts, or embedding dimensions (Peter et al., 8 Aug 2025). ConvMixer is described as a patch-based convolutional architecture using depth-wise and point-wise convolutions, with approximately 2.1M parameters (Peter et al., 8 Aug 2025). ConvNeXt is described more generally as a modern convolutional architecture incorporating transformer-inspired design principles while preserving convolutional inductive bias (Peter et al., 8 Aug 2025).

The optimization protocol includes cross-entropy loss, AdamW, initial learning rate 0.001, learning-rate decay factor 0.1, step size 7 epochs, and 10 epochs total (Peter et al., 8 Aug 2025). The learning-rate schedule is written as

ηt=η0γt/s\eta_t = \eta_0 \cdot \gamma^{\lfloor t/s \rfloor}

with η0=0.001\eta_0 = 0.001, yi=1y_i = 10, and yi=1y_i = 11 (Peter et al., 8 Aug 2025). Cross-entropy is reported in the paper as

yi=1y_i = 12

with yi=1y_i = 13, although, as the source itself notes implicitly by comparison with standard usage, the minus sign is absent in the printed expression (Peter et al., 8 Aug 2025). Additional implementation details, including batch size, weight decay value, dropout, hardware, and software framework, are not reported (Peter et al., 8 Aug 2025).

5. Explainable AI components

Explainability is one of the principal components of MammoFormer. The abstract lists five XAI techniques: Integrated Gradients, GradCAM, Occlusion, DeepLIFT, and Saliency maps (Peter et al., 8 Aug 2025). The main text and tables also refer to Guided GradCAM, Attention maps, SHAP values, and Occlusion sensitivity, producing some inconsistency in enumeration (Peter et al., 8 Aug 2025). Faithfully interpreted, the framework integrates at least the following across sections: Integrated Gradients, GradCAM or Guided GradCAM, Occlusion or Occlusion Sensitivity, DeepLIFT, Saliency Maps, Attention Maps for transformers, and SHAP Values (Peter et al., 8 Aug 2025).

For CNN-based models, especially ResNet-50, the principal localization method discussed is Grad-CAM / Guided GradCAM applied to the last convolutional layer (Peter et al., 8 Aug 2025). The paper reports that ResNet50 heatmaps focused on clinically relevant regions and that, in malignant cases, heatmaps highlighted spiculated borders and irregular masses, with 83% correspondence to radiologist annotations (Peter et al., 8 Aug 2025). It also reports that DenseNet121 showed similar behavior and achieved 7% higher precision for microcalcifications (Peter et al., 8 Aug 2025).

For transformer models, the paper emphasizes attention maps and distributed attention across multiple suspicious regions (Peter et al., 8 Aug 2025). It reports that in 76% of malignant cases, attention was distributed across multiple regions, compared with 42% of benign cases (Peter et al., 8 Aug 2025). This is presented as evidence of stronger global contextual encoding in transformer architectures.

The paper also uses SHAP for feature-importance analysis. It reports that in CNNs, texture features contributed 43% and shape irregularity contributed 37%, whereas in transformers, contributions were more evenly distributed and contextual features accounted for 31% in transformers versus 12% in CNNs (Peter et al., 8 Aug 2025). For occlusion sensitivity, it reports that a Hybrid ViT-CNN maintained 78% accuracy when 25% of important regions were occluded, compared with 51% for pure CNN models (Peter et al., 8 Aug 2025).

The only attribution formula explicitly provided is for Integrated Gradients: yi=1y_i = 14 where yi=1y_i = 15 is a baseline image and yi=1y_i = 16 is the model function (Peter et al., 8 Aug 2025). The paper further reports quantitative interpretability-related observations including 82% alignment with clinical expertise and 18% of cases potentially showing novel biomarkers, but it does not define a formal XAI benchmark protocol beyond such summary statistics (Peter et al., 8 Aug 2025).

A plausible implication is that MammoFormer treats interpretability not as post hoc visualization alone, but as a comparative analytic lens spanning different architecture classes.

6. Results, deployment logic, and relation to adjacent mammography models

The main performance table reports accuracy, precision, recall, and F1-score for seven architectures under four enhancement settings (Peter et al., 8 Aug 2025). The most salient results reported in the source are as follows. For CNN, original, negative, and AHE inputs each yield 99.9 / 99.9 / 99.9 / 99.9, while HOG yields 99.7 / 99.7 / 99.7 / 99.7 (Peter et al., 8 Aug 2025). For ResNet, all four enhancement conditions are reported as 99.9 / 99.9 / 99.9 / 99.9 (Peter et al., 8 Aug 2025). For ViT, the reported values are 94.0 / 94.3 / 94.0 / 94.0 on original images, 54.3 / 56.6 / 54.3 / 51.9 on negative images, 98.3 / 98.3 / 98.3 / 98.3 with AHE, and 99.0 / 99.0 / 99.0 / 99.0 with HOG (Peter et al., 8 Aug 2025). For Swin, the reported pattern is 83.3 / 87.4 / 83.3 / 82.8 on original images, 91.3 / 92.7 / 91.3 / 91.3 with negative preprocessing, 51.7 / 26.7 with AHE in the truncated excerpt, and 96.3% accuracy for the recommended Swin + HOG configuration as stated in the deployment discussion (Peter et al., 8 Aug 2025).

The final deployment recommendation is explicit: the primary recommended model for clinical deployment is ResNet-50 with original images, reported as achieving 99.9% accuracy and described as the most robust solution for routine screening (Peter et al., 8 Aug 2025). Transformer models are assigned a supporting role for contextual validation in complex cases: ViT with AHE and Swin Transformer with HOG (Peter et al., 8 Aug 2025). The resulting MammoFormer ensemble is therefore hybrid and tiered, rather than transformer-exclusive.

This deployment strategy is notable in light of the framework’s title. Although transformer architectures motivate the framework and are central to its comparative results, the final operational system is not a pure “former” model. The paper’s own evidence leads it to prefer a CNN-first clinical workflow augmented by transformer validators and XAI.

Within the broader mammography literature, MammoFormer occupies a specific position. It differs from Multi-modal Transformer (MMT), which formulates breast imaging as a variable-length sequence classification problem over current and prior exams and fuses FFDM, DBT, and ultrasound for both near-term cancer detection and 5-year risk prediction (Shen et al., 2023). It also differs from earlier prior-aware mammogram models that compare current and prior exams with CNN-based pairwise fusion and alignment rather than transformer reasoning (Park et al., 2019). In relation to multi-view generalization work such as MammoDG, the contrast is also clear: MammoDG is primarily a multi-view CNN-based domain-generalization framework with a late transformer fusion module, whereas MammoFormer centers on enhancement-sensitive architecture comparison and XAI in CBIS-DDSM (Yang et al., 2023). More recent alternatives such as Mammo-Mamba explicitly position themselves against transformer-heavy multi-view mammography models by replacing much of the all-pairs attention burden with hybrid state-space and attention blocks (Bayatmakou et al., 23 Jul 2025).

These comparisons suggest that MammoFormer is best understood not as the definitive mammography transformer architecture, but as a framework at the intersection of transformer adoption, preprocessing optimization, and interpretability-focused clinical deployment. Its specific contribution lies in asserting that transformer usefulness in mammography is contingent on representation engineering and that clinically credible deployment requires an explicit XAI layer rather than performance reporting alone (Peter et al., 8 Aug 2025).

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to MammoFormer.