  This chapter proposes using the Moth Flame Optimization (MFO) algorithm for
finetuning a Deep Neural Network to recognize different underwater sonar
datasets. Same as other models evolved by metaheuristic algorithms, premature
convergence, trapping in local minima, and failure to converge in a reasonable
time are three defects MFO confronts in solving problems with high-dimension
search space. Spiral flying is the key component of the MFO as it determines
how the moths adjust their positions in relation to flames; thereby, the shape
of spiral motions can regulate the transition behavior between the exploration
and exploitation phases. Therefore, this chapter investigates the efficiency of
seven spiral motions with different curvatures and slopes in the performance of
the MFO, especially for underwater target classification tasks. To assess the
performance of the customized model, in addition to benchmark Sejnowski &
Gorman's dataset, two experimental sonar datasets, i.e., the passive sonar and
active datasets, are exploited. The results of MFO and its modifications are
compared to four novel nature-inspired algorithms, including Heap-Based
Optimizer (HBO), Chimp Optimization Algorithm (ChOA), Ant Lion Optimization
(ALO), Stochastic Fractals Search (SFS), as well as the classic Particle Swarm
Optimization (PSO). The results confirm that the customized MFO shows better
performance than the other state-of-the-art models so that the classification
rates are increased 1.5979, 0.9985, and 2.0879 for Sejnowski & Gorman, passive,
and active datasets, respectively. The results also approve that time
complexity is not significantly increased by using different spiral motions.
