Optimizing Hyperparameters for Improved Melanoma Classification using Metaheuristic Algorithm

—Melanoma, a prevalent and formidable skin cancer, necessitates early detection for improved survival rates. The rising incidence of melanoma poses significant challenges to healthcare systems worldwide. While deep neural networks offer the potential for precise melanoma classification, the optimization of hyperparameters remains a major obstacle. This paper introduces a groundbreaking approach that harnesses the Manta Rays Foraging Optimizer (MRFO) to empower melanoma classification. MRFO efficiently fine-tunes hyperparameters for a Convolutional Neural Network (CNN) using the ISIC 2019 dataset, which comprises 776 images (438 melanoma, 338 non-melanoma). The proposed cost-effective DenseNet121 model surpasses other optimization methods in various metrics during training, testing, and validation. It achieves an impressive accuracy of 99.26%, an AUC of 99.56%, an F1 score of 0.9091, a precision of 94.06%, and a recall of 87.96%. Comparative analysis with EfficientB1, EfficientB7, EfficientNetV2B0, NesNetLarge, ResNet50, VGG16, and VGG19 models demonstrates its superiority. These findings underscore the potential of the novel MRFO-based approach in achieving superior accuracy for melanoma classification. The proposed method has the potential to be a valuable tool for early detection and improved patient outcomes.


I. INTRODUCTION
Skin cancer is characterized by the uncontrolled growth of abnormal cells in the skin's outermost layer (epidermis) due to DNA damage and mutations.Melanoma, a highly aggressive form of skin cancer, is on the rise, posing significant challenges for healthcare systems in terms of early detection and intervention [1].The precise cause of all melanomas remains unclear, but exposure to ultraviolet (UV) radiation from sunlight or tanning lamps and beds significantly heightens the risk of developing this form of skin cancer [2].In the United States, the American Cancer Society's estimations predict that approximately 97,610 new cases of melanoma will be diagnosed in the year 2023 [3].This contrasts with the year 2020, during which a total of 324,635 individuals tested positive for melanoma, with an unfortunate outcome in 57,043 cases, resulting in fatalities [4].The fiveyear relative survival rate for melanoma is 93%, with a range of 99% for cases diagnosed at a localized stage (83% of cases) to 27% for cases diagnosed at a faraway stage (4%) [5].
Nevertheless, due to the inherent challenges associated with early detection, both by professionals and patients, there is a pressing need to develop an effective method for the early detection of melanoma and skin cancer.To ensure precise and timely diagnosis, accurate equipment is essential, even in the hands of highly skilled professionals.Dermatologists typically initiate the diagnostic process by employing non-invasive dermoscopy techniques on suspicious areas.However, this conventional method primarily relies on visual examination by the naked eye for preliminary diagnosis.This reliance on visual assessment can introduce challenges, as it can be cumbersome, susceptible to inaccuracies, and dependent on subjective interpretation in a clinical environment [6].Given these inherent limitations, there is an urgent need to integrate advanced diagnostic tools and technologies to improve the accuracy and efficiency of early melanoma detection.
Deep learning (DL), with its multi-layered artificial neural networks, has ushered in a transformative era in image classification [7].At the forefront of this revolution are Convolutional Neural Networks (CNNs), renowned for their unparalleled ability to autonomously discern intricate features from raw pixel data [8].Through iterative training on extensive datasets, DL models refine their parameters to excel in identifying objects and patterns, finding application in diverse domains such as medical imaging [9], autonomous driving [10].Moreover, in the realm of natural language processing [11].The exceptional precision and effectiveness of CNNs, particularly in analyzing complex medical images, continue to inspire researchers to leverage them in addressing intricate challenges across various fields.
CNNs have emerged as powerful tools, and researchers often leverage predefined CNN models such as VGG16, VGG19, ResNet, DenseNet, Inception, etc., which come pretrained on extensive image datasets.These pre-trained models serve as valuable starting points for various image-related tasks, as they have already learned a rich set of features from massive amounts of data.Achieving optimal performance with these models requires careful consideration of hyperparameters, and proper selection of these hyperparameters has a direct impact on the performance of the model [12].Effective hyperparameter selection stands as a critical endeavor for optimizing a CNN's performance in various applications [13], particularly in the realm of medical imaging, where precise and accurate results are paramount www.ijacsa.thesai.org[14].Unlocking the full potential of CNNs in this critical domain hinges on the careful process of hyperparameter optimization.To address this challenge, metaheuristic algorithms have emerged as invaluable tools for efficiently searching for optimal hyperparameter values [15].In contrast to traditional gradient-based optimization methods, such as stochastic gradient descent (SGD), which may struggle with the complex and non-convex landscapes [16] often encountered in medical image analysis, metaheuristics excel.These algorithms, which encompass a range of techniques, including genetic algorithms, particle swarm optimization, simulated annealing, and ant colony optimization, among others, have demonstrated their adaptability and efficiency in exploring and exploiting intricate parameter spaces [17].In medical imaging, where accuracy and speed are paramount, metaheuristic algorithms offer a promising approach to enhance the capabilities of DL models, ultimately contributing to more accurate disease diagnosis and treatment planning [18].
This study centers on hyperparameter optimization for melanoma classification, employing the DenseNet-121 transfer learning model in tandem with the MRFO metaheuristic algorithm.The principal objective is to elevate melanoma detection accuracy, a pivotal factor in enabling early diagnosis and ultimately improving patient outcomes.
In this study, we make the following significant contributions: • Novel CNN-Based Framework: A novel CNN framework, developed for reliable classification of Melanoma using the ISIC2019 dataset.
• Transfer Learning Utilization: We utilize ten pretrained models for transfer learning, benefiting from their knowledge learned on extensive datasets to enhance melanoma classification performance.
• Hyperparameter Optimization: To boost classification performance, we fine-tune hyperparameters for both the CNN model and pre-trained models using the Manta Rays Foraging Optimizer (MRFO) algorithm.This process identifies optimal configurations for each pre-trained model, enhancing melanoma detection performance.
The subsequent sections of this paper are structured as follows: Section II provides a comprehensive literature review on melanoma classification, offering insights into existing research and methodologies.Section III, a detailed overview of our proposed methodology, outlining the approach to melanoma classification using the CNN framework and the MRFO algorithm.Section IV delves into the experimental results and discussions, shedding light on findings and their implications.Finally, Section V presents conclusions and outlines potential avenues for future research in the field of melanoma classification.

