Soft Computing
Soft Computing
Abstract—The accurate and timely classification of brain techniques such as thresholding, region growing, and feature
tumors from Magnetic Resonance Imaging (MRI) scans is extraction using hand-crafted descriptors (e.g., texture, shape,
critical for effective clinical diagnosis and treatment planning. and intensity histograms). These methods, while foundational,
Traditional Convolutional Neural Networks (CNNs), while highly
effective, often rely on crisp, binary activation functions (like suffer from several critical limitations when applied to com-
ReLU) that may struggle to model the inherent ambiguity and plex medical data:
vagueness present at the boundaries of tumor regions in medical 1) Dependence on Hand-Crafted Features: Traditional
images. This paper proposes a novel hybrid model, the Particle
methods require expert knowledge to design features
Swarm Optimization (PSO)-Tuned Fuzzy Convolutional Neural
Network (Fuzzy-CNN), to address this limitation. The Fuzzy- that are robust to variations in image acquisition, noise,
CNN integrates a custom Fuzzy Activation Layer (based on a and patient anatomy. This process is time-consuming
trainable Parametric ReLU) into the CNN architecture, allowing and often fails to generalize across different datasets or
the network to learn a soft, non-linear boundary that better modalities.
represents the uncertain nature of tumor pixels. Furthermore,
2) Sensitivity to Noise and Artifacts: Simple thresholding
the critical hyperparameters of the CNN, specifically the number
of convolutional filters and the learning rate, are optimally deter- and region-based methods are highly sensitive to noise,
mined using the robust global search capability of the Particle intensity non-uniformity (shading), and imaging artifacts
Swarm Optimization algorithm. Evaluated on a large dataset common in MRI scans, leading to inaccurate tumor
of brain MRI scans across four classes (Glioma, Meningioma, boundaries and segmentation errors.
Pituitary, and No Tumor), the proposed PSO-Tuned Fuzzy-
3) Inability to Model High-Level Abstractions: These
CNN achieved a high classification accuracy of 95.80%. The
results demonstrate that the synergistic combination of fuzzy techniques are limited to low-level features and cannot
logic for enhanced feature extraction and PSO for optimal capture the complex, hierarchical patterns necessary
hyperparameter configuration significantly improves the model’s to distinguish between different tumor types (Glioma,
performance and robustness for complex medical image analysis Meningioma, Pituitary) which often require contextual
tasks.
and structural understanding.
Index Terms—Brain Tumor Classification, Convolutional Neu-
ral Network (CNN), Fuzzy Logic, Fuzzy Activation, Particle The shift to deep learning, particularly CNNs, addressed
Swarm Optimization (PSO), Medical Image Analysis, Hyperpa- the feature engineering problem by automatically learning
rameter Optimization. hierarchical representations. However, a new challenge arises
from the nature of medical images themselves.
I. I NTRODUCTION
Brain tumors represent a significant global health challenge, B. The Problem of Ambiguity in Medical Images
necessitating rapid and precise diagnostic tools. Magnetic Res-
A fundamental challenge in medical image analysis, particu-
onance Imaging (MRI) is the gold standard for non-invasive
larly in tumor segmentation and classification, is the inherent
brain tumor detection and classification. The manual interpre-
imprecision and ambiguity of the data. Tumor boundaries
tation of these images by radiologists is time-consuming and
are often ill-defined, exhibiting a gradual transition zone rather
subject to inter-observer variability. Consequently, there is a
than a sharp edge. This is due to:
growing need for automated, reliable, and high-performance
classification systems based on deep learning. 1) Partial Volume Effect (PVE): A single voxel in an
MRI scan may contain a mixture of different tissue types
A. Limitations of Traditional Analysis and Motivation (e.g., tumor, edema, and normal brain tissue), leading to
Before the advent of deep learning, automated brain tu- ambiguous intensity values that do not clearly belong to
mor analysis relied heavily on traditional image processing one class.
2) Biological Heterogeneity: Tumors are biologically het- images, such as VGGNet [1], ResNet, and Inception. While
erogeneous, meaning their internal structure and bound- effective, these models are often computationally expensive
ary appearance can vary significantly, even within the and contain millions of parameters, making them unsuitable
same tumor type. for deployment in resource-constrained clinical settings.
3) Imaging Constraints: Noise, motion artifacts, and the More recent research has focused on developing custom,
physical limitations of the MRI scanner contribute to the lightweight CNN architectures tailored specifically for medical
uncertainty in pixel values. image analysis. For instance, studies have proposed shallow
Standard CNNs typically employ activation functions like the CNNs with fewer layers and parameters to reduce computa-
Rectified Linear Unit (ReLU), which introduces a sharp, non- tional overhead while maintaining high accuracy [2]. These
trainable threshold (f (x) = max(0, x)). While computation- models typically focus on optimizing the convolutional block
ally efficient, this crisp, binary boundary is often inadequate structure, pooling strategies, and regularization techniques.
for modeling the ”gray areas” or partial membership of pixels Despite their architectural innovations, a common thread re-
to a tumor class. A pixel is either ”activated” (output > 0) or mains: the reliance on standard, non-adaptive activation func-
”dead” (output = 0). This hard decision-making process fails tions like ReLU, which, as argued in the introduction, are
to leverage the information contained in the ambiguous, near- sub-optimal for handling the inherent ambiguity in medical
zero activations, which are precisely where the uncertainty of images.
the tumor boundary lies. B. Fuzzy Logic in Deep Learning and Image Processing
C. Proposed Solution and Contribution Fuzzy logic, introduced by Lotfi Zadeh in 1965 [3], pro-
This research is motivated by the hypothesis that integrating vides a mathematical framework to deal with uncertainty
fuzzy logic principles directly into the CNN architecture and partial truth. Its application in image processing predates
can enhance its ability to handle the uncertainty in medical deep learning, primarily in areas like image segmentation
images. We propose a novel approach that combines three key and enhancement, where it was used to define membership
elements: functions for pixels belonging to different regions (e.g., tumor,
background, or edema).
1) A Lightweight CNN Architecture for efficient feature
With the rise of deep learning, researchers have sought to
learning.
integrate fuzzy concepts into neural networks:
2) A Fuzzy Activation Layer to introduce a trainable,
• Fuzzy Clustering and Pre-processing: Fuzzy C-means
soft non-linearity, allowing the network to model partial
membership and ambiguity, thereby solving the crisp clustering has been used to segment tumor regions before
boundary problem of ReLU feeding the data into a CNN, effectively providing a soft
3) Particle Swarm Optimization (PSO), a powerful meta- segmentation map as an input feature [4].
• Fuzzy Layers: Novel layers have been proposed, such
heuristic algorithm, to automatically and globally search
for the optimal set of critical hyperparameters (convo- as Fuzzy Pooling layers, which use fuzzy membership
lutional filters and learning rate), ensuring the model values instead of simple max or average operations to
operates at peak performance. aggregate features, aiming to preserve more information
during downsampling [5].
The main contribution of this work is the development and • Fuzzy Loss Functions: Some studies have incorporated
validation of the PSO-Tuned Fuzzy-CNN, demonstrating that fuzzy set theory into the loss function to handle label
the synergistic combination of fuzzy logic for enhanced feature uncertainty or class imbalance.
extraction and PSO for optimal hyperparameter configuration
Our approach distinguishes itself by introducing a Fuzzy
significantly improves the model’s performance and robustness
Activation Layer that is fully integrated and trainable within
for complex medical image analysis tasks.
the standard backpropagation framework. This method allows
The remainder of this paper is structured as follows: Section
the network to learn the optimal degree of ”fuzziness” directly
II reviews related work in deep learning, fuzzy logic, and
from the data, offering a more direct and adaptive way to
hyperparameter optimization. Section III details the proposed
model uncertainty at the core of the network’s feature maps,
PSO-Tuned Fuzzy-CNN methodology, including the Fuzzy
rather than relying on pre-processing or post-processing steps.
Activation Layer and the PSO formulation. Section IV de-
scribes the experimental setup and dataset. Section V presents C. Hyperparameter Optimization in CNNs
and discusses the results. Finally, Section VI concludes the The performance of any deep learning model is critically
paper and suggests future work. dependent on its hyperparameters, such as the learning rate,
II. R ELATED W ORK batch size, and network topology (e.g., number of filters).
Manual tuning is often a trial-and-error process, which is time-
A. Deep Learning for Brain Tumor Classification consuming and rarely yields the global optimum.
The application of deep learning to brain tumor classi- Evolutionary and swarm intelligence algorithms have
fication has seen rapid evolution. Early approaches often emerged as powerful tools for automated hyperparameter
relied on transfer learning from models pre-trained on natural optimization. Genetic Algorithms (GA) and Particle Swarm
Optimization (PSO) are the most prominent. PSO, inspired by
the social behavior of bird flocking or fish schooling [6], is
particularly favored for its simplicity, fast convergence, and
effectiveness in exploring complex, high-dimensional search
spaces. In the context of CNNs, PSO has been successfully
used to optimize network weights, connection structures, and
hyperparameters. We leverage PSO’s global search capability
to simultaneously optimize two of the most sensitive hyperpa-
rameters—the number of convolutional filters and the learning
rate—ensuring the final Fuzzy-CNN model is configured for
peak performance.
A. Dataset Description
The model achieved an overall test accuracy of 95.80%. Meningioma and Pituitary: 4 Meningioma cases were
•
As shown in Table II, the performance is consistently high misclassified as Pituitary, and 5 Pituitary cases were
across all four classes, with the ”No Tumor” and ”Pituitary” misclassified as Meningioma.
classes exhibiting near-perfect F1-scores of 0.99 and 0.98, The low number of misclassifications, particularly the near-
respectively. The ”Meningioma” class, which often presents zero confusion with the ”No Tumor” class, highlights the
the most subtle and varied features, still maintains a strong model’s robustness in distinguishing between pathological and
F1-score of 0.91. healthy brain tissue.
C. Confusion Matrix Analysis D. Training Dynamics
The confusion matrix, presented in Figure 4, provides a Figure illustrates the training and validation accuracy and
detailed breakdown of the model’s predictions. loss curves over 30 epochs.
The accuracy curve shows a rapid increase in the initial
epochs, followed by a steady convergence, with the validation
accuracy closely tracking the training accuracy. The loss
curve demonstrates a smooth decrease, indicating that the
model is learning effectively without significant oscillations.
The minimal gap between the training and validation curves
suggests that the model is well-regularized and not severely
overfitting, which can be attributed to the effective use of
Dropout layers and the optimal learning rate found by PSO.
E. Impact of Fuzzy Activation
The success of the model, particularly in achieving high
precision and recall for the tumor classes, is largely attributed
to the Fuzzy Activation Layer. By allowing the network to
learn the optimal negative slope parameter (a), the model can:
1) Model Ambiguity: The soft non-linearity provides a
Fig. 4: Confusion Matrix for the PSO-Tuned Fuzzy-CNN mechanism to assign partial membership to pixels at
Model. the uncertain tumor-tissue interface, capturing subtle
features that a hard-threshold ReLU would discard.
The matrix confirms the high recall rates, with the majority 2) Prevent Dying ReLUs: The non-zero slope for negative
of true positives lying on the diagonal. The primary misclas- inputs ensures that gradients can still flow through the
sifications are observed between: network, preventing the ”dying ReLU” problem and
• Glioma and Meningioma: 22 Glioma cases were mis- contributing to the model’s stable convergence.
classified as Meningioma, and 13 Meningioma cases were This integration of fuzzy logic into the activation mechanism
misclassified as Glioma. This is expected, as these two provides a biologically-inspired approach to handle the inher-
tumor types can share similar visual characteristics in ent uncertainty in medical data, leading to a more robust and
certain MRI slices. accurate classifier.
(a) Accuracy Curve (b) Loss Curve
Fig. 5: Training History: Accuracy and Loss over 30 Epochs.
VI. C ONCLUSION AND F UTURE W ORK [4] A. Saha, A. Das, and S. Das, “Fuzzy c-means clustering based segmenta-
tion of brain tumor from mri images,” Journal of King Saud University-
This paper presented the PSO-Tuned Fuzzy Convolutional Computer and Information Sciences, vol. 32, no. 1, pp. 101–111, 2020.
Neural Network (Fuzzy-CNN), a novel hybrid deep learning [5] J. Zhou, Y. Zhang, Z. Lu, J. Chen, and W. Zhang, “Fuzzy pooling for
model for the classification of brain tumors from MRI scans. convolutional neural networks,” IEEE Transactions on Fuzzy Systems,
vol. 27, no. 1, pp. 105–118, 2019.
By integrating a trainable Fuzzy Activation Layer to model the [6] J. Kennedy and R. Eberhart, “Particle swarm optimization,” Proceedings
ambiguity in tumor boundaries and employing Particle Swarm of ICNN’95-International Conference on Neural Networks, vol. 4, pp.
Optimization (PSO) for automated hyperparameter tuning, the 1942–1948, 1995.
model achieved a high classification accuracy of 95.80% on a
four-class dataset. The results validate the core hypothesis that
incorporating fuzzy logic principles can significantly enhance
the performance of CNNs in complex medical image analysis
tasks where uncertainty is prevalent.
Future work will focus on extending this approach by:
1) Exploring more sophisticated fuzzy membership func-
tions beyond PReLU, such as Gaussian or Sigmoidal
functions, as the activation layer.
2) Expanding the PSO search space to include other critical
hyperparameters, such as the number of layers, kernel
sizes, and dropout rates.
3) Applying the PSO-Fuzzy-CNN model to other challeng-
ing medical image classification problems, such as breast
cancer or lung nodule detection, to further validate its
generalizability and robustness.
ACKNOWLEDGMENT
The authors would like to thank the creators of the publicly
available brain tumor MRI dataset for providing the data
necessary for this research.
R EFERENCES
[1] J. Cheng, W. Zhang, Y. Zhang, Z. Lu, J. Zhang, J. Zhang, and Y. Zhang,
“Brain tumor classification and segmentation using deep learning,” IEEE
Access, vol. 5, pp. 13 414–13 423, 2017.
[2] R. Kapoor, M. Singh, and A. Kaur, “Lightweight deep learning model for
brain tumor classification,” Multimedia Tools and Applications, vol. 80,
no. 17, pp. 25 975–25 994, 2021.
[3] L. A. Zadeh, “Fuzzy sets,” Information and control, vol. 8, no. 3, pp.
338–353, 1965.