Clear Sky Science · en
MultiTask learning AI system to assist BCC diagnosis with dual explanation
Why this matters for everyday skin health
Skin cancer is the most common cancer worldwide, and basal cell carcinoma is its most frequent form. As telemedicine expands, family doctors are sending more skin photos to hospital specialists than ever before, creating long queues and delays. This study presents an artificial intelligence tool that not only spots likely basal cell cancers in these images, but also shows doctors why it reached that conclusion, making it easier to trust and use in real clinics.

How skin photos travel through telemedicine today
In many regions, family doctors use teledermatology to send close-up skin images to hospital dermatologists. These experts look for a set of visual clues, such as certain shapes, colors, and blood vessel patterns, to decide whether a spot is a basal cell carcinoma or something harmless. While the basic rules are well known, each case can look quite different, and specialists must review a growing flood of images from many clinics, which slows down care and strains the system.
Turning expert rules into a helpful assistant
The researchers designed an AI system that follows the same logic specialists use. It looks for seven key visual patterns in each dermoscopic image, such as ulceration or leaf-like shapes, and also checks for a pattern that signals the lesion is unlikely to be basal cell carcinoma. Instead of only saying “cancer” or “not cancer,” the tool reports which of these patterns it sees and then uses simple rules based on dermatologists’ practice to declare a lesion as likely cancer or not. This approach makes the computer’s reasoning easier to understand.

Training the system with many opinions
To teach the AI, the team used 1,559 skin images collected from 60 primary care centers in Andalusia, plus additional non-cancer images from a public archive. Four dermatologists marked which of the seven patterns they saw in each lesion, but there is no perfect reference for these fine-grained patterns, and specialists often disagree. The researchers used a statistical method to merge these different opinions into a single consensus label for each image, capturing the group’s shared judgment while reducing individual bias.
What the AI learned to do
The core of the system is a compact image recognition network adapted from a well-known mobile architecture. It is trained to perform two tasks at once: separating basal cell cancers from other lesions and detecting the visual patterns that support that decision. To handle rare patterns and an uneven dataset, the team applied techniques such as advanced loss functions, data augmentation, and careful cross-validation. The result is a model that correctly classifies lesions as basal cell carcinoma or not about 90% of the time and still performs well at picking out the crucial visual patterns that guide that decision.
Seeing where the AI is looking
Beyond pattern lists, the system provides color maps that highlight the image regions most responsible for its decision. To check whether these maps really match clinical thinking, dermatologists carefully outlined pattern areas on hundreds of images. The researchers then compared the AI’s highlighted zones to these outlines and found that most of the model’s “attention” falls inside the same regions that experts consider important. In nearly all cancer-positive cases, at least one relevant pattern was correctly identified, and in most non-cancer cases the expected “safe” pattern rule was respected.
What this means for patients and doctors
Taken together, the results show that a compact AI tool can help triage skin lesions in teledermatology while giving clear, clinically meaningful reasons for its choices. It does not replace dermatologists, but it can highlight which cases should be seen first and show the visual cues behind its alerts. Because the system runs on lightweight hardware and mirrors specialist reasoning, it is well suited for rapid deployment in primary care networks, with the potential to speed up diagnosis, support learning, and increase trust in AI-assisted skin cancer care.
Citation: Matas, I., Serrano, C., Silva-Clavería, F. et al. MultiTask learning AI system to assist BCC diagnosis with dual explanation. Sci Rep 16, 15652 (2026). https://doi.org/10.1038/s41598-026-40229-8
Keywords: basal cell carcinoma, teledermatology, explainable AI, skin lesion imaging, dermoscopy