II. LITERATURE REVIEW
In recent years, there has been a significant surge in the development of algorithms designed for the automated detection of melanoma using dermoscopy images.In the early 2000s, most automated melanoma classification solutions primarily relied on the utilization of manually crafted, lowlevel features such as shape, color, and texture [19].However, recent studies, exemplified by [20], have signaled a shift in melanoma identification and recognition methodologies.This transition signifies a departure from the heavy reliance on manual feature engineering, marking a substantial evolution in the field.Presently, there is a noticeable uptick in the adoption of DL approaches for automated skin image analysis [21].This paradigm shift reflects a move away from manual feature engineering towards methods that harness the capabilities of neural networks to autonomously learn and extract pertinent features from dermoscopy images.This transformation underscores the changing landscape in melanoma classification.
Daghrir et al. [22] introduced an innovative melanoma identification approach by combining three techniques using a majority voting method.Their method incorporates CNN along with two traditional ML approaches, SVM and KNN.These models were trained to recognize specific skin cancer features, including edges, texture, and color characteristics.While this ensemble approach improved overall performance, the combination of results from three different techniques can introduce computational complexity and potentially result in slower processing times.Nevertheless, the results demonstrated that CNN achieved the highest accuracy at 85.5%, followed by SVM with 71.8% accuracy and KNN with 57.3% accuracy.
To address the critical challenge of accurately classifying early Melanoma detection, Golnoori et al. in [23] introduced a novel approach by tackling the persistent complexity of selecting optimal neural network architectures and hyperparameters by employing metaheuristic optimization algorithms to fine-tune both pre-trained and scratch-trained CNN models.These optimized models' deep features were effectively combined and utilized to train a K-nearest neighbors (KNN) classifier.The results of their method demonstrated exceptional performance, achieving an accuracy of 81.6% with an F1-score of 80.9% on the ISIC 2017 dataset and 90.1% accuracy with an 89.8% F1-score on the ISIC 2018 dataset.
Segmentation plays a pivotal role in ML.In their study [24], the authors introduced a technique involving image segmentation.This technique utilizes anisotropic diffusion filtering and a rapid bounding box approach, followed by feature extraction through a hybrid feature extractor (HFE) and a feature extractor based on CNNs.The fusion of these extracted features facilitated the development of a highly accurate classification model capable of distinguishing between melanoma and non-melanoma images.The evaluation, conducted on two datasets, yielded outstanding results, including an accuracy rate of 99.85%, sensitivity of 91.65%, and specificity of 95.70%.These outcomes www.ijacsa.thesai.orgunderscore the remarkable effectiveness of this approach, surpassing the performance of previous ML algorithms.
To tackle the issue of automated segmentation of melanoma regions, the authors in [25] proposed a DL method based on a deep region-based Convolutional Neural Network (RCNN).This method comprises three main steps: skin refinement, melanoma region localization, and segmentation.The research was evaluated using a dataset consisting of 900 training images and 376 testing images from ISIC 2016 melanoma images.The results highlight the superiority of this approach compared to state-of-the-art techniques, achieving exceptional performance across various evaluation metrics: accuracy (0.94), specificity (0.94), sensitivity (0.97), F1 score (0.96), dice score (0.94), and Jaccard coefficient (0.93).
Ian their study [21], the authors comprehensively analyze the use of pre-trained CNN architectures for melanoma classification.They address a gap in previous research by investigating the specific features extracted by different CNN models.To enhance feature extraction, they introduce boundary localization to preserve critical skin lesion regions.They assess the effectiveness of eight pre-trained CNN models for deep feature extraction from these regions and employ various classifiers for melanoma detection.Across datasets like Ph2, ISIC 2016, ISIC 2017, and HAM10000, their approach achieves high accuracies of 98.33%, 80.47%, 81.16%, and 81%, outperforming state-of-the-art CNN methods.
The authors in [26] introduced a comprehensive threephase framework for melanoma diagnosis, incorporating data segmentation via an extended Chan-Vese method, data augmentation, and CNN training facilitated by an active learning mini-batch process.To gauge its performance, they conducted an evaluation comparing it with established models such as DenseNet, InceptionV3, MobileNet, NASNet, and Xception.The assessment leveraged Standard Deviation (STD) as a metric to gauge model robustness and stability.The proposed active learning query strategy outperformed baseline methods in both performance and convergence across sixteen image datasets, underscoring the framework's effectiveness in accurate melanoma diagnosis.Nevertheless, the reliance on the active learning mini-batch process may not be universally applicable and may exhibit reduced effectiveness when dealing with imbalanced or noisy datasets.
Adepu et al. [27] present a novel approach for melanoma classification using a lightweight Deep-CNN-based framework.Their methodology incorporates knowledge distillation, Cost-Sensitive Learning with Focal Loss, and inpainting algorithms to enhance classification performance.To improve the model's performance, they introduce new CutOut variations and utilize test time augmentation as regularizers.On the ISIC-2020 dataset, the authors achieve a state-of-theart result with a sensitivity of 81%, an AUC of 93, and a specificity of 90%.However, as the model processes a larger number of augmented images during each epoch, the use of CutOut may significantly increase the computational cost of training.
The authors in [28] introduce a CAD system utilizing the Online Region-based Active Contour Model (ORACM) to extract the Region of Interest (ROI) from skin lesions.The system demonstrates remarkable performance with an accuracy of 92.24% and perfect specificity and sensitivity (100%).However, it exhibits limitations, such as a heavy reliance on handcrafted features, sensitivity to the initial contour location and manual parameter selection, and the potential for the Non-dominated Sorting Genetic Algorithm (NSGA II) to find local instead of global optimum solutions, resulting in increased computational complexity.
In the realm of lightweight transfer learning models suitable for mobile devices, the study by the authors in [29] introduced the utilization of MobileNetV2 for the classification of melanoma images into benign and malignant categories.Their experiments conducted on multiple melanoma datasets yielded promising results, demonstrating the effectiveness of the proposed method with accuracy rates reaching as high as 85%, outperforming other network architectures.Additionally, the suggested architectural design of the head model, featuring a global average pooling layer followed by two fully-connected layers, not only contributed to high accuracy but also preserved the network's efficiency The diagnosis of cancer during surgical treatment primarily relies on cancer stage or tumor thickness.In their study [30], the authors introduced two distinct methods aimed at classifying melanoma into two stages: the first stage includes stage 1 and stage 2, while the second encompasses stage 1, stage 2, or stage 3 melanoma.The proposed system employs a CNN, utilizing the Similarity Measure for Text Processing (SMTP) as the loss function.The experimental results include a comparison of various loss functions against the proposed SMTP loss function, demonstrating the superior efficiency of the proposed algorithm when contrasted with several other loss functions tailored for classification tasks.
The authors in [31] introduces a hybrid learning approach for melanoma detection, employing image processing techniques to enhance detection by addressing common issues such as hair, air bubbles, and image noise in dermoscopic images.The study presents an innovative hybrid model, merging DL and machine learning (ML), in its debut for melanoma detection.Performance evaluation on the Hamm 1000 (ISIC 2018) and ISIC 2020 datasets achieves exceptional accuracy scores, reaching 99.44% and 100%, respectively.Notably, the effectiveness of the saturation masking and wavelet transform techniques used may be sensitive to image quality, especially in cases of low resolution, artifacts, or variations in lighting, potentially impacting their noise reduction and lesion prominence enhancement capabilities.
In the study conducted by Nancy [32] presents a two-tier hybrid dual CNN (2-HDCNN) feature fusion approach for malignant melanoma prediction.It first identifies challenging samples, generates a Baseline Segregated Dataset (BSD), and preprocesses it.The second-tier CNN produces bottleneck features, combined with ABCD rule-derived features.These hybrid features are used with various classifiers, resulting in high accuracy (92.15%), precision (96.96%), specificity (96.8%), sensitivity (86.48%), and an AUC of 0.96 for diagnosing malignant melanoma on the ISIC 2018 dataset.www.ijacsa.thesai.org In conclusion, our review of the existing literature in melanoma classification reveals a significant gap in research focused on the optimization of hyperparameters and network structures.While numerous studies have explored ML and DL models for melanoma detection, very few have delved into the critical area of hyperparameter optimization using metaheuristic algorithms.Notably, none of the studies have investigated the potential of the MRFO algorithm in this context.This identified research gap highlights the unexplored potential of MRFO and other metaheuristic algorithms for enhancing the accuracy and efficiency of melanoma classification models.

