BreastMNIST: Real Clinical Datasets, Diagnostic Ultrasound Physics & Neural Interpretability
BreastMNIST is a standardized biomedical dataset belonging to the globally recognized
MedMNIST v2 benchmark suite. Originating from the Breast Ultrasound Images
(BUSI) clinical cohort, it abstracts complex ultrasound oncology into a standardized binary
classification benchmark: separating benign breast lesions (fibroadenomas, simple cysts) from
malignant neoplasms (invasive ductal and lobular carcinomas). This interactive visualizer integrates the
real project dataset atlas with a mathematically rigorous synthetic biophysical acoustic simulator.
Together, these engines investigate acoustic impedance, convolutional receptive fields, Grad-CAM saliency, and the counterintuitive
28×28 vs 224×224 resolution paradox.
1. Acoustic Ultrasound Physics & Stratified Anatomy
Medical B-mode (Brightness mode) ultrasound relies on pulse-echo acoustic wave propagation. High-frequency
longitudinal ultrasound pulses ($f_0 \approx 7.5 - 12.0 \text{ MHz}$) propagate through stratified anatomical layers, encountering reflections at boundaries:
- Skin: A thin, hyperechoic boundary layer characterized by a high acoustic impedance mismatch.
- Premammary Subcutaneous Fat: Hypoechoic fat lobules interspersed with and bordered by hyper-reflective connective tissue known as Cooper's ligaments.
- Mammary Fibroglandular Complex: Glandular lobules and ductal networks surrounded by dense stroma, generating characteristic granular Rayleigh acoustic backscatter.
- Retromammary Zone & Pectoralis Major: Deep muscle fascia exhibiting parallel linear striations lying anterior to hyperechoic rib margins and dense rib acoustic shadows.
Acoustic reflection at tissue interfaces is dictated by the relative acoustic impedance mismatch $Z = \rho \cdot c$:
$$R = \left( \frac{Z_2 - Z_1}{Z_2 + Z_1} \right)^2$$
In simple cysts, sound travels through non-viscous serous fluid with negligible attenuation ($\alpha \approx 0$),
producing posterior acoustic enhancement. Conversely, scirrhous malignant carcinomas
possess dense fibrous stroma that scatters and absorbs acoustic energy, casting a dense posterior acoustic shadow deep to the lesion.
2. Diagnostic Morphometry: The BI-RADS Lexicon
The American College of Radiology (ACR) BI-RADS lexicon defines quantitative morphological criteria to stratify risk and separate benign pathology from invasive carcinomas:
-
Aspect Ratio (Taller-Than-Wide): Anteroposterior height $H$ divided by transverse width $W$.
Benign lesions tend to compress horizontally along natural tissue planes ($H/W < 1.0$), while malignant tumors invade vertically across Cooper's ligaments and tissue boundaries ($H/W \ge 1.0$), serving as a strong indicator of malignancy.
-
Margin Characteristics: Benign tumors typically display smooth, well-circumscribed, or macrolobulated borders. Malignant tumors frequently exhibit angular, microlobulated, or sharply spiculated margins caused by desmoplastic host responses to tumor infiltration.
3. The Resolution Dilemma: Why 28×28 Competes with 224×224
Standard machine learning intuition suggests that higher spatial resolution should unconditionally yield superior diagnostic performance.
However, empirical benchmarks on BreastMNIST demonstrate comparable or even superior results at native $28 \times 28$ resolution compared to upscaled $224 \times 224$:
| Model Architecture |
Input Spatial Dimensions |
Area Under Curve (AUC) |
Accuracy (ACC) |
| ResNet-18 |
28 × 28 |
0.901 |
0.863 |
| ResNet-18 |
224 × 224 |
0.891 |
0.833 |
| ResNet-50 |
28 × 28 |
0.857 |
0.812 |
| ResNet-50 |
224 × 224 |
0.866 |
0.842 |
| AutoML Vision (Google) |
Ensemble Native |
0.919 |
0.861 |
The Biophysical Explanation: Ultrasound images are inherently corrupted by multiplicative Rayleigh speckle noiseโan interference pattern formed by sub-wavelength scatterers rather than true anatomical macrostructure.
Downsampling the image to $28 \times 28$ functions as an aggressive spatial anti-aliasing lowpass filter. It attenuates the stochastic high-frequency speckle noise while preserving macroscopic geometric contours (such as the crucial $H/W$ ratio and gross margin irregularity).
Furthermore, expanding the input tensor to $224 \times 224$ without a commensurate increase in the training sample size ($N=780$) severely overparameterizes the network, driving the model to overfit on acquisition artifacts and probe focal banding rather than underlying pathology.
4. Explainable AI: Grad-CAM Formulation & Usage
Gradient-Weighted Class Activation Mapping (Grad-CAM) ensures that the deep network attends to genuine tumor pathology rather than acoustic edge artifacts.
Grad-CAM calculates the gradient of the class activation score $Y^c$ with respect to the feature maps $A^k$ of the final convolutional layer:
$$\alpha_k^c = \frac{1}{Z} \sum_{i=1}^U \sum_{j=1}^V \frac{\partial Y^c}{\partial A_{i,j}^k}$$
A weighted combination is then passed through a ReLU activation to construct the final localization heatmap $L_{\text{Grad-CAM}}^c$:
$$L_{\text{Grad-CAM}}^c = \text{ReLU}\left( \sum_k \alpha_k^c A^k \right)$$
Interactive Operation: Use the Render Layer Display toggles to superimpose the Grad-CAM heatmap over either real or synthetic lesions. Notice how the network's attention (indicated by intense orange/red pixels) focuses explicitly on irregular spiculated margins or tall vertical invasion borders when diagnosing malignancy, while resting broadly across the center of benign cysts.
5. Context-Aware Biomedical Modules
Open Access License: This interactive educational module is released under
CC BY-NC 4.0 (Attribution-NonCommercial)
for non-commercial research, academic study, and clinical education.
Commercial & Enterprise Licensing: For white-labeling, proprietary LMS/course embedding, hardware dashboard telemetry integration, or custom feature engineering, secure a commercial license at
BioniCloud.com or contact
Dr. Yuri Beno.