AI identifies people with sharply elevated risk of skin cancer within 5 years

A skin cancer diagnosis can seem to arrive out of nowhere. But buried in years of health records, prescription histories, and demographic data, researchers say there may be clues that help flag people at especially high risk before melanoma appears.

That is the idea behind a large Swedish study that tested whether artificial intelligence could sort through routine healthcare registry data and identify adults more likely to develop melanoma within five years. The work drew on records from more than 6 million people, making it one of the broadest efforts yet to use national population data for melanoma risk prediction.

During the five-year study window, 38,582 of the 6,036,186 adults in the dataset developed melanoma, including melanoma in situ. That amounts to about 0.64% of the population studied.

“Our study shows that data which is already available within healthcare systems can be used to identify individuals at higher risk of melanoma,” said Martin Gillstedt, a doctoral student at the University of Gothenburg’s Sahlgrenska Academy and a statistician at Sahlgrenska University Hospital’s Department of Dermatology and Venereology. “This is not a form of decision support that is currently available in routine healthcare, but our results give a clear signal that registry data can be used more strategically in the future.”

Sam Polesie (Photo: Johan Wingborg) and Martin Gillstedt.
Sam Polesie (Photo: Johan Wingborg) and Martin Gillstedt. (CREDIT: Sam Polesie)

Looking beyond age and sex

Melanoma continues to rise in Western countries, adding pressure to healthcare systems and strengthening the case for earlier detection. Sweden, like other Nordic countries, has extensive national health registries, which gave researchers a rare chance to examine whether machine learning could do more than standard risk estimates based on age and sex alone.

The study included every adult living in Sweden on Dec. 31, 2014, as long as they had not migrated during the years leading up to that date. Researchers then looked for melanoma diagnoses recorded between Jan. 1, 2015, and Dec. 31, 2019, deliberately avoiding the pandemic period.

To make predictions, the team fed several types of information into four machine learning models: age, sex, education, disposable income, marital status, region of birth, parental background, medical diagnoses, prescribed medications, and registry data on basal cell carcinoma. The models tested were logistic regression, random forests, gradient boosting, and a simple neural network known as a multilayer perceptron.

The strongest model, gradient boosting, reached an AUC of 0.735. In practical terms, the researchers said it could distinguish between people who would later develop melanoma and those who would not in about 73% of cases. A model using only age and sex reached an AUC of 0.644, or about 64%.

That gap matters. It suggests that melanoma risk is not captured well by simple demographic information alone.

A small group, a much larger risk

The most striking result came when the researchers looked at the people given the very highest risk scores.

Schematic graph of prediction data and outcome. MLP: Multilayer perceptron (a simple neural network model). Ones (1) represent the occurrence of codes. σi = risk scores (real number in [0, 1]) for melanoma outcome.
Schematic graph of prediction data and outcome. MLP: Multilayer perceptron (a simple neural network model). Ones (1) represent the occurrence of codes. σi = risk scores (real number in [0, 1]) for melanoma outcome. (CREDIT: Acta Dermato-Venereologica)

Among the 301 to 400 individuals with the top risk scores, the estimated probability of developing melanoma within five years was 33%, with a confidence interval of 17% to 53%. In another high-risk group, among those who had never previously had melanoma, the people ranked roughly 1,001 to 1,100 on the risk scale had an estimated melanoma risk of 6.8%, far above the 0.64% baseline across the whole cohort.

That does not mean the system is ready to be rolled out in clinics tomorrow. It does mean the model was able to isolate very small groups whose risk looked dramatically different from that of the general population.

“Our analyses suggest that selective screening of small, high-risk groups could lead to both more accurate monitoring and more efficient use of healthcare resources,” said Sam Polesie, associate professor of dermatology and venereology at the University of Gothenburg and a dermatologist at Sahlgrenska University Hospital. “This would involve bringing population data into precision medicine and supplementing clinical assessments.”

Clues hidden in ordinary records

Some of the strongest predictors were not surprising. People with a history of skin-related diagnoses were more likely to develop melanoma later. Among those born in Sweden with two Swedish-born parents and no earlier melanoma diagnosis, the factors most strongly tied to a later melanoma included melanocytic nevi, invasive melanoma, melanoma in situ, basal cell carcinoma or squamous cell carcinoma, actinic keratosis, and pigmentation-related diagnoses in outpatient records.

Basal cell carcinoma stood out too. It was present in 11.7% of melanoma cases, compared with 2.7% of people who did not develop melanoma.

Receiver operating characteristic curves (ROC). ROC curves are shown for gradient boosting (the best performing model). The performance of this model, also trained only on age and sex or demographic data, is also shown.
Receiver operating characteristic curves (ROC). ROC curves are shown for gradient boosting (the best performing model). The performance of this model, also trained only on age and sex or demographic data, is also shown. (CREDIT: Acta Dermato-Venereologica)

Age also mattered. The median age was 65 for melanoma cases, compared with 54 in the non-melanoma group. Previous melanoma diagnoses were more common among those who later developed melanoma, as were earlier cancer diagnoses more broadly.

Some associations went in the opposite direction. Drugs tied to acute alcohol withdrawal, sedation, anxiety relief, and Alzheimer’s disease appeared less often among those who later developed melanoma. The researchers offered two possible explanations. Those groups may face a higher risk of death before melanoma is diagnosed, or they may simply have lower sun exposure.

Not every group was equally predictable. The model performed worse for people who had already had melanoma, suggesting that future melanoma in this group may be harder to sort out because the patients are more alike.

What the model cannot settle

The researchers were careful not to oversell the results.

For one thing, the study is based entirely on Swedish registry data, so its findings may not carry over cleanly to other countries. The models also treated predictors as time-independent, meaning they did not track how risk changed over time in a more dynamic way. And the outcome was defined as melanoma recorded in the Swedish healthcare system, not every melanoma a person might develop, including diagnoses made abroad.

The team also noted that future code changes, shifts in healthcare use, immigration patterns, and evolving diagnostic habits could all affect how well such models work over time.

Fairness remains another challenge. Swedish registries do not include ethnicity, religion, or race, and the researchers warned that minority groups may be underrepresented in healthcare records because of differences in access and health literacy. That can introduce bias into the data itself. They suggested future work should include fairness constraints across skin photo types and better calibration to reduce false negatives.

There is also the risk of overdiagnosis. Broader screening may detect more skin cancers, especially basal cell carcinomas, that lead to added cost and treatment without always improving outcomes.

Practical implications of the research

This study points to a future in which routine registry data could help healthcare systems focus melanoma screening on people most likely to benefit.

Instead of treating the whole population the same, clinics could use existing records to identify small, high-risk groups for closer follow-up, outreach, or screening invitations. That could make care more targeted and use resources more efficiently, especially as melanoma rates keep rising.

But the researchers say more work, along with policy decisions, would be needed before such an approach becomes part of standard care.

Research findings are available online in the journal Acta Dermato-Venereologica.

The original story “AI identifies people with sharply elevated risk of skin cancer within 5 years” is published in The Brighter Side of News.


Related Stories

Like these kind of feel good stories? Get The Brighter Side of News’ newsletter.


The post AI identifies people with sharply elevated risk of skin cancer within 5 years appeared first on The Brighter Side of News.

Leave a comment
Stay up to date
Register now to get updates on promotions and coupons
HTML Snippets Powered By : XYZScripts.com

Shopping cart

×