A. Introduction
This study introduces a comprehensive framework for melanoma classification Exploiting CNNs alongside transfer learning techniques and MRFO for hyperparameter optimization.The workflow consisting of data acquisition, pre-processing, splitting, classification, and optimization.These phases collectively enable accurate and reliable melanoma classification.

B. Dataset Description
The ISIC-2019 dataset [33], comprising 25,331 dermoscopy images, is used to evaluate the proposed technique.These images, categorized into eight distinct classes representing different types of skin lesions, exhibit varying dimensions, ranging from 600x450 to 1024x1024 pixels.In our evaluation, a total of 776 images are employed, including 438 melanoma and 338 non-melanoma cases.

C. DenseNet-121 Architecture
DenseNet121, a CNN architecture renowned for its effectiveness in visual object recognition, achieves state-ofthe-art results with reduced parameters by intricately connecting each layer to both preceding and subsequent layers [34].In total, DenseNet-121 comprises 121 layers, making it a versatile choice for various computer vision tasks.This study specifically employs DenseNet-121 due to its compelling advantages, such as mitigating the vanishing-gradient problem, enhancing feature propagation, promoting feature reuse, and notably reducing the overall model parameter count [35]

D. Hyperparameter Selection
The study focuses on optimizing several critical hyperparameters to enhance model performance: • Loss Function: Defines the loss metric used for model optimization.
• Training Batch Size: Determines the number of samples used in each training iteration.
• Model Dropout Ratio: Regulates the extent of regularization during training.
• Transfer Learning Ratio: Controls the extent of pretrained weight utilization.
• Rotation Angle: Diversifies training data by simulating different lesion orientations.
• Shifts (Width and Height): Handles variations in lesion position and image composition.
• Zoom Level: Allows the model to learn features at various scales within images.
• Shear Transformation: Introduces controlled deformations to enhance the model's adaptability.
These hyperparameters collectively contribute to the adaptability, generalization, and optimization of the model for melanoma classification.Next steps involve leveraging the MRFO [36].Metaheuristic Algorithm to fine-tune these hyperparameters systematically, ensuring that the model achieves the best possible results in the challenging task of classifying melanoma.

