Editor’s introduction
The study evaluates a multi-stage AI framework that uses pretrained convolutional neural networks to classify knee X-ray images into normal, osteopenia, and osteoporosis categories. It compares performance across models, finding EfficientNetB0 and DenseNet121 to extract the most discriminative features, with combinations of classifiers like Efficient Linear and Neural Network delivering strong results. Post-hoc recalibration and class-prior boosting improved reliability and sensitivity under external conditions. However, the external validation highlights limitations in cross-domain performance, indicating that model behavior shifts under different imaging conditions. The evidence shows the framework performs well in controlled settings but requires adaptive adjustments to maintain accuracy in real-world, diverse clinical environments.
Introduction
Osteoporosis is a chronic and systemic skeletal disorder characterized by decreased bone mass, microarchitectural deterioration, and increased bone fragility and fracture. The disease is observed in over 200 million individuals worldwide and is a significant public health challenge with specific attention to post-menopausal women and older individuals. The worldwide burden of osteoporosis is escalating rapidly as a consequence of the aging population, sedentary lifestyles, and nutritional insufficiencies. Osteoporotic fractures—especially those in the hip, spine, and wrist—cause substantial injury to the body, decrease quality of life, and cause increased mortality.
The gold standard for diagnosing osteoporosis is dual-energy X-ray absorptiometry (DXA) which measures bone mineral density (BMD) and classifies normal, osteopenic, and osteoporotic patients according to T-score thresholds determined by the World Health Organization. Nevertheless, DXA has its own limitations, despite diagnostic precision. It demands expensive, specialized equipment and trained operatives, and is not uniformly available, particularly in rural or resource-light healthcare contexts. Furthermore, DXA is a unilateral measure of bone density and does not capture microstructural alterations and cortical thinning seen clinically on radiographs.
Given these limitations, there has been growing interest in using existing radiographs, which are already commonplace in clinical practice for various other purposes, for the opportunity of screening patients for osteoporosis. A variety of X-rays, such as knee, hip, or spine, can indirectly indicate bone quality by the characteristics of texture, cortical thickness, and trabecular shape. Knee radiographs are particularly frequently used in orthopedic and rheumatologic examinations which allow us to measure the condition of bone without the need for other radiation or additional expense. The knee joint includes cortical and trabecular bone elements within the distal femur and proximal tibia areas that may reveal systemic bone changes related to the advancement of osteoporosis.
Medical image analysis has been revolutionized by the recent advancements of artificial intelligence (AI), especially deep learning (DL) and convolutional neural networks (CNNs). These models automatically capture hierarchical representations based on the imaging data, showing impressive capabilities in the diagnostic processes, segmentation, and disease classification across different medical fields. For musculoskeletal imaging, CNNs have been used to estimate bone age, detect fractures, and pre-determine osteoporosis severity derived from radiographs or CT scans. Multiple studies have shown that CNN-based systems can predict bone health status based on naked radiographs with similar or superior accuracy to that of conventional BMD classification techniques. For example, D’Agostino et al. (2024) has demonstrated high sensitivity and specificity in osteoporosis classification using deep learning on knee radiographs, and Gomathi et al. (2026) developed a hybrid deep-learning model, which revealed osteopenia as an intermediate stage, yielding significant accuracy gains. Nonetheless, a significant number of these models were trained and validated on small datasets, often from only one institution, prompting concerns of overfitting and generalizability limitations. To further enhance robustness and make the models more applicable into clinical settings, multi-stage CNN frameworks have also been presented. These models extract features and perform classification in a sequential or hierarchical manner and classification decisions processed in sequential or hierarchical manner to model the expert human reasoning. Moreover, different CNN layers, architectures, and even image data modalities can be considered as complementary visual inputs, and feature fusion can offer a good option where many complementary visual cues can be merged together.
Multi-stage architectures combined with feature fusion can alleviate data imbalance and improve the learning of discriminative texture-based features from medical images. The methodological novelty of the present study lies in the integration of a translational multi-stage architecture that combines complementary deep feature representations, targeted data augmentation, machine-learning-based feature learning, and independent external validation within a unified osteoporosis screening framework. Unlike conventional end-to-end CNN models that rely on a single feature extractor, the proposed framework systematically investigates multiple CNN architectures and exploits feature fusion to capture complementary cortical and trabecular bone characteristics. This design aims to improve feature diversity, enhance robustness against imaging variability, and provide a framework with improved potential for clinical translation and external applicability. However, even considering the methodological improvements, an important step often missing from AI research is external validation. Models designed and trained internally often model fine results but fail to apply to a diverse set of data (across institutions, imaging systems, and patient populations). External validation assesses model generalizability and real-world performance, critical for both clinical translation and regulatory acceptancy. As a result, including real-world (hospital) data as an external test set offers stronger evidence of the clinical robustness and applicability.
When the patients are involved for their osteoporosis, external validation is of exceptional importance due to the heterogeneity, the variations in imaging characteristics, and the differences in bone characteristics between ethnic groups. For instance, from the Kaggle Osteoporosis Knee Dataset, quality, de-identified radiographs are provided, divided into the normal OTS, osteopenia, and osteoporosis groups. This dataset is perfect for the model building and pilot internal validation. Nevertheless, clinical validity needs validation on hospital-based datasets, which includes University of Phayao Hospital, with Normal = 41, Osteopenia = 34, and Osteoporosis = 41, to ensure the model validates across varied imaging modalities and populations. The project, “Translational Multi-Stage CNN Framework with Feature Fusion and External Validation to classify Osteoporosis and Knee X-rays”, focuses on bridging the gap between algorithmic progress and clinical implementation. By using deep learning with feature fusion and validation based on the performance alone, the work adheres to the principles of translational medicine that can convert computational techniques into diagnostic tools that assist in early diagnosis and clinical decision.
Full Dataset Expansion and Class Balancing (3× + Oversampling)
In this section, all classes are uniformly expanded by a factor of three (3×), followed by class balancing through oversampling to match the maximum class size. This strategy aims to enhance both data diversity and class balance simultaneously. The results are compared with those obtained from the minority-only augmentation strategy to examine the impact of full expansion and balancing on model performance. Special attention is given to changes in sensitivity and specificity across all classes, as well as overall model stability.
Among all combinations, EfficientNet-B0 with Efficient Linear achieves one of the best performances, with high test accuracy (75.38) and strong AUC (0.8880), highlighting its effectiveness and computational efficiency. Similarly, DenseNet-121 with Neural Network delivers the best overall performance, achieving the highest test accuracy (75.38) and F1-score (72.45), along with the highest AUC (0.9010), demonstrating superior generalization and feature learning capability.
In contrast, ResNet18-based models show comparatively lower performance, particularly on the test set, suggesting limited feature richness. Across classifiers, Neural Network and Efficient Linear consistently provide better generalization, while SVM performs well on validation but tends to show performance degradation on the test set. Naive Bayes remains the least effective despite significantly higher training time, indicating its limitations in handling high-dimensional deep features.
Among the evaluated models, EfficientNetB0 combined with the Efficient Linear classifier achieves the best overall performance, particularly in terms of AUC and classification balance across classes. DenseNet121 with Neural Network also shows competitive performance, especially in feature representation, while ResNet18 provides comparatively lower but stable results.
Overall, EfficientNetB0 and DenseNet121 consistently outperformed ResNet18 across most evaluation metrics. DenseNet121 combined with Neural Network achieved the best overall test performance, whereas EfficientNetB0 with Efficient Linear provided the most stable balance between validation and test performance.
External Validation Results
To assess the generalization capability of the proposed framework, external evaluation was conducted using an independent publicly available knee X-ray dataset. The trained models were evaluated without retraining to assess performance under external testing conditions and distributional shift. Performance metrics such as accuracy, precision, recall, and F1-score are reported, along with confusion matrices to analyze class-wise prediction behavior. The external evaluation provides additional evidence regarding the framework’s behavior under domain shift; however, the dataset should be interpreted as an external stress test rather than a formal multi-center clinical validation cohort.
This phenomenon indicates that the models preserved their ability to rank disease severity correctly, while the predicted probability distributions shifted under external conditions. Consequently, fixed decision thresholds such as argmax or 0.5 probability cutoffs became less reliable, leading to reduced classification accuracy despite acceptable AUC performance.
A major contributing factor is domain shift in knee X-ray images acquired from different institutions, including variations in imaging protocols, detector characteristics, image contrast, noise distribution, patient positioning, and demographic composition. These differences alter the feature distributions extracted by the CNN models, causing downstream classifiers trained on internal data to generalize poorly to external datasets.
The 3× oversampling strategy further supports this interpretation. While oversampling substantially improved AUC performance (0.87–0.89), external test accuracy did not improve consistently and occasionally decreased. This suggests that oversampling enhanced feature separability and minority-class ranking performance but also introduced posterior probability bias due to artificially balanced training distributions, resulting in poor threshold-based predictions on external data.
Additionally, the relatively small external test set size may have contributed to instability in accuracy and F1-score estimates. In multi-class classification, macro-average One-vs-Rest AUC can remain high even when argmax classification fails, particularly when confusion occurs between clinically adjacent categories such as Osteopenia and Osteoporosis.
Overall, these findings suggest that the proposed framework successfully learned clinically meaningful representations that generalize across datasets. However, the primary limitation lies in probability calibration and threshold transferability across imaging domains rather than in the feature extraction capability itself.
Discussion
The experimental results demonstrate that the performance of the proposed framework is strongly influenced by both data diversity and cross-domain variability. In this study, data augmentation strategies, particularly the 3× oversampling approach, substantially improved the discriminative capability of the models, as reflected by the increased external AUC values. These findings suggest that minority-class expansion enabled the CNN feature extractors to learn more representative disease-related patterns, especially for Osteopenia and Osteoporosis cases. However, despite the improved ranking performance, threshold-based metrics such as accuracy and F1-score remained substantially lower during external validation, indicating that the primary challenge was not feature learning itself, but rather probability calibration and domain transferability.
The extensive use of augmentation and oversampling should also be interpreted with caution. Although these strategies effectively increased the apparent training sample size and improved minority-class representation, they do not introduce truly independent patient samples and therefore cannot fully replace larger and more diverse datasets. Consequently, there remains a risk that the learned representations may partially reflect cohort-specific characteristics, potentially limiting generalizability under external conditions.
In addition, artificial class balancing modifies the effective class priors observed during training. While this often improves discriminative performance and minority-class detection, it may also distort posterior probability estimates when the model is evaluated on datasets with different class distributions. This phenomenon is consistent with the calibration drift observed during external validation, where relatively strong discrimination performance was accompanied by reduced threshold-dependent metrics. These findings highlight the importance of considering probability calibration alongside conventional classification accuracy when developing AI-based screening systems.
The external validation analysis revealed a clear discrepancy between threshold-independent metrics (AUC) and threshold-dependent metrics (accuracy, precision, recall, and F1-score). While several models achieved relatively high AUC values (0.87–0.89), external classification accuracy remained limited (approximately 42–43%). Importantly, high discrimination performance should not be interpreted as evidence of clinical readiness. Although AUC values remained relatively high under external testing, the substantially reduced classification accuracy indicates that many individual predictions would still be incorrect in practice. Therefore, discrimination alone is insufficient if clinically relevant classification performance remains limited after domain transfer, highlighting the need for calibration-aware and deployment-oriented model evaluation.
This finding indicates that the learned deep features retained discriminatory information under external testing conditions, but the posterior probability distributions became distorted after domain transfer. Such behavior is characteristic of calibration drift in medical imaging AI systems. Despite encouraging discrimination performance, the external validation cohort remained relatively small and originated from a single public dataset. Therefore, the reported results should be interpreted cautiously and should not be considered sufficient evidence for routine clinical deployment. Additional multi-center validation studies involving diverse imaging systems and patient populations are required to further establish generalizability and clinical utility.
Further recalibration analysis using the EfficientNet-B0 + SVM model under the targeted augmentation strategy confirmed the presence of severe class-specific calibration failure. Reliability diagrams demonstrated that the Osteopenia class experienced substantial probability collapse, with predicted probabilities remaining consistently below 0.30 during external testing. Consequently, Osteopenia cases were systematically overridden by Normal or Osteoporosis predictions during argmax classification, resulting in extremely poor recall performance. In contrast, the Osteoporosis class exhibited overconfidence, while the Normal class showed moderate under confidence in low-to-intermediate probability ranges.
Conclusions
This study presents a multi-stage framework for osteoporosis classification from knee X-ray images by integrating deep feature extraction with machine learning classifiers. The experimental results demonstrate that pretrained CNN models, particularly EfficientNetB0 and DenseNet121, are capable of extracting informative and discriminative features associated with osteoporosis status. Among the evaluated classifiers, Neural Network, Efficient Linear, and SVM-based models exhibited stable and reliable performance when combined with deep CNN representations. A key methodological contribution of this work is the integration of complementary deep feature representations, machine-learning-based classification, external validation, and post-hoc calibration analysis within a single translational framework. Unlike conventional single-model approaches, the proposed architecture explicitly addresses both predictive discrimination and deployment-related challenges associated with cross-domain generalization.
The findings further emphasize the importance of data preparation strategies, including targeted augmentation, oversampling, and class balancing. These approaches improved feature separability and minority-class representation, leading to enhanced discriminative performance, particularly in terms of AUC. Nevertheless, the results also indicate that model performance remains strongly influenced by dataset size, diversity, and inter-domain variability, suggesting that larger and more representative datasets are essential for improving model stability and generalizability.
A major contribution of this study is the identification of calibration drift and class-prior mismatch during external validation. Although several models maintained relatively high AUC values under external testing, threshold-dependent metrics such as accuracy and F1-score decreased substantially. This finding underscores that strong discrimination alone is insufficient to support clinical deployment when threshold-based classification performance remains limited under external conditions. Reliability analysis revealed that the primary limitation was not the loss of learned feature representations, but rather distorted posterior probability distributions across domains, especially for the intermediate Osteopenia class.
To address this issue, post-hoc recalibration and class-prior boosting strategies were investigated. The proposed post-hoc adjustment strategy improved minority-class recovery under the evaluated external validation setting, particularly for Osteopenia detection, and enhanced balanced accuracy and macro F1-score during external validation. These findings suggest that adaptive recalibration and threshold optimization may be important components for future clinical translation of AI-based osteoporosis screening systems.
From a clinical perspective, the proposed framework demonstrates the potential of opportunistic osteoporosis assessment using routine knee radiographs. The proposed framework is intended as an opportunistic screening and decision-support tool that can be integrated into routine radiographic workflows. Patients identified as being at elevated risk of osteopenia or osteoporosis from existing knee radiographs may be prioritized for confirmatory DXA assessment and further clinical evaluation. In this manner, the framework has the potential to support early risk identification without replacing established diagnostic procedures.
Overall, this study provides proof-of-concept evidence that a multi-stage CNN and machine learning framework can extract informative osteoporosis-related patterns from routine knee radiographs. The findings further demonstrate the importance of addressing calibration drift and class-prior mismatch when transferring AI models across imaging domains. Nevertheless, the study is limited by its single-center internal dataset and relatively small external validation cohort derived from an independent public dataset. Additional multi-center, prospective validation studies and further calibration research are required before routine clinical implementation can be considered. Despite these limitations, the present findings demonstrate that routine knee radiographs contain clinically relevant information for osteoporosis risk stratification and highlight the importance of combining external validation, calibration analysis, and adaptive threshold optimization when developing clinically transferable AI systems. These principles may serve as a useful foundation for future AI-assisted musculoskeletal screening applications.


