Dermoscopic Image Classification with Neural Style Transfer

Skin cancer, the most commonly found human malignancy, is primarily diagnosed visually via dermoscopic analysis, biopsy, and histopathological examination. However, unlike other types of cancer, automated image classification of skin lesions is deemed more challenging due to the irregularity and variability in the lesions' appearances. In this work, we propose an adaptation of the Neural Style Transfer (NST) as a novel image pre-processing step for skin lesion classification problems. We represent each dermoscopic image as the style image and transfer the style of the lesion onto a homogeneous content image. This transfers the main variability of each lesion onto the same localized region, which allows us to integrate the generated images together and extract latent, low-rank style features via tensor decomposition. We train and cross-validate our model on a dermoscopic data set collected and preprocessed from the International Skin Imaging Collaboration (ISIC) database. We show that the classification performance based on the extracted tensor features using the style-transferred images significantly outperforms that of the raw images by more than 10%, and is also competitive with well-studied, pre-trained CNN models through transfer learning. Additionally, the tensor decomposition further identifies latent style clusters, which may provide clinical interpretation and insights.


Introduction
Skin cancer is the most common type of cancer in the world, with millions of cases occurring globally each year [3]. Melanoma, the deadliest type of skin cancer, causes up to more than 10,000 deaths in the U.S. annually [3]. However, studies show that the early detection of melanoma is crucial and can significantly increase the survival rates of patients [3,5]. Dermoscopy is the examination of skin lesions with a dermoscope, which allows for enhanced inspection of skin lesions unobstructed by reflections of skin surfaces [7]. Studies have shown that this technology yields a higher diagnostic accuracy compared to standard photography [8] when implemented by dermatologists. Nevertheless, the correct classification of lesion types highly depends on the clinical experiences and skills of each dermatologist, and is prone to inter-observer variation [4].
Therefore, this has motivated many studies to develop more automated and accurate classification methods to supplement the dermatologists [6,11,13,14,16].
Automated skin lesion classification and machine learning research for skin cancer diagnostics have received much attention in the last decade, especially for image feature extraction [25,11,13].
One major area of such work focuses on quantifying the ABCD rule (Asymmetry, Border, Color, and Differential Structure) [11,18,25] or the 7-point checklist [13,17], which have been widely adopted by dermatologists and can serve as initial inputs for either a deterministic or model-based classification scheme. On the other hand, deep learning has found much success in image analysis applications with deep feature extraction capability such as the Convolutional Neural Network (CNN) [52,57], and has been effective in dermoscopic classification problems [16,26,61].
However, although CNN-based models provide powerful classification performance, the black-box nature of CNN models [47,48] makes them less interpretable from a clinical perspective.
Tensor decomposition has shown to be a great tool for image clustering and latent feature extraction due to its natural representation of images as higher order tensors [50]; for example, brain FRMI [33], head and neck cancer [35], and breast cancer [34]. However, there has been a lack of literature using tensor decomposition for skin lesion classification problems. One reason behind this may be due to the heterogeneity of lesion shapes, locations, and sizes, which makes implementating tensor decomposition challenging since it is infeasible to stack the images together [42]. Therefore, this motivates us to consider a novel image registration method [69] to align the lesion information to effectively implement tensor decomposition. Medical image registration is very popular among radiology [68] and brain FRMI [33], primarily to register patient images across different time periods, angles, or modalities [69]. However, medical registration is still lacking for dermoscopic imaging [66]. In this paper, we propose modern techniques such as neural style transfer to bridge this gap.
Neural Style Transfer (NST) [29] is a successful application using deep learning. The algorithm originally aims to extract the style of an art or image and transfer it onto another image (commonly referred to as the 'content' image) [30,32]. Recently, NST [29] has been integrated with the Generative Adverserial Network (GAN) [63] for data augmentation purposes [41,64], and has been used to generate artificial skin lesion images [64,65]. However, the fundamental purpose of these methods is not to process and register existing images, but rather focusing on creating new, synthetic images from existing images. Therefore, they do not address the issue of heterogeneity of lesion structures, as mentioned above. Additionally, these methods [64,65] do not enforce spatial control over the style-transfer process [30], which may capture unwanted texture information, e.g., background skin texture.
In this paper, we propose a novel adaptation of the NST algorithm [29,30] as an image preprocessing and registration step for dermoscopic images, and subsequently implement the CAN-DECOMP/PARAFAC (CP) decomposition [50] as a feature extraction method for dermoscopic images. We introduce a new paradigm to capture texture information of skin lesions for melanoma classification. In particular, we first transfer the style of a skin lesion to a homogeneous content image, constructed from the mean values of the red/green/blue (RGB) channels across all lesion images. We further enforce spatial control [30] over the transfer process with the implementation of segmentation masks. Thus, only the lesion information is transferred and any non-lesion related information is omitted during the process. Our proposed method ultimately extracts, magnifies, and normalizes all the lesions' positions in the same imaging region, which permits the successful implementation of higher-order tensor decomposition methods [50] to learn predictive latent style features successfully for more accurate classification performance.
Our contributions are mainly two-fold. First, we introduce a novel paradigm to extract and register lesion textures for classification purposes by implementing the style transfer framework that is mostly used in artwork [29]. We further show that the style-transferred images yield image features that are significantly more predictive than the features obtained from raw images using tensor decomposition, and are competitive with pre-trained and fine-tuned end-to-end CNN models. Sec-ond, our proposed method provides additional representation of different lesion clusters according to their style/texture, which may benefit clinical interpretation and diagnostics. As opposed to the existing style-GAN [63] literature for data augmentation of skin lesion classification problems [64,65], our proposed method does not perform data augmentation. Instead we develop a more interpretable formulation for end-to-end deep learning models while still achieving competitive classification performances. To the best of our knowledge, our work is the first study to extract and register the texture of skin lesions for general melanoma classification, and is the first work to apply tensor decomposition to lesion images for interpretable clustering and feature extraction.
The paper is structured as follow. Section 2 provides an overview of the existing literature. Section 3 presents a discussion of the dataset used in this study. Section 4 discusses the preprocessing and segmentation of lesion images. Section 5 and 6 present the proposed methodology and feature extraction methods respectively, along with the classification models considered for this study. We present the results of this study in Section 7. Section 8 concludes this study with some remarks on the proposed method. An illustration of our proposed analysis pipeline is provided in