E. Manta Ray Foraging Metaheuristic Algorithm
The MRFO [36] algorithm incorporates three foraging behaviors: chain foraging, cyclone foraging, and somersault foraging.These behaviors are mathematically modeled as follows: • Chain foraging: -In the MRFO [36] Chain foraging: Manta rays use their ability to detect plankton concentration to navigate towards better positions.The algorithm assumes the highest plankton concentration represents the best solution found so far.Manta rays form a foraging chain, moving towards both the food and the individual in front of them.www.ijacsa.thesai.org In dimension d th , represents the i th individual's position at time (t) with r as a random vector between 0 and 1, α as a weighting coefficient, and denoting a highplankton concentration area.Fig. 2 illustrates the twodimensional foraging behavior of individuals.An individual's position update depends on the previous (i-1) th individual's current position, ), and the food source position, .
• Cyclone foraging: -Manta rays display a distinctive foraging behavior in which they form a long chain and spiral toward plankton patches in deep waters.This spiral foraging strategy resembles that seen in WOA [37].In the case of cyclone foraging, manta ray swarms spiral towards food while also moving toward the ray in front, forming a line that takes on a spiral shape.Fig. 3 illustrates this cyclone foraging behavior in a 2-dimensional context.Swarm members follow the leader, traversing a spiral path toward food.The mathematical equation for modeling this twodimensional spiral movement of manta rays is as follows: Where, w is a random number between 0 and 1.
This behavior can extend to n-dimensional space.The mathematical model for cyclone foraging is defined as follows: (5) In the cyclone foraging strategy, individuals perform random searches relative to the food source as their reference point, promoting both exploitation and exploration.To encourage exploration, each individual is directed to seek a new position in the search space, away from the current best position, using a new random reference point.This approach enhances exploration, enabling the MRFO [36] algorithm to perform a broad global search.The mathematical equation is as follows: is the weight coefficient, T is the maximum number of iterations, and 1 is a random number in [0, 1]. ( 6) where, is a random position randomly produced in the search space, are the upper and lower limits of the  th dimension respectively.• Cyclone foraging: -This behavior treats the food source position as a pivot, causing individuals to swim in a back-and-forth manner while somersaulting to new positions.This results in continuous position updates around the current best solution.The mathematical equation below models this behavior.
( ) The somersault factor (S = 2) determines the range of somersaulting for manta rays using random numbers (r1 and r2) in [0, 1].Eq. ( 8) allows each individual to move within a new search domain, symmetrically positioned around the best solution found so far.As an individual approaches the optimal solution, the somersault range decreases, guiding all individuals toward convergence.This adaptive reduction occurs as iterations increase.Fig. 4 visually illustrates somersault foraging behavior in MRFO [36].
Like other metaheuristic optimizers, MRFO [36] begins with a random population.In each iteration, individuals update positions relative to neighbors and a reference point.The exploration-exploitation balance is controlled by t/T, decreasing from 1 to t/T.When t/T < rand, the best solution is used for exploitation; otherwise, a random position aids www.ijacsa.thesai.orgexploration.Chain and cyclone foraging alternate randomly, while somersault foraging adapts positions to the best solution.This iterative process continues until the stopping criterion is met, yielding the best individual's position and fitness value.
Three individuals undergo 100 iterations in the search space using Eq. ( 8).Randomly sampled points distribute between current positions and their symmetrical positions around xbest.As distance to xbest decreases, the number of sampled points reduces.Dense points around xbest aid exploitation, while sparse ones promote exploration.

