Source-linked AI summary

A Lightweight CNN Integrated Compact Convolutional Transformer for Multi-Scale Feature Learning and reducing computational complexity for breast cancer mammography image detection and classification

Md Taimur Ahad, Ainuddin Ahmed

arXiv:2609.18212v1cs.LGcs.AIcs.CV

TL;DR

CNNs can struggle to capture long-range context in breast mammograms, where early and accurate detection matters. The paper proposes a lightweight CNN-integrated CCT with explainability methods; it reports 99%–100% accuracy across three datasets, while noting that evaluation used secondary mammography data.

  • Problem

    CNN-based models can struggle to capture long-range contextual dependencies in medical images, while early and accurate breast cancer detection is important for treatment planning.

    Source: §1 · p. 3
  • Method

    The lightweight CNN-integrated CCT combines local convolutional features with transformer-based global context learning and integrates XAI methods.

    Source: §1 · p. 4, §6 · pp. 51–52
  • Results

    99%–100% accuracy across three datasets was reported for the model in 5-fold cross-validation; it has 250,435 parameters.

    Source: §5 · p. 48, §6 · p. 52
  • Takeaways & Limitations

    The authors describe the framework as having potential for clinical decision support in breast cancer screening and as suitable for computer-aided diagnosis systems.

    Source: §5 · p. 50, §6 · p. 52

    Evaluation used a secondary dataset and mammographic images only; the authors call for extensive multi-center validation.

    Source: §6 · p. 51

Abstract

from arXiv · show

Over the years, Convolutional Neural Networks (CNNs) have demonstrated strong capability in cancer detection and classification using medical images. However, CNN-based models often struggle to capture long-range contextual dependencies. In such scenarios, integrating Compact Convolutional Transformer (CCT) architectures after the CCT layer allows CNN-extracted features to reshape into compact patch tokens using a CCT tokenizer, followed by the addition of positional embeddings to preserve spatial structure. Using 5-fold cross-validation, the model was tested on 3 sets of breast cancer mammography. With only 250,435 parameters, the model achieved 99%-100% accuracy across 3 datasets, indicating robust generalization. Explainable AI (XAI) was integrated into the model to explain the breast cancer classification process to enhance clinical trust. The results indicate that the proposed framework is suitable for computer-aided diagnosis systems, particularly in resource-constrained clinical environments. The novelty of the proposed CNN-integrated CCT overcomes the limitation of CNN's gradient degradation in the last layers by integrating convolutional tokenization with transformer-based learning. Lighter than ViT, which is effective in capturing long-range dependencies, the model has also proven efficient in breast cancer classification by capturing long-range dependencies among breast tissue regions.

1. Introduction

Breast cancer screening needs accurate, consistent interpretation, but mammograms can contain subtle abnormalities and manual reading is affected by noise and artifacts. The study proposes a lightweight CNN-integrated CCT to combine local features with global context, while addressing explainability and component-analysis questions.

1. Introduction

  • Manual mammogram inspection can be affected by noise, low contrast, and artifacts, contributing to diagnostic variability, human error, and false positives.The introduction links these challenges to demand for CAD systems that help clinicians improve diagnostic accuracy and consistency.Source: §1 · p. 3
  • CNNs perform strongly in breast cancer classification but may miss long-range dependencies, while transformers model global dependencies through self-attention.CCT combines convolutional feature extraction and transformer attention, and is described as more data-efficient and easier to train than standard ViTs in many practical cases.Source: §1 · pp. 3–4
  • CCT is described as computationally intensive as sequences grow, with higher memory use and slower inference, and its design requires careful tuning.The introduction also notes that hybrid models may lose flexibility in some structured vision tasks.Source: §1 · p. 4
  • CNN-integrated CCT combines local feature extraction with global context learning for mammographic classification.The proposal is motivated by the multi-scale cues in mammograms, from microcalcifications to masses and asymmetries.Source: §1 · pp. 4–5
  • The study conducts ablation analyses to examine how CNN components affect performance, efficiency, and generalization in breast cancer classification.The introduction says these analyses address the roles of convolutional tokenization, transformer encoder layers, and sequence pooling.Source: §1 · pp. 4–5
  • CCT explainability remains a concern because convolutional tokenization and attention jointly contribute to predictions, while attention-based explanations can be unreliable or incomplete.The study integrates XAI into its lightweight CNN-integrated CCT model.Source: §1 · p. 5

2. Literature Review

The literature review covers CNNs, hybrid CNN–Transformer architectures, feature fusion, and methods that combine classical feature extraction or optimization with deep learning. It describes strong reported results while also noting dataset, modality, and generalization constraints in prior work.

