Enhancing Bone Cancer Detection Through Optimized Pre-Trained Deep Learning Models and Explainable AI Using the Osteosarcoma Tumor Assessment Dataset

Scientific Reports 2025 AI 8 Explanations View Original
Original Paper (PDF)

Unable to display PDF. Download it here or view on PMC.

Plain-English Explanations
Pages 1-2
The Diagnostic Problem in Osteosarcoma and the Case for AI

Osteosarcoma is the most common primary bone malignancy, with histopathological image analysis being a cornerstone of diagnosis and treatment response assessment. After neoadjuvant chemotherapy, pathologists evaluate resected tumor specimens to determine the ratio of viable to necrotic tumor cells, a metric directly tied to prognosis. A necrosis rate exceeding 90% following chemotherapy is considered a favorable response and correlates with significantly better long-term outcomes. This assessment is labor-intensive, inherently subjective, and prone to interobserver variability, making it a prime target for computational automation.

Current limitations: Existing deep learning approaches for bone cancer histopathology have demonstrated technical promise but share a consistent set of weaknesses. Hyperparameter settings in most published models are manually selected or coarsely tuned, leaving performance below the model's theoretical ceiling. Explainability is frequently absent, meaning pathologists cannot interrogate why a model classified an image as viable or necrotic, which limits clinical trust. Additionally, many published systems are trained on small, homogeneous datasets without class-balance strategies, resulting in fragile models that fail to generalize across institutions or patient populations.

Proposed solution: This paper introduces the Optimized Deep Learning Framework for Bone Cancer Detection (ODLF-BCD), which addresses each of these gaps simultaneously. The framework combines five state-of-the-art transfer learning architectures (EfficientNet-B4, ResNet50, DenseNet121, InceptionV3, and VGG16), Enhanced Bayesian Optimization (EBO) for systematic hyperparameter tuning, data augmentation for class balancing, and a three-pronged explainable AI suite comprising Grad-CAM, SHAP, and LIME. The paper reports results on the publicly available Osteosarcoma-Tumor-Assessment dataset from UT Southwestern/UT Dallas, which contains high-resolution histopathological images annotated for viable and necrotic tumor regions.

The study evaluates performance across both binary classification (tumor vs. non-tumor) and multi-class classification (viable tumor, necrotic tumor, and non-tumor), providing a comprehensive comparison of architectures, ablation evidence for individual framework components, and a preliminary comparison against radiologist diagnoses on a small held-out test set.

TL;DR: ODLF-BCD combines EfficientNet-B4, ResNet50, DenseNet121, InceptionV3, and VGG16 with Enhanced Bayesian Optimization and three explainability methods (Grad-CAM, SHAP, LIME) for binary and multi-class osteosarcoma classification. The dataset is from UT Southwestern/UT Dallas, containing annotated viable and necrotic tumor histopathology images. The paper targets persistent gaps in hyperparameter tuning, interpretability, and generalization.
Pages 3-5
The Osteosarcoma-Tumor-Assessment Dataset and Image Preprocessing Pipeline

The Osteosarcoma-Tumor-Assessment dataset, provided by UT Southwestern Medical Center and UT Dallas, consists of high-resolution histopathological images representing three tissue categories relevant to post-chemotherapy tumor assessment: viable tumor, necrotic tumor, and non-tumor (normal tissue). Each image captures detailed cellular morphology, including nuclear size and shape, cytoplasmic characteristics, and extracellular matrix organization. The differences between viable and necrotic tumor regions are often subtle at the individual cell level, making this a particularly challenging multi-class problem compared to simpler binary tumor-detection tasks.

Preprocessing steps: All images were resized to a uniform 224 x 224 pixel resolution using bilinear interpolation to ensure compatibility with the pre-trained model input layers. Pixel intensity values were normalized to the range [0, 1] by dividing by the maximum possible intensity (255 for 8-bit images), which stabilizes gradient updates during training and accelerates convergence. This normalization was applied consistently across all images before they entered any model pipeline.