Notations
We first introduce the notation used in this study. Here, we denote a tensor as X , where X ∈ R I 1 ,I 2 ,...,In , a matrix as X, and a vector as x i . An image is denoted as x. In our study, each colorized dermoscopic image is a tensor with 3 color channels, and the corresponding lesion mask is a binary image with a single color channel. Additionally, is the element-wise product, * is the Khatri-Rao product, and † is the pseudoinverse.

Related Work
The existing literature in automated melanoma classification usually consists of three/four consecutive operations, i.e., (a) image pre-processing, (b) lesion segmentation, and (c) feature extraction and selection, and (d) classification [6,11].
Due to the innate limitations of dermoscopic imaging, unwanted artefacts such as dark corners, marker ink, gel bubbles, color discs, and ruler marks [6,7] may be present. Another major artefact is the presence of skin hair [7]. Typically, median/bilinear filtering [36] has been widely adopted in removing minor image artefacts. For thicker skin hair, the DullRazor algorithm [56] has been demonstrated to work well. On the other hand, different dermoscope devices and usage may cause variation in illumination, contrast and noise [11,13]. To normalize the color channels, one can subtract the average RGB value [11] or intensity of the background skin [14] from each lesion. Alternatively, Barata et. al [12] investigated four different color normalization schemes [12] for color and illumination constancy, and showed that these schemes can effectively improve classification performance.
The following step is to conduct image segmentation. This is done to isolate the lesion region from the background skin for downstream feature extraction. Although conceptually simple, this is a very important part of the automated classification pipeline, as most feature extraction methods (e.g. asymmetry or border irregularity), including the proposed NST algorithm, are dependent on the quality of the segmentation masks. The earliest and still widely used method for image segmentation is Otsu's method [24], which is simply performing image thresholding; i.e., dividing the image into a foreground and background according to a specified pixel value. Later developments have include clustering (median cut, k-means, fuzzy-c means and mean shift) [23] and more recently, deep learning based approaches [10,14,58]. In particular, the fully connected U-net [58], a symmetric U-shaped deep neural network, has proven to be very efficient and effective in performing medical image segmentation [14].
The next and most important step for automated lesion classification is feature construction and extraction, and consequently, classification [11,13,14,6]. There are primarily two approaches for this step. The first approach is through manual feature construction, where different measurements of lesions are used as features, such as shape (area, asymmetry, diameter, etc.), color (mean and SD of color channels), and texture (gray-level co-occurrence matrix [67]). These quantifications are largely inspired by the ABCD rule [25], and have been widely adopted and expanded in the existing literature. For example, Ganster et al. [11] extracted color and shape features from images of a large dataset (5000+ images), and achieved a sensitivity and specificity of 87% and 92% respectively with a KNN classifier. Celebi et al. [51] extracted a large feature vector for each lesion after dividing each lesion region into several clinical feature areas. They achieved a respective sensitivity and specificity of 93% and 92% on a unbalanced dataset of 564 images. Codella proposed a 2-systems approach, where they considered both global (extracted from entire lesion), and local (extracted from parts-of-whole lesion patches) features for classification on the PH 2 dataset of 200 images [21]. Studies conducted by other researchers also follow this direction [6,9,18,15]. The second approach for feature extraction is to use CNN models [16,26,61,19], usually under the transfer learning framework [26,60]. Lopez et al. considered transfer learning and fine tuning of the VGG16 network [52] in the ISIC 2016 competition [70], and reported a new top sensitivity of 0.795. Esteva et al. [26] presented a landmark work within this field, where they trained a large dataset of 129,450 images via transfer-learning using a pre-trained InceptionV3 model [60].
They reported an AUC of 0.94 for melanomas classified exclusively with dermatoscopic images.
Codella et al. [14] considered an ensemble of popular pre-trained models and hand-coded features, and reported a 7% improvement over the top result in the ISIC 2016 competition [70]. However, despite the promising results of these works, the different datasets used in each study make it difficult to compare the methods or relevance of the features across different studies [54,28]. Recently, the International Skin Imaging Collaboration (ISIC) [54] has made an effort to unify the datasets used in dermoscopic imaging studies by providing a large repository of public images, and an annual data competition that consists of lesion segmentation, feature extraction, and classification [70,71].

