Automatic Cluster Detection in Hyperspectral Images using Quantum Walrus Optimizers Tulika Dutta1,*,† , Siddhartha Bhattacharyya2,† , Bijaya Ketan Panigrahi3,† , Jan Platos4,† , Ivan Zelinka5,† and Vaclav Snasel6,† 1 Department of Electrical Engineering, IIT Delhi, New Delhi, India, and Department of Information Technology, Manipal Institute of Technology Bengaluru, Manipal Academy of Higher Education, Manipal, India 2 VSB Technical University of Ostrava, Ostrava, Czech Republic 3 Department of Electrical Engineering, IIT Delhi, New Delhi, India 4 VSB Technical University of Ostrava, Ostrava, Czech Republic 5 VSB Technical University of Ostrava, Ostrava, Czech Republic 6 VSB Technical University of Ostrava, Ostrava, Czech Republic Abstract The task of determining the correct number of clusters in hyperspectral images is not a straightforward procedure as the images feature complex spectral data, redundancy, and lack of validation images. Hence, automatic clustering methods are often preferred in practical applications, as they can effectively handle the complexity of spectral data and the absence of validation images. This study introduces two novel algorithms viz., the Qubit Walrus Optimizer (QbWaO) and Qutrit Walrus Optimizer (QtWaO) to leverage quantum principles to address the limitations of classical optimization techniques, which are inspired by the breeding behavior of walruses. QbWaO and QtWaO are designed to automatically detect clusters in hyperspectral images (HSI) by effectively balancing exploration and exploitation. This makes them particularly suited for high-dimensional clustering tasks in a real time environment. The concept of quantum Hadamard gates is used to initialize the population and induce diversity. The optimal clusters are then determined using the Adjusted Rand Index as the fitness function. 𝐹 score and the 𝐹 ′ score are used to determine the quality of the grouping. The comparative results suggest that the proposed methods outperform classical approaches in most scenarios, demonstrating their effectiveness in automatically clustering hyperspectral images. Keywords walrus optimizer, qutrit, qubit, Hadamard gate, hyperspectral image 1. Introduction The emergence of spectral cameras and sensors has significantly improved the ability to collect detailed information about ground data in various fields, such as agriculture, law enforcement, geography, and military applications [1]. Hyperspectral sensors capture data across hundreds of contiguous spectral bands. This broader spectral and wide area coverage helps represent a combination of multiple materials, each contributing to the pixel’s overall spectral signature with varying abundance levels. Hyperspectral imaging (HSI) is a powerful technology, but the vast amount of data in contiguous spectral bands presents a major computational challenge. Band Selection (BS) techniques are commonly employed as a preprocessing step to identify unique spectral bands. A key challenge is designing effective criteria for informative bands while retaining important spectral information. Recently, information theory-based methods [1] have demonstrated great potential in HSI band selection. The 2024 Sixth Doctoral Symposium on Intelligence Enabled Research (DoSIER 2024), November 28–29, 2024, Jalpaiguri, India * Corresponding author. † These authors contributed equally. $ munai.tulika@gmail.com (T. Dutta); dr.siddhartha.bhattacharyya@gmail.com (S. Bhattacharyya); bijayaketanpanigrahi@gmail.com (B. K. Panigrahi); jan.platos@vsb.cz (J. Platos); ivan.zelinka@vsb.cz (I. Zelinka); vaclav.snasel@vsb.cz (V. Snasel)  0000-0003-2672-5360 (T. Dutta); 0000-0001-7296-7999 (S. Bhattacharyya); 0000-0003-2062-2889 (B. K. Panigrahi); 0000-0002-8481-0136 (J. Platos); 0000-0002-3858-7340 (I. Zelinka); 0000-0002-5213-3302 (V. Snasel) © 2025 Copyright for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0). CEUR ceur-ws.org Workshop ISSN 1613-0073 Proceedings One critical task in HSI processing is automatic cluster detection [2]. This aims to identify under- lying patterns, classes, or regions without ground-truth images. Traditional clustering algorithms, such as k-means [3] or fuzzy c-means [4], often struggle with HSI’s high-dimensional, nonlinear na- ture. Optimization-based clustering techniques have gained popularity to overcome these challenges. Nature-inspired metaheuristic optimization techniques, such as Genetic Algorithms [5], Particle Swarm Optimization [6], and Tabu Search [7], have emerged as powerful tools in HSI clustering. These meth- ods effectively explore the vast solution space, adapt to HSI data’s complex spectral signatures and high-dimensional structure, and avoid local minima, thus offering superior performance over traditional clustering algorithms. The Walrus Optimizer (WaO) [8] is a relatively new optimization algorithm offering efficient global search capability while balancing navigating and leveraging the search space. WaO [8] can suffer from slow and premature convergence when solving complex problems. The No Free Lunch Theorem affirms that no one-size-fits-all algorithm can effectively address all NP- hard problems [9]. Researchers are creating improved metaheuristic algorithms to effectively address the diverse array of real-world challenges. In recent years, quantum-based metaheuristic methods have transpired as potential solutions to these problems [2]. These algorithms enhance search efficiency by employing quantum computing principles such as superposition and entanglement. In recent years, qubit or bi-level quantum metaheuristics have drawn substantial research attention, but developing higher-order quantum metaheuristics remains a complex challenge [10]. However, applying quantum- based approaches to complex clustering problems requires innovative designs and frameworks. In this work, qubit and qutrit versions of the Walrus Optimizer algorithm viz., Qubit Walrus Optimizer (QbWaO) and the Qutrit Walrus Optimizer (QtWaO) are introduced. The breeding behavior of walruses has inspired these, and quantum principles have enhanced their limitations. QbWaO and QtWaO are designed to automatically detect clusters in hyperspectral images by leveraging quantum-inspired mechanisms to balance exploration and exploitation effectively. This makes it ideal for complex high- dimensional HSI clustering. Furthermore, QbWaO and QtWaO incorporate breeding-inspired dynamics and foraging behavior to maintain population diversity. The primary contributions are as follows. • emphQubit and Qutrit-Based WaO: This is the first instance of developing and applying multilevel quantum versions of the Walrus Optimizer Algorithm for clustering hyperspectral images. • Enhanced Exploration Phase with Global Best Selection: Instead of selecting a random walrus, the global best solution or the best walrus is utilized during the exploration phase. This effectively guides the entire population towards the leader. • Band Selection Based on Spectral Variability (BSSV) [11]: The proposed method selects the most dissimilar bands by utilizing spectral variability similarity, ensuring the removal of redundant information. • Population Diversity Enhancement with qubit and qutrit Hadamard Gate: The population is initialized using either qubit or qutrit Hadamard gate, which equally distributes individuals across the search space, increasing diversity in the population. The paper is organized as follows: Section 2 presents a brief review of the literature. Relevant concepts are discussed in Section 3. Section 4 contains the details of the main proposed work. Section 5 thoroughly describes the dataset used, the experimental design, and the result anyalysis. Finally, Section 6 offers a concise conclusion of the proposed methodology. 2. Brief Survey of Related Works Hyperspectral imaging has revolutionized the way detail information about ground targets is captured and analyzed in various fields such as agriculture, geographical monitoring, and defense-based applica- tions. However, this vast amount of data leads to significant computational challenges, necessitating effective band selection techniques to identify informative bands while preserving essential spectral information [11]. Recent studies have shown that information theory-based methods offer promising results in HSI band selection, allowing for the extraction of critical features from complex datasets [1]. In [12], superpixel segmentation is performed to find the heterogeneous area in region-specific hyper- graphs, and then a consensus matrix is built to select bands efficiently for hyperspectral imagery. Clustering assessment metrics are employed to determine the optimal number of clusters. Adjusted Rand Index (AIndex) [13], and PBM index [14] are some well-known metrics. Estimating optimal clusters in HSI is important as ground truth data is often absent [15]. A lot of HSI clustering methods have been reviewed in [15]. Although an effective process, unsupervised Artificial DNA Spectral Matching proposed in [16] takes a huge amount of time for execution. Optimization-based clustering techniques have gained traction in addressing these challenges. The Walrus Optimization Algorithm (WaO)[8] is a recent addition to this suite of optimization algorithms, distinguished by its efficient global search capabilities and its balanced approach to exploration and exploitation of the search space, but it suffers from slow and premature convergence. As no individual optimization algorithm can universally solve all NP-hard problems[9], developing enhanced metaheuristic algorithms that can adapt to a wide range of real-world challenges is needed. In light of these considerations, quantum-based metaheuristic methods have emerged as potential solutions, harnessing the quantum computing principles, such as superposition, coherence and deco- herence—to improve search efficiency [2]. While qubit-based quantum metaheuristics have garnered significant attention, advancing higher-order quantum metaheuristics, such as those utilizing qutrits, remains a complex challenge [10]. In [17], a qubit-based Grey Wolf Optimizer (QBGWO) is introduced, incorporating quantum rotation and NOT gates to enhance solution quality. A memetic quantum- inspired evolutionary algorithm was proposed in [18] which combines quantum genetic algorithms with tabu search. It balances global exploration via quantum rotation gates and local exploitation through directional mutations, achieving faster convergence and improved performance on benchmark functions. In [19], a qubit based Differential Evolution algorithm is developed for efficiently identifying optimal clusters without prior knowledge and outperforming competitive algorithms in accuracy and convergence speed. While qubit-based algorithms generally outperform classical metaheuristics, they remain constrained by the No Free Lunch Theorem [9]. Consequently, there is significant research interest in developing higher-order quantum metaheuristics, specifically qudit-based methods. A three-valued quantum or (qutrit) based Genetic Algorithm was developed in [20]. In [2], the Differential Evolution algorithm has been introduced for the automated clustering of hyperspectral images. Additionally, six quantum methodologies based on the Artificial Hummingbird Algorithm, Particle Swarm Optimization, and Genetic Algorithms have been presented in [10], utilizing both bi-level and tri-level quantum logic for unsupervised clustering of HSI data. 3. Significant Related Concepts This section discusses several key concepts, viz., band selection method used, foundational principles of quantum computing, and the WaO[8] algorithm. 3.1. Band Selection Based on Spectral Variability [11] Spectral Information Divergence (SID) measures the difference between two spectral bands by evaluating their probability distributions. To compute the SID first, the probability vectors are defined as follows. For two spectral bands 𝑆𝑉 𝐵𝑗 and 𝑆𝑉 𝐵𝑘 , we first define their probability vectors as - For band 𝑆𝑉 𝐵𝑖 : 𝑆𝑉 𝐵𝑗𝑖 𝑃 𝑎𝑖 = ∑︀𝐵𝑎 , 𝑖 = 1, 2, . . . , 𝐵𝑎 𝑘=1 𝑆𝑉 𝐵 𝑗𝐿 - For band 𝑆𝑉 𝐵𝑗 : 𝑆𝑉 𝐵𝑘𝑖 𝑃 𝑎𝑗 = ∑︀𝐵𝑎 , 𝑖 = 1, 2, . . . , 𝐵𝑎 𝑘=1 𝑆𝑉 𝐵𝑗𝑘 where, 𝐵𝑎 is the spectral dimension of the HSI dataset. The SID between the two bands 𝑆𝑉 𝐵𝑖 and 𝑆𝑉 𝐵𝑗 are defined using the Kullback-Leibler divergence (relative entropy) as 𝑆𝐼𝐷(𝑆𝑉 𝐵𝑖 , 𝑆𝑉 𝐵𝑗 ) = 𝑅𝐸(𝑆𝑉 𝐵𝑖 ||𝑆𝑉 𝐵𝑗 ) + 𝑅𝐸(𝑆𝑉 𝐵𝑗 ||𝑆𝑉 𝐵𝑖 ), (1) where, the Kullback-Leibler divergence 𝑅𝐸(𝑆𝑉 𝐵𝑖 ||𝑆𝑉 𝐵𝑗 ) is given by 𝐵𝑎 ∑︁ 𝑃 𝑎𝑖𝑘 𝑅𝐸(𝑆𝑉 𝐵𝑖 ||𝑆𝑉 𝐵𝑗 ) = 𝑃 𝑎𝑖𝑘 log . (2) 𝑃 𝑎𝑗𝑘 𝑘=1 The channel transition probability is defined as 𝑆𝐼𝐷(𝑆𝑉 𝐵𝑖 , 𝑆𝑉 𝐵𝑗 ) 𝐵𝑆𝑆𝑉𝑗|𝑖 = ∑︀𝐵𝑎 , (3) 𝑙=1 𝑆𝐼𝐷(𝑆𝑉 𝐵𝑙 , 𝑆𝑉 𝐵𝑗 ) The bands with the lowest SID values are selected as the distinct bands because they exhibit the least similarity in spectral information. 3.2. Quantum Computing Principles Quantum-based machines represent a powerful computational paradigm that merges quantum mechan- ics with fundamentals of computing [10]. The basic unit of quantum machines are the qubit. Qubits exist in two distinct states: |0⟩ and |1⟩ [10]. These states can be expressed mathematically in the following column vector notation [21]. (︂ )︂ (︂ )︂ 1 0 |0⟩ = , |1⟩ = (1) 0 1 Qubits exist in a superposition of its basis states (|0⟩ and |1⟩). The number of states that can be repre- sented by n qubits in superposition grows exponentially (2𝑛 ) and thus provides increased computational efficacy with fewer resources. The superposition state of a qubit, denoted as |𝑆𝑡 ⟩ (where 𝑡 = 2 for qubit), is given by |𝑆𝑡 ⟩ = 𝑠0 |0⟩ + 𝑠1 |1⟩ (2) The probabilities that the qubits are in states |0⟩ or |1⟩ are represented by the complex coefficients 𝑠0 and 𝑠1 , respectively. These probabilities also satisfy the following condition. 0 ⩽ |𝑠𝑡 |2 ⩽ 1, for 𝑡 = 0, 1 (3) The normalization condition for a qubit is expressed as follows [21]. 𝑠20 + 𝑠21 = 1 (4) Quantum systems can exhibit a wider range of discrete energy levels and exist in more than two states, known as qudits [2]. The smallest multilevel quantum system is called a qutrit [2]. A qutrit can similarly be represented as ⎛ ⎞ ⎛ ⎞ ⎛ ⎞ 1 0 0 |0⟩ = 0 , |1⟩ = 1 , |2⟩ = 0⎠ ⎝ ⎠ ⎝ ⎠ ⎝ (5) 0 0 1 Qudits offer better performance than qubits [10]. They require fewer units to achieve superior results than a larger number of qubits, thus reducing computation time. Mathematically, to represent the same information as 𝑛 qubits, only log𝑛(3) qutrits are needed, resulting in an efficiency increase of 2 approximately log2 (3) ≈ 1.6 [2]. This reduction significantly lowers decoherence in qudit-based systems, enhancing their computational power. A qutrit can be expressed in a superposition state as follows. |𝑆𝑡 ⟩ = 𝑠0 |0⟩ + 𝑠1 |1⟩ + 𝑠2 |2⟩ (6) The normalization condition for a qutrit is given by 𝑠20 + 𝑠21 + 𝑠22 = 1 (7) Furthermore, the probabilities associated with the states of a qutrit must satisfy the following condition. 0 ⩽ |𝑠𝑡 |2 ⩽ 1, for 𝑡 = 0, 1, 2 (qutrit) (8) 3.3. Walrus Optimizer Algorithm [8] The WaO [8] algorithm is based on the behavior of walruses. Their ways of migrating, breeding, roosting, and foraging are considered by Han et al.. This approach models walruses social structures and role divisions, assuming populations interpret behavior through danger and safety signals. The steps of WaO [8] are briefly described in Algorithm 1. The WaO [8] uses a population of "walruses" (agents) to explore and exploit the search space for optimal solutions to optimization problems. The algorithm divides the population into adults (90%) and juveniles (10%), with different roles for males, females, and juveniles. Key features of WaO [8] include danger and safety signals, which encompasses the phases of exploration and exploitation in the algorithm. In high-risk conditions, walruses migrate causing enhanced searching in the entire solution space, while in safer conditions, they reproduce causing exploitation of the search space. Migration is achieved by adjusting positions based on other walruses’ locations, while reproduction involves updating positions through male influence (using a Halton sequence) and female influence from both the male and the best solution. Juveniles update their positions to avoid predators. 4. Proposed Work The proposed methodology can be divided into two sections viz., BSSV based Band Depletion and Quantum Walrus Optimizer Algorithms. Band minimization is done as stated in Section 3.1. 4.1. Quantum Walrus Optimizers (QbWaO and QtWaO) The quantum versions viz., Qubit Walrus Optimizer and Qutrit Walrus Optimizer algorithms follow the same steps as mentioned in Algorithm 1. The modifications introduced are as follows: • Qubit or Qutrit Encoding and Observation [20] : The qubit walrus population is represented as follows. [︂ ]︂ 𝑠01 𝑠02 𝑠03 . . . 𝑠0𝑛 𝑠11 𝑠12 𝑠13 . . . 𝑠1𝑛 Similarily, the qutrit walrus population is represented in the following manner. ⎡ ⎤ 𝑠01 𝑠02 𝑠03 . . . 𝑠0𝑛 ⎣𝑠11 𝑠12 𝑠13 . . . 𝑠1𝑛 ⎦ 𝑠21 𝑠22 𝑠23 . . . 𝑠2𝑛 As Hadamard gate initializes all the states with equal amplitude values, qubit states are initialized in the following manner. 𝐼𝑡 𝑆𝑛,𝑑 = 1/𝑠𝑞𝑟𝑡(2) + 1/𝑠𝑞𝑟𝑡(2) (23) where, 𝑠01 = 1/𝑠𝑞𝑟𝑡(2) and 𝑠11 = 1/𝑠𝑞𝑟𝑡(2) for each individual qubit. Similarly, the following method is used for a qutrit. 𝐼𝑡 𝑆𝑛,𝑑 = 1/𝑠𝑞𝑟𝑡(3) + 1/𝑠𝑞𝑟𝑡(3) + 1/𝑠𝑞𝑟𝑡(3) (24) Algorithm 1 Walrus Optimizer Algorithm [8] 1: Input: Population 𝑃 𝑜𝑃 consisting of 𝑛 Walrus of 𝑑 dimension, Maximum iterations 𝑀 𝑎𝑇 , 𝑟𝑑1 , 𝑟𝑑2 , 𝑟𝑑3 ,𝑟𝑑4 and 𝑟𝑑5 are random numbers between (0,1), 𝑀 𝑆𝑡𝑒𝑝 is Migration step, 𝛾 is a distress coefficient designated by random number between (0,1). 2: 𝑃 𝑜𝑃 is divided into 45% Male Walrus (MW) with top fitness values, 45% Female Walrus (FW) and 10% Young Walrus (YW) in Exploitation Phase. Best Male Walrus (BW1) has the highest fitness, and (BW2) has the second highest fitness value. 3: Initialize the population 𝑃 𝑜𝑃 using 𝑃 𝑜𝑃𝑛,𝑑 = random(0, 1) (9) 4: Calculate fitness values 𝐹 for each walrus 5: while 𝐼𝑡 ≤ 𝑀 𝑎𝑇 do 6: Calculate danger signal 𝐷𝑎𝑛𝑔𝑒𝑟 𝑠𝑖𝑔𝑛𝑎𝑙 = 𝐷𝑎𝑠 · 𝑅 (10) where, 𝐴, 𝐷𝑎𝑠 , and 𝑅 are given by 𝐼𝑡 𝐴=1− , 𝐷𝑎𝑠 = 2 × 𝐴, 𝑅 = 2 × 𝑟𝑑1 − 1 (11) 𝑀 𝑎𝑇 7: if |𝐷𝑎𝑛𝑔𝑒𝑟 𝑠𝑖𝑔𝑛𝑎𝑙| ≥ 1 then 8: Exploration phase 9: Update positions of each walrus 𝐼𝑡+1 𝑃 𝑜𝑃𝑛,𝑑 𝐼𝑡 = 𝑃 𝑜𝑃𝑛,𝑑 + 𝑚𝑠 (12) where, the Migration step is calculated as 𝐼𝑡 𝑀 𝑆𝑡𝑒𝑝 = 𝑅𝑛,𝑑 𝐼𝑡 − 𝑃 𝑜𝑃𝑛,𝑑 · 𝑏 · 𝑟𝑑3 (13) where, 𝑅 is a randomly selected position, and 1 𝑏=1− (︁ )︁ (14) 𝐼𝑡−𝑀 𝑎𝑇 /2 1 + exp − 𝑀 𝑎𝑇 ×10 10: else 11: Exploitation phase 12: if Safety signal ≥ 0.5 then 13: Breeding behavior 14: for each MW do 15: Use the Halton sequence to update the position 16: end for 17: for each FW do 18: Update It+1 It It It 𝐹 𝑊𝑛,𝑑 = 𝐹 𝑊𝑛,𝑑 + 𝑎 · (𝑀 𝑊𝑛1,𝑑1 − 𝐹 𝑊𝑛,𝑑 ) + (1 − 𝐴) · (𝐵𝑊 1It𝑑 − 𝐹 𝑊𝑛,𝑑 It ) (15) 19: end for 20: for each YW do 21: Update position 𝐼𝑡+1 𝑌 𝑊𝑛,𝑑 𝐼𝑡 = (𝑃 − 𝑌 𝑊𝑛,𝑑 )·𝛾 (16) where: 𝑃 = 𝐵𝑊 1𝐼𝑡 𝐼𝑡 (17) 𝑑 + 𝑌 𝑊𝑛,𝑑 · 𝐿𝑃 22: end𝐿𝑃foris generated using Lévy distribution to imitate Lévy movement 23: else 24: Foraging behavior 25: if |𝐷𝑎𝑛𝑔𝑒𝑟 𝑠𝑖𝑔𝑛𝑎𝑙| ≥ 0.5 then 26: Gathering behavior 27: Update positions 𝐼𝑡+1 𝐵𝑊 1𝐼𝑡 𝐼𝑡 𝑛,𝑑 + 𝐵𝑊 2𝑛,𝑑 𝑃 𝑜𝑃𝑛,𝑑 = (18) 2 where, 𝐵𝑊 1𝐼𝑡+1 𝐼𝑡 𝐼𝑡 𝐼𝑡 (19) 𝑛,𝑑 = 𝐵𝑊 1𝑛,𝑑 − 𝑎1 · 𝑏1 · |𝐵𝑊 1𝑛,𝑑 − 𝑃 𝑜𝑃𝑛,𝑑 | 𝐵𝑊 2𝐼𝑡+1 𝐼𝑡 𝐼𝑡 𝐼𝑡 𝑛,𝑑 = 𝐵𝑊 2𝑛,𝑑 − 𝑎2 · 𝑏2 · |𝐵𝑊 2𝑛,𝑑 − 𝑃 𝑜𝑃𝑛,𝑑 | (20) Calculate 𝑎 and 𝑏 𝑎𝑖 = 𝑏 · 𝑟𝑑5 − 𝑏, 𝑏𝑖 = tan(𝜃), 𝑖 = 1, 2 (21) 28: else 29: Fleeing behavior 30: Update positions 𝐼𝑡+1 𝑃 𝑜𝑃𝑛,𝑑 𝐼𝑡 = 𝑃 𝑜𝑃𝑛,𝑑 𝐼𝑡 · 𝑟 − |𝐵𝑊 1𝑑 − 𝑃 𝑜𝑃𝑛,𝑑 | · 𝑟𝑑4 (22) 31: end if 32: end if 33: end if 34: Update walrus positions 35: Calculate fitness and update the best solution 36: 𝐼𝑡 = 𝐼𝑡 + 1 37: end while 38: Output: The best solution Algorithm 2 Qubit State Observation 1: for 𝑖 = 1 to 𝑛 do 2: for 𝑖 = 1 to 𝑑 do 3: 𝑟𝑎𝑛𝑑 ← random number in range [0, 1] 4: if 𝑟𝑎𝑛𝑑 < 𝑠0𝑛,𝑑 then 5: 𝑃 𝑜𝑃𝑛,𝑑 ← 0 6: else 7: 𝑃 𝑜𝑃𝑛,𝑑 ← 1 8: end if 9: end for 10: end for Algorithm 3 Qutrit State Observation 1: for 𝑖 = 1 to 𝑛 do 2: for 𝑖 = 1 to 𝑑 do 3: 𝑟𝑎𝑛𝑑 ← random number in range [0, 1] 4: if 𝑟𝑎𝑛𝑑 < 𝑠0𝑛,𝑑 then 5: 𝑃 𝑜𝑃𝑛,𝑑 ← 0 6: else if 𝑠0𝑛,𝑑 ≤ 𝑟𝑎𝑛𝑑 < 𝑠1𝑛,𝑑 then 7: 𝑃 𝑜𝑃𝑛,𝑑 ← 1 8: else 9: 𝑃 𝑜𝑃𝑛,𝑑 ← 2 10: end if 11: end for 12: end for where, 𝑠01 = 1/𝑠𝑞𝑟𝑡(3), 𝑠11 = 1/𝑠𝑞𝑟𝑡(3) and 𝑠21 = 1/𝑠𝑞𝑟𝑡(3). This ensures that the initial population is equally distributed in the solution space. Equations (23) and (24) suffice the normalization principles stated in Section 3.2. The following Algorithms 2 and 3 are used for finding the probable classical state observations [20]. The notations of 𝑛, 𝑑 and 𝑃 𝑜𝑃 are same as specified in Algorithm 1. The resulting classical representation in binary and ternary form after observations for each walrus are (25) [︀ ]︀ 0 1 0 1 1 1 1 0 0···𝑑 (26) [︀ ]︀ 0 2 0 1 1 2 1 0 0···𝑑 • Equqation (13) is replaced by the equation given below. 𝑀 𝑆𝑡𝑒𝑝 = 𝐵𝑊𝑑𝐼𝑡 − 𝑃 𝑜𝑃𝑛,𝑑 𝐼𝑡 · 𝑏 · 𝑟𝑑3 (27) Instead of considering any random Walrus, the best Walrus with the highest fitness value enhances the exploration phase. • At the end of every iteration, it is checked whether the quantum normalization principles are adhered to. When it does not stand true Equations (23) and (24) are used to reinitialize those walruses. • In every iteration, a random count of zeros is incorporated into the population for which 𝑃 𝑜𝑃 is true. The non-zero values designate the cluster centers using k-mean++ [3] algorithm, the appropriate clusters are constructed. The AIndex [13] is used as the Cluster Validity Index to identify the optimal cluster numbers. The complexity of the band minimization is as follows: 𝑂(𝑚 × 𝑛 × 𝑑) Table 1 Mean (𝑀 𝑒), Standard Deviation (𝑆𝑇 𝐷) and convergence time (CTime) for WaO [8], QbWaO, and QtWaO using AIndex [13] for WHU Dataset [22] [23] No Algorithm Me STD Time 1 WaO [8] 0.4456 0.0594 974.3500 2 QbWaO 0.4737 0.0028 480.2580 3 QtWaO 0.4753 0.0034 21.98680 Here 𝐷 bands are present each of dimensions 𝑀 × 𝑁 pixels. For the QbWaO, if 𝑃 is a randomly chosen pixel intensity value, 𝑑 represnts the length of individual population, 𝑀 𝑎𝑇 is the total number of iterations then the worst-case time complexity is: 𝑂(2 × 𝑃 × 𝑑 × 𝑀 𝑎𝑇 ) For QtWaO, the time complexity is as follows: 𝑂(3 × 𝑃 × 𝑑 × 𝑀 𝑎𝑇 ) 5. Findings and Analysis This section presents the various parameters used, the dataset employed, the statistical tests conducted, and the analysis of the experimental results. 5.1. HSI Dataset The WHU-Hi-LongKou dataset (WHU) [22] [23] was collected in 2018, featuring scenes of Longkou Town in Hubei province, China. It has 9 classes spread over an agricultural landscape with six types of crops. It has a spatial dimension of 550 × 400 pixels and a spectral dimension of 270 spectral bands. The UAV-borne hyperspectral imagery has a spatial resolution of approximately 0.463 meters. 5.2. Experimental Configurations and Analysis QbWaO and QtWaO are compared with their classical version WaO [8] using the WHU-Hi-LongKou dataset [22] [23]. To conduct an impartial study, all algorithms are executed for 50 times over 100 iterations. An Intel Core i7-8700 processor and a Windows 11 machine were used. All simulations were conducted on MATLAB 2023b. In WaO [8], each Walrus has dimensions of 20 and 20 walruses were considered. The dimensions were kept the same for both QbWaO and QtWaO. The number of walruses taken was 16 for QbWaO and 14 for QtWaO, respectively. For QbWaO, 8 male and female walruses and 2 young walruses were taken. In QtWaO, 7 male and female walruses and 2 young walruses were taken. The proposed methods are also compared with Kmeans [3] algorithm using taking the predefined cluster number as 6. Various statistical tests like mean and standard deviation are recorded in Table 1 for all three algorithms. The time required for the convergence of each algorithm is noted in Table 1. From Table 1 and Figure 1 it can be observed that QtWaO takes far lesser time to converge than the other two algorithms. Table 2 contains the optimal AIndex [13] values, automatically detected cluster numbers, 𝐹 score [24] and 𝐹 ′ score [24] are presented. The 𝐹 score [24] and 𝐹 ′ score [24] help determine the clustering quality. QtWaO produces 10 clusters nearest to the classes in the WHU Dataset [22] [23]. The clustered images, along with the minimized image produced by using BSSV [11] and the ground truth image of WHU Dataset [22] [23] are presented in Figure 2. The null hypothesis is evaluated using the One-Way ANOVA test [25], which assesses whether the results originate from the same probability distribution. The null hypothesis is rejected if the 𝑝 value is below the 1% significance level, indicating support for the alternative hypothesis. The results are Figure 1: Convergence curve for WaO [8], QbWaO, and QtWaO results for WHU Dataset [22] [23] Table 2 Optimal clusters detected (NC) and best fitness values using Adjusted Rand Index (AIndex) [13] and 𝐹 and 𝐹 ′ scores [24] for WaO [8], QbWaO, and QtWaO, evaluated on the WHU Dataset [22] [23] ′ No Algorithm AIndex [13] NC F Score 𝐹 Score 1 WaO [8] 0.3883 4 0.3669 46.4787 2 QbWaO 0.4680 7 0.5492 68.5959 3 QtWaO 0.4882 10 0.9467 84.1882 Table 3 One-Way ANOVA Test [25] on WaO [8], QbWaO, and QtWaO results for WHU Dataset [22] [23] Dataset p-value Significance WHU Dataset [22] [23] 5.8623e-04 Highly Significant summarized in Table 3. Additionally, Tukey’s post hoc test [25] is conducted. The box plots for both tests are shown in Figure 3. Based on the various tests conducted and the parameters evaluated, QtWaO generally outperforms QbWaO in most cases. Also, the population size and convergence speed of QtWaO are far better than those of both QbWaO and WaO. 6. Conclusion Qubit and Qutrit Walrus Optimizer algorithms significantly advance unsupervised clustering for hyper- spectral imagery. By integrating quantum principles and biological inspirations, QbWaO and QtWaO effectively address the challenges associated with the slow and premature convergence of the Walrus Optimizer algorithm. The enhanced exploration phase integrated with the Hadamard gate and band selection strategies improves clustering performance and ensures the robustness of the algorithms in high-dimensional spaces. The qutrit version performs better in almost all aspects, producing a near-optimal number of clusters in less time. Future work could explore enhancements to these quan- tum algorithms, including implementing more advanced quantum techniques and their application to various domains requiring sophisticated data clustering solutions. Additionally, parameter reduction can be implemented in the Walrus Optimizer. Acknowledgments Thanks to the developers of ACM consolidated LaTeX styles https://github.com/borisveytsman/acmart and to the developers of Elsevier updated LATEX templates https://www.ctan.org/tex-archive/macros/ latex/contrib/els-cas-templates. Declaration on Generative AI The author(s) have not employed any Generative AI tools. References [1] C.-I. Chang, Y.-M. Kuo, S. Chen, C.-C. Liang, K. Y. Ma, P. F. Hu, Self-mutual information-based band selection for hyperspectral image classification, IEEE Transactions on Geoscience and Remote Sensing 59 (2021) 5979–5997. [2] T. Dutta, S. Bhattacharyya, B. K. Panigrahi, J. Platos, V. Snasel, Automatic hyperspectral image clus- tering using qutrit differential evolution, in: Y. Tan, Y. Shi (Eds.), Advances in Swarm Intelligence, Springer Nature Singapore, Singapore, 2024, pp. 280–294. [3] D. Arthur, S. Vassilvitskii, k-means++: the advantages of careful seeding, in: Proceedings of the Eighteenth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA ’07, Society for Industrial and Applied Mathematics, USA, 2007, p. 1027–1035. [4] J. C. Bezdek, R. Ehrlich, W. Full, FCM: The fuzzy c-means clustering algorithm, Computers & Geosciences 10 (1984) 191–203. [5] J. Holland, Adaptation in natural and artificial systems: An introductory analysis with application to biology, control, and artificial intelligence, University of Michigan Press, 1975. [6] Y. Shi, R. Eberhart, A modified particle swarm optimizer, in: 1998 IEEE International Conference on Evolutionary Computation Proceedings. IEEE World Congress on Computational Intelligence (Cat. No.98TH8360), 1998, pp. 69–73. [7] F. Glover, M. Laguna, Tabu Search, Springer US, Boston, MA, 1998, pp. 2093–2229. [8] M. Han, Z. Du, K. F. Yuen, H. Zhu, Y. Li, Q. Yuan, Walrus optimizer: A novel nature-inspired metaheuristic algorithm, Expert Systems with Applications 239 (2024) 122413. [9] S. Mirjalili, S. M. Mirjalili, A. Lewis, Grey wolf optimizer, Advances in Engineering Software 69 (2014) 46–61. [10] T. Dutta, S. Bhattacharyya, B. K. Panigrahi, I. Zelinka, L. Mrsic, Multi-level quantum inspired metaheuristics for automatic clustering of hyperspectral images, Quantum Machine Intelligence 5 (2023) 1–35. [11] C.-I. Chang, An information-theoretic approach to spectral variability, similarity, and discrim- ination for hyperspectral image analysis, IEEE Transactions on Information Theory 46 (2000) 1927–1932. [12] B. Fu, X. Sun, C. Cui, J. Zhang, X. Shang, Structure-preserved and weakly redundant band selection for hyperspectral imagery, IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing 17 (2024) 12490–12504. [13] S. Zhang, H.-S. Wong, Arimp: A generalized adjusted rand index for cluster ensembles, in: 2010 20th International Conference on Pattern Recognition, 2010, pp. 778–781. [14] M. K. Pakhira, S. Bandyopadhyay, U. Maulik, Validity index for crisp and fuzzy clusters, Pattern recognition 37 (2004) 487–501. [15] H. Zhai, H. Zhang, P. Li, L. Zhang, Hyperspectral image clustering: Current achievements and future lines, IEEE Geoscience and Remote Sensing Magazine 9 (2021) 35–67. [16] H. Jiao, Y. Zhong, L. Zhang, An unsupervised spectral matching classifier based on artificial dna computing for hyperspectral remote sensing imagery, IEEE Transactions on Geoscience and Remote Sensing 52 (2014) 4524–4538. [17] Y. Liu, C. Li, J. Xiao, Z. Li, W. Chen, X. Qu, J. Zhou, Qegwo: Energy-efficient clustering approach for industrial wireless sensor networks using quantum-related bioinspired optimization, IEEE Internet of Things Journal 9 (2022) 23691–23704. [18] A. S. Hesar, M. Houshmand, A memetic quantum-inspired genetic algorithm based on tabu search, Evolutionary Intelligence 17 (2024) 1837–1853. [19] A. Dey, S. Bhattacharyya, S. Dey, J. Platos, V. Snasel, A quantum inspired differential evolution algorithm for automatic clustering of real life datasets, Multimedia Tools and Applications 83 (2024) 8469–8498. [20] V. Tkachuk, Quantum genetic algorithm based on qutrits and its application, Mathematical Problems in Engineering 2018 (2018) 8614073. [21] T. Dutta, S. Bhattacharyya, S. Mukhopadhyay, Automatic clustering of hyperspectral images using qutrit exponential decomposition particle swarm optimization, in: 2021 IEEE International India Geoscience and Remote Sensing Symposium (InGARSS), 2021, pp. 289–292. [22] Y. Zhong, X. Wang, Y. Xu, S. Wang, T. Jia, X. Hu, J. Zhao, L. Wei, L. Zhang, Mini-uav-borne hyperspectral remote sensing: From observation and processing to applications, IEEE Geoscience and Remote Sensing Magazine 6 (2018) 46–62. [23] Y. Zhong, X. Hu, C. Luo, X. Wang, J. Zhao, L. Zhang, Whu-hi: Uav-borne hyperspectral with high spatial resolution (h2) benchmark datasets and classifier for precise crop identification based on deep convolutional neural network with crf, Remote Sensing of Environment 250 (2020) 112012. [24] M. Borsotti, P. Campadelli, R. Schettini, Quantitative evaluation of color image segmentation results, Pattern Recognition Letters 19 (1998) 741–747. [25] E. Liberto, D. Bressanello, G. Strocchi, C. Cordero, M. R. Ruosi, G. Pellegrino, C. Bicchi, B. Sgorbini, Hs-spme-ms-enose coupled with chemometrics as an analytical decision maker to predict in-cup coffee sensory quality in routine controls: Possibilities and limits, Molecules 24 (2019). (a) (b) (c) (d) (e) (f) Figure 2: (a) Ground Truth image of WHU Dataset [22] [23], (b) Resultant image using BSSV [11], (c) Clustered image using WaO [8], (d) Clustered image using QbWaO, (e) Clustered image using QtWaO with AIndex [13], (f) results using 𝐾-means [3] (cluster number = 6) on WHU Dataset [22] [23] (a) (b) Figure 3: (a) One-Way ANOVA test [25], (b) Tukey’s post hoc test [25] - results for WHU Dataset [22] [23]