Data augmentation strategy: To address class imbalance and improve generalization, the training pipeline applied several augmentation transforms: random horizontal and vertical flips, rotations within a defined angular range, and random brightness adjustments drawn from a uniform distribution. These transforms increase the effective diversity of training samples without collecting additional labeled data, a critical consideration given the scarcity of annotated histopathological images for rare tumor types. Augmentation was applied only during training; validation and test sets received no augmentation to ensure unbiased evaluation.

Dataset partitioning: The dataset was split into training (70%), validation (20%), and test (10%) subsets using stratified sampling, which preserves the class proportion in each split. This strategy is particularly important when class imbalance exists between viable tumor, necrotic tissue, and normal tissue categories, as random splitting could produce test sets that underrepresent a class and yield misleadingly optimistic metrics.

TL;DR: The UT Southwestern/UT Dallas osteosarcoma dataset covers three classes: viable tumor, necrotic tumor, and non-tumor. Preprocessing includes bilinear interpolation resize to 224x224, [0,1] normalization, and augmentation (flips, rotations, brightness). The 70/20/10 stratified split preserves class balance across training, validation, and test sets.
Pages 5-8
Five Transfer Learning Architectures and Their Osteosarcoma-Specific Adaptations

All five models were initialized with ImageNet weights, providing a rich foundation of learned visual features (edges, textures, shapes) before fine-tuning on histopathological data. The initial convolutional layers of each model were frozen to preserve these generic features, while the higher-level feature extraction layers and final classification heads were replaced with a custom architecture: a global average pooling layer, fully connected dense layers with ReLU activation, dropout regularization, and a softmax output layer sized for the target number of classes. This transfer learning approach is essential given the relatively small size of osteosarcoma datasets compared to natural image benchmarks.

EfficientNet-B4: The highest-performing architecture, EfficientNet-B4 uses compound scaling to simultaneously adjust network depth, width, and input resolution according to a principled formula. Rather than scaling a single dimension (as earlier architectures like VGG do by increasing depth), EfficientNet balances all three using constants determined by grid search and a user-defined compound coefficient. EfficientNet-B4 operates at a native resolution of 380 x 380 pixels, which was found to significantly outperform the standard 224 x 224 input. It also employs depthwise separable convolutions and squeeze-and-excitation modules to reduce parameter count while preserving feature quality.

ResNet50 and DenseNet121: ResNet50's residual connections allow gradients to bypass layers, effectively solving the vanishing gradient problem that plagued deep networks before skip connections were introduced. For this study, fine-tuning was applied to the top 20 trainable layers (out of 50), with the remainder frozen. DenseNet121 takes a different approach: every layer receives feature maps from all preceding layers through concatenation rather than addition, maximizing feature reuse and gradient flow. This dense connectivity also reduces the total number of parameters relative to comparably deep architectures, which is advantageous when training data is limited.

InceptionV3 and VGG16: InceptionV3 uses parallel convolutional branches with different kernel sizes within each inception module, allowing the network to extract features at multiple spatial scales simultaneously. This multi-scale property is particularly relevant for histopathology, where diagnostic features range from subcellular structures to broader tissue architecture. VGG16, the oldest and simplest architecture evaluated, stacks 3x3 convolutional kernels in a straightforward sequential manner. Although it lacks the architectural sophistication of EfficientNet or ResNet, it serves as a robust baseline and achieved 96.0% binary classification accuracy, confirming that even simpler transfer learning approaches perform well on this task.

TL;DR: Five architectures were fine-tuned with frozen base layers and custom classification heads. EfficientNet-B4 uses compound scaling across depth, width, and resolution (380x380 input). ResNet50 applies skip connections across 20 fine-tuned layers. DenseNet121 uses dense layer concatenation for feature reuse. InceptionV3 captures multi-scale features via parallel kernel branches. VGG16 serves as a sequential-convolution baseline.
Pages 8-10
Enhanced Bayesian Optimization for Systematic Hyperparameter Tuning

Hyperparameter selection has a large effect on deep learning model performance but is rarely addressed rigorously in medical imaging research, where grid search and manual tuning remain common. This study applies Enhanced Bayesian Optimization (EBO) as a principled alternative. EBO uses a Gaussian Process (GP) surrogate model to approximate the objective function (validation accuracy) over the hyperparameter space, guiding the search toward regions likely to yield improvement without requiring exhaustive evaluation of every combination.

