Using Artificial Intelligence to Locate Iris Flowers | by Alexa Zetzalo | October, 2022

Building Perceptrons and its Applications in Cyber ​​Security

Unsplash. Photo by Per Taufeeku Barbhuiya

Recently I was asked to start exploring AI and its impact on cloud security for work. I decided to take the time and get my hands dirty by exploring the basics of PyTorch and AI. In this article, we’ll explore the most fundamental AI algorithm, the perceptron, and apply it to classify flowers based on their petals and sepals length. Later, we will discuss the potential impact of AI on cyber security.

Source: https://commons.wikimedia.org/wiki/File:Perceptron_moj.png#/media/File:Perceptron_moj.png

Rosenblatt’s perceptron is the first model of a programmatically described neuron. The perceptron works by taking a series of inputs (x_1 outside of x_n), each representing an attribute of a different object, multiply them at random by the specified weights, and do a sum.

Based on this sum of all weighted attributes, the object is classified as belonging to a category or not (output .) 1 related or . for 0 Not to be related), after which a margin of error is calculated, and the weight is adjusted accordingly. with each instance (a row of attributes X_1 outside of X_n), the weights of each variable are updated, and this moves the dividing line between the two categories, as seen in the figure below:

Source: https://upload.wikimedia.org/wikipedia/commons/thumb/8/8a/Perceptron_example.svg/1024px-Perceptron_example.svg.png

After each iteration, the weights of each variable and the bias (y-intercept) are calculated as follows:

Source: https://www.saedsayad.com/images/Perceptron_weight.png

For each variable, the weight change is classified as the discrepancy between the predicted and desired outcome time learning rate (a multiplier on the weight) and the var itself. It is then added or subtracted from the weight of the associated variable. The same is done for the bias before the net iteration.

Since the perceptron is basically based on a linear equation, a clear linear boundary must exist between the two categories for the perceptron to operate well, as it updates its boundary with each item used in training. does. However, in some cases, if no “clean dividing line exists,” the assumption can run in an infinite loop.

Making a perceptron is fairly easy and requires only three actions:

  1. Fit — which trains according to the data set and adjusts the weights with each example.
  2. Net Input – which calculates the weighted sum of all inputs.
  3. Predict – which can be used to estimate the category of an object after training.

To use the perceptron to classify iris flowers, we will obtain the first 100 data points from the website containing the iris measurement dataset (lines 9-11). Along the lines of 14-18, n The uploaded files of the code below, we split the attributes (petal and sepal length) into arrays X and label for array y, Along lines 22-23, we’ll introduce the perceptron and give it a learning rate of 0.1 and 10 epochs, meaning it will run through the data ten times more, with each error multiplying by 0.1 to affect the weighting . we will use the function plot_decision_regions To plot our decision boundary and see how the data is classified.

The above code produces the graph seen below. The data is accurately plotted with two different types of iris flowers on each side of the border line, as seen in the image produced by our code below.

The full code of the project can be found here:

AleksaZatezalo/IrisClassification (github.com)

Although I have a lot to explore, I found Perceptron quite intuitive, and I hope the rest of AI is similar. I want to explore its crossover with cyber security. Throughout the many different readings I’ve done, AI has a number of potential implications for cybersecurity, especially in the cloud.

Deploying software in an environment where the infrastructure is managed by a third party, artificial intelligence and machine learning algorithms can be deployed to analyze and enforce secure policies at the edge where the software can still control Is. While it’s tempting to see machine learning sprinkled everywhere (it’s a trendy topic), it’s important to know where this technology can be applied with the most utility. Some examples are as follows:

Machine learning models can be deployed in AWS to detect adversarial inputs in files uploaded and shared to the cloud. This has strong potential applications in identifying malicious data, Trojan virus software, and protecting data integrity. A tutorial is linked below:

Neutral Warning: The tutorial above is short and can be difficult to implement.

Anomalies in network traffic can serve as strong indicators of attack under the right circumstances. As per the tutorial below, the Random Cut Forest algorithm can be deployed in AWS and used to identify irregularities in network traffic. If connected correctly to your SIM, a ticket can be raised, and a process can be initiated.

Artificial intelligence is a strong component of many zero trust security. Throughout the many different readings I’ve done, AI has many potential impacts on cybersecurity, especially in the cloud. Deploying software in an environment affects implementation. The Zero Trust environment combines a user’s trust score (calculated by the AI), which considers all of their previous actions and network policy to determine whether they can perform an action. An interesting article on this topic can be found below:

Thanks for reading.

Stay tuned for more!

Leave a Comment