1. Introduction
The increasing frequency and diversity of water anomalies (e.g., floods, algal blooms, black-odor water, and offshore oil spills) pose significant threats to aquatic ecosystems, water security, and socioeconomic stability [
1,
2]. Rapid and accurate identification of these distinct anomaly types is therefore critical for enabling early warning and facilitating timely management responses, which rely on the intelligent detection of multicategory anomalies. However, achieving fast and reliable multi-type identification via satellite remote sensing remains challenging. Although these anomalies arise from distinct hydrological, biological, and chemical processes and are generally distinguishable in their spectral responses [
3], similarities in spectral and radiometric characteristics may occur among different anomaly types as well as between anomalous and normal surface conditions under complex observation scenarios (e.g., mixed pixels, illumination variation, and background interference), thereby increasing the difficulty of accurate multi-class discrimination. Among various water anomalies, floods, algal blooms, black-odor water, and offshore oil spills are particularly representative due to their high occurrence frequency and significant environmental and socioeconomic impacts. The lack of a unified method that can maintain high discriminatory power therefore remains a key barrier to reliable, anomaly type identification.
Early research in this field focused primarily on water-quality parameter inversion and the retrieval of chlorophyll-a (Chl-a), total suspended matter (TSM), and colored dissolved organic matter (CDOM) from multispectral or hyperspectral imagery [
4,
5,
6,
7]. These parameters have proven valuable for assessing long-term ecosystem trends and evaluating water restoration policies. For instance, coastal transparency improved following the Bohai Sea Management Initiative [
8]. Although parameter inversion methods have advanced substantially, they are designed primarily for continuous environmental assessment rather than the rapid detection of abrupt anomalies. The retrieval process typically requires atmospheric correction, bio-optical modeling, and empirical calibration, which increases the computational cost and hinders real-time application. Moreover, while these parameters reflect changes in water quality, they lack the categorical specificity required to discriminate among multiple surface anomaly types.
To improve responsiveness, spectral index-based methods have been developed for the fast empirical identification of specific anomaly types. These methods design algebraic combinations of spectral bands to amplify specific physical signals, such as water extent, vegetation, or turbidity, and have proven effective for single-type anomaly identification. For example, the normalized difference water index (NDWI) and the normalized difference built-up index (NDBI) are typically used to delineate flooded areas and urban inundation zones, respectively, whereas the normalized difference vegetation index (NDVI) and normalized difference chlorophyll index (NDCI) increase bloom identification by exploiting chlorophyll-related spectral peaks [
9,
10]. Black-odor water, characterized by high organic loading and low oxygen levels, has been studied using both field-derived and remote-sensing indices, such as the black and odds water quality index (BOWQI) and the remotely derived normalized difference black-odorous water index (NDBWI), which have achieved accuracies exceeding 80% across major Chinese cities [
11,
12]. To address the insufficient accuracy of existing remote sensing classification methods for surface water in complex backgrounds, a study proposes a novel water index (SSWI) [
13] that integrates spectral and solar elevation angle dynamic variation characteristics based on GF-4 geostationary orbit satellite dense time-series imagery. Nevertheless, index-based approaches require substantial spectral prior knowledge and depend heavily on expert-driven index design. A single index typically corresponds to a single anomaly type, and multi-index combinations often lead to incompatibility among decision rules, degraded robustness, or conflicting anomaly indications. As a result, these methods are difficult to extend to consistent and accurate multitype identification in complex real-world environments.
Beyond empirical index approaches, recent advances in data-driven methods have improved the capacity for automated water anomaly type identification. Convolutional neural networks (CNNs), particularly U-Net architectures, have been widely adopted to integrate multisource inputs and learn spatial–spectral patterns directly from imagery. For instance, deep learning models such as U-Net have demonstrated superior performance in flood mapping from Sentinel-1 SAR imagery compared to traditional threshold-based methods and conventional machine learning approaches [
14]. Furthermore, the integration of topographic variables, including slope, digital elevation models (DEM), and height above nearest drainage (HAND), has been shown to further improve classification accuracy in complex terrain conditions. Similar deep architectures have been extended to identify oil spills and flood susceptibility [
15,
16], often by coupling CNNs or recurrent models with optimization algorithms to increase generalizability and efficiency. Collectively, these studies demonstrate the growing potential of deep learning for multisource fusion and high-accuracy anomaly mapping. These models underscore the potential of deep architectures to automate water anomaly type identification and integrate multisource inputs. However, due to the potential for confusion between different types of water anomalies and between these anomalies and normal Earth’s surface spectral response characteristics, the class distributions of the model in the feature space may overlap, thus placing higher demands on the characterization of feature separability.
The emergence of decision boundary–based methods provide a potential direction for improving multiclass discrimination. A decision boundary defines regions in the feature space that correspond to different classes, and its structure directly influences the separability of feature distributions. By introducing explicit geometric constraints, such as hypersphere-based boundary modeling or margin-based separation, existing studies have shown that feature representations can be better organized, leading to improved intra-class compactness and inter-class separation [
17,
18]. These approaches suggest that explicitly structuring the feature space can help reduce ambiguity among classes and improve discrimination performance under complex data distributions. However, such strategies have not been specifically tailored to the task of multiclass water anomaly detection, where multiple anomaly types and normal Earth’s surface conditions coexist with varying degrees of spectral similarity.
Motivated by this perspective, this study proposes a deep multisphere decision boundary (DMSDB) method to enhance feature separability for multiclass water anomaly identification. The proposed method is inspired by Deep Multi-sphere Support Vector Data Description [
19] and is adapted as a feature-space structuring strategy rather than a standalone classification method. By constructing water anomaly response features (WARFs) from five complementary indices (NDCI, NDTI, BOI, MNDWI, and NIR-SWIR), the method learns independent spherical decision regions for each anomaly category through a multisphere contrast loss. This design enables the feature space to be organized into relatively compact and separable regions corresponding to different anomaly types, thereby improving the model’s ability to distinguish among floods, algal blooms, black-odor water, and offshore oil spills. Nevertheless, the proposed method has certain limitations. First, its performance depends on the quality and representativeness of the selected spectral indices, which may affect its generalization across different sensors and environmental conditions. Second, the use of spherical decision boundaries assumes relatively compact feature distributions in the learned space, which may not fully capture highly complex or irregular structures. In addition, the current study is conducted on a limited number of annotated scenes, which may not fully capture the variability of water conditions across different regions and acquisition settings. However, the use of complementary feature representations partially alleviates the dependency on large-scale training data. These limitations will be further addressed in future work.
3. Results and Analysis
All the experiments were implemented using the deep multisphere decision boundaries method. The model was trained with the VM-UNet-v2 architecture as the backbone feature extractor initialized using Xavier initialization and optimized using the Adam optimizer with an initial learning rate of 0.001 and a weight decay of . Learning rate milestones were scheduled at epochs 50, 100, and 200 to ensure stable convergence across the 300 training epochs. The batch size was set to 128. To ensure reproducibility, a fixed random seed 42 was used. The method was configured with a feature space dimension of four corresponding to the 5 water anomaly indices (, , , and ) and a five-class classification setup, representing the four water anomaly types and an additional background class. The decision boundary strategy hyperparameter was set to ν = 0.1, balancing the one-class boundary constraint and the interclass repulsion term within the loss function. A block coordinate optimization strategy was adopted to alternately update the network parameters and sphere boundaries, with a warm-up period of 5 epochs and boundary updates performed every 5 epochs.
3.1. Quantitative Performance Evaluation
Table 2 summarizes the F1 scores of the proposed model for detecting four major water anomaly types—flood, algal bloom, black-odor water, and offshore oil spills—under different combinations of hyperparameters ν (0.1, 0.05, and 0.01) and λ (0.1 and 1). The results indicate that model performance is jointly influenced by both ν and λ, with λ = 0.1 generally yielding better detection accuracy across most anomaly categories.
For flood detection, the proposed model maintains consistently high performance across all parameter settings, with F1 scores ranging from 0.9273 to 0.9492. The best performance is achieved at ν = 0.05 and λ = 0.1, while only minor fluctuations are observed under different parameter combinations, demonstrating strong robustness of the model for flood detection. Algal bloom detection also achieves stable and high accuracy under all configurations, with F1 scores ranging from 0.9043 to 0.9635. The highest F1 score is obtained at ν = 0.01 and λ = 0.1. Moreover, under λ = 0.1, the performance gradually improves as ν decreases, indicating that relatively tighter boundary constraints help enhance the separability of algal bloom features in the latent feature space. Compared with floods and algal blooms, black-odor water detection exhibits stronger sensitivity to hyperparameter settings. When ν = 0.1 and λ = 0.1, the F1 score is only 0.5612, indicating insufficient discrimination capability under relatively loose boundary constraints. As ν decreases to 0.05, the performance improves significantly, reaching 0.8348 at λ = 0.1 and 0.8536 at λ = 1. However, when ν is further reduced to 0.01, the performance decreases slightly, suggesting that excessively tight boundary constraints may limit the representation of the complex spectral variability of black-odor water. For offshore oil spill detection, the model achieves relatively stable performance, with F1 scores ranging from 0.7091 to 0.7876. The best performance is achieved at ν = 0.01 and λ = 0.1. In addition, under λ = 0.1, the F1 score gradually increases as ν decreases, indicating that stronger boundary constraints are beneficial for capturing subtle spectral differences between oil spill regions and surrounding seawater. From an overall perspective, the best performance is achieved at ν = 0.05 and λ = 0.1, where the mean F1 score reaches 0.8789 and the mIoU reaches 0.7932, both representing the highest overall performance among all parameter combinations. These results indicate that a moderate boundary constraint combined with a lower interclass repulsion weight provides the most balanced feature representation for diverse water anomaly types. Therefore, the parameter combination ν = 0.05 and λ = 0.1 is selected as the optimal setting in this study due to its superior and consistent performance across multiple evaluation metrics.
3.2. Qualitative Analysis of Detection Results
Figure 4 provides qualitative examples of detection outputs under different decision boundary parameter settings. Across all tested values of ν (0.1, 0.05, and 0.01), the predicted anomaly maps exhibit consistent spatial patterns and show strong agreement with the ground truth annotations, indicating that the proposed method maintains stable detection capability over a wide range of decision boundary configurations. Although slight variations can be observed in the predicted boundary details, the overall anomaly regions and category distributions remain highly consistent. These results further demonstrate the robustness of the proposed method and suggest that its detection performance is relatively insensitive to moderate changes in the decision boundary parameter.
Across all anomaly categories, the predicted maps are generally consistent with the reference annotations; however, a limited and acceptable level of cross-class misclassification is still observed, reflecting the robustness of the proposed multisphere decision boundary strategy across different parameter settings. Overall, ν = 0.05 provides the most balanced detection performance by maintaining target integrity while preserving boundary accuracy. In contrast, ν = 0.1 tends to produce under-segmentation due to relatively loose boundary constraints, whereas ν = 0.01 is more susceptible to over-segmentation and boundary diffusion caused by excessively compact feature boundaries. For algal bloom events, all parameter settings successfully identify the primary anomalous regions, indicating that the proposed framework is highly sensitive to chlorophyll-induced spectral anomalies. Nevertheless, ν = 0.01 introduces more pronounced cross-class confusion, with portions of bloom regions being misclassified as flood anomalies. In flood scenarios, the model accurately captures the major inundated areas under all parameter settings, while ν = 0.05 achieves superior spatial continuity and boundary completeness. By comparison, ν = 0.1 fails to detect certain marginal regions, and ν = 0.01 generates additional anomalous responses in localized areas. For black-odorous water, the model exhibits higher sensitivity to decision boundary configurations due to the small spatial extent and complex spectral characteristics of the targets. Specifically, ν = 0.1 results in noticeable false negatives, whereas ν = 0.05 and ν = 0.01 successfully identify the primary anomalous regions but still exhibit minor deviations in boundary delineation. In offshore oil spill cases, all parameter settings effectively capture the major pollution zones, while ν = 0.05 achieves a better trade-off between target completeness and false positive suppression. Furthermore, normal surface samples remain largely free from abnormal responses across all parameter settings, indicating that the proposed method possesses strong false positive suppression capability in non-anomalous regions.
In practical detection scenarios, the proposed algorithm demonstrates processing capabilities that are well aligned with the acquisition characteristics of Sentinel-2 imagery. Considering the satellite’s scene acquisition cycle of approximately 38 s and its spatial resolution of 10 m per pixel, the system employs a tile-based processing architecture that analyzes 128 × 128-pixel units in parallel during the data downlink process. Validation on a dataset comprising 1726 scenes confirms that the model maintains stable throughput, achieving an average inference time of 33.37 s on an NVIDIA V100 GPU (16 GB), indicating strong potential for onboard deployment. This architectural design effectively eliminates the processing bottleneck between the data acquisition and analysis phases.
3.3. Ablation Experiments
To systematically evaluate the contributions of input feature configuration, loss formulation, and decision boundary design, ablation experiments were conducted, as summarized in
Table 3. For a fair comparison, all baseline models were trained under identical experimental settings. UNet and DeepLabV3+ were initialized with ImageNet pre-trained weights, whereas VMUNetV2 was initialized using Xavier initialization because no publicly available ImageNet pre-trained model is available for this architecture. All models were optimized using the Adam optimizer with an initial learning rate of 0.001 and a weight decay of
. The learning rate was decayed at epochs 50, 100, and 200 during a total of 300 training epochs with a batch size of 128. In addition, training and validation losses of all baseline models reached stable convergence before the end of the 300 training epochs. A fixed random seed of 42 was adopted throughout all experiments to ensure reproducibility.
Under identical training settings, all conventional semantic segmentation baselines exhibit limited performance when relying solely on RGB inputs. Specifically, UNet, VMUNetV2, and DeepLabV3+ achieve mIoU values of 0.1356, 0.1459, and 0.1391, respectively, with corresponding mF1 scores of 0.2095, 0.2376, and 0.2135. The relatively low performance of these RGB-based methods suggests that RGB information alone is insufficient to effectively characterize the spectral differences among multiple water anomaly categories, rather than reflecting limitations of the segmentation architectures themselves. Under this challenging multi-class water anomaly detection task, the lack of discriminative spectral information limits the effectiveness of architectural improvements, resulting in comparable performance among different segmentation backbones. Replacing RGB inputs with five remote sensing indices (NDCI, NDTI, BOI, MNDWI, and NIR-SWIR) while retaining the conventional softmax classifier improves the mIoU of VMUNetV2 from 0.1459 to 0.1925. However, the corresponding mF1 score remains relatively limited, indicating that enhanced spectral representations alone cannot fully resolve the complex feature distributions of multiple water anomaly categories when conventional softmax decision boundaries are employed.
Internal ablation experiments further demonstrate the effectiveness of the proposed method. When only a single spectral index (MNDWI) is provided, introducing the multisphere decision boundary together with the MSC loss already yields a substantial improvement, achieving an mIoU of 0.5481 and an mF1 score of 0.5791. This result indicates that the proposed geometric feature constraints can significantly enhance class discrimination even under limited spectral information. In contrast, removing the inter-class repulsion term and retaining only the attraction component causes feature collapse, resulting in mIoU and mF1 values of 0, which demonstrates that intra-class attraction alone cannot establish discriminative feature representations for multi-class water anomaly recognition. Finally, the complete method, integrating five remote sensing indices with the proposed MSC loss and multisphere decision boundary, achieves the best overall performance with an mIoU of 0.7920 and an mF1 score of 0.8786. These results confirm that the superior performance of the proposed method arises from the synergistic combination of enhanced spectral representation, discriminative feature optimization, and multisphere decision boundary construction.
3.4. Robustness Analysis via Random Seed Initialization
To evaluate the stability and robustness of the proposed model under different random seed initializations, we conducted 20 independent runs using distinct random seeds and performed statistical analyses on the results.
As
Figure 5 illustrated, Accuracy, Flood F1, and Bloom F1 demonstrate compact distributions with median values exceeding 0.90, indicating a low sensitivity to random initialization. The comprehensive segmentation metrics, mIoU and Mean F1, achieve stable medians of approximately 0.73 and 0.82, respectively. However, varying degrees of variance are observed among the class-specific metrics. While the F1-scores for the Flood and Bloom classes show narrow interquartile ranges, the Black-Odorous Water F1 and Offshore Oil Spill F1 metrics exhibit higher dispersion. The F1-score for Black-Odorous Water ranges from approximately 0.70 to 0.91 with a median of 0.83. The Offshore Oil Spill F1 displays the highest variability, with values ranging between 0.46 and 0.78 and a median of 0.63. This variance suggests that the optimization process for offshore oil spills and black-odorous water bodies is more sensitive to initial weight configurations, which can be attributed to the spectral complexities and varying environmental conditions inherent to these specific target classes.
Overall, the model demonstrates relatively stable performance for Flood and Algal Bloom detection, while the Black-Odorous Water and Offshore Oil Spill categories exhibit larger performance fluctuations across different random seeds.
4. Discussion
4.1. Advantages of the Proposed Method
The effectiveness of the proposed method mainly arises from the explicit constraints imposed by the multisphere decision boundaries on feature distributions, which promote intra-class compactness and inter-class separation, thereby enhancing the overall discriminability among multiple water anomaly types. Specifically, each class is represented by a hypersphere characterized by a center and a radius, transforming the classification problem into a region-partitioning task. Under this formulation, each category corresponds to a bounded region in the feature space, and the class membership of a sample is determined by its distance to the corresponding class center and whether it falls within the associated region. Compared with conventional approaches that rely on implicit classification functions, this formulation provides a more explicit region-based description of class boundaries in the feature space.
To enforce such a structured feature distribution, a multisphere contrast loss (MSC Loss) is constructed as the optimization objective. The loss operates on Euclidean distances in the feature space, encouraging samples of the same category to move closer to their corresponding class centers while maintaining a certain distance from other class centers. Notably, the repel term is formulated based on the minimum distance between each sample and non-target class centers, such that only the closest competing class contributes to the loss. This mechanism emphasizes the most ambiguous class boundaries, instead of enforcing uniform separation from all non-target classes. Through this mechanism, the relative spatial relationships among samples directly participate in the optimization process, leading to a feature distribution that is more compact within classes and more separable across classes.
The multisphere decision boundaries and the MSC Loss are jointly optimized through an alternating strategy. When the feature mapping network is fixed, class centers and radii are updated based on the current feature representations, thereby defining the corresponding decision regions. Conversely, when the decision boundary parameters are fixed, the network parameters are optimized using the contrast loss to update the feature representations. Through this alternating process, region partitioning based on class centers and distance-based constraints are integrated into the feature learning process, progressively improving the separability of different categories in the feature space.
The impact of this mechanism is primarily reflected in the change in feature distribution rather than solely in classification accuracy. Visualization results based on principal component analysis (PCA) show that (
Figure 3), in the original feature space, different anomaly types and normal surface samples exhibit noticeable overlap, particularly in boundary regions. After feature mapping, the distributions become more structured, with reduced overlap between categories and increased clustering around their respective centers. The relative spatial relationships between anomaly classes and normal surfaces become clearer, and the transition regions between categories are more distinct. In addition, the distance distributions indicate that samples tend to have smaller distances to their corresponding class centers and larger distances to the nearest non-target centers, which is consistent with the formulation of the multisphere decision boundaries. These results demonstrate that the proposed feature mapping mechanism effectively enhances class separability and stabilizes the decision boundary structure, thereby improving the robustness of multiclass anomaly discrimination.
Overall, the proposed method improves multiclass water anomaly discrimination by jointly leveraging a high-efficiency feature extraction module and explicitly structured multisphere decision boundaries with distance-based constraints. This design reduces feature overlap and enhances inter-class separability in the feature space, thereby enabling fast and accurate identification of water anomalies in complex remote sensing scenarios.
4.2. Limitations of the Proposed Method and Future Works
Although the proposed method markedly enhances multiclass anomaly recognition in water surface monitoring, several limitations should be noted. The model’s performance still depends on the representativeness and balance of the training data, and it tends to be less effective in identifying small-scale or rare anomaly types. Moreover, its generalizability across diverse environmental conditions and multi-sensor datasets has yet to be thoroughly assessed. In particular, future work will focus on extending the proposed method to integrate emerging Earth observation data sources, such as multi-sensor and multi-modal observations, with the aim of addressing data gaps under complex environmental conditions and improving its transferability across regions, sensors, and application scenarios.
5. Conclusions
This study proposes a deep multisphere decision boundaries (DMSDB) method for multiclass water anomaly detection. The core idea is to explicitly constrain feature distributions in the learned space by representing each anomaly category as a dedicated sphere defined by its center and radius, thereby transforming the classification problem into a structured region-partitioning task. By integrating multisphere decision boundaries with a contrastive optimization mechanism, the proposed method enhances intra-class compactness and inter-class separability, leading to more discriminative feature representations. To implement this method, a compact 5-dimensional feature space is first constructed based on remote sensing indices derived from Sentinel-2 imagery, and a modified VM-UNet-v2 network is employed to extract water anomaly response features (WARFs). Subsequently, a multi-sphere contrast loss function is introduced to optimize class-specific decision boundaries. Experimental results across four representative anomaly types—floods, algal blooms, black-odor water, and offshore oil spills—demonstrate that the proposed method achieves an average F1 score of 0.8789 and an mIoU of 0.7932. In addition, the model exhibits high inference efficiency, completing classification over a 10,000 km2 scene within 33 s, indicating its suitability for large-scale rapid monitoring tasks. These results confirm that the performance improvement is closely related to the structured feature distributions guided by multisphere constraints, which effectively enhance the separability of spectrally similar anomaly categories. Nevertheless, several limitations remain. The effectiveness of the model still depends on the representativeness of the selected features and the scale of the training data, and its generalization capability under more diverse environmental and sensor conditions requires further investigation. Future work will focus on expanding the dataset, incorporating additional anomaly types, and validating the method under more complex scenarios. Overall, the proposed approach provides an effective and efficient solution for multiclass water anomaly detection by improving feature separability and applying efficient network architecture, offering a practical pathway for intelligent water environment monitoring.