Abstract
<jats:p>Background & Aims: Haematoxylin and eosin (H&E) staining remains the diagnostic gold standard for solid cancers, including hepatocellular carcinoma, and is increasingly complemented by genomic profiling for precision medicine. Inferring genomic alterations directly from H&E images could streamline testing, but heterogeneity and biases in human training data limit interpretation of genotype-phenotype associations. Here, we aimed to relate histologic to genomic pathology to provide biological explainability for mutation prediction models and assess the impact of germline variation on model performance. Methods: We analysed 597 murine liver tumours with matched whole-genome sequencing and histopathology (163,835 image tiles; 22.9 million nuclei). Our controlled in vivo design accounted for germline variation, biological sex, and causal mutagen (N-diethylnitrosamine), removing confounding factors present in human cohorts. We trained and evaluated deep learning and supervised machine learning models to predict germline variation and cancer driver alterations from H&E. Results: Modelling accurately predicted germline and somatic alterations from histology, at both locus-specific and genome-wide scales. Quantitative image analysis revealed an unexpected association between Egfr driver mutations and hepatic steatosis, linking genotype to an interpretable morphological phenotype. While model performance declined when applied to tumours from unrepresented genetic backgrounds, this limitation was biologically informative, revealing strain-dependent differences in tumour evolution, notably the prevalence of whole-genome duplication. Conclusions: Machine learning integration of histological and genomic pathology enables accurate, interpretable inference of genetic alterations from H&E, potentially reducing reliance on costly ancillary molecular assays. Our predictions are supported by human-interpretable biological features, addressing concerns around 'black-box' technologies. However, caution is required when applying such methods to samples with a genetic background that, even if closely related, is beyond the genetic horizon of training data.</jats:p>