LSTM IDS Models for CICIDS2017 Dataset
This repository provides two trained PyTorch LSTM models for network intrusion detection, trained on the CICIDS2017 dataset. These models are designed for use in research, benchmarking, or as a starting point for further development in network security and anomaly detection tasks.
Models Included
lambda_with_valid.pth
: LSTM model trained for binary classification (benign vs. attack) using cross-validation.mapping_with_valid.pth
: LSTM model trained for multi-class attack categorization using cross-validation.
Model Details
- Architecture: LSTM-based Recurrent Neural Network
- Input Features: 80 per sample (preprocessed from CICIDS2017)
- Training: 5-fold cross-validation, early stopping, Adam optimizer
- Framework: PyTorch
Usage
- Download the
.pth
files from this repository. - Load the model in your PyTorch code:
import torch from your_model_definition import IdsRnn # Use the same architecture as in training model = IdsRnn(hidden_size=512, output_size=2) # or output_size=7 for multi-class model.load_state_dict(torch.load('lambda_with_valid.pth')) model.eval()
- Prepare your input data with the same preprocessing as used during training.
- Run inference as needed.
Notes
- These models require the same feature extraction and preprocessing pipeline as described in the original training code.
- For best results, refer to the full training pipeline and preprocessing steps.
License
MIT License
If you use these models in your research or project, please cite or reference this repository.
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
๐
Ask for provider support