2. Literature Review

  • CNN–LSTM hybrid classification achieved up to 99.90% accuracy, while TransBreastNet combines subtype classification with temporal lesion-progression analysis.The review also describes SwinCNN performance across BACH and BreakHis and characterizes hybrid architectures as combining local extraction with global context.Source: §2 · p. 6
  • Hybrid feature fusion from VGG16, VGG19, ResNet50, and DenseNet121 achieved accuracies exceeding 97% across MIAS, CBIS-DDSM, and INbreast.The review attributes the approach to combining complementary feature representations.Source: §2 · p. 6
  • SIFT-BCD achieved up to 99.20% accuracy by combining SIFT and CNN features with fuzzy decision-tree classifiers.Other reviewed approaches pair LBP with CNNs for texture representation, wavelets with CNNs for multi-resolution features, and PSO with CNNs for hyperparameter tuning.Source: §2 · pp. 6–7
  • Reviewed CNN–Transformer work includes SwinCNN, ViT-based CNN models, and RDTNet, reported at up to 99% accuracy across magnification levels.The review also describes EAT as reaching up to 99% accuracy with low computational complexity, and notes that transformers often require hybridization to address data limitations.Source: §2 · pp. 7–8
  • The review includes multimodal systems that combine imaging with clinical or textual data, including TransBreastNet and late fusion of images with radiology reports.It also notes that transfer-learning performance can be constrained by dataset imbalance and domain shift between natural and medical images.Source: §2 · pp. 6, 8

3. Research methodology

The methodology overview covers the study’s hardware and software environments, datasets, image preprocessing, CNN-integrated CCT model, and training process.

3. Research methodology

  • The methodology spans hardware and software environments, datasets, preprocessing, the CNN-integrated CCT model, and training.Figure 1 is identified as the research methodology overview.Source: §3 · p. 10, Figure 1 · p. 11

3.1 Dataset description

The study evaluates the CNN-integrated CCT across datasets with different class distributions and modality counts, using held-out test images. The supplied dataset descriptions include a two-class dataset and a multi-source, five-class dataset.

3.1 Dataset description

  • The evaluation includes balanced and imbalanced datasets with varying numbers of breast cancer modalities and assesses classification on unseen images.The authors say these choices support analysis of consistency and generalizability across uneven class distributions.Source: §3.1 · p. 12
  • Dataset A contains 7,632 mammogram images: 2,520 benign and 5,112 malignant.The images were collected at the Breast Center of Centro Hospitalar de S. Joao in Porto.Source: §3.1 · p. 12
  • Dataset C, MammoNet32k, contains 32,191 mammographic images from 7,079 patients across seven public datasets, organized into five classes.Images were converted to 16-bit grayscale PNG at 1024×1024 resolution; the source datasets span the US, Europe, China, and the Middle East.Source: §3.1 · p. 12
  • The images were split into 70% training, 20% validation, and 10% testing, with separate directories used to prevent data leakage.The method distinguishes the test set from the validation set and describes testing on data unseen during training.Source: §3.1 · p. 12

3.2 Hardware Specification

Experiments used a Precision 7680 Workstation and Python 3.9, selected for its support for TensorFlow-GPU, SHAP, and LIME.

3.2 Hardware Specification

  • The experiments ran on a Precision 7680 Workstation.The cited passage identifies the workstation but does not specify its hardware configuration.Source: §3.2 · p. 13
  • The workstation included a 3500 Ada Generation GPU, 32 GB DDR5 RAM, and a 1 TB SSD.Source: §3.2 · p. 13
  • Python 3.9 was chosen because it supports TensorFlow-GPU, SHAP, and LIME generation.Source: §3.2 · p. 14

3.3 Image preprocessing

Preprocessing combines contrast enhancement and noise reduction with edge-preserving and sharpening steps.

3.3 Image preprocessing

  • CLAHE improves local contrast in dense tissue regions, followed by Gaussian blurring to suppress high-frequency noise.Source: §3.3 · p. 14
  • Bilateral filtering is applied to preserve edge structures considered critical for mass detection.Source: §3.3 · p. 14
  • Nonlocal-means denoising smooths the image while preserving important features, and unsharp masking improves edge clarity.Source: §3.3 · p. 14

3.4 Image augmentation

The study augments mammograms with geometric, contrast, and noise transformations to diversify training data for breast cancer classification.

3.4 Image augmentation

  • Training data augmentation uses rotations, scaling, flipping, contrast adjustments, and noise addition.The transformations are intended to represent variability in cancer size, shape, location, orientation, and image quality.Source: §3.4 · pp. 14–15
  • Rotation of ±20° and scaling of ±10% address differences in cancer orientation and size, respectively.Source: §3.4 · p. 14
  • Contrast adjustment of ±15% addresses image-quality differences, while Gaussian noise with variance 0.05 targets imaging artifacts.Source: §3.4 · p. 15
  • Figure 3 presents samples of the augmentation.Source: Figure 3 · p. 15

