Abstract Background Efficient identification of individuals at high risk of skin cancer is crucial for implementing personalized screening strategies and subsequent care. While Artificial Intelligence holds promising potential for predictive analysis using image data, its application for skin cancer risk prediction utilizing facial images remains unexplored. We present a neural network-based explainable artificial intelligence (XAI) approach for skin cancer risk prediction based on 2D facial images and compare its efficacy to 18 established skin cancer risk factors using data from the Rotterdam Study. Methods The study employed data from the Rotterdam population-based study in which both skin cancer risk factors and 2D facial images and the occurrence of skin cancer were collected from 2010 to 2018. We conducted a deep-learning survival analysis based on 2D facial images using our developed XAI approach. We subsequently compared these results with survival analysis based on skin cancer risk factors using cox proportional hazard regression. Findings Among the 2,810 participants (mean Age=68.5±9.3 years, average Follow-up=5.0 years), 228 participants were diagnosed with skin cancer after photo acquisition. Our XAI approach achieved superior predictive accuracy based on 2D facial images (c-index=0.72, SD=0.05), outperforming that of the known risk factors (c-index=0.59, SD=0.03). Interpretation This proof-of-concept study underscores the high potential of harnessing facial images and a tailored XAI approach as an easily accessible alternative over known risk factors for identifying individuals at high risk of skin cancer. Funding The Rotterdam Study is funded through unrestricted research grants from Erasmus Medical Center and Erasmus University, Rotterdam, Netherlands Organization for the Health Research and Development (ZonMw), the Research Institute for Diseases in the Elderly (RIDE), the Ministry of Education, Culture and Science, the Ministry for Health, Welfare and Sports, the European Commission (DG XII), and the Municipality of Rotterdam. G.V. Roshchupkin is supported by the ZonMw Veni grant (Veni, 549 1936320). Research in context Evidence before this study We searched PubMed for articles published in English between Jan 1, 2000, and Sept 28, 2023, using the search terms “skin cancer” AND “artificial intelligence” OR “deep learning”. Our search returned more than 1,323 articles. We found no study had explored the feasibility of predicting the risk of developing skin cancer based on facial images that were taken before the first diagnosis of skin cancer. Although there were studies focused on deep learning image analysis and skin cancer, those are based on skin cancer lesion images. We found current skin cancer risk prediction models are still hampered by dependencies on complex patient data, including genetic information, or rely on self-reported patient data. Added value of this study In this study, we presented a neural network-based explainable artificial intelligence (XAI) approach for skin cancer risk prediction based on 2D facial images. To the best of our knowledge, our study is the first to utilize facial images as predictors in a skin cancer survival analysis. Our novel image-based approach showed superior performance when juxtaposed with traditional methods that relied on clinical and genetic skin cancer risk factors, as observed within our study population Implications of all the available evidence This proof-of-concept study underscores the high potential of harnessing facial images and a tailored XAI approach as an easily accessible alternative over known risk factors for identifying individuals at high risk of skin cancer.