Deep Learning Manual,paper and other (1)
Deep Learning Manual,paper and other (1)
Bachelor of Technology
In
Artificial Intelligence and Machine Learning
Submitted by
A.Y 2024 - 25
BONAM VENKATA CHALAMAYYA ENGINEERING COLLEGE
(Autonomous)
(Approved by AICTE, permanently affiliated to JNTUK, Kakinada) (ISO 9001:2015 Certified Institute
Accreditedby NBA and NAAC with A‘Grade)
Odalarevu – 533210
CERTIFICATE
This is to certify that manual entitled, “DEEP LEARNING WITH TENSORFLOW
LAB MANUAL” is a Bonafide work of A. Krishna Sowjanya, M. Anantha
Lakshmi, M. Sai Harshitha of III B. Tech in Artificial Intelligence and Machine
Learning, Bonam Venkata Chalamayya Engineering College, Odalarevu, permanently
affiliated to Jawaharlal Nehru Technological University Kakinada, during the
academic year 2024-2025 in partial fulfilment of the requirements for the Award of the
Bachelor of Technology in Artificial Intelligence and Machine Learning.
We express our deep hearted thanks to Dr. A. Rama Krishna, our beloved Head
of the Department for being helpful in providing us with his valuable advice and
timely guidance.
We would like to thank the principal, Sri Dr. Maheswar Dutta and management of
Bonam Venkata Chalamayya Engineering College, for providing us with the
requisite facilities to carry out.
Our deep hearted thanks to all the faculty members of our department for their
value-based impairing of theory and partial subjects, which we had put into use in our
deep learning lab. We are also indebted to the non-teaching staff for their co-
operation.
A. Krishna Sowjanya
M. Anantha Lakshmi
M. Sai Harshitha
BONAM VENKATA CHALAMAYYA ENGINEERING COLLEGE
(AUTONOMOUS)
APPROVED BY AICTE, NEW DELHI, AFFILIATED TO JNTUK KAKINADA
ODALAREVU, ALLAVARAL MANDAL, DR.B. R AMBEDKAR KONASEEMA DISTRICT, ANDHRA PRADESH – 533210.
DEPARTMENT OF AIML
INSTITUTION VISION MISSION
OUR VISION
“To become a leading technical institute of academic excellence by imparting high patterns of
discipline through innovative programs of global standards making our students technologically
superior and ethically strong to serve the Nation.”
OUR MISSION
“To create an environment that shall foster the growth of intellectually capable, innovative
professionals who can contribute to the growth of Technology in partnership with Industry and develop
and harness it for the welfare of the Nation and Mankind.”
OUR VISION
To make the students technically and communicationally strong to produce globally competent
graduates with innovative idea and ethics to build a vibrant nation.
OUR MISSION
To provide good infrastructure, technology know how in collaboration with software industry, student
internship, training by corporate experts, undertaking real time projects, also exposing the students to
workshops and motivational programs.
PEO:2
BVC Graduates will be successfully engaged in careers in software and hardware and allied
fields as eminent engineers and managers.
PEO:3 BVC Graduates will be prepared for continued professional development through
postgraduate studies in engineering and allied fields and through life-long learning.
PEO:4 BVC Graduates will have demonstrated practices and skills in professional attitude,
teamwork, leadership, values, ethics and communication.
Solutions to the real-world problem: Associate learning of Data Science, Big Data, IOT to
PSO1:
arrive solution to real world problem
Use of open-source modern design tools: improve capability to comprehend the
PSO2: technological advancements in the usage of open-source modern design tools to analysis,
design subsystem process for variety applications
Code: 20AD6L04 L T P C
III YEAR II SEM
0 0 3 1.5
DEEP LEARNING WITH TENSORFLOW LAB
Course Outcomes:
Text Books:
1. Reza Zadeh and Bharath Ramsundar, ―TensorFlow for Deep Learning¦, O ‘Reilly publishers,
2018
References:
1. https://github.com/fchollet/deep-learning-with-python-notebooks
EXPERIMENT:1
1.Implement a multi-layer perceptron algorithm for MNIST Hand Written Digit Classification.
AIM: Implement a multi-layer perceptron algorithm for MNIST Hand Written Digit Classification.
DESCRIPTION:
Handwritten digit recognition using MNIST dataset is a major project made with the help of
Neural Network. It basically detects the scanned images of handwritten digits.
We have taken this a step further where our handwritten digit recognition system not only
detects scanned images of handwritten digits but also allows writing digits on the screen with
the help of an integrated GUI for recognition.
The MNIST dataset (Modified National Institute of Standards and Technology) is a large
collection of handwritten digits (0-9) used for training and testing machine learning models,
particularly in image classification and deep learning.
Key Features of MNIST:
60,000 training images and 10,000 test images
Each image is 28x28 pixels in grayscale (values between 0 and 255)
Labels range from 0 to 9, representing the digit in the image
It is widely used for benchmarking neural network architectures like MLPs, CNNs, and RNNs
The figure 1 shows the basic architecture of a neural network consisting the different layers densely
connected to each other. The figure 2 shows the proposed method that how the model is going to
be trained. It follows several steps for the execution and provides some insights like the evaluation
metrics such as accuracy.
Fig 1: Basic Architecture of a Deep Neural Network
Design a neural network for classifying movie reviews using IMDB (Internet Movie Database)
AIM:
Design a neural network for classifying movie reviews using IMDB (Internet Movie Database)
DESCRIPTION:
The IMDB dataset is a comprehensive collection of information sourced from the Internet Movie
Database (IMDB), which serves as a prominent online resource for details related to movies, television
shows, and other entertainment content. This dataset encompasses a wide array of information,
including titles, release dates, genres, cast and crew details, user ratings, plot summaries, box office
performance, and awards.
A neural network is a computational model inspired by the way biological neural networks in the
human brain process information. It consists of interconnected layers of nodes, or "neurons," which
process inputs to produce outputs as shown in the figure 1. Each neuron receives signals, applies a
mathematical transformation, and passes the result to the next layer. The network learns from data by
adjusting the weights of the connections based on the errors in its predictions, enabling it to perform
tasks such as classification, regression, and pattern recognition across various applications like image
and speech recognition.
Proposed Method: Designing a neural network for classifying IMDB movie reviews involves several
steps as shown in the figure 2, from data preprocessing to model training and evaluation. Below is a
step-by-step proposed method:
Step 1: Data Collection & Preprocessing
Dataset: Use the IMDB movie reviews dataset available in TensorFlow/Keras (imdb.load_data()). It
contains 50,000 reviews labelled as positive or negative.
Tokenization: Convert text into sequences of integers using a vocabulary dictionary.
Padding: Pad sequences to a fixed length to ensure uniform input size.
Train-Test Split: Typically, the dataset is already split into 25,000 training and 25,000 testing samples.
Step 2: Neural Network Architecture
We use a deep learning model with an Embedding layer followed by recurrent layers (LSTM/GRU) or
CNN for feature extraction.
Step 3: Model Compilation & Training
Loss Function: Use binary_crossentropy since it is a binary classification task.
Optimizer: Adam (adam) for better convergence.
Metrics: Accuracy (metrics=['accuracy']).
Batch Size & Epochs: Experiment with values like batch_size=64, epochs=10-20.
Step 4: Model Evaluation
Evaluate the model on the test set, using accuracy, precision, recall, and F1-score as performance
metrics.
Step 5: Fine-Tuning & Optimization
Adjust hyperparameters (learning rate, batch size), using techniques like dropout, batch normalization,
or bidirectional LSTM for improvement.
Step 6: Model Accuracy and Loss Visualization:
The model accuracy and loss metrics should be visualized using the matplotlib.pyplot.
PROGRAM:
EXPERIMENT:3
AIM:
Design a neural network for classifying news wires (multiclass, classification) using Reuters dataset.
DESCRIPTION:
The Reuters dataset is a well-known collection of newswires that are used in deep learning projects for
text classification tasks. Here are a few key details about it:
Source: The dataset consists of news articles from Reuters, a reputable international news
organization.
Content: It includes 11,228 news articles categorized into 46 different topics, such as politics,
business, sports, and technology.
Purpose: It's commonly used for multi-class classification tasks, where the goal is to classify a
given news article into one of the predefined topics.
Popularity: The Reuters dataset is frequently used in academic research and practical
applications to train and evaluate text classification models.
A neural network is a computational model inspired by the way biological neural networks in the
human brain process information. It consists of interconnected layers of nodes, or "neurons," which
process inputs to produce outputs as shown in the figure 1. Each neuron receives signals, applies a
mathematical transformation, and passes the result to the next layer. The network learns from data
by adjusting the weights of the connections based on the errors in its predictions, enabling it to
perform tasks such as classification, regression, and pattern recognition across various applications
like image and speech recognition.
Proposed Method: The proposed method as shown in the figure 2, consists of several steps of
execution which can be explained as:
Step 1: Import Libraries and Load the Reuters Dataset
Begin by importing necessary libraries such as TensorFlow, Keras, and NumPy. Load the Reuters
dataset, which is available in Keras, using the reuters.load_data() function. This dataset consists of
news articles categorized into different topics.
Step 2: Preprocessing the Data
Preprocess the data by tokenizing the text, converting it into sequences, and padding the sequences to
ensure uniform input size. Additionally, convert the labels into a one-hot encoded format to prepare
them for classification.
Step 3: Neural Network Architecture
Define the architecture of the neural network. This typically includes an embedding layer for text
representation, followed by one or more dense layers with activation functions (like ReLU) and a final
output layer with a SoftMax activation function for multi-class classification.
Step 4: Compile the Model
Compile the model by specifying the optimizer (e.g., Adam), loss function (e.g., Categorical Cross
entropy), and evaluation metrics (e.g., Accuracy) to be used during training.
Step 5: Train the Model
Train the model using the training data, specifying the number of epochs and batch size. Monitor the
training process to ensure the model is learning effectively.
Step 6: Evaluate the Model
After training, evaluate the model's performance on a separate validation or test dataset to assess its
accuracy and generalization capabilities.
PROGRAM:
EXPERIMENT:4
Design a neural network for predicting house price using Boston housing price.
AIM:
Design a neural network for predicting house price using Boston housing price.
DESCRIPTION:
Neural networks are machine learning models that mimic the complex functions of the human brain.
These models consist of interconnected nodes or neurons that process data, learn patterns and enable
tasks such as pattern recognition and decision making. The typical neural network can be shown in
figure 1.
Layers:
Input Layer: It receives the import data. Each input neuron in layer corresponds to a feature in
input data.
Hidden Layer: A neural network can have one or more multiple hidden layers. Each layer
consists of units that transform the inputs into something that output layer can use.
Output Layer: The final layer produces the output of the model.
Proposed Method: The proposed method as shown in the figure 2, consists of several steps of
execution which can be explained as:
Begin by importing the necessary libraries for data manipulation, model building, and visualization.
This typically includes libraries like TensorFlow or Keras for constructing the neural network, along
with NumPy, Pandas, and Matplotlib for data handling and visualization.
Load the Boston housing dataset, which contains features related to housing attributes and their
corresponding prices. Preprocess the data by handling any missing values, encoding categorical
variables if needed, and splitting the dataset into features (input variables) and target (housing prices).
Normalize or standardize the features to enhance model performance.
Define the architecture of the neural network, which usually consists of an input layer, one or more
hidden layers with activation functions (such as ReLU), and a final output layer designed for regression
tasks (typically a linear activation function).
Compile the model by selecting an appropriate optimizer (like Adam), a loss function suitable for
regression (such as Mean Squared Error), and relevant metrics (like Mean Absolute Error). Train the
model using the training dataset, specifying the number of epochs and batch size to optimize learning.
PROGRAM:
EXPERIMENT:5
Build a convolutional neural network for MNIST hand written digit classification.
AIM:
Build a convolutional neural network for MNIST hand written digit classification.
DESCRIPTION:
Hand written digit classification system is the system of working with of a machine train itself so that
it can recognize different sources email book changes 1 paper etc.
MNIST DATASET:
MNIST stands for “Modified National Institute of Standard and Technology”.
Each image is of 28*28 pixels i.e. about 784 features.
It is a dataset of 70,000 hand written images.
Each features represents only one pixel’s intensity i.e. from 0(white) to 255(black)
This dataset is further divided into 60,000 training and 10,000 testing images.
CNN: A convolutional neural network (CNN) is a type of deep learning architecture commonly used
for image classification as shown in the figure 1.
Fig 1: Convolutional Neural Network (CNN) Architecture for Handwritten Digit Recognition
Fig 2: Proposed Method
Proposed Method: The proposed method as shown in the figure 2, consists of several steps of
execution which can be explained as:
Step 1: Import Necessary Libraries
In this initial step, you will import essential libraries required for building your Convolutional Neural
Network (CNN) model. This typically includes libraries such as TensorFlow or PyTorch for deep
learning, NumPy for numerical operations, and Matplotlib for visualizations. These libraries provide
useful functions and classes that simplify the implementation of machine learning models.
PROGRAM:
EXPERIMENT:6
To build a convolutional neural network for simple image (dogs and cats) classification.
AIM:
To build a convolutional neural network for simple image (dogs and cats) classification.
DESCRIPTION:
CNN is a machine learning for machines to understand the features of image with foresight and
remember the features to guess whether the name of new image is fed to machine.
We will create an image classifier of our own as shown in the below figure 1, that can distinguish
whether a given picture of a dog or cat, or something else depending upon your fed data. To achieve
our goal, we will use one of the famous machine learning algorithms out there which are used for image
classification i.e. CNN. The name of each image of training dataset is either start with “cat” or “dog”
so we will use that to our advantage then we use one hot encoder for the machine to understand the
labels (cat [1,0] or dog [0,1]).
PROGRAM:
EXPERIMENT:7
AIM:
DESCRIPTION:
AIM:
DESCRIPTION:
One-hot encoding: One-hot encoding is a method of convert categorical data into a numerical format
that algorithms can process as shown in the figure 1.
Categorical data: This data consists of categorical such as words or characters in text.
Vocabulary: Identify all unique categories (words or character) in data. This forms your vocabulary.
Vectorisation: Create a binary vector for each category. The length of vector equals to number of
unique categories. The vector has all zeros except for a single one at position corresponding to category.
Step 2: Tokenization
Tokenization involves breaking the text into smaller units called tokens. These tokens can be words,
sub words, or characters, depending on the level of granularity required. Tokenization helps in
structuring text data for further processing in NLP applications.
AIM:
DESCRIPTION:
Word Embedding is essential in natural language processing with deep learning. This learning allows
the network to learn about the meaning of the words. The IMDB dataset is then loaded and prepared
by limited the vocabulary to the top 10,000 must common words and padding sequence to ensure
uniform input size. A sequential model is created.
Proposed Method: The proposed method as shown in the figure 2, consists of several steps of
execution which can be explained as:
Step 1: Import Libraries
The required libraries such as TensorFlow, Keras, NumPy, and Matplotlib are imported. TensorFlow
and Keras are used for building and training the deep learning model, while NumPy is used for
numerical operations. Matplotlib is used for visualizing training history. The IMDB dataset is also
imported from Keras, which contains movie reviews for sentiment classification.
Implement a Recurrent Neural Network for IMDB movie review classification problem.
AIM: Implement a Recurrent Neural Network for IMDB movie review classification problem.
DESCRIPTION:
Recurrent neural networks, also known as RNNs, are a class of neural networks that allow
previous outputs to be used as inputs while having hidden states. A recurrent neural network is
designed to allow the ANN model to represent temporal characteristics of a training set by
connecting the current state of the network output to a combination of the network input and to
previous state(s) of the network. This is done by feeding the output of a hidden layer or the
network output back to the input layer
The primary objective of this experiment is to classify IMDB movie reviews into positive and
negative sentiments using a Recurrent Neural Network (RNN). Given the sequential nature of
textual data, RNNs are well-suited for capturing dependencies between words and
understanding the overall sentiment of a review.
The IMDB movie review dataset is a widely used benchmark dataset for sentiment
classification. It consists of 50,000 reviews, evenly split between positive and negative
sentiments. The dataset is pre-processed by tokenizing the text, converting words into numerical
representations, and padding sequences to ensure uniform input length.
The experiment employs an RNN-based deep learning model for sentiment classification. The
model consists of an embedding layer to convert words into dense vector representations,
followed by a recurrent layer such as Simple RNN, Long Short-Term Memory (LSTM), or
Gated Recurrent Unit (GRU). These layers help capture long-term dependencies in the text. A
fully connected dense layer with a sigmoid activation function is used for final binary
classification.
2. Model Architecture
The classification model follows a sequential deep learning approach with the following layers:
Embedding Layer: Converts words into dense vector representations of dimension 128.
LSTM Layer: A single LSTM layer with 128 units is used to process the sequential input data.
Dense Output Layer: A fully connected layer with sigmoid activation outputs the probability of a
review being positive or negative.
3. Training Strategy
The model is compiled using the Adam optimizer for efficient gradient updates. Binary cross-entropy
loss function is used since it is a binary classification task. The model is trained for 10 epochs with a
batch size of 32. A validation split of 20% is used to monitor generalization performance.
4. Evaluation Metrics
The trained model is evaluated using the following performance metrics:
Accuracy: Measures the proportion of correctly classified reviews.
Precision & Recall: Evaluates how well the model differentiates between positive and negative
reviews.
F1-Score: Provides a balance between precision and recall.
Confusion Matrix: Visualizes true positive, true negative, false positive, and false negative
classifications.
1. INTRODUCTION
Enhanced Intrusion Detection System refers to a
more sophisticated variant of a conventional Intrusion
Detection System (IDS) that utilizes more intricate
methods and algorithms to identify potential cyber threats
with greater accuracy and efficiency. Such systems often
integrate machine learning, behavioral analysis, and real-
time threat intelligence to recognize anomalies beyond
basic signature-based detection techniques. A system that
uses advanced techniques to recognize and tackle network
threats is termed as an enhanced Intrusion Detection
System (IDS). It is capable of monitoring threats, policy
breaches, and malicious actions on a network. An
safeguard network infrastructure, intrusion detection
Intrusion Detection System (IDS) is a security technology
systems (IDS) are essential. The work flow of the intrusion
that monitors for hostile activities or policy violations
detection system is as presented in the Figure -1.
within a computer network or its systems. By analyzing
traffic and alerting administrators to intervene, it helps in
identifying unauthorized access, potential threats, and Figure 1: Intrusion Detection System
unusual behaviors. For the preservation of network
security and the protection of critical data from Maonan Wang et al. [1], the SHAP approach enhances IDS
cyberattacks, an IDS is crucial. An Intrusion Detection interpretability while promoting more transparency and trust by
System (IDS) tracks network traffic, looking for irregular using SHAP to provide both local and global explanations for
activities and generating alerts when such activities occur. model choices. Ajmeera Kiran, et al [2], says that by examining
While detecting anomalies and reporting them is a system call patterns unique to each user's typical activity, IIDPS is
primary duty of an Intrusion Detection System (IDS), able to identify hostile behavior. Usman Shuaibu Musa et al. [3],
some IDSs can also respond to the discovery of hostile hybrid and ensemble machine learning classifiers outperform
activities or irregular traffic. In this context, we utilized single classifiers in intrusion detection systems, offering higher
the machine learning algorithm known as Support Vector detection rates and accuracy. Roberto Magán-Carrión et al. [4], the
Machine. A Support Vector Machine (SVM) is a main goal of this research is to develop the R-NIDS technique,
supervised learning model employed for both which combines many datasets to lessen overfitting and enhance
classification and regression analysis. It creates a the generalization and dependability of machine learning-based
hyperplane or a collection of hyperplanes in a high- network intrusion detection systems. Lan Liu, et al. [5], says that
dimensional space to distinguish between different Introduction of the DSSTE algorithm, which improves the
classes. SVMs are particularly effective for high- classification accuracy of intrusion detection systems by
dimensional spaces and scenarios that require clear addressing imbalanced network traffic through targeted expansion
of minority samples. Iftikhar Ahmad, et al. [6], says that The proposed method of this approach is given
According to this study, Extreme Learning Machines (ELM) are in Fig-2. Accuracy has been calculated and a graph has been
the best machine learning method for intrusion detection systems plotted based on the obtained results.
because they can handle big datasets with great recall, accuracy,
and precision. Murali A, et al. [7], says that in order to direct
future research toward creating a general intrusion detection
system (IDS) that can handle all kinds of attacks, this work will
examine and contrast current intrusion detection techniques in
order to determine their advantages and disadvantages. Zahedi
Azam, et al. [8], says that provide an overview of AI-based NIDS,
highlighting the advantages of DL over ML, their challenges in
real-time implementation, and open research issues for improving
intrusion detection systems. Ida Seraphim et al. [9], says that
combining deep learning and artificial neural networks with
traditional machine learning is a two-level approach to improve
the efficacy and accuracy of intrusion detection systems. Gan Xu-
sheng, et al. [10], says that the PLS–CVM approach enhances the
efficacy and efficiency of anomaly intrusion detection in large-
scale data by combining PLS for feature extraction with CVM for
quick modeling. Poulmanogo Illy, et al. [11], says that Using the
NSL-KDD dataset, ensemble learners enhance intrusion detection
and attack classification. A fog-cloud architecture is suggested for
quicker detection and more resource-intensive classification.
Amira Sayed A. Aziz, et al. [12], says that Future study will
concentrate on behavioral attack identification in regular traffic,
while simpler classifiers like NB excel in low-represented attacks.
A hybrid intrusion detection system employing multiple
classifiers increases detection accuracy across a variety of attack Fig-2: Proposed Method
classes. S. A. B. R. Mahajan et al. [13], says that future study,will
focus on feature selection and real-time implementation because
Random Tree is an efficient machine learning technique for real- 2.1 Intrusion Detection System utilizing SVM
time intrusion detection due to its high detection rate and quick
model building time. K. Azarudeen, et al. [14], says that NIDS A Machine Learning Approach This project creates an
for zero-day attacks can be improved with a deep learning intrusion detection system (IDS) based on the Support Vector
framework that uses RNNs to improve accuracy, precision, and Machine (SVM) algorithm; a supervised machine learning
recall. With the use of GPU acceleration, training times may be technique recognized for its effectiveness in classification tasks.
shortened. Mukesh Kumar Yadav, et al. [15], says that On the The dataset utilized in this study is preprocessed and analyzed to
NSL-KDD dataset, the ensemble model for intrusion detection identify various types of network intrusions.
achieves high accuracy across a range of attack types, surpassing
state-of-the-art approaches. Samir Fenanir et al. [16], says that a 2.2 Data Preprocessing along with Feature
machine learning-based lightweight intrusion detection model is Engineering
recommended for IoT security; decision trees (DT) outperform
other models in terms of accuracy and efficiency when tested on Several crucial preprocessing procedures are applied to the
the NSL-KDD dataset.. Kathryn-Ann Tait, et al. [17], says that
original dataset. To prepare nominal attributes for the SVM
machine learning's efficacy in intrusion detection, with KNN algorithm, they are transformed into binary representations. To
producing results that are almost flawless, and recommends maintain compatibility, non-numeric features that are not directly
investigating deep learning for potential advancements. Manjula applicable to the SVM are discarded. (Note: The image refers to
C. Belavagi, et al. [18], says that Using the NSL-KDD dataset, labeling into Normal, DoS, Probe, and R2L categories, but this
the Random Forest classifier performs better than the others with information is not explicitly included in the supplied code. If this
99% accuracy in intrusion detection. Dong Seong Kim et al. [19], categorization takes place during data loading or in a distinct
says that a network-based intrusion detection system based on preprocessing phase, it ought to be included.).
support vector machines (SVMs) has demonstrated its
effectiveness in detecting assaults on the 1999 KDD dataset.
Rashid Baimukashev, et al. [20], says that using a variety of
2.3 Splitting of the data
machine learning models to solve the intrusion detection problem,
with NOG-LSTM achieving the highest accuracy for binary To guarantee a thorough assessment of the model's
classification (85.68%).The Intrusion Detection System is briefly performance on previously unknown data, the
explained in the following ways with the fields: the proposed train_test_split function from scikit-learn is used to divide
method is described in the Section 2 and the sub sections are the dataset into training and testing sets.
followed by the section 2, the obtained results and discussion is
present in the section 3 and also the conclusion is demonstrated in 2.4 Model Selection
the section 4.
The SVC class from scikit-learn is used to build an SVM
classifier, with a linear kernel used for this implementation. The
2. METHOD creation of probability estimates is made possible by using the
argument probability=True; they are essential for creating ROC
curves. To guarantee repeatability, a random state is established.
Intrusion detection and prevention are necessary in light [11] Poulmanogo Illy, “Securing Fog-to-Things Environment
Using Intrusion Detection System Based On Ensemble
of current developments. Detecting and preventing breaches is
Learning”, 2019 IEEE Wireless Communications and
essential since our routine events rely significantly on networks
NetworkingConference(WCNC),DOI:
and information systems. Intrusion detection systems have used a 10.1109/WCNC.2019.8885534
range of techniques. Among these is machine learning, which is
essential. Machine-learning methods like SVM are examined in [12] Amira Sayed A. Aziz, "Comparison of classification techniques
this study, which suggests handling 31493 examples. To improve applied for network intrusion detection and classification", Journal
accuracy in upcoming work with massive data sets, a hybrid multi- of Applied Logic, Volume 24, Part A, November 2017, Pages 109-
level model will be created. It involves creating a more efficient 118, DOI: 10.1016/j.jal.2016.11.018
model based on well-structured classifiers that are better able to
classify new threats.
[13] S. A. B. R. Mahajan, "Machine Learning for Intrusion Detection",
Journal of Information Security and Applications (2017),
5. ACKNOWLEDGEMENTS University of Pune, India, Volume: 35, Pages: 1-13, DOI:
10.1016/j.jisa.2017.03.005.
The Bonam Venkata Chalamayya group of institutions
provided support for this study. The authors express their gratitude [14] K. Azarudeen, "Intrusion Detection System Using Machine
to B. Ganga Bhavani Mam for her essential support and guidance Learning by RNN Method", E3S Web Conf., Volume 491, 2024
during this work. International Conference on Environmental Development Using
Computer Science (ICECS’24), Pages (10), DOI:
10.1051/e3sconf/202449104012
REFERENCES
[15] Mukesh Kumar Yadav, "Enhancement of Intrusion Detection
[1] Maonan Wang, "An Explainable Machine Learning Framework for System using Machine Learning", IJERT, Central Research
IntrusionDetectionSystems”,IEEEAccess(Volume:8),pages:73127 Laboratory Bharat Electronics Limited Ghaziabad, India, Volume
-73141,DOI: 10.1109/ACCESS.2020.2988359 12, Issue 01 (January 2023), DOI: 10.17577/IJERTV12IS010058
Anantha Lakshmi Mekala has completed her Intermediate Studies at Sri Chaitanya Junior
College in Amalapuram and now she is presently pursuing a three-year B. Tech in the field of
Artificial Intelligence and Machine Learning at Bonam Venkata Chalamayya Engineering College in
Odalarevu. Through internships at IIDT APSSDC Blackbucks in AI-ML-DS and at Codsoft in domain
of UI/UX design, Techno hacks in the domain of python development. She has acquired practical
experience. Machine Learning, and Artificial Intelligence are among her interests. She can be reached
via email at [email protected]
Sai Harshitha Magapu completed her Intermediate Studies at Aditya Junior College in
Mandapeta and now she is presently pursuing a three-year B.Tech in the field of Artificial Intelligence
and Machine Learning at Bonam Venkata Chalamayya Engineering College in Odalarevu. Through
internships at IIDT APSSDC Blackbucks in AI-ML-DS and at Codsoft in domain of UI/UX design,
Technohacks in the domain of python development. she has acquired practical experience. Machine
Learning, and Artificial Intelligence are among her interests. She can be reached via email at
[email protected]
Paper ID : IJSC/4704
Author 1 Details
Designation : Student
University : JNTUK
Address : ODALAREVU
Email ID : [email protected]
Mobile/Phone No : 7386956365
Author 2 Details
Designation : Student
University : JNTUK
Address : ODALAREVU
Email ID : [email protected]
Mobile/Phone No : 9573747956
Author 3 Details
Designation : Student
ICT Academy
ICTACT Journal on Soft Computing – Author’s Information Form
University : JNTUK
Address : ODALAREVU
Email ID : [email protected]
Mobile/Phone No : 9391348752
Author 4 Details
University : JNTUK
Address : ODALAREVU
Email ID : [email protected]
Mobile/Phone No : 9603087788
ICT Academy
Page 1 of 15 - Cover Page Submission ID trn:oid:::1:3163686932
Ganga Bhavani
Intrusion
17
Economy
Document Details
Submission ID
trn:oid:::1:3163686932 10 Pages
Download Date
File Name
AN_EFFICIENT_ENHANCED_INTRUSION_DETECTION_SYSTEM_USING_SVM-.pdf
File Size
492.8 KB
Quoted Text
0 Missing Citation 0%
Matches that have quotation marks, but no in-text citation
0 Missing Citation 0%
Matches that have quotation marks, but no in-text citation
Top Sources
The sources with the highest number of matches within the submission. Overlapping sources will not be displayed.
1 Internet
www.mdpi.com 1%
2 Publication
H.L. Gururaj, Francesco Flammini, J. Shreyas. "Data Science & Exploration in Artifi… 1%
3 Internet
fastercapital.com 1%
4 Publication
Arvind Dagur, Karan Singh, Pawan Singh Mehra, Dhirendra Kumar Shukla. "Artific… 1%
5 Internet
link.springer.com <1%
6 Internet
www.preprints.org <1%
7 Publication
Abhijeet Singh, Achyut Mishra, Ajit Antil, Bharat Bhushan, Anamika Chauhan. "An… <1%
8 Internet
vdoc.pub <1%
9 Student papers
10 Student papers
11 Student papers
12 Publication
Al-Sakib Khan Pathan. "The State of the Art in Intrusion Prevention and Detection… <1%
13 Publication
Huiwen Wang, Jie Gu, Shanshan Wang. "An effective intrusion detection framewo… <1%
14 Student papers
15 Internet
www.diva-portal.org <1%
16 Internet
www.researchandmarkets.com <1%
17 Student papers
18 Internet
www.springerprofessional.de <1%
19 Student papers
20 Publication
Ping Li, Limin Zhang. "Application of big data technology in enterprise informatio… <1%
21 Publication
Zhi Xu, Jun Lu, Xin Wang, JiaHai Zhang, Mamoun Alazab, Vicente García Díaz. "AI a… <1%
22 Internet
arxiv.org <1%
23 Internet
ibc.org.in <1%
24 Internet
www.iieta.org <1%
25 Internet
www.ncbi.nlm.nih.gov <1%
26 Publication
Sidra Abbas, Shtwai Alsubai, Gabriel Avelino Sampedro, Muhammad Ibrar ul Haq… <1%
27 Publication
Vandana Mohindru Sood, Yashwant Singh, Bharat Bhargava, Sushil Kumar Naran… <1%
28 Publication
margin separation.
18
Abstract
An intrusion detection system (IDS) is necessary to
monitor network and system activities and identify malicious An Intrusion Detection System's (IDS) operation
behavior. Improving IDS accuracy is essential to lowering false within a network is depicted in the figure. The process
alarms and raising detection rates as computer connectivity grows. begins with a server transmitting packets to a router over
a network. Traffic is routed by the router to a firewall,
In order to enhance IDS performance, this work investigates
which blocks unwanted access. The Intrusion Detection
machine learning techniques, namely Support Vector Machine System (IDS) concurrently examines the traffic to look for
13
(SVM). The NSL-KDD dataset is used for assessment, and the irregularities or malicious behaviour. By examining the
13
findings indicate that SVM outperforms SVM in terms of accuracy packets that are moving through the system, a user keeps
and misclassification rates. In order to enhance intrusion detection an eye on network security. By identifying threats before
capabilities and ultimately improve network security, this study they compromise the system, this configuration improves
highlights the significance of efficient classification cybersecurity. In order to detect unwanted access and
methodologies in the analysis of large network traffic data.
Keywords: Machine Learning, Intrusion Detection, Malicious
Activity, Support Vector Machine, NSL-KDD Dataset, Network
Security Attack Classifier.
1. INTRODUCTION
Enhanced Intrusion Detection System refers to a
more sophisticated variant of a conventional Intrusion
Detection System (IDS) that utilizes more intricate
methods and algorithms to identify potential cyber threats
with greater accuracy and efficiency. Such systems often
16 integrate machine learning, behavioral analysis, and real-
time threat intelligence to recognize anomalies beyond
basic signature-based detection techniques. A system that
uses advanced techniques to recognize and tackle network
12 threats is termed as an enhanced Intrusion Detection
System (IDS). It is capable of monitoring threats, policy
11 breaches, and malicious actions on a network. An
7 safeguard network infrastructure, intrusion detection
Intrusion Detection System (IDS) is a security technology
7 systems (IDS) are essential. The work flow of the intrusion
that monitors for hostile activities or policy violations
detection system is as presented in the Figure -1.
within a computer network or its systems. By analyzing
traffic and alerting administrators to intervene, it helps in
identifying unauthorized access, potential threats, and Figure 1: Intrusion Detection System
unusual behaviors. For the preservation of network
security and the protection of critical data from Maonan Wang et al. [1], the SHAP approach enhances IDS
cyberattacks, an IDS is crucial. An Intrusion Detection interpretability while promoting more transparency and trust by
System (IDS) tracks network traffic, looking for irregular using SHAP to provide both local and global explanations for
activities and generating alerts when such activities occur. model choices. Ajmeera Kiran, et al [2], says that by examining
While detecting anomalies and reporting them is a system call patterns unique to each user's typical activity, IIDPS is
12 primary duty of an Intrusion Detection System (IDS), able to identify hostile behavior. Usman Shuaibu Musa et al. [3],
some IDSs can also respond to the discovery of hostile hybrid and ensemble machine learning classifiers outperform
activities or irregular traffic. In this context, we utilized single classifiers in intrusion detection systems, offering higher
4
8 the machine learning algorithm known as Support Vector detection rates and accuracy. Roberto Magán-Carrión et al. [4], the
Machine. A Support Vector Machine (SVM) is a main goal of this research is to develop the R-NIDS technique,
supervised learning model employed for both which combines many datasets to lessen overfitting and enhance
1 classification and regression analysis. It creates a the generalization and dependability of machine learning-based
1 hyperplane or a collection of hyperplanes in a high- network intrusion detection systems. Lan Liu, et al. [5], says that
27 dimensional space to distinguish between different Introduction of the DSSTE algorithm, which improves the
classes. SVMs are particularly effective for high- classification accuracy of intrusion detection systems by
dimensional spaces and scenarios that require clear addressing imbalanced network traffic through targeted expansion
of minority samples. Iftikhar Ahmad, et al. [6], says that The proposed method of this approach is given
According to this study, Extreme Learning Machines (ELM) are in Fig-2. Accuracy has been calculated and a graph has been
the best machine learning method for intrusion detection systems plotted based on the obtained results.
because they can handle big datasets with great recall, accuracy,
and precision. Murali A, et al. [7], says that in order to direct
future research toward creating a general intrusion detection
system (IDS) that can handle all kinds of attacks, this work will
examine and contrast current intrusion detection techniques in
order to determine their advantages and disadvantages. Zahedi
Azam, et al. [8], says that provide an overview of AI-based NIDS,
highlighting the advantages of DL over ML, their challenges in
real-time implementation, and open research issues for improving
intrusion detection systems. Ida Seraphim et al. [9], says that
combining deep learning and artificial neural networks with
22
traditional machine learning is a two-level approach to improve
the efficacy and accuracy of intrusion detection systems. Gan Xu-
4
sheng, et al. [10], says that the PLS–CVM approach enhances the
efficacy and efficiency of anomaly intrusion detection in large-
scale data by combining PLS for feature extraction with CVM for
quick modeling. Poulmanogo Illy, et al. [11], says that Using the
NSL-KDD dataset, ensemble learners enhance intrusion detection
and attack classification. A fog-cloud architecture is suggested for
quicker detection and more resource-intensive classification.
Amira Sayed A. Aziz, et al. [12], says that Future study will
concentrate on behavioral attack identification in regular traffic,
while simpler classifiers like NB excel in low-represented attacks.
A hybrid intrusion detection system employing multiple
classifiers increases detection accuracy across a variety of attack Fig-2: Proposed Method
classes. S. A. B. R. Mahajan et al. [13], says that future study,will
focus on feature selection and real-time implementation because
Random Tree is an efficient machine learning technique for real- 2.1 Intrusion Detection System utilizing SVM
time intrusion detection due to its high detection rate and quick
10
model building time. K. Azarudeen, et al. [14], says that NIDS A Machine Learning Approach This project creates an
for zero-day attacks can be improved with a deep learning intrusion detection system (IDS) based on the Support Vector
framework that uses RNNs to improve accuracy, precision, and Machine (SVM) algorithm; a supervised machine learning
recall. With the use of GPU acceleration, training times may be technique recognized for its effectiveness in classification tasks.
shortened. Mukesh Kumar Yadav, et al. [15], says that On the The dataset utilized in this study is preprocessed and analyzed to
NSL-KDD dataset, the ensemble model for intrusion detection identify various types of network intrusions.
achieves high accuracy across a range of attack types, surpassing
24
state-of-the-art approaches. Samir Fenanir et al. [16], says that a 2.2 Data Preprocessing along with Feature
machine learning-based lightweight intrusion detection model is Engineering
recommended for IoT security; decision trees (DT) outperform
4
other models in terms of accuracy and efficiency when tested on Several crucial preprocessing procedures are applied to the
the NSL-KDD dataset.. Kathryn-Ann Tait, et al. [17], says that
original dataset. To prepare nominal attributes for the SVM
machine learning's efficacy in intrusion detection, with KNN algorithm, they are transformed into binary representations. To
producing results that are almost flawless, and recommends maintain compatibility, non-numeric features that are not directly
investigating deep learning for potential advancements. Manjula applicable to the SVM are discarded. (Note: The image refers to
C. Belavagi, et al. [18], says that Using the NSL-KDD dataset, labeling into Normal, DoS, Probe, and R2L categories, but this
28 Random Forest classifier performs better than the others with
the information is not explicitly included in the supplied code. If this
99% accuracy in intrusion detection. Dong Seong Kim et al. [19], categorization takes place during data loading or in a distinct
1 that a network-based intrusion detection system based on
says preprocessing phase, it ought to be included.).
support vector machines (SVMs) has demonstrated its
effectiveness in detecting assaults on the 1999 KDD dataset.
2.3 Splitting of the data
2
Rashid Baimukashev, et al. [20], says that using a variety of
machine learning models to solve the intrusion detection problem,
23 NOG-LSTM achieving the highest accuracy for binary To guarantee a thorough assessment of the model's
2
with
6
classification (85.68%).The Intrusion Detection System is briefly performance on previously unknown data, the
explained in the following ways with the fields: the proposed train_test_split function from scikit-learn is used to divide
method is described in the Section 2 and the sub sections are the dataset into training and testing sets.
followed by the section 2, the obtained results and discussion is
present in the section 3 and also the conclusion is demonstrated in 2.4 Model Selection
the section 4.
14 The SVC class from scikit-learn is used to build an SVM
classifier, with a linear kernel used for this implementation. The
2. METHOD creation of probability estimates is made possible by using the
Intrusion detection and prevention are necessary in light [11] Poulmanogo Illy, “Securing Fog-to-Things Environment
Using Intrusion Detection System Based On Ensemble
of current developments. Detecting and preventing breaches is
Learning”, 2019 IEEE Wireless Communications and
essential since our routine events rely significantly on networks
NetworkingConference(WCNC),DOI:
and information systems. Intrusion detection systems have used a 10.1109/WCNC.2019.8885534
range of techniques. Among these is machine learning, which is
essential. Machine-learning methods like SVM are examined in [12] Amira Sayed A. Aziz, "Comparison of classification techniques
this study, which suggests handling 31493 examples. To improve applied for network intrusion detection and classification", Journal
accuracy in upcoming work with massive data sets, a hybrid multi- of Applied Logic, Volume 24, Part A, November 2017, Pages 109-
21 model will be created. It involves creating a more efficient
level 118, DOI: 10.1016/j.jal.2016.11.018
model based on well-structured classifiers that are better able to
classify new threats.
[13] S. A. B. R. Mahajan, "Machine Learning for Intrusion Detection",
Journal of Information Security and Applications (2017),
5. ACKNOWLEDGEMENTS University of Pune, India, Volume: 35, Pages: 1-13, DOI:
10.1016/j.jisa.2017.03.005.
The Bonam Venkata Chalamayya group of institutions
provided support for this study. The authors express their gratitude [14] K. Azarudeen, "Intrusion Detection System Using Machine
to B. Ganga Bhavani Mam for her essential support and guidance Learning by RNN Method", E3S Web Conf., Volume 491, 2024
during this work. International Conference on Environmental Development Using
Computer Science (ICECS’24), Pages (10), DOI:
10.1051/e3sconf/202449104012
REFERENCES
[15] Mukesh Kumar Yadav, "Enhancement of Intrusion Detection
[1] Maonan Wang, "An Explainable Machine Learning Framework for System using Machine Learning", IJERT, Central Research
IntrusionDetectionSystems”,IEEEAccess(Volume:8),pages:73127 Laboratory Bharat Electronics Limited Ghaziabad, India, Volume
-73141,DOI: 10.1109/ACCESS.2020.2988359 12, Issue 01 (January 2023), DOI: 10.17577/IJERTV12IS010058
DOI: 10.18280/ria.330306
BIOGRAPHIES OF AUTHORS:
Anantha Lakshmi Mekala has completed her Intermediate Studies at Sri Chaitanya Junior
College in Amalapuram and now she is presently pursuing a three-year B. Tech in the field of
Artificial Intelligence and Machine Learning at Bonam Venkata Chalamayya Engineering College in
Odalarevu. Through internships at IIDT APSSDC Blackbucks in AI-ML-DS and at Codsoft in domain
of UI/UX design, Techno hacks in the domain of python development. She has acquired practical
experience. Machine Learning, and Artificial Intelligence are among her interests. She can be reached
via email at [email protected]
Sai Harshitha Magapu completed her Intermediate Studies at Aditya Junior College in
Mandapeta and now she is presently pursuing a three-year B.Tech in the field of Artificial Intelligence
and Machine Learning at Bonam Venkata Chalamayya Engineering College in Odalarevu. Through
internships at IIDT APSSDC Blackbucks in AI-ML-DS and at Codsoft in domain of UI/UX design,
Technohacks in the domain of python development. she has acquired practical experience. Machine
Learning, and Artificial Intelligence are among her interests. She can be reached via email at
[email protected]