Artificial intelligence beats experienced dermatologists when it comes to skin cancer diagnosis, according to a study published in the journal Annals of Oncology.

Researchers trained a deep learning convolutional neural network (CNN) to distinguish malignant melanomas from benign moles using more than 100,000 photographs. Then, they compared its success rate against those of 58 dermatologists from 17 countries.

And it’s bad news for derms.

"The CNN missed fewer melanomas, meaning it had a higher sensitivity than the dermatologists, and it misdiagnosed fewer benign moles as malignant melanoma, which means it had a higher specificity; this would result in less unnecessary surgery," Holger Haenssle, senior managing physician at the Department of Dermatology at the University of Heidelberg, Germany, said in a statement.

How does it work? Neural networks are a type of machine learning software that operate a bit like the brain’s neural networks. From childhood, we use our five senses to absorb information from our surroundings. With that information, we learn how to recognize patterns.

Take dogs as an example. The first time you saw a dog, you wouldn't have known what it was – until someone told you. As you grow up you are exposed to many dogs of different colors and sizes and before long, you can tell your dogs from your cats even though there are hundreds of dog breeds that look very different from one another.

A neural network might not be able to “see” in the same way we do but it can learn to recognize patterns and categorize objects through exposure and repetition – just like we do.

“With each training image, the CNN improved its ability to differentiate between benign and malignant lesions,” Haenssle explained.

To test it, the team used two sets of images, none of which had been used in training. The first round required the AI and dermatologists to make a diagnosis from the images and decide on the best course of action (surgery, short-term follow-up, or no action).

On average, dermatologists correctly detected 86.6 percent of melanomas and 71.3 percent of benign moles. The CNN identified the same percentage of benign moles but outshone the dermatologists when it came to melanomas, correctly diagnosing cancer 95 percent of the time.

In round two, four weeks later, the dermatologists were provided with clinical information, like age and position of the lesion. This improved their performance, upping their success rate to 88.9 percent for melanomas and 75.7 for benign moles. But the CNN – working only from images – still did better than even the most experienced professionals.

Working dermatologists needn't worry about the robots stealing their jobs just yet. "Currently, there is no substitute for a thorough clinical examination,” the authors wrote. However, this type of technology could one day assist in cancer diagnoses and standardize care so that people regardless of where they live or their doctor's experience level can access reliable diagnostic assessment.