Acquisition function and search strategy: At each iteration, EBO selects the next hyperparameter configuration to evaluate using an Expected Improvement (EI) acquisition function, which balances exploration (sampling from underexplored regions) and exploitation (refining around known good configurations). Multi-fidelity optimization was integrated by conducting initial evaluations on a subset of training data or fewer epochs, then promoting only promising configurations to full evaluation. This substantially reduces computational cost while maintaining the quality of the final optimized configuration.

Hyperparameter search spaces and results: The search space spanned learning rate, batch size (16, 32, 64), dropout rate (0.2 to 0.5), and dense layer neuron count (128 to 512). Model-specific parameters were also tuned: for EfficientNet-B4, compound scaling coefficients (depth: 2 to 5, width: 1 to 3) and input resolution (224x224 or 380x380) were included; for ResNet50, the number of trainable layers (10 to 50) was varied; for InceptionV3, the number of trainable inception blocks (5 to 15) was optimized. Final optimized values reflect clear patterns: EfficientNet-B4 benefited from higher resolution (380x380) and more depth (depth coefficient 4, width coefficient 2), while VGG16 converged with a smaller dense layer (128 neurons) and lower dropout (0.2).

The ablation study directly quantifies EBO's contribution: removing EBO and replacing it with simpler tuning reduced binary classification accuracy from 97.9% to 95.8%, a 2.1 percentage point drop. This confirms that systematic Bayesian optimization provides meaningful, not marginal, performance gains over baseline hyperparameter selection approaches.

TL;DR: EBO uses a Gaussian Process surrogate with Expected Improvement acquisition to guide hyperparameter search across learning rate, batch size (16-64), dropout (0.2-0.5), and architecture-specific parameters. Multi-fidelity evaluation reduces cost. Removing EBO drops accuracy from 97.9% to 95.8%. EfficientNet-B4 optimal settings: depth 4, width 2, resolution 380x380, dropout 0.4.
Pages 10-13
Model Performance: Binary and Multi-Class Osteosarcoma Classification

Table 3 in the paper provides the definitive performance comparison across all five models and both tasks. For binary classification (tumor vs. non-tumor), EfficientNet-B4 achieves 97.9% accuracy, precision 0.98, recall 0.98, F1-score 0.98, and ROC-AUC 0.99. DenseNet121 is the second-best binary performer at 97.2% accuracy and ROC-AUC 0.98. ResNet50 reaches 96.8%, InceptionV3 96.5%, and VGG16 96.0%, with ROC-AUC values of 0.98, 0.97, and 0.96, respectively. All five models exceed 96% binary accuracy, confirming that transfer learning from ImageNet weights provides a strong foundation even for the specialized domain of bone cancer histopathology.

Multi-class results: The three-class problem (viable tumor, necrotic tumor, non-tumor) yields slightly lower accuracy for all models, as expected given increased task complexity. EfficientNet-B4 leads at 97.3% accuracy and ROC-AUC 0.98, followed by DenseNet121 at 96.5% and ResNet50 at 96.2%. InceptionV3 and VGG16 achieve 96.1% and 95.8%, respectively. The performance gap between EfficientNet-B4 and other architectures is statistically significant, confirmed by paired t-tests across five independent runs: EfficientNet-B4 vs. VGG16 shows a mean accuracy difference of 1.9% with p = 0.003; vs. InceptionV3 the difference is 1.4% with p = 0.007; vs. DenseNet121 it is 0.7% with p = 0.048.

Confusion matrix analysis: In binary classification, EfficientNet-B4 produced only 8 false positives and 10 false negatives across the test set. In multi-class classification, the model correctly classified 155 samples in Class 0 (non-tumor), 145 in Class 1 (viable tumor), and 150 in Class 2 (necrotic tumor), with the smallest off-diagonal error counts of all five models. DenseNet121 showed the most confusion between Classes 1 and 2, while ResNet50 and InceptionV3 had higher overall misclassification rates, particularly between the two tumor subtypes.