Dataset
The dermoscopic images considered in this paper are described in [28], and are available for public download through the ISIC database [54]. These are 24-bit JPEG images with a typical resolution of 768 × 512 pixels. However, not all the images in the database are in satisfactory condition. To first validate our approach, we constructed a high-quality, balanced dataset of 1000 images (500 malignant and 500 benign) by omitting the images that satisfiy any of the following conditions [11]: (a) the entirety of the tumor does not fit within the image frame, or the tumor has been partially masked by the borders of the dermoscope, (b) an abundance of hair which blocks a significant portion of the lesion, to the extent that hair removal algorithms are ineffective, (c) are duplicated or augmented versions of other images. This data cleaning is necessary in order to ensure accurate border detection, reliable feature extraction, fair comparison of classification performances, and a satisfactory quality control for the style-transferred images without the interference of non-lesion information.
We then apply our proposed methodology to the lesion classification problems in both the ISIC 2016 [70] and ISIC 2017 [71] competitions. The 2016 dataset contains 900 training images and 379 testing images with 2 lesion types, i.e., benign versus malignant [70]. The 2017 dataset contains 2000 training images and 600 testing images with 3 lesion types, i.e., melanoma, nevus, and seborrheic keratosis [71]. The 2017 dataset is split into 2 problems: (a) melanoma (malignant) versus nevus and seborrheic keratosis together (benign), and (b) seborrheic keratosis (non-melanocytic) versus melanoma and nevus together (melanocytic). These results are presented in Section 7.