F. Hyperparameter Optimization Process
1) Data preprocessing: After acquiring the dataset, it underwent a series of preprocessing steps involving four key techniques: image resizing, dimensional scaling, data balancing, and data augmentation.In the image processing phase, a two-step approach was utilized to standardize the various image dimensions.Initially, the color space conversion from BGR to RGB was executed to ensure consistent color representation.Subsequently, bicubic interpolation [38] resizing was applied to all images, harmonizing them to a uniform size of (32x32x3) pixels.This process established consistency, laying a solid foundation for subsequent analysis.Addressing the issue of data imbalance [39], the study employed data augmentation techniques encompassing width and height shifting, shearing, rotation, horizontal and vertical flipping, and zooming.These techniques help diversify the dataset and mitigate potential misclassification or overfitting during training and optimization phases [40].Additionally, the dataset was partitioned into an 80% training subset and a 20% validation subset to facilitate model training and evaluation.This division ensures a robust assessment of model performance and generalizability.
2) Classification and optimization: The optimization process commences with the creation of an initial solution population represented as vectors.Each vector element corresponds to a specific hyperparameter, such as dropout ratio, optimizers, batch size, etc.In this study, 12 well-defined hyperparameters are targeted for optimization, as outlined in Table I.The dimensionality of solution vectors depends on the application of data augmentation.a) Fitness Function and Hyperparameter Mapping: At the core of the optimization process, the fitness function is utilized to assess the quality of each population solution.This function encompasses three crucial steps: • Hyperparameter Mapping: To effectively configure the pre-trained transfer learning model, solution elements are mapped to their corresponding actual hyperparameters.
• Top of Form b) Balancing Exploration and Exploitation: This approach dynamically traverses the hyperparameter space, striving for a harmonious balance between exploration and exploitation.This equilibrium proves pivotal in uncovering globally optimal solutions.The process iteratively refines the population, gradually converging towards configurations that yield superior model performance.
Fig. 3 depicts the model architecture employed in our optimization process, offering a visual representation of the complex interplay between hyperparameters, fitness evaluation, and model creation.

