A multi-objective approach to spam image detection: Balancing performance and resource constraints using lightweight models
Adnane Filali, El Arbi Abdellaoui Alaoui, Amine Sallah, Mostafa Merras, Yassine Maleh · Information Security Journal A Global Perspective · 2025
Image-based spam poses an increasing threat to digital communication systems, demanding solutions that are both accurate and resource-efficient. Traditional spam detection methods often focus solely on classification performance, overlooking the computational constraints inherent in real-world deployment environments. This paper addresses the dual challenge of maintaining high detection accuracy while minimizing computational cost by proposing a novel multi-objective optimization framework for image spam detection. The framework combines the lightweight EfficientNetB0 architecture with NSGA-II (Non-dominated Sorting Genetic Algorithm II) to jointly optimize classification performance and resource consumption. To evaluate the proposed approach, experiments are conducted on the ISH dataset. We use both performance metrics (accuracy, precision, recall, F1-score) and efficiency metrics (processing time and memory usage). Three Pareto solution selection strategies – Weighted Point, Knee Point, and Compromise Point – are employed to explore trade-offs between performance and efficiency. Extensive experiments show that the optimized model achieves 99.53% accuracy and 99.56% F1-score. Training under resource constraints requires 18,325.5 seconds and 326.8758 MB of memory. During testing, inference time is reduced to 0.00204 milliseconds per image with only 0.2395 MB of memory used per image. Notably, the Weighted Point strategy with 20 generations and a population size of 10 improves precision by 2.21%, F1-score by 1.12%, and accuracy by 1.19% compared to the baseline. The framework also integrates K-fold cross-validation and hyperparameter tuning to ensure robustness. These findings demonstrate the practical applicability of balancing high detection performance with acceptable computational cost for real-time spam filtering, even under moderate resource constraints.