Image Pre-processing and Segmentation
In this section, we first discuss the standard pre-processing of the lesion images, followed by image segmentation of the lesions to extract the corresponding segmentation masks. Next, we present a review of the NST method [29], followed by the proposed methodology to transfer the style of the lesions onto a homogenized content image using the guided-NST algorithm [30].

Image Pre-processing
We first implement bilinear interpolation [39] to resize all the images to 224×224×3 (input size of the VGG network [52]) to reduce the computational complexity of the style-transfer algorithm, feature extraction, and the final classification problem. Next, we remove the air bubbles, thin hairs and other minor image artefacts using median filtering [36]. From our numerical experiments, we found that a 5 × 5 filtering window is a good choice for removing most image noises while still preserving the quality and resolution of the lesion. We then implement the DullRazor software [56] to remove larger hair threads that were irremovable from the previous step.
Since the color of a lesion is dependent on the background skin color [11], and each dermoscopic image could be subjected to different device and illumination settings [12], it is necessary to normalize the color channels of each image. Here we implement the Shades of Gray algorithm [53] to normalize the images, as shown in Fig. (2).

Image Segmentation
In order to both perform the guided-NST method [30] and to further extract skin lesion features, we need to first isolate the lesion from the skin information [16,14,61].
We perform image segmentation by implementing the U-net architecture [58], as shown in Fig. 3, under the Tensorflow [38] framework. We use a convolution kernel size of 3 × 3 with batch normalization at the end of each of convolution block, max pooling layers of 2 × 2, 16 convolution filters at the first stage, a 256-dimensional fully connected layer, and a dropout of 0.5 at all dropout layers. We implement the Adam optimizer [59] with an initial learning rate of 0.0005 and momentum of 0.95. We consider the binary cross-entropy loss for this U-net model.
The U-net model is trained from the PH 2 dataset [21], with the dataset divided according to a 90%/10% training/validation split. We apply standard data augmentation procedures [41] to increase the available training samples and to prevent overfitting, including size re-scaling, rotations of 40 • , horizontal/vertical shift/flipping, image zooming, and shearing. The model is then trained on the training set for 200 epochs. Early stopping [40] is implemented when the validation accuracy does not improve for at least 20 epochs to reduce the potential of overfitting. We then generate Figure 3: A U-net [58] architecture to learn and generate the segmentation mask. the segmentation mask for our dataset of 1000 images after the training is done.
The generated segmentation masks may contain multiple regions, holes, or rough edges. Additional post-processing is done to isolate the Region of Interest (ROI) [20] by retaining only the largest white color blob and filling in all holes on each of the segmented mask (Fig. 4). A 9x9 median-blur filter [36] is finally applied to the masks for edge smoothing.

Review of Neural Style Transfer
Motivated by the goal of texture synthesis [32], the NST algorithm [29] aims to learn the style of an image (typically an artwork or photo) and transfers it onto another piece of image. This newly rendered image generally contains the stylistic representation of the former image with the content of the latter image preserved. This is done by using the convolution layers of a pre-trained VGG19 network [52] to extract feature maps at different convolution layers, where each feature map represents certain aspects of the original image.
A stylized content image x is generated by first initializing as a white noise image (or simply the content image itself), then simultaneously optimized with respect to both a content loss and style loss. Let p, a and x represent the content image, the style image and the target image, and P l , A l , F l be their respective feature representations in layer l. Here P l , A l , and F l all have dimensions M l × N l , where N l is the number of feature maps in layer l and M l = h l × w l is the product of the height and width of each feature map in layer l.
The content loss is defined as the squared loss between the feature representation of the content image and the target image, as given in (1), Gatys [29] defined the style representation as a correlation measure between the vectorized feature maps F l in layer l. These correlations are given by the Gram matrix G l ∈ R N l ×N l , where G l ij is the inner product between the vectorized feature map i and j in layer l, shown in (2), The Gram matrix effectively utilizes the second-moment information of the feature maps in each considered convolution layer. As the feature maps are vectorized during the calculation, the exact spatial structures of the pixels are discarded and only the correlations between the feature maps are captured, which is desired for style transfer purposes as we do not want the exact "content" of the style image to be carried over. Moreover, Li et. al [31] further showed that style of an image can be intrinsically represented by feature distributions in different layers of a CNN, and that style transfer can be seen as a distribution alignment process from the content image to the style image.
The style loss is the squared loss between the style representation of the original style image a and the target image x in layer l. For each layer, the contribution to the total style loss L style is given in and the total style loss L style is given in Equation (4), where w l are the weight factors of the contribution of each layer to the total loss. Finally, the extent to which the generated image resembles either the style or content images is controlled by two weight parameters α and β, as shown in (5),

