SOFAN-UNet: A Short Optimization Approach for Attention Networks in U-Net Using Particle Swarm Strategy for Precise Brain Tumor Segmentation
Shoffan Saifullah, Rafał Drezewski, Anton Yudhana, Wahyu Caesarendra, Enny Itje SelaAbstract
Accurate segmentation of brain tumors in magnetic resonance imaging (MRI) is essential for clinical diagnosis and treatment planning. However, variations in tumor morphology, location, and modality-specific appearance make the task highly complex for conventional deep learning approaches. This study introduces SOFAN-UNet, a novel segmentation framework that improves tumor localization and boundary delineation through hybrid attention mechanisms and bio-inspired optimization. The proposed SOFAN-UNet architecture builds on the traditional U-Net structure and incorporates a hybrid attention mechanism combining Squeeze-and-Excitation (SE) and Self-Attention modules. A short optimization strategy, implemented via Particle Swarm Optimization (PSO), is used to dynamically calibrate attention gate parameters, including scale factors and filter sizes, within a constrained search space. This enables efficient learning of discriminative tumor features while preserving spatial detail through optimized skip connections. The model was evaluated across three benchmark datasets—FBTS, BraTS 2021, and BraTS 2018—using DSC, JI, HD, ASSD, AUC, and MCC metrics. Ablation studies and five-fold cross-validation were conducted to assess robustness. SOFAN-UNet achieved state-of-the-art performance, with Dice scores reaching 0.9685 and Jaccard Index up to 0.9389. It demonstrated strong generalization across MRI modalities and tumor types, maintained low boundary error ( HD < 2.5), and achieved AUC values above 0.999. Ablation results confirmed the effectiveness of PSO-based calibration and attention integration, especially for heterogeneous tumor regions. The SOFAN-UNet model offers a highly accurate and computationally efficient framework for brain tumor segmentation. Its robustness across datasets and imaging modalities supports its potential for clinical deployment and further extension to subregion tumor analysis.