Training dynamics: Accuracy and loss curves over 20 epochs illustrate EfficientNet-B4's superior convergence. It reaches 97.9% binary accuracy by epoch 20 with a stabilized loss of approximately 0.11, indicating minimal overfitting. VGG16 and InceptionV3 show slower loss reduction, converging at higher loss values and lower accuracy, reflecting less effective learning dynamics with the given hyperparameter configurations.

TL;DR: EfficientNet-B4: 97.9% binary accuracy, ROC-AUC 0.99; 97.3% multi-class accuracy, ROC-AUC 0.98. All five models exceed 95.8% accuracy on both tasks. Statistical significance confirmed by paired t-tests (all p-values below 0.05). Binary confusion matrix: 8 false positives and 10 false negatives for EfficientNet-B4.
Pages 13-15
Grad-CAM, SHAP, and LIME: Making Model Predictions Interpretable for Clinicians

Deep learning models applied to medical imaging are often dismissed in clinical settings precisely because their internal logic cannot be interrogated. This paper integrates three complementary explainability methods to address this trust deficit. Together, Grad-CAM, SHAP, and LIME provide spatial, quantitative, and perturbation-based perspectives on model decision-making, and the authors validate all three against clinical expectations using histopathological tumor images.

Grad-CAM (Gradient-weighted Class Activation Mapping): Grad-CAM computes the gradient of the target class score with respect to the feature maps of the final convolutional layer. These gradients are spatially averaged and used to weight the activation maps, producing a heatmap that highlights which regions of the input image most strongly drove the model's prediction. For osteosarcoma histopathology, Grad-CAM heatmaps consistently concentrated activation on morphologically abnormal tissue regions, including areas with disrupted cellular architecture, abnormal nuclear enlargement, and necrotic zones, all of which align with pathological criteria used by trained pathologists in manual review.

SHAP (SHapley Additive exPlanations): SHAP assigns a numerical importance score to each input feature (pixel region) based on Shapley values from cooperative game theory. Each feature's contribution is computed by comparing model outputs across all possible subsets that include or exclude that feature, and averaging the marginal contributions. In this context, SHAP quantifies how specific pixel-level intensities and spatial regions affect classification of viable versus necrotic tissue, enabling both global summaries of feature importance across many images and local explanations for individual predictions. This dual capability is particularly valuable for identifying whether the model has learned biologically meaningful features rather than spurious correlations.

LIME (Local Interpretable Model-agnostic Explanations): LIME perturbs individual input images by removing or masking regions and observing how predictions change, then fits a locally faithful linear approximation to the model's decision boundary around each input. This approach validates that the model's outputs are locally stable, meaning that small, clinically irrelevant changes to non-tumor regions of the image produce correspondingly small changes in the classification score. LIME visualizations highlighted the same tumor-relevant regions as Grad-CAM but through a perturbation lens rather than a gradient lens, providing independent corroboration. Ablation results confirm that removing explainability techniques leaves accuracy unchanged at 97.9%, affirming that XAI adds interpretability without any performance cost.

TL;DR: Grad-CAM heatmaps highlight tumor-relevant tissue regions that match pathological criteria. SHAP quantifies pixel-level feature contributions using Shapley values for both global and local interpretability. LIME uses perturbation-based linear approximations to validate prediction stability. Removing XAI leaves accuracy at 97.9%, confirming zero accuracy cost for full interpretability.
Pages 15-17
Component Contributions and Expert Validation on Test Cases

The ablation study systematically isolates the contribution of each framework component by removing it and measuring the resulting drop in classification performance. All experiments used EfficientNet-B4 in the binary classification setting. The full framework achieved 97.9% accuracy (precision 0.98, recall 0.98, F1-score 0.98, ROC-AUC 0.99). The results identify transfer learning and data augmentation as the two most impactful components, with input resolution scaling a close third.