Proposed Guided Style Transfer for Skin Lesions
We first regard each of the pre-processed lesion images as the base style images. For the content image, we took the average of each of the RGB channels across all the original lesion images (after median filtering and hair removal) in the data set to create a single content image (Fig. 5). There  To transfer the style of the lesion without the background skin information, we apply the guided-NST algorithm [30] under the Tensorflow framework [38] to transfer the style of each lesion onto the homogeneous content image. Here we utilize the segmentation masks we gener-ated in the previous step to guide the style transfer process by masking the feature maps at each considered convolution layer of the style transfer process. To propagate the mask to the appropriate dimension at each considered layer, we construct a similar network structure as the VGG19 network [52], but without the convolution and ReLU layers. We only retain the pooling layers here as our goal is to perform dimension reduction of the segmentation mask. We denote the segmentation mask at layer l of the VGG19 network as T l , where T l ∈ R h l ×w l . Each channel mask is normalized such that i (T l i ) 2 = 1. After the segmentation mask is generated for each convolution block, we then perform a Hadamard product between the columns of F l , i.e., f l j where j ∈ (1, ..., N l ) and the vectorized channel mask t l ∈ R M l ×1 in one convolution layer, yielding the masked feature maps for that The new masked Gram matrixG The generated images may have undesirable artefacts and high frequency noise, especially for bright or dark pixels. Thus, in addition to the style loss and content loss, we also consider the total variation loss [43] for image smoothing. Assuming that x i,j represents the pixel value at coordinate (i, j) of the target image, the total variation loss, denoted as L tv , is given as (8).
Thus, the final loss function to generate an image is where γ is the weight of the total variation loss.
We perform a grid search across different style layers, content layers, style/content ratios, and total variation weights as shown in Table 1 to examine the quality of the style transfer and how it impacts downstream classification performances. Both the style and content layers are chosen according to Gaty's work [29], except that we replace the convolution layers with the ReLU layers as they generate images with slightly better quality according to our experiments.  or if the relative change in loss is less than 0.0005 given in (10), where t is the loss at the t-th iteration. The GPUs do not affect the quality of the style transfer, only the speed of the generation process. Each image takes about 15 seconds, 9 seconds, and 5 seconds to generate respectively, with V100 being the fastest.
We present 2 pairs of the style transferred images with style masks guidance in Fig. 6 as examples, i.e., two for benign lesions and two for melanomas. The images shown here are based on the tuning parameters that yielded the best classification performance, which are reported in  Second, we observe that the style of each lesion is generally well-distributed across the content image regardless of its original shape. In particular, the brown streaks of the first image are wellpreserved and scattered uniformly across the content image. This achieves the goal of normalizing the position of the texture of each lesion, which further permits the implementation of tensor decomposition, as discussed later in Section 6.
6 Feature Extraction and Classification Models

Feature Extraction
In this subsection, we present the ABCD rule [25,18], followed by the tensor decomposition [50] for feature extraction.

Asymmetry
We consider both the shape asymmetry and lengthening index [25,18] to measure the degree of asymmetry of a lesion.
Shape Asymmetry Index (SAI): The ROI of each image obtained from the image segmentation step is first centered. Then, it is rotated by θ • to align the (x, y) coordinates with the principle axis of its centroid, where θ • is defined as the angle between the x-axis and the axis around which the object can be rotated with minimum inertia, The m 11 , m 20 , and m 02 here are the moments of inertia defined as where (x 0 , y 0 ) is the centroid. An example of this process is provided below in Fig. 7. x-principal axis, and A left , A right denote the left and right portion of the ROI with respect to the y-principal axis. We further denote A x top as A top flipped with respect to the x-principal axis, and A y left as A left flipped with respect to the y-principal axis. The SAI in terms of the x-principal axis and y-principal axis are given in (12), Lengthening Index: This measurement describes the lengthening and the anisotropy degree of the skin lesion [51], and is measured as the ratio between the eigenvalues λ and λ of the inertia matrix, as shown in 13,

