Advancements in communication and computer technologies set the stage for numerous security threats, thus prompting the need for sophisticated abilities for identifying anomalies in network traffic. Since deep learning techniques using Convolutional Neural Networks proved to perform well on processing multi-dimensional inputs and automatically extracting features, they have been increasingly used in applications relying on such inputs. In this study, we propose a novel architecture that composes Multilayer Perceptron-Convolutional Neural Network architecture with the nature-inspired algorithm that is inspired from collective behavior of tuna fish, called Tuna Swarm Optimization. An example of a flexible and robust optimization framework is TSO that allows navigation of complex, multi-dimensional spaces. An effective hybrid MLP CNN TSO model which effectively blends out the anomaly detection accuracy up to a satisfying 99.4% is obtained. The research proves the model’s potential for hardening cybersecurity measures through comprehensive experiments, which poses as a strong solution for detecting, diagnosing and mitigating network anomalies. It achieved 99.4% accuracy, 98.91% precision, and 96.3% F1-score. By using this novel combination of data preprocessing, feature extraction and intelligent optimization, this novel contribution to safeguarding of digital infrastructures makes available state of the art tool. © 2025 IEEE.