Component-specific findings: Removing transfer learning (training from random initialization instead of ImageNet weights) dropped accuracy from 97.9% to 94.5%, a 3.4 percentage point reduction, and reduced precision and recall to 0.92 and 0.93 respectively. This is the largest single-component impact, confirming that the osteosarcoma dataset is insufficient for training from scratch. Removing data augmentation reduced accuracy to 94.3%, a 3.6 point drop and the largest absolute reduction observed, indicating that without augmentation the model overfits to the limited training distribution. Removing Enhanced Bayesian Optimization and substituting simpler tuning reduced accuracy to 95.8%. Reducing input resolution from 380x380 to 224x224 dropped accuracy from 97.9% to 96.5%, confirming that finer spatial detail in higher-resolution tiles captures subtle texture differences between viable and necrotic tumor regions that are invisible at lower resolution.

Radiologist comparison: Ten test images spanning all three diagnostic classes (malignant, benign, normal) were independently assessed by a board-certified radiologist, whose ground-truth diagnoses were then compared to EfficientNet-B4's predictions. The model achieved 100% agreement with the expert across all 10 cases, yielding a Cohen's Kappa statistic of 1.00, indicating perfect inter-rater reliability. Grad-CAM heatmaps generated for these 10 cases were also visually reviewed by the radiologist, who confirmed that the model's regions of highest activation corresponded to the same morphological features that guided the expert's diagnosis.

The authors appropriately note that this radiologist comparison is based on a small convenience sample of 10 images and should be interpreted as a proof-of-concept alignment study rather than a definitive clinical validation. A larger prospective study with multiple expert annotators and an independent external test set is required before drawing clinical conclusions.

TL;DR: Ablation results: removing transfer learning cuts accuracy from 97.9% to 94.5%; removing augmentation cuts to 94.3%; removing EBO cuts to 95.8%; lower resolution (224x224) cuts to 96.5%; removing XAI has zero effect. Radiologist comparison on 10 test cases: 100% agreement, Cohen's Kappa = 1.00. Authors note this is a preliminary alignment study, not clinical validation.
Pages 17-19
Current Limitations and the Path Toward Clinically Deployable Bone Cancer AI

Dataset scope: The framework was developed and evaluated on a single dataset, the Osteosarcoma-Tumor-Assessment collection from UT Southwestern/UT Dallas. While this dataset covers the critical classification problem of viable versus necrotic tumor assessment, the authors acknowledge that performance on images from other institutions, acquired under different staining protocols, scanned with different hardware, and prepared by different pathology teams, may differ substantially. Single-dataset evaluations are known to overestimate real-world performance, and external validation across multiple centers is a prerequisite for clinical deployment.

Unimodal imaging: The current framework operates exclusively on histopathological images, which are available after surgical resection but not at the time of initial diagnosis or during non-invasive surveillance. Clinically, osteosarcoma management also relies heavily on MRI for staging and surgical planning, CT for pulmonary metastasis detection, and bone scintigraphy for systemic staging. A multimodal AI framework that integrates histopathology with radiological imaging would provide a more complete diagnostic and prognostic tool. The authors list multimodal imaging integration as the primary direction for future work.

Explainability versus clinical interpretability: The paper makes an important conceptual distinction between explainability (technical methods that clarify model mechanics) and interpretability (the degree to which a clinician can understand, trust, and act on those explanations). Grad-CAM, SHAP, and LIME provide explainability, but their outputs still require expert review to confirm clinical relevance. The Grad-CAM heatmaps validated against radiologist annotation in this study represent a first step, but do not address whether the explanations are sufficiently detailed, consistent, or actionable for routine pathology workflows.

Validation scale and statistical testing: The radiologist comparison involved only 10 test cases, and the statistical significance testing used five independent runs on the same dataset rather than across separate patient cohorts or institutions. Future validation studies should employ larger, multi-institutional expert-annotated datasets, cross-validation strategies that reflect real-world population heterogeneity, and prospective study designs that measure model impact on diagnostic time, accuracy, and clinical decisions. The source code has been made publicly available at GitHub (DevaBolleddu/bone_cancer_detection), which facilitates independent replication and external benchmarking.

TL;DR: Key limitations: single-dataset evaluation, histopathology-only modality, and small 10-case radiologist comparison. No external multi-center validation. Explainability methods (Grad-CAM, SHAP, LIME) require clinical expert review to confirm actionability. Future work targets multimodal imaging (MRI, CT), larger datasets, and multi-institutional prospective validation. Source code publicly available at GitHub.