Border Irregularity
We compute the Compact Index, given in (14) to measure border irregularity, defined as the ratio between the perimeter (P ) and the area (A), The area (A)is the sum of all white pixels within each segmentation mask. For the perimeter (P ), we slide a 3 × 3 convolution window of all 1s with only the white pixels as the center. The pixels that do not have a sum of 9, which implies that there exists at least one black pixel in its 3 × 3 neighborhood, is considered as a border pixel. The perimeter (P ) is then the sum of all such border pixels.

Color
Six different colors (white, red, light brown, dark brown, blue gray, and black) are considered according to the PH 2 database [21,15]. Thresholds for the pixel ranges of the red, green and blue channels constituting these six colors are given in Fig. 8. We then compute the proportion of each color for each lesion as given from the table. Additionally, we also compute the 7 summary statistics (min/Q1/median/Q3/max/mean/sd) of the RGB channel of the images.

Diameter
We construct a minimum bounding box over each rotated lesion mask as shown in Fig. 8. The pixel height and width of the bounding box is then used as the horizontal and vertical length of the lesion.

Latent Style Features via Tensor Decomposition
Now that the lesion styles are aligned on the same content image, we are able to stack all the images in the training set together and implement the CP decomposition [50] where X (1) is the mode-1 unfolding of X . We then use A train and A test as our features for classifi-cation.

Classification Models
Here we discuss the supervised learning models considered in this study. For the image features constructed in Section 5.4, we consider the penalized linear regression [45], random forest (RF) [46] and support vector machine (SVM) [49] for binary classification. We further consider different tuning parameters for each model in Table 2, and report the best results out of all the supervised learning models and tuning parameters. We compare the results of our guided style transferred  image with that of the raw images. Note that since the shape information is adversely discarded due to the style transfer process, all the ABCD features for the style-transferred images are computed from the original images to compensate for this loss in information.

Models Tuning Parameters
To show our method's competitiveness with end-to-end deep learning models, we also compare our performance via transfer learning [60] with two variants of the VGG network [52], i.e., the pretrained VGG16 and VGG19 respectively. These two models are both trained on the pre-processed raw images. We follow the steps outlined in [16]'s work to train both networks, i.e., (a) freezing all but the fully connected layers of the network, and (b) fine tuning the deeper parts of the network after Step (a). In addition, we also consider the same data augmentation procedures [16,41] when training the U-net in the previous section.
We consider the accuracy, area under curve (AUC), sensitivity, and specificity [27] as metrics to evaluate classification performance. We perform a 5-fold cross-validation to evaluate each model, where the 80% training and 20% testing sets are split via random, stratified sampling. This crossvalidation process is then further repeated 10 times with the results averaged across all runs.

Real Data Analysis and Results
In this section, we present the classification results of our analysis, followed by the interpretation of the style clusters according to the learned tensor features.

Classification Result
We first present the results of the ABCD rule and tranfer learning of the raw images in Tables   3 and 4, respectively. Next, we show the result comparison between the raw images and styletransferred images via (a) CP decomposition and (b) ABCD + CP decomposition in Table 5. Note that the ABCD features for both the raw and generated images are derived from the raw images.      [70]. Likewise, our averaged AUC of 83.60% across problem (a) and (b) of the ISIC 2017 competition is comparable to the 8th place on the leaderboard [71]. To our knowledge, the top performing models in the competition typically uses transfer learning and data augmentation, some even with additional external data sources during training [71]. Thus, the above results further show the competitiveness of our proposed method with the most popular existing frameworks, despite our approach being fundamentally different and without relying on any external data augmentation methods.

