End-to-end deep learning pipeline for classifying emails as Ham (legitimate) or Spam / Malicious.
The Spammalicious Detection dataset contains 100,000 labeled emails collected in 2024, with 30 features spanning content, metadata, security, and behavioral signals. The target variable is binary: 0 = Ham / Legitimate, 1 = Spam / Malicious.
A sequential feedforward neural network was designed for text-based email classification. The model takes 29 encoded features as input and passes them through two dense hidden layers with ReLU activation, a dropout layer for regularization, and a softmax output layer.
Note: The design canvas also supports advanced layers such as LSTM, GRU, Bidirectional, BatchNorm, and various pooling layers for more complex architectures.
| Epoch | Loss | Val Loss | Accuracy | Val Accuracy |
|---|---|---|---|---|
| 1 | 0.4459 | 0.2354 | 0.8638 | 0.9858 |
| 2 | 0.1734 | 0.0975 | 0.9849 | 0.9935 |
| 4 | 0.0505 | 0.0355 | 0.9948 | 0.9971 |
| 5 | 0.0308 | 0.0402 | 0.9908 | 0.9976 |
| 6 | 0.0251 | 0.0183 | 0.9908 | 0.9978 |
| 7 | 0.0183 | 0.0103 | 0.9976 | 0.9981 |
| 9 | 0.0183 | 0.0118 | 0.9976 | 0.9988 |
✅ Achieved 99.87% test accuracy with consistently low loss and high precision/recall across both classes. The model generalizes well, with validation metrics closely tracking training performance.
The pipeline is ready for deployment in real-world spam filtering, email security research, and multilingual spam pattern detection.