3.5 Description of proposed CNN-Integrated CCT Model

The proposed CNN-integrated CCT processes mammograms through local convolutional feature extraction and tokenization, then transformer-based global context modeling and classification.

3.5 Description of proposed CNN-Integrated CCT Model

  • The model combines a CNN feature extractor for local breast-tissue patterns with a CCT block that tokenizes features and learns global relationships between mammographic regions.Source: §3.5 · p. 15

Input Layer

  • Inputs are mammograms represented as H × W × 3 RGB images; grayscale mammograms are converted to RGB to match model requirements.Source: Input Layer · p. 16

CNN Feature Extraction Block

  • The CNN block precedes the CCT tokenizer and uses convolutional layers with 48, 128, 192, 192, and 128 filters, with max pooling after selected layers.The block extracts increasingly detailed local features and refines them before tokenization.Source: CNN Feature Extraction Block · pp. 16–17

CCT Tokenizer

  • The convolutional tokenizer converts CNN features into tokens using convolution and max pooling, retaining local spatial information before transformer processing.Unlike direct fixed-patch division, this approach is presented as suited to subtle mammographic abnormalities.Source: CCT Tokenizer · pp. 17–18

Projection to Token Embedding Space

Positional Embedding

  • Learnable positional embeddings are added to tokens because the transformer does not inherently encode token positions.The text connects position information to lesion location, tissue distortion, and relationships among surrounding regions.Source: Positional Embedding · p. 18

Transformer Encoder Block

Global Average Pooling, classification, and training

3.6 Training Process of CNN-Integrated CCT Model

The training pipeline preprocesses and augments mammograms, extracts local features with a convolutional tokenizer, and uses transformer encoders to model global relationships before classification.

3.6 Training Process of CNN-Integrated CCT Model

  • Images are normalized to [0, 1], then split into training, validation, and test subsets with stratified sampling to preserve class distributions.The supplied passage describes stratification as keeping class distributions approximately consistent across subsets.Source: §3.6 · p. 24
  • Five-fold cross-validation trains on K − 1 folds and validates on the remaining fold to assess generalization.The passage identifies K = 5 as the typical setting.Source: §3.6 · p. 24
  • Real-time augmentation applies horizontal flips and intensity rescaling to simulate positioning, imaging-angle, and scanner-noise variation.The augmentation function is described as supporting robustness to real-world variations.Source: §3.6 · pp. 24–25
  • AdamW and categorical cross-entropy optimize training, while the checkpoint with the lowest validation loss is selected.The passage identifies learning rate, weight decay, and moment estimates as components of the AdamW update.Source: §3.6 · pp. 25–26
  • A convolutional tokenizer uses convolution, ReLU, and max pooling to extract local mammographic features and convert them into compact visual tokens.Convolutional tokenization preserves local spatial information relevant to subtle structures such as microcalcifications and lesion boundaries.Source: Final Training Hyperparameters · pp. 26–27
  • Projected tokens receive positional embeddings and pass through transformer blocks with self-attention to model long-range dependencies among mammographic regions.Global average pooling aggregates the final token representations, and a dense softmax classifier estimates class probabilities.Source: §3.6 · p. 25, Final Training Hyperparameters · pp. 27–28

4. Result of the proposed model

The model reports high performance on unseen test data and across five-fold evaluations, alongside low computational cost. Ablations and visual explanations characterize its components and predictions.

4.1 Performance of 5-folds of the CNN-Integrated CCT Model

  • 99%–100% accuracy was reported across folds and class setups; Mini-MIAS precision reached 93% in Fold 5, while INbreast recall ranged from 96% to 99%.The five-fold classification report is Table 3.Source: Table 3 · p. 29, §4.1 · p. 30
  • AUC was 1.00 for 2-class and 3-class cross-validation, while 5-class AUC was mostly 0.98–0.99 and about 0.96 for Mini-MIAS.For unseen test data, 2-class and 3-class AUC was 1.0000 and 5-class AUC ranged from 0.9994 to 1.0000.Source: §4.1 · pp. 31–32, §4.2 · p. 38, Figure 13 · p. 38

4.2 Performance of unseen data detection and classification

  • Test accuracy remained above 98% across 2-, 3-, and 5-class tasks, with a slight decline for the more complex 5-class task.The test-set summary is presented in Table 4.Source: Table 4 · p. 36, §4.2 · p. 36

