Abstract
Primary liver cancers, predominantly hepatocellular carcinoma (HCC) and intrahepatic cholangiocarcinoma (ICC), represent major global health challenges due to late diagnosis, biological heterogeneity, and poor survival outcomes. The emergence of artificial intelligence (AI) and machine learning (ML) has revolutionized liver oncology by enabling automated, data-driven decision support for early detection, clinical staging, and personalized prognosis prediction. This study presents a comprehensive exploration of advanced image processing and machine learning models for early diagnosis and prognostic modeling of primary liver cancers, integrating multi-modal imaging data with clinical and molecular information to enhance diagnostic accuracy and predictive power. The proposed framework employs a multi-phase imaging pipeline, combining radiomics feature extraction, convolutional neural networks (CNNs), and transformer-based architectures for high-resolution analysis of computed tomography (CT), magnetic resonance imaging (MRI), and ultrasound data. Preprocessing techniques such as contrast enhancement, lesion segmentation, and texture mapping are implemented to ensure consistency and noise reduction. Extracted features are fused with laboratory biomarkers and clinical metadata using ensemble ML models random forests, gradient boosting, and deep neural networks to achieve robust lesion classification, early tumor detection, and risk-level differentiation. Prognostic modeling leverages survival regression and deep learning-based survival analysis (DeepSurv, Cox-nnet) to forecast recurrence likelihood, progression-free survival, and overall patient outcomes. Experimental validation on publicly available datasets (LiTS, TCIA Liver, and institutional cohorts) demonstrates superior diagnostic performance, with accuracies exceeding 92%, area-under-curve (AUC) values above 0.95, and significant improvement in early-stage detection compared to traditional radiological methods. The prognostic models exhibit strong calibration and generalizability, enabling reliable outcome prediction and aiding treatment planning. Furthermore, explainable AI techniques Grad-CAM, SHAP, and integrated gradients are employed to visualize model reasoning, increasing transparency and clinician trust. The study underscores the transformative potential of AI-driven imaging analytics in liver oncology, bridging the gap between computational innovation and clinical practice. By integrating advanced image processing, ML-based diagnostic classification, and prognostic modeling, the proposed framework supports precision medicine, enhances diagnostic objectivity, and facilitates early therapeutic intervention. Future directions include real-time clinical deployment, federated learning for privacy-preserving model training, and integration with digital pathology and genomics for holistic liver cancer management.