Artificial intelligence applied to pathological anatomyhas attracted a particular interest from pathologists and, in more detail, also from dermatopathologists. Increasing attention is being paid to the applications of AI and ML in the diagnosis of simple or more complex skin lesions, and the training of AI algorithms is gathering increasing feedback from the scientific community.
In the last two decades, an unprecedented development of information technologies associated with a considerable increase in memory units has allowed giant strides to be made in the futuristic field of artificial intelligence (AI). Although this is the prerogative of the informatics and technological branches, the use of software and new technologies has spread to many different fields of medicine, indeed to practically all branches, including pathological anatomy and, therefore, also the subbranch of dermatopathology 
Artificial intelligence applied to pathological anatomy 
has attracted a particular interest from pathologists and, in more detail, also from dermatopathologists. Increasing attention is being paid to the applications of AI and ML in the diagnosis of simple or more complex skin lesions, and the training of AI algorithms is gathering increasing feedback from the scientific community 
. In a recent paper by Sam Polesie et al. 
, an attempt was made to understand the degree of perception, attitude and knowledge of AI in general and then as applied to dermatology and dermatopathology. An anonymous, voluntary online survey was prepared and distributed to pathologists who regularly analyze dermatopathology slides/images. In total, 718 people from 91 countries responded to this survey (64.1% of them women). While 81.5% of the respondents were aware of AI as an emerging topic in pathology, only 18.8% had a good or excellent knowledge of AI. In terms of diagnosis classifications, 42.6% saw a strong or very strong potential for automatic suggestion of the possible skin cancer diagnosis. The corresponding figure for inflammatory skin diseases was 23.0%. For specific applications, the highest potential was considered to be for automatic detection of mitosis (79.2%) and tumor margins (62.1%) and for the evaluation of immunostaining (62.7%). The potential for automatic suggestion of immunostaining (37.6%) and genetic panels (48.3%) was seen as lower. This study highlighted that respondent age did not affect the general attitude towards AI. Only 6.0% of the respondents agreed or firmly agreed that human pathologists will be replaced by AI in the near future. Among the whole group, 72.3% agreed or firmly agreed that AI will improve dermatopathology and 84.1% think AI should be part of medical education. All this demonstrates profound recent changes in the very perception of AI and ML and that an increasing number of applications of these is occurring in various medical fields. For example, in some studies 
, artificial intelligence algorithms match or outperform doctors in disease detection related to medical imaging. Additionally, the use of AI has been facilitated by the availability of affordable high-speed Internet, new computing power and secure cloud storage to manage and share datasets. Therefore, it has been possible to make these algorithms scalable on multiple devices, platforms and operating systems, transforming them into modern medical tools 
. The paper by Esteva et al. 
applied a deep learning algorithm to a combined skin dataset of 129,450 clinical and dermoscopic images consisting of 2032 different skin lesions. The AI performance was shown to be on a par with the dermatologists’ performance for skin cancer classification. Deep learning solutions have been successful in the field of digital pathology with whole-slide imaging (WSI). Examples of histopathological images of skin lesions are shown in Figure 1
Figure 1. Examples of images of lesions used in various studies in the literature. (A) Basal cell carcinoma, superficial variant (hematoxylin–eosin, original magnification: 4×). (B) Seborrheic keratosis, hyperkeratotic variant (hematoxylin–eosin, original magnification: 10×). (C) Squamous cell carcinoma (hematoxylin–eosin, original magnification: 20×). (D) Intradermic nevus (hematoxylin–eosin, original magnification: 10×). (E) Amelanotic malignant melanoma (hematoxylin–eosin, original magnification: 20×).
Hekler et al. 
analyzed 695 lesions previously classified by an expert histopathologist according to the guidelines (of which 350 were nevi and 345 were melanomas). Hematoxylin and eosin (H&E)-stained slides of these lesions were scanned using a slide scanner and then randomly cut out; 595 of the resulting images were used to train a convolutional neural network. The additional 100 sections of H&E images were used to test the CNN results against the original class labels. The authors reported a discrepancy with the histopathologist of 18% for melanoma (95% confidence interval (CI): 7.4–28.6%), 20% for nevi (95% CI: 8.9–31.1%) and 19% for the full set of images (95% CI: 11.3–26.7%).
Jiang et al. 
aimed to develop deep neural network structures for accurate BCC recognition and segmentation based on microscopic ocular images (MOI) acquired by smartphones. To do this, they collected a total of 8046 MOIs, 6610 of which had binary classification labels, while the other 1436 had pixel-by-pixel annotations. Meanwhile, 128 WSIs were collected for comparison. Two deep learning frameworks were created. The “waterfall” framework had a classification model for identifying difficult cases (images with low prediction confidence) and a segmentation model for further in-depth analysis of difficult cases. The “segmentation” framework directly segmented and categorized all images.
Cruz-Roa et al. 
used a deep learning architecture to discriminate between BCC and normal tissue models in 1417 images from 308 regions of interest (ROIs) of skin histopathology images. They compared the deep learning method to traditional machine learning with feature descriptors, including feature pack, canonical and Haar wavelet transformation. The deep learning architecture proved superior to traditional approaches, reaching 89.4% in F-measure and 91.4% in balanced accuracy.
Table 1 summarizes other studies present in the literature and not mentioned in the entry.
Table 1. Other studies present in the literature besides those analyzed in the Discussion section of this work.
||Type of AI
|Potter et al. 
|Concordance and possibility of integration with patient clinical data
||Disagreement and little memory space
|Crowlet R. et al. 
|Possibility of learning rather easily
||Clear prototypical schemes are indispensable
|Joset Feit et al. 
||Hypertext atlas of dermatopathology
||A collection of about 3200 dermatopathological images
|Payne et al. 
|Tutoring made it possible to implement the training of learners
||Ability to learn from mistakes
||Greater difficulties in tutoring related to superficial
|Olsen et al. 
||Deep learning algorithms
||The artificial intelligence system accurately classified 123/124 (99.45%) BCCs (nodular), 113/114 (99.4%) dermal nevi and 123/123 (100%) seborrheic keratoses
||Difficulty in presenting artifacts, poor coloring
Peizhen et al. 
built a multicenter database of 2241 digital images of whole slides of 1321 patients from 2008 to 2018. They trained both ResNet50 and Vgg19 using over 9.95 million patches by transferring learning and test performance using two types of critical classifications: melanoma malignant versus benign nevi in separate and mixed magnification, and distinguishing nevi at maximum magnification. Regions of interest (ROIs) were also localized, which was significantly useful, offering pathologists greater support for the correct diagnosis. Although the development of ML-based AI is spreading in dermatopathology, we are still quite far from its application in clinical routine because, even when compared to the algorithms applied in dermoscopy, there is less sensitivity and specificity and hence less accuracy. More specifically, some histological lesions closely mimic other types of neoplasms, such as skin adnexal lesions, which can require differential diagnosis with BCC, SCC, KS or melanoma 
. Furthermore, despite rather promising values, these algorithms are not able to diagnose a malignant lesion (for example, melanoma) in all cases, thus making their use unacceptable without human control