Ductal carcinoma in situ (DCIS) is the most common form of non-invasive breast cancer, confined to the milk ducts and accounting for around 84% of all in situ cancers. Breast cancer becomes invasive when tumor cells grow outside the ducts into surrounding breast tissue, a shift that substantially worsens prognosis and limits treatment options.
Early and accurate identification of whether a breast cancer is still non-invasive or has already become invasive directly affects the treatment choices available to patients. DCIS patients may be candidates for breast-conserving surgery with targeted local therapy, while invasive cancers often require more aggressive systemic treatment. Getting the classification right matters enormously for patient quality of life.
Traditional prognostic factors such as lymph node status, tumor size, histological grade, and margin width are well-established predictors for larger invasive tumors but are less reliable for small lesions, including minimally invasive breast cancer (MIBC), defined here as invasive tumors no larger than 15 mm. Distinguishing DCIS from MIBC represents a particularly difficult diagnostic challenge where additional decision support tools could reduce uncertainty.
While machine learning has been applied to breast cancer detection and to differentiating benign from malignant lesions, no prior study had specifically developed an ML model to distinguish DCIS from MIBC using the combination of clinical, imaging, and histopathological data routinely collected during workup. This study aimed to fill that gap with a practical, record-based classification tool.
The study retrospectively analyzed 420 women who underwent biopsies confirming breast cancer at Wanfang Hospital, Taipei Medical University, between 2010 and 2020. From an initial pool of 1,377 patients, strict inclusion criteria selected 189 with pure DCIS and 231 with MIBC (invasive tumors 15 mm or smaller on histology), excluding patients with microinvasion or oversized tumors to keep the two classes diagnostically comparable.
An extensive set of 187 features was collected from electronic medical records across four domains: clinical characteristics (age, BMI, menopausal status, family history, hormone replacement therapy use), mammographic findings interpreted with BI-RADS 5th edition criteria, ultrasonographic findings also interpreted with BI-RADS criteria, and histopathological parameters including nuclear grade, comedo necrosis, architectural pattern, and receptor expression (ER, PR, HER2).
Not all patients had both imaging modalities. Mammography was not performed in 99 patients (24%) and ultrasound was not performed in 22 patients (5%), creating missing data. Features missing in more than 30% of patients were excluded from the model, while features missing in fewer than 30% were statistically imputed. A correlation filter then removed features that were highly correlated with other features (above 0.8), reducing redundancy.
The final dataset was split into a training set of 357 patients (70%), a validation set of 63 patients (15%), and a test set of 63 patients (15%). The two cancer groups were well-matched on most clinical characteristics, with statistically significant differences only in age at first live birth, family history of breast cancer, and BMI distribution, suggesting these variables carry meaningful signal for distinguishing the two cancer types.
XGBoost (Extreme Gradient Boosting) is a gradient boosting algorithm that builds an ensemble of decision trees sequentially, where each new tree corrects the errors of the previous ones. It is computationally efficient because it uses approximate algorithms to find optimal tree splits rather than exhaustive search, and it incorporates regularization to reduce overfitting. It is widely used in tabular medical data classification tasks due to its strong performance and interpretability.
After preprocessing and correlation filtering, a feature importance analysis was used to identify the optimal subset of features. The Select K Best algorithm was applied to rank features by their predictive contribution to the XGBoost model. Testing multiple values of k, the researchers found that a set of 147 features produced the best combination of accuracy, F1 score, recall, and precision. The final model was wrapped in the SelectFromModel algorithm to automatically extract the most informative features from the full feature set.
To prevent overfitting, k-fold cross-validation was applied during training, and hyperparameters were manually tuned using a grid search method. Key hyperparameters included a learning rate of 0.03, a maximum tree depth of 6, 200 estimators (trees), and a subsample ratio of 0.7. These settings balance model flexibility and regularization to improve generalization to the test set.
SHAP (Shapley Additive Explanations) analysis was used alongside XGBoost's built-in feature importance scores to identify and visualize the 20 features contributing most to classification. SHAP values provide a rigorous mathematical framework for attributing each prediction to specific input features, allowing both global feature ranking and individual patient-level explanation. Model performance was also benchmarked against four alternative ML algorithms: random forest, support vector machine, Gaussian naive Bayes, K-nearest neighbors, and decision tree classifier.
After feature importance selection, the XGBoost model achieved an AUC of 0.93 (95% CI: 0.87-0.95) on the test set, with an accuracy of 0.84, sensitivity of 0.91, and specificity of 0.75. This performance substantially exceeded the baseline model (all features without selection), which had achieved only an AUC of 0.81 and accuracy of 0.79, demonstrating that strategic feature selection meaningfully improved discrimination between DCIS and MIBC.
SHAP analysis identified the five features with the highest influence on predictions: the appearance of calcification on mammography had by far the highest SHAP importance score (1.53), followed by non-parallel mass orientation on ultrasound (0.84), absence of microcalcification in invasive carcinoma on histopathology (0.39), posterior acoustic shadowing on ultrasound (0.28), and BMI group (0.27). In contrast, XGBoost's own importance scores highlighted calcification on mammography, lymph node presence, microcalcification on histopathology, irregular mass shape on ultrasound, and non-parallel mass orientation.
The clinical interpretation of these findings is coherent with breast imaging principles. Non-parallel mass orientation, irregular shape, and posterior acoustic shadowing are well-established ultrasound features of invasive cancers, reflecting their tendency to infiltrate into surrounding tissue rather than growing within contained ductal spaces. Mammographic calcifications are a key DCIS hallmark, making their morphology and distribution important signals for distinguishing the two lesion types.
Compared to the four alternative ML algorithms, XGBoost achieved the best overall accuracy (0.84) and F1 score (0.87). The random forest classifier came second with accuracy of 0.82 and F1 score of 0.84. Gaussian naive Bayes, K-nearest neighbors, and decision tree classifiers all performed worse, with accuracies ranging from 0.63 to 0.75, confirming XGBoost as the superior choice for this multi-feature tabular classification task.
The model's performance was compared against two radiologists who independently classified the same test cases using standard imaging reports. Radiologist 1 was a first-year resident who, when using both mammography and ultrasound together, achieved sensitivity of 0.74 and specificity of 0.64. This was significantly lower than the XGBoost model's sensitivity of 0.91 and specificity of 0.75 (p less than 0.05 for both metrics).
Radiologist 2, with over ten years of breast imaging experience, achieved sensitivity of 0.83 and specificity of 0.71 when using both modalities combined. The difference between the experienced radiologist and the model was not statistically significant (p greater than 0.05), indicating that the XGBoost model performs at the level of a seasoned breast imaging specialist.
Both radiologists achieved better performance when using mammography and ultrasound together compared to either modality alone, confirming established evidence that multimodal imaging improves breast cancer classification. The model's advantage is that it simultaneously processes features from all four data domains (clinical, mammographic, ultrasound, and histopathological) rather than integrating only two imaging modalities, suggesting it has access to a more comprehensive information set.
The model's strong performance reflects the genuine clinical utility of combining multiple data sources. Individually, mammographic or ultrasound features provide incomplete information, but combining them with clinical risk factors and histopathological findings creates a richer, more complete picture of each tumor's biological nature. The model's ability to integrate 147 features simultaneously represents a clear advantage over the limited cognitive bandwidth of individual clinicians reviewing data sequentially.
The importance of calcification patterns on mammography in distinguishing DCIS from MIBC aligns with known biology: DCIS is strongly associated with microcalcifications because tumor cells within confined ducts undergo necrosis and calcium deposition. Once a lesion becomes invasive and grows beyond ductal boundaries, the calcification pattern changes and additional features like mass irregularity and acoustic shadowing become more prominent on ultrasound.
The finding that BMI group appears among the top predictive features is consistent with published epidemiological data linking BMI to the risk of small invasive lesions. The association of family history of breast cancer with DCIS over MIBC in this dataset also aligns with known patterns of hereditary breast cancer, where BRCA-related pathways may predispose to in situ rather than immediately invasive presentations in some cases.
This study demonstrates that an XGBoost model combining clinical characteristics, mammographic findings, ultrasound findings, and histopathological features can distinguish DCIS from minimally invasive breast cancer at the level of an experienced radiologist, achieving AUC 0.93 and 91% sensitivity. The SHAP-based interpretability framework makes the model's predictions explainable and actionable for clinical use.
Key limitations include the single-center retrospective design, which limits generalizability. External validation in independent cohorts from other institutions and patient populations would be necessary before clinical implementation. The relatively modest sample size of 420 patients, while adequate for the current study, would benefit from larger prospective validation. Missing data for patients who did not undergo both imaging modalities also constrained the completeness of the feature set.
Future improvements could incorporate radiomic features extracted directly from mammography or MRI images, which would capture quantitative imaging patterns beyond the categorical BI-RADS descriptors used here. A convolutional neural network approach trained on raw images combined with the tabular clinical data could further improve discrimination. If validated externally, this model could serve as a real-time decision support tool for radiologists, reducing the time burden of classification and expanding the therapeutic options available to patients through earlier and more accurate diagnosis.