Contribution of Style Layers
We next discuss the impact of different style layers on the classification performance of our balanced dataset. Recall the tuning parameters described in Table 1. In our experiments, we generate 375 sets of images based on the different combinations of tuning parameters and perform the same classification pipeline. To see how each tuning parameter contributes to the accuracy, we perform a regression with the 375 accuracy measures as the response and the different tuning parameters as categorical predictors. Our analysis shows that the most important tuning parameter is the style layer (p-value < 10 −3 ), followed by the style-content weight ratio (p-value < 0.1). The total variation weight and content layer are not significant. Here we present the box plot of the classification accuracy for the three models across the different subsets of style layers in Figure 9. The boxplots in Figure 9 show that the classification accuracy improves as the number of considered style layers increases, with the highest accuracy using all the 5 style layers. The classification accuracy appears to be mainly driven from the first four layers. We observe that the texture of the lesion gets progressively more macroscopic and distinct as the number of style layers increases.
For example, the main information in layer 1 consists of the color hue of the images but not the texture information. As more style layers are taken into account, the general texture starts to appear, starting from minor dots to speckles to more sophisticated patterns. This progressive change is the most evident for the first four layers, while adding the fifth layer does not provide a noticeable difference in the generated images, which explains the minor difference in improvement in classification accuracy as shown in Figure 9. Additionally, we notice that apart from style layer 1, the boxplots of the other style layers are quite flat. This implies that besides some statistical outliers, the other tuning parameters do not significantly impact the classification results.

Visualization of Tensor Clusters
We can further interpret the loadings of the A matrix computed from the CP decomposition of the generated image to visualize the underlying style clusters. We illustrate this example in  From the violin plot, we observe that the normalized loading for the malignant tumors are visibly lower than the benign tumors for the first and third cluster, and higher than the latter in the second cluster. To interpret what each cluster represents, we examine the generated images with the largest positive loadings under the top two cluster vector in A, as shown in Figure 11.
These images can be regarded as the representative images of this cluster. Furthermore, we can also examine the images with the smallest negative loadings. These sets of images can be viewed as a contrast to the images with the positive loadings. To better understand these points, we present representative images in Figure 11 for the first two cluster vectors as selected by the random forest.
For each cluster, four sets of images are presented, two for the largest postive loadings and two for the smallest negative loadings. The original source image for each generated image is also provided alongside.
From Figure 11, we observe that the images with the largest positive loadings are scattered with small islands, whereas the images on the opposite spectrum are scattered with bouts of brown streaks and spots with a brown color center. From a visual standpoint, the CP decomposition ad-

Conclusion
We proposed a novel method to register skin lesions onto a homogeneous background using neural style transfer to utilize tensor decomposition for better classification performances. Our method is conceptually simple and straightforward to implement, requiring only the lesion image and its corresponding mask, while at the same time yielding classification results as competitive as popular deep learning methods. Furthermore, the features learned from the tensor decomposition provide additional interpretability due to its innate cluster representation, which may be beneficial for clinical purposes.
There are several potential directions for improvement. First, even though our method addresses the issue of different lesion shapes, locations, and sizes, our method also adversely forgoes this information during the transfer process. This may discard predictive information that can potentially improve classification performance. Therefore, it may be desirable to consider more flexible formulations, where weights may be assigned to the border pixels of feature maps during the calculation of the Gram matrix. Conceptually, this is similar to implementing soft masks on the lesion part, with different values on the border of the lesion as opposed to the core of the lesion. However, the choice of how to choose these mask values is nor trivial, and may require an elaborative optimization strategy to find the optimal weights. Another interesting direction is to consider utilizing the Gram matrix to directly extract texture features. This can be regarded as a new representation compared to the existing gray-level co-occcurence matrix [67] for textural feature extraction, and may likely yield better results. Finally, there has been a lot of development of algorithmic advancements in neural style transfer [32], and these advancements could be implemented for better image generation and classification results. In our case, we implement the guided NST [30] due to its flexibilty and established practicability.
Our work introduces a useful paradigm for registering and classifying dermoscopic images, which can serve as a stepping stone for future work on dermoscoping imaging and even other medical imaging data.