G. Evaluation Metrics
The proposed model will undergo evaluation using standard assessment metrics, including Accuracy, Precision, Recall, and F-Score, as mentioned in [38]- [41].

H. Software and Tools
The experiments were conducted in Python, utilizing popular libraries including Keras, Scikit-learn, and OpenCV.The computational environment employed a Dell system equipped with an Intel Xeon CPU, boasting up to 128GB of memory, and a spacious 1TB SSD.

IV. RESULT AND DISCUSSION
In this section, the proposed model was assessed through a comparison with four nature-inspired techniques (GA, WOA, GWO, WHO) and benchmarked against eight state-of-the-art deep learning architectures (EfficientB1, EfficientB7, EfficientV2B0, MobileNet, NesNetLarge, ResNet50, VGG16, and VGG19) on the ISIC 2019 dataset.This dataset comprises 776 skin lesion images encompassing melanoma and nonmelanoma classes.

Data
preprocessing was undertaken, including augmentation to expand the dataset to 8000 images, and an 80%-20% random split was applied for training and validation purposes.For image resizing, bilinear interpolation was utilized.The experiments were conducted using the Keras library with the hyperparameters detailed in Table I.
The model is comprised of 7.2 million parameters, which includes 121 convolutional layers and three fully connected layers.Training was executed over 1000 epochs, involving 12 distinct hyperparameter configurations and the incorporation of early stopping with a patience of 15.