4.3 Computational cost analysis of the CNN-integrated CCT Model

  • The model has 0.2504 million parameters, uses less than 1 MB of storage, and processes one image in approximately 1.4884 ms.The reported inference-memory increase was 0.9180 MB; 0.00210944 GFLOPs refers only to convolutional operations, not the full model.Source: §4.3 · p. 40, Table 5 · p. 40

4.4 Statistical analysis of the result of 3-class breast mammography

  • Training accuracy and loss were strongly negatively correlated, with Pearson correlation −0.9966 and Spearman correlation −0.9981.The epoch-wise distributions were non-normal, so the authors used a Wilcoxon test for additional non-parametric support.Source: Table 7 · p. 41, §4.4 · p. 42, Table 8 · p. 42
  • Removing stochastic depth slightly improved evaluation accuracy but made convergence less stable; reducing transformer depth slightly limited global-context capture.The full model is described as balancing accuracy, loss stability, and Macro AUC.Source: §4.4 · p. 43
  • Removing the CNN stem caused a more noticeable performance drop, while removing positional embeddings also negatively affected performance.The reported ablations associate the CNN stem with local texture extraction and positional embeddings with spatial encoding.Source: §4.4 · p. 43

XAI integration analysis

  • Removing augmentation most degraded generalization, and disabling label smoothing produced less-calibrated predictions with reduced generalization performance.The authors also report that explanations focused mainly on informative tissue regions, including dense and irregular patterns in malignant examples.Source: §4.4 · pp. 43–44, XAI integration analysis · pp. 46, 48

5. Discussion

The discussion reports strong cross-dataset classification performance and compares the compact CNN-integrated CCT with other approaches. It also notes limits tied to small datasets and transformer inference overhead.

5. Discussion

  • The model achieved 99%–100% accuracy across three datasets, but performance declined on smaller, challenging datasets, where some recall values were 93–97%.The discussion links the variability to class scarcity and domain-specific imaging variability.Source: §5 · p. 48
  • The authors report comparable or improved accuracy against cited hybrid models while maintaining a more compact design than those approaches.The comparison names CNN–LSTM architectures, Swin CNN hybrids (Sreeleklekshmi et al., 2024), and ViT-CNN architectures (Abimouloud et al., 2024).Source: §5 · p. 49
  • The design combines CNN texture extraction, compact CCT tokens, and transformer self-attention for global contextual reasoning.The discussion says these components capture fine-grained patterns, reduce computational redundancy, and support discrimination between visually similar classes.Source: §5 · p. 50
  • Smaller-dataset variability indicates dependence on training diversity, and transformer layers add inference overhead relative to pure CNN models.The discussion describes that overhead as non-trivial despite being more efficient than standard Vision Transformers.Source: §5 · p. 50
  • The authors identify breast-cancer screening decision support and edge-device use as potential applications, and report explanations based on multiple XAI methods.The discussion names LIME, SHAP, and Grad-CAM and describes the model as suitable for edge devices due to resource requirements.Source: §5 · p. 50

6. Limitations, Future, and Conclusions

The study concludes that its CNN-integrated CCT combines local mammographic feature extraction with global contextual learning, while acknowledging constraints in dataset scope and deployment. It also presents a prototype for breast-cancer CAD.

6. Limitations, Future, and Conclusions

  • The evaluation used secondary breast mammography data; the authors call for multi-center validation across heterogeneous datasets.They note that primary data collection was difficult in their research setting and identify other imaging modalities as potential future tests.Source: §6 · p. 51
  • Dataset bias and variation in devices, protocols, and operator artifacts may limit generalization, while transformer overhead may increase inference latency.The authors also flag fixed patch tokenization as potentially suboptimal for irregular or low-contrast tumor boundaries, and note sensitivity to hyperparameter settings; they propose lightweight attention mechanisms for future optimization.Source: §6 · p. 51
  • The conclusion presents the framework as combining local feature extraction with global contextual learning to detect subtle abnormalities and support accurate, robust computer-aided breast cancer classification.The authors identify convolutional tokenization and compact transformer design as the basis of this potential.Source: §6 · pp. 51–52
  • The CNN extracts hierarchical local features, then the CCT tokenizer forms compact patch embeddings and positional embeddings preserve spatial information for transformer-based long-range modeling.A classification head predicts benign or malignant cases.Source: §6 · p. 52
  • With 250,435 parameters, the model achieved strong classification performance for 2-, 3-, and 5-class breast lesions and was integrated with LIME, SHAP, and Grad-CAM.The authors describe it as suitable for real-time clinical deployment and applicable to computer-aided diagnosis systems.Source: §6 · p. 52
  • The authors present a prototype combining the model with a Streamlit web interface and an Android mobile application.They expect it to support efforts to make CAD more practical, interpretable, and widely usable.Source: §6 · p. 52
Loading 2609.18212v1…