Breast cancer is the most common cancer among women globally, accounting for approximately 30 percent of all female cancers. While mortality rates have declined over recent decades, with mammography screening reducing deaths by an estimated 20 percent and improved treatments accounting for 60 percent, early and accurate detection remains a critical unmet need. Standard screening programs treat all women similarly without accounting for individual risk profiles.
Current breast cancer prediction models tend to focus on a single category of data, such as mammographic image features, demographic risk factors, or genetic markers, without integrating across all known risk domains. This fragmented approach misses the complementary information that each data type provides, since breast cancer is a multifactorial disease shaped by demographic, hormonal, metabolic, and imaging-related factors simultaneously.
Machine learning offers a way to discover non-obvious relationships hidden in complex, high-dimensional datasets that classical statistical methods may miss. By training on large collections of patient records that span multiple data types, machine learning algorithms can identify combinations of features that together predict breast cancer risk more accurately than any single factor alone.
This Iranian study aimed to build and compare multiple machine learning models for breast cancer prediction using a comprehensive 10-year clinical dataset that combined demographic, laboratory, and mammographic features, testing whether integrating all three data types improved predictive accuracy over demographic and laboratory data alone.
The study used 5,178 patient records from Motamed Cancer Institute in Tehran collected over a 10-year period (2011 to 2021). Each record contained 24 features divided into three categories: 11 demographic features including age, BMI, lactation history, physical activity, smoking, marital status, life event stress, and age at menarche and menopause; 9 laboratory features including oral contraceptive use, hormone replacement therapy duration, family and personal history of breast cancer, vitamin D levels, biopsy pathology, and prior cancer history; and 4 mammography features including breast density, micro-lobulated findings, circumscribed masses, and calcification type.
Of the 5,178 records, 1,295 (25 percent) were breast cancer cases and the remainder were benign. After removing 5 male records and handling missing values using the mode substitution method, 1,290 final cases remained. To address the class imbalance between cancer and non-cancer records, the Synthetic Minority Oversampling Technique (SMOTE) was applied during training to ensure models learned from equal representation of both classes, preventing the common problem of classifiers biasing toward the majority class.
Three machine learning classifiers were compared: Random Forest (RF), which builds many decision trees and combines their predictions; Gradient Boosting Trees (GBT), which trains trees sequentially with each learning from the errors of the previous; and Multi-Layer Perceptron (MLP), a feedforward neural network with 10 hidden layers. A Genetic Algorithm (GA) was used as an optimization wrapper to tune hyperparameters and improve each classifier's performance.
Models were trained and evaluated in two configurations: first using only the 20 demographic and laboratory features, then adding the 4 mammography features to all 24 features total. This two-phase design allowed direct measurement of how much mammographic data contributed to prediction accuracy beyond what demographic and laboratory information alone could achieve. Final evaluation used a 75 to 25 percent train-test split.
Feature importance analysis revealed that family history of breast cancer and personal history of breast cancer carried the highest weights in prediction models (0.92 and 0.89 respectively), consistent with their established roles as primary breast cancer risk factors in the clinical literature. These two features dominated the feature importance rankings across algorithms.
Breast density and age at diagnosis each received importance weights of 0.80, reflecting their well-established contributions to breast cancer risk. Dense breast tissue is both a direct risk factor and limits mammographic sensitivity, while age is the fundamental driver of breast cancer incidence. These findings validate the model's consistency with established clinical knowledge.
Other notable features included hysterectomy history, biopsy pathology type, and vitamin D levels. Prior research has found a statistically significant association between hysterectomy and breast cancer risk. The inclusion of biopsy findings is expected given that pathological classification directly encodes histological risk, but the study design did not separate diagnostic from predictive features, which is an important methodological consideration.
Adding mammography features to the model improved gradient boosting sensitivity from 63 percent to 82 percent and accuracy from 62 percent to 74 percent, representing substantial gains for the algorithm with the highest AUC. Similarly, the MLP improved from 78 percent sensitivity to 82 percent sensitivity when mammography features were added. Random forest sensitivity improved from 93 percent to 95 percent with mammography features included, though its AUC remained at 0.53.
Across all three algorithms with all 24 features, Gradient Boosting Trees (GBT) achieved the highest AUC of 0.59, with 82 percent sensitivity, 86 percent specificity, and 74 percent accuracy. While its AUC appears modest, GBT's strength in this dataset lies in its balance between sensitivity and specificity, achieving the highest specificity of any model tested (86 percent), meaning it produced relatively few false positive classifications.
The Random Forest (RF) model achieved the highest sensitivity of 95 percent, meaning it detected almost all true breast cancer cases but with more false positives (80 percent specificity and 80 percent accuracy). An AUC of 0.53 is only slightly above chance and suggests limited overall discriminative ability for this model on this dataset, despite the high sensitivity. In breast cancer screening contexts, high sensitivity is often prioritized to avoid missing cases.
The Multi-Layer Perceptron (MLP) achieved 82 percent sensitivity, 84 percent specificity, and 73 percent accuracy with an AUC of 0.56, performing between GBT and RF in most metrics. This balanced performance profile, combined with its flexibility for capturing non-linear relationships, makes MLP a reasonable choice when neither sensitivity nor specificity is prioritized exclusively over the other.
The relatively modest AUC values across all three models (0.53 to 0.59) are lower than some published breast cancer prediction studies that used well-curated benchmark datasets such as the Wisconsin Breast Cancer Database or the SEER registry. The authors attribute this gap to the real-world clinical nature of their data, which includes greater noise, missing values, and heterogeneous feature types compared to controlled benchmark datasets.
The broader literature on breast cancer prediction with machine learning reveals that datasets combining multiple types of risk factors consistently outperform single-factor models. Behravan and Hartikainen demonstrated that XGBoost combining demographic and genetic data improved AUC from 0.678 (single factor) to 0.788 (combined), while Ayvaci et al. achieved AUC of 0.84 by combining demographic, mammography, and biopsy data with logistic regression. These results support the multifactorial approach of this study.
Studies reporting very high accuracy values (approaching 100 percent) in breast cancer prediction typically use idealized benchmark datasets such as the Wisconsin dataset, which consists of pre-extracted histological features from biopsy specimens rather than messy real-world clinical records. The AUC values in this study reflect the harder task of predicting breast cancer from mixed clinical data with real-world noise, making direct comparison with benchmark-based results misleading.
The advantage of Genetic Algorithm optimization for feature selection was supported by published literature. Studies using GA for feature selection and hyperparameter optimization in breast cancer classification consistently showed improved model performance compared to unoptimized counterparts. This aligns with the observation in this study that GA-tuned models achieved better configurations across all three classifiers.
The finding that mammographic data adds meaningfully to sensitivity, particularly for gradient boosting, reinforces the argument that integrating imaging features with clinical risk factors provides complementary information. Mammography captures tumor morphology and tissue density patterns that laboratory and demographic data cannot encode, and combining these perspectives allows models to leverage both biological risk indicators and direct tumor appearance.
This study demonstrated that machine learning can predict breast cancer from a combination of demographic, laboratory, and mammographic clinical data, with gradient boosting achieving the highest overall AUC and random forest achieving the highest sensitivity. The finding that all three algorithms improved when mammographic features were added supports integrating multiple data types rather than relying on any single category of predictors.
The primary limitations are the single-center design and the absence of genetic data. The dataset was drawn entirely from one Iranian cancer research institute, meaning the findings may not generalize to populations with different ethnic backgrounds, healthcare systems, or referral patterns. Access to genetic data such as BRCA1/2 status and polygenic risk scores could further improve model accuracy, particularly for identifying high-risk younger patients without strong imaging findings.
The inclusion of biopsy pathology results as a feature is a conceptual limitation in a prediction context, since biopsy results are themselves part of the diagnostic process rather than a pre-diagnostic risk indicator. Models incorporating biopsy data may be characterizing known cancer cases rather than predicting future risk in truly undiagnosed patients. Prospective validation separating pre-diagnostic features from post-diagnostic ones would clarify this distinction.
Future directions include expanding to multi-center datasets that include data from different institutions and ethnic populations, incorporating genetic and molecular markers, and developing visual prediction tools such as nomograms that would make model outputs interpretable and actionable for clinicians and patients without statistical expertise.