Top of Form
In Table II, we observed that the model's performance across the top 10 epochs consistently exhibited high accuracy, ranging from 0.9908 to 0.9926, and AUC, ranging from 0.9898 to 0.9974.Additionally, precision, recall, and the F1-Score consistently demonstrated strong values, indicating proficient classification capabilities with minimal discrepancies.These results underscore the model's robust and stable performance, making it well-suited for accurate for melanoma classification.From Fig. 4, the performance of DenseNet121 model was evaluated under three different scenarios: 100 epochs with a 5000-sample dataset, 500 epochs with an 8000-sample dataset, and 1000 epochs with an 8000-sample dataset.The model with 1000 epochs on the larger dataset demonstrated the highest accuracy (99.26%),AUC (99.56%), and F1-Score (0.9091), indicating its superior ability to classify positive and negative instances.It also achieved the lowest loss (0.0217) and high precision (94.06%) and recall (87.96%) values.It is observed that increasing the number of training epochs and dataset size consistently leads to better model performance across various metrics.The presented data showcases the performance evaluation of the proposed model (see Table IV) in comparison to several established DL architectures across various metrics.The proposed model outperforms all other models with an impressive accuracy of 99.26%, an AUC of 99.56%, and a commendable F1-Score of 0.9091.Furthermore, it exhibits a high precision of 94.06% and recall of 87.96%, indicating its robustness in correctly classifying positive instances while minimizing false positives.In contrast, models like EfficientB1, EfficientB7, EfficientNetV2B0, NesNetLarge, ResNet50, VGG16, and VGG19 show lower accuracy and F1-Scores, reflecting their limitations in effectively handling the given task.MobileNet, while achieving a high accuracy and AUC, falls slightly behind the proposed model in F1-Score, precision, and recall.These results underscore the superior performance of the proposed model in comparison to established architectures, demonstrating its potential for melanoma classification.Additionally, the low loss value of 0.0217 for the proposed model further confirms its proficiency in minimizing prediction errors during training.In comparison with other literature, the proposed DensNet121-based model optimized with MRFO exhibits superior performance.Fig. 5 shows the comparison with other architectures.It achieves an accuracy of 99.26%, surpassing previous models utilizing different metaheuristics such as GWO (98.3%) and WHO (96%).Moreover, the proposed model's precision (0.9406) and recall (0.8796) outperform an AlexNet model optimized with GA (accuracy: 81.66%, precision: 81.18%, recall: 81.67%).Additionally, the F1-Score of the proposed model (0.9091) exceeds that of a CNN optimized with PSO (accuracy: 90.01%, F1-Score: 0.897).These findings highlight the effectiveness of the proposed model in achieving superior accuracy and a balanced precision-recall trade-off when compared to existing literature.

V. CONCLUSION
In conclusion, the manual classification of melanoma from dermoscopic images presents significant challenges, even for experts, highlighting the pressing need for efficient automation solutions.This paper introduces an automated and cost-effective model built upon the DenseNet121 architecture, harnessed by the MRFO metaheuristic algorithm for melanoma classification.Through careful optimization of critical CNN hyperparameters, this model significantly enhances the architecture's ability to tackle melanoma classification effectively.
The study employs data preprocessing techniques, including bilinear interpolation-based image resizing, and adeptly encodes CNN hyperparameters to facilitate optimization.To validate the model's efficacy, a comprehensive evaluation was conducted, comparing it with hyperparameter optimization techniques GA, PSO, GWO and WHO on the ISIC skin cancer dataset.Additionally, the model was benchmarked against eight state-of-the-art deep learning The final results demonstrated the superiority of our proposed model in terms of accuracy, AUC, precision, F1 Score and loss rates during training, testing, and validation phases, surpassing the performance of other optimization methods explored in this experiment.
As a direction for future research, further refinement and exploration of this model can lead to even more robust and accurate melanoma classification systems, potentially contributing to early diagnosis and improved patient outcomes in the field of dermatology.

Fig. 4 .
Fig. 4. Comparison with different configuration.Comparative Analysis of the Proposed Model and Other Architectures

TABLE II .
PERFORMANCE OF PROPOSED MODEL ACROSS TOP 10 EPOCHSIn correspondence to TableIII, the model consistently demonstrates strong validation performance, with accuracy ranging from 0.9586 to 0.9734 and AUC values between 0.8164 and 0.8588.Validation loss falls in the range of 0.1458 to 0.2014, indicating close alignment with the ground truth.Precision values consistently exceed 0.5, indicating minimal false positives, while recall values vary, indicating the model's ability to correctly identify positive samples.These findings highlight the model's robust and consistent validation performance, ideal for tasks demanding accurate classification.

TABLE IV .
COMPARATIVE ANALYSIS OF MODEL PERFORMANCE

Table V
shows the In-Depth Analysis of Proposed DensNet121 Model in Comparison with Prior Literature.

TABLE V .
ANALYSIS OF PROPOSED MODEL IN COMPARISON WITH PRIOR LITERATURE