Skip to content
ImagineWorld

AI, Machine Learning, and Statistics - A Taxonomy

node_idnode-book_artificial-intelligence-for-cybersecurity_chapter-04-ai-machine-learning-and-statistics-a-taxonomy
node_typechapter-node
schema_profileworld.chapter_node.v1
statusactive
entropyhigh
manifoldworld
domainimagineworld.net
authorityinforms
layercorpus
chapter_num4
chapter_titleAI, Machine Learning, and Statistics - A Taxonomy
governed_byCORPUS
constitutional_citationCONSTITUTION
local graph

Chapter 4 — AI, Machine Learning, and Statistics - A Taxonomy

Section titled “Chapter 4 — AI, Machine Learning, and Statistics - A Taxonomy”

In the current literature and in media articles, there is often a misrepresentation of the meanings of the terms artificial intelligence (AI) and machine learning (ML). These terms are often used interchangeably and as synonyms. However, in this chapter, we differentiate between AI and ML. We define AI as a capability, and ML is defined as a set of techniques that can enable us to achieve some form of AI. For many readers and practitioners, it might also be interesting to reiterate the difference between ML and statistics, more specifically, statistical machine learning. Although it is not required to master the technical details of all these definitions, we believe you could benefit a lot from understanding the key aspects of the disciplines, which will certainly help you with the rest of the book.

In this chapter, we will cover the following topics:

  • A brief introduction to AI history
  • The relation to statistics (statistical machine learning)
  • ML — Taxonomy
  • Deep learning and its recent advances
  • The limitations of ML and its security concerns

Although there are no hard requirements for any technical skills, it is generally beneficial for you to have a basic understanding of modern engineering concepts. Previous chapters should prepare you with the knowledge required to follow this chapter.

In classic AI literature, there are broadly eight definitions of AI, and we can categorize them into four categories based on the named properties of the AI systems:

  • Thinking humanly
  • Acting humanly
  • Thinking rationally
  • Acting rationally

AI systems are expected to perform functions that humans can perform, but also to act and think rationally, thereby exhibiting intelligent behavior. On the other hand, ML is a set of techniques that enables AI. The techniques of ML are based on designing methods and systems that use data to learn how to perform tasks that exhibit AI. Apart from ML, many other methods contribute to AI, such as expert systems and fuzzy logic. We show a very simple illustration of their relationship in Figure 4*.1*. By no means is this comprehensive, but we want to ensure you’re aware that AI is a top-level concept that contains many other domains. This book focuses on ML techniques under AI, and how they are applied in cybersecurity. Let’s start by introducing the history of AI briefly, and then give you a taxonomy system to navigate the subject of ML.

Figure 4.1 – A simple illustration of AI taxonomy

Figure 4.1 – A simple illustration of AI taxonomy

The modern history of AI can be traced back to the Dartmouth conference in 1956, where a group of leading researchers in this field coined the term “artificial intelligence”. Prior to the workshop, Alan Turing wrote a thesis in 1950 that laid the groundwork for the birth of AI. Turing’s thesis explored the idea of whether machines could be made to “think” like humans, and he proposed a test (now known as the Turing test) to determine whether a machine could exhibit intelligent behavior indistinguishable from that of a human. This idea was a major inspiration for the researchers who attended the Dartmouth conference, and it set the stage for the development of AI as a field of study. Over the years, the field of AI has grown exponentially, and today, it is a rapidly evolving and exciting field that holds tremendous promise for the future. While the formal definition of AI can be somewhat contentious, it generally involves the development of algorithms and approaches that simulate human thought processes and decision-making in order to create intelligent machines. The goal of modern AI is to create software or hardware that can think, learn, and reason like humans, and that can perform a wide range of tasks in a variety of domains.

During the early days of AI research, symbolic processing and logic programming were the focus of attention. Symbolic processing represents knowledge in terms of symbols and rules and uses logical reasoning to manipulate those symbols in order to solve problems. Logic programming, on the other hand, involves defining a set of logical rules and using them to derive new knowledge from existing knowledge. While symbolic processing and logic programming were successful in solving certain types of problems, they had limitations. One of the main limitations of symbolic processing was its inability to handle uncertainty and incomplete information. This led to the development of probabilistic reasoning, which is the basis of many modern ML algorithms. Another limitation of symbolic processing was its inability to learn from experience, which led to the development of connectionism and neural networks, which later formed the essence of deep learning (DL). Nevertheless, symbolic processing and logic programming remain important areas in early research of AI, and they continue to be used in various applications.

Despite the early successes, the first AI winter occurred in the late 1970s and early 1980s. This was a period of reduced funding and interest in AI research, due to a lack of significant progress in the field. However, with the introduction of connectionism and expert systems, AI research experienced a resurgence in the 1980s, leading to the second AI boom. Connectionism involves the use of artificial neural networks (ANNs) to simulate the functioning of the human brain, while expert systems are computer programs that are designed to mimic the decision-making ability of a human expert in a particular field. With the dramatic development of personal computing devices, the second AI winter occurred in the late 1980s and early 1990s. At that time, PC and Mac machines were overtaking the world, which made expert systems and other commercial AI systems less practical. After late 1990, there was a shift towards neural networks and probabilistic reasoning, which was introduced by Jude Pearl. These developments paved the way for the rise of ML and DL, which are the primary focus of this chapter. ML is a method of teaching computers to learn from data, without being explicitly programmed. On the other hand, DL is a subset of ML that involves training deep layered neural networks to solve more complex tasks. As ML and DL have advanced, more and more mathematical tools have been formally introduced into this area. These tools include probability theory, linear algebra, calculus, optimization, and information theory. Learning algorithms use these mathematical tools to identify patterns and relationships within data and create models that can be used for prediction and decision-making.

The following figure summarizes the timeline of the development of the field of AI.

Figure 4.2 – Timeline of the development of AI

Figure 4.2 – Timeline of the development of AI

In recent years, ML and DL have revolutionized the field of AI, leading to significant advances in computer vision, speech recognition, natural language processing, and other areas. For instance, ML algorithms have been used to develop self-driving cars, predict consumer behavior, and improve healthcare outcomes. In finance, ML is being used to detect fraud, predict market trends, and optimize investment portfolios. Furthermore, in the field of cybersecurity, AI is being used to combat adversarial threats by simulating various defensive techniques, typically conducted by security experts. However, there are still challenges that need to be addressed, including ethical and societal implications.

As AI becomes more advanced and ubiquitous, it raises important ethical questions related to privacy, security, bias, and accountability. It is important for individuals, organizations, and governments to consider these issues and work together to ensure that AI is developed and used in a responsible and ethical manner. Note that AI itself is also vulnerable to certain adversarial attacks that change the behavior of AI systems to produce harmful outcomes. It is therefore important to consider these vulnerabilities and develop strategies to mitigate them. This includes developing robust and secure AI systems, as well as developing methods for detecting and responding to adversarial attacks.

In conclusion, the history of AI has been characterized by a series of breakthroughs and advances in various technologies and approaches. The recent advancements in AI have been closely associated with the increase in computing power and the availability of big data technologies. These have enabled AI algorithms to process and analyze vast amounts of data quickly and efficiently, leading to significant improvements in the performance of AI systems. Furthermore, as computing power continues to increase and big data technologies become more sophisticated, we can expect even more exciting developments in the field of AI in the years to come. While there have been challenges and setbacks along the way, the field of AI is making rapid progress and holds great promise for the future. With continued research, innovation, and collaboration, we can create intelligent machines that can help us solve some of the world’s most challenging problems and improve our lives tremendously.

The relation to statistical learning theory

Section titled “The relation to statistical learning theory”

We have seen a brief history of how AI has developed and the modern rise of ML as the most promising approach to many applications. Apparently, the technology shift isn’t an isolated event; it is being realized along with the advance of computing technologies, such as high-performance computing and big data technology. The mathematical foundation of ML algorithms utilizes a heavy implementation of modern statistics. For a long time, statisticians thought computer scientists were reinventing the wheel, while computer scientists were seeking more practical realization of statistics-driven methods. The truth is that statistics is studying the properties of data generation processes. However, ML is a relatively new paradigm that is quite the opposite: that is, it studies the data generation process given some observations. In other words, they are closely related and complementary to each other. In Figure 4*.2*, we relate statistics and ML together to give readers a general idea of them.

Figure 4.3 – Connection between statistics and ML

Figure 4.3 – Connection between statistics and ML

Let’s elaborate a bit more on the key differences. In the real world, there are numerous data generation processes that generate samples to form certain populations. Statisticians are often interested in establishing a mathematical language to describe the properties of the population. For instance, expectation, variance, and correlation are examples of descriptive statistics that describe properties of the data generation process. By formal verification of these properties, we can test different hypotheses and derive outcomes that are of interest. On the other hand, ML concentrates on learning or estimating the data generation process from observations, and utilizing it for various task completion. A common interest of both statistics and ML is inference or statistical inference; that is, given a data generation process, we draw conclusions from it with a certain level of reasoning. The key to inference is understanding why we get certain outcomes, rather than estimating the outcome values. This led to the prominence of the area called statistical learning theory or computational learning theory in the modern age of computing. The whole idea of it is that how closely we can approximate the ground truth, which translates into the aforementioned concept of data generation process. This is how accurately we can build a model or function that gives promising inference. In the 1990s and 2000s, statistical learning became the core paradigm of ML. You will learn about the algorithms that fall under the category in the next chapters, such as logistic regression and support vector machines (SVMs). Deep learning has begun to overtake statistical learning in almost every line of AI research; nevertheless, statistical learning still finds wide applications in the industry thanks to its theoretical soundness, which is yet to be established in the DL community.

It can be challenging for readers to fully grasp the difference between them; however, it is useful to pull them together to clarify some common confusions in the AI and ML communities. Next, we will look at a systematic description of AI and ML that will help you understand the chapters in the rest of the book.

In this section, we provide a taxonomy of ML and the basic framework of an ML system. There are various ways to define the taxonomy of ML. Broadly speaking, we can define the taxonomy as follows:

  • How is the ML model trained?
  • What is the learning objective?
  • What to expect during model inference
  • Model modality

This is a general classification of ML that is widely accepted in the community. It should be noted that there may be other taxonomies available as well. However, this should be sufficient for you to navigate all different ML algorithms.

Depending on how we train a model, we can place it in one of four main categories: supervised learning, unsupervised learning, semi-supervised learning, and reinforcement learning, each with its own unique set of algorithms and applications.

Figure 4.4 – Difference between supervised learning and unsupervised learning

Figure 4.4 – Difference between supervised learning and unsupervised learning

Supervised learning algorithms are trained on labeled data and are typically used for classification and regression tasks. Labels are considered the ground truth that guides the model to learn a meaningful pattern between many input and output pairs. Examples of supervised learning algorithms are decision trees and SVMs. A decision tree is a model that uses a tree-like structure to represent decisions and their possible consequences. Its variants, such as random forest and XGBoost, are popular algorithms for various applications, especially when the data is in a tabular format. On the other hand, SVMs are a family of learning algorithms that can be used for classification, regression, and even anomaly detection. The main idea behind SVMs is to find a hyperplane that best separates the data into different classes. They are also commonly used in many applications.

Figure 4.5 – Taxonomy of ML by learning schema

Figure 4.5 – Taxonomy of ML by learning schema

Unsupervised learning algorithms are trained on unlabeled data and are typically used for clustering and dimensionality reduction tasks. This means the data does not provide a ground truth, and there is no explicit guidance on how to train the model. Most unsupervised learning algorithms involve a definition of criteria that can be used as a learning objective, for instance, the probability density of input or the geometric distance of pairs of data points.

Examples of unsupervised learning algorithms are K-means clustering, Principal Component Analysis (PCA), and autoencoders. K-means clustering is an algorithm that partitions data into K clusters based on their geometric similarity. PCA is a popular algorithm that reduces the dimensionality of data while preserving its variance. It is also commonly used in data visualization and feature extraction, or as an initialization step for other complex models. Generative adversarial networks (GANs) consist of a generator and discriminator, which work against each other to learn how to generate data that cannot be distinguished from the ground truth. It is notable that the key difference between supervised and unsupervised learning is solely whether we have the ground truth in the training data.

Semi-supervised learning algorithms are trained on both labeled and unlabeled data and are typically used when labeled data is scarce or expensive to obtain. In practice, usually we do not have enough labeled data, therefore semi-supervised learning has practical benefits. Examples of semi-supervised learning algorithms are self-training and co-training, where self-training is a simple and effective algorithm that involves training a model on the labeled data and using it to label the unlabeled data. The model is then retrained on the combined labeled and pseudo-labeled data. Co-training is an algorithm that involves training two models on different subsets of the data and using each model to label the other’s unlabeled data. This approach is commonly used in text mining tasks.

The last one, reinforcement learning, has gained popularity in recent years. It has got attention from both research and industry, as it learns toward intelligent agents that interact with a given or known environment where agents are trained to make decisions based on rewards and punishments. Many real-life scenarios involve dynamic environments, such as autonomous driving, robotics, and gaming. A typical reinforcement learning setting can be defined by a tuple of agent, reward function, and state-action space. Depending on the use case, there may also be a transition matrix advising the actions of the agent. Reinforcement learning algorithms can be used to optimize complex systems with a large number of possible actions and states, and can learn to make decisions based on long-term rewards rather than just short-term gains. Furthermore, reinforcement learning algorithms can be used to learn from experience and adapt to new situations, making them ideal for applications where the environment is constantly changing.

Figure 4.6 – A representation of reinforcement learning

Figure 4.6 – A representation of reinforcement learning

Besides the learning schema, ML algorithms can also be categorized based on the learning objectives. In the following sections, we list the taxonomy by the widely recognized learning objectives that will cover most of the learning tasks in practice.

The goal of classification is to assign input data points to one of several predefined classes. Here are some example use cases:

  • Recognition of handwritten digits (classification of images into one of the 10 digits)
  • Classification of malware into malware families
  • Attribution of attacks to different threat actors
  • Spam detection – classification of e-mails into spam/not spam

When the goal is to predict a continuous output variable based on one or more input variables, we say the learning task is regression. Here are some example use cases:

  • Prediction of house prices based on location, size, and market trends
  • Estimation of the vulnerability score of software based on code properties
  • Prediction of the number of cyberattacks based on the security posture of the organization

The goal of clustering is to group similar data points together based on their similarity or distance. Here are some example use cases:

  • Clustering Netflix users based on their watching habits
  • Malware clustering to discover new malware groupings
  • Clustering phishing messages to determine groups of similar phishing attempts

For many cybersecurity use cases, anomaly detection plays a central role. As the name suggests, anomaly detection seeks to identify data points that are significantly different from the rest of the data, although the minority is not necessarily malicious. However, the consequence of misclassification might be very different for positive and negative samples. Many clustering or classification algorithms can be used in anomaly detection as well, such as one-class SVM, DBSCAN, and Local Outlier Factor.

Broadly speaking, anomaly detection can also be supervised, unsupervised, or semi-supervised. In supervised anomaly detection, we have target labels from majority and minority classes, based on which we can use ML methods for classification with some additional tweaks to account for class imbalance. In the unsupervised methods, we use either clustering or some other dedicated methods to discover regular patterns in the data and find anomalies, which are observations that don’t conform to that pattern. Semi-supervised learning methods are employed if only part of the data is labeled, and the methods applied in this case are a combination of supervised and unsupervised learning approaches. Here are some examples of anomaly detection use cases:

  • Detecting faults in industrial control systems
  • Determination of user account takeover in web applications
  • Detecting lateral movement or command and control techniques employed by attackers in enterprise networks

Generative AI has gained significant attention. It differs from the previously most common learning objectives, where learning models only generate atomic output. Generative models are used to learn the underlying distribution of the data and generate content that conforms to the original data. With the popularity of transformer networks, generative approaches are progressing at an unprecedented pace. Some examples of generative models are Variational Autoencoders (VAEs), GANs, and the most recent large language models (LLMs), such as Llama and GPT-4. Here are some example use cases:

  • Generation of conversational text as answers to questions by chatbots
  • Image generation based on textual description
  • Malware code generation based on desired characteristics

These are the most common learning objectives you need to learn in practice. As you should have noticed, the learning objectives focus on the type of model outputs. It is usually straightforward to formulate the learning task in any one of these categories.

Model modality refers to the type of input data that an ML algorithm uses to make predictions or decisions. The input data can be of various modalities, such as text, image, audio, video, or a combination of these modalities. Recently, multimodal models have gained significant attention. They use multiple modalities to improve performance on a given task. We’d like to introduce the taxonomy of ML methods based on the model modality. Before we dive into that, let’s first introduce various data formats that relate to ML models, since ML methods are often designed for specific types of data so that the models can exploit the inherent data structure and capture the prior knowledge about how the data is generated. This enables easier and more effective recognition of patterns during the training of machine learning models. Furthermore, it enables the transfer of empirical knowledge in application areas that share common data types, such as vision and natural language.

In this section, we will list some data types.

Sequential data is a type of data where there is a sequential dependency between data points, that is, the probability of a value of one data point ( depends on the values of previously generated data points (, ). Examples of this data are DNA sequences, sequences of characters in text, and time series data.

Time series data is a special type of sequential data where the sequence of data points has a time dependency. Each data point is associated with an absolute or relative timestamp, and the machine learning methods used on this type of data need to take account of the time context applied to this data. The patterns in this data that the model should learn are time-dependent. Some examples of this type of data are EEG scans, video data, meteorological measurements, and vehicle sensors.

ML is often applied to learn structures in graphical data, such as social networks, computer networks, and website structure graphs. This data is represented with nodes and edges that describe the relationships between nodes. The goal of the ML methods is to observe the relationship between nodes and find patterns in their structure. ML methods can be used to classify graphs, classify nodes in graphs, find clusters of nodes, or find anomalies in graph data. The most famous example is finding structure in social networks, which helps us discover groups of users with similar interests or connections.

Textual data assumes that the data is structured in a hierarchy, where words are structured in sentences according to a certain grammar, and sentences are structured in documents following the writing style of the text author. Some ML methods also work at the granularity level of characters, which are combined into words. With these methods, we often take this structure into account either by defining features based on discovering the grammatical facts associated with words or sentences (e.g., finding nouns, verbs, etc.), by preprocessing the data to remove the words or characters that don’t contribute towards the accuracy of the model (e.g., word stemming), or by adding constraints on ML models to explicitly encode grammar (e.g., syntax trees). This enables us to have more accurate models for textual data, for example, for text classification, author recognition, and e-mail spam detection.

There are multiple applications of ML in processing image data, such as image classification, image generation, and object recognition. These applications exploit the structure of image data, such as the hierarchy of objects in an image. For instance, convolutional neural networks (CNNs) are inspired by convolutional filters for image processing that were traditionally used to detect object edges in images. The ML methods for video data combine characteristics of ML methods for images with ML methods for sequence data.

Now, let’s learn the taxonomy based on model modality.

Single-modal models are those that use a single modality as input data. For instance, a natural language processing (NLP) model that takes in only text data is a single-modal model. Other examples are image classification models that take in only image data and audio classification models that take in only audio data. Most ML models are single-modal models that only accept one type of input, that is, tabular data, images, text, or audio, and they only work in one particular domain. It is only recently that researchers have progressed with multi-modal models that show some early evidence of artificial general intelligence.

Multi-modal models, on the other hand, are models that use multiple modalities as input data. For instance, a model that takes in both text and image data to classify an image is a multi-modal model. Another example is a model that takes in both text and audio data to perform speech recognition. Multi-modal models have shown remarkable improvements in performance on various tasks, such as image captioning, visual question answering, and speech recognition. Some examples of multi-modal models are vision-language models, such as ViLBERT and LXMERT, and text-image-audio models, such as MMT.

Overall, the taxonomy of ML algorithms based on model modality is a relatively new one, but it has shown great potential in improving the performance of ML models. It is reasonable to believe that as more data becomes available across different modalities, there will be significant improvement in the field.

The following table disambiguates the classical ML methods:

MethodCategoryDataPurpose
ClusteringUnsupervised learningUnlabeledGrouping data in a set of clusters
Density estimationUnsupervised learningUnlabeledEstimating probability density based on data
Dimensionality reductionUnsupervised learningUnlabeledReducing the dimensionality of data (compression)
ClassificationSupervised learningLabeled with discrete labelsClassifying data based on the model
RegressionSupervised learningLabeled with continuous labelsMaking numerical predictions
Anomaly detectionSupervised or unsupervised learningCan be labeled or unlabeledDetecting outliers in data

Table 4.1 – Classical ML methods

So far, we have introduced different ways of categorizing ML algorithms. In the next section, we will shift our focus to DL. Note that DL is a subset of ML; the taxonomy is applicable to DL as well. However, DL is much more powerful than traditional ML models in terms of predictive capability and its flexibility in modeling complex tasks. It has found its applications in some of the most challenging scenarios.

DL is a subset of ML that has gained significant attention in recent years due to its state-of-the-art performance on many complex tasks, such as image recognition, machine translation, and speech recognition. While traditional ML algorithms are limited by their inability to learn from vast amounts of data, DL algorithms can identify complex patterns and relationships within data by using deep neural networks, which consist of multiple layers of interconnected nodes that can learn to recognize increasingly abstract features.

The key difference between DL and traditional ML algorithms is the ability of deep neural networks to extract high-level features from raw input data. For example, in image recognition tasks, deep neural networks can learn to recognize edges, shapes, and textures in an image by processing the raw pixel data through a series of convolutional layers. Similarly, in NLP tasks, deep neural networks can learn to generate meaningful representations of words and phrases by processing the raw text data through layers of recurrent neural networks (RNNs).

The core training process of DL algorithms is via the backpropagation algorithm, which is used to adjust the weights and biases of the neural network during training. Backpropagation works by computing the gradient of the cost function with respect to each weight and bias in the network and using this gradient to update the weights and biases in the direction that minimizes the cost function. By iteratively adjusting the weights and biases in this way, the neural network can learn to recognize complex patterns and relationships within the data. In addition to backpropagation, the development of software libraries such as Autograd has also greatly accelerated the development of DL. Autograd is a powerful tool that automatically computes the gradients of numerical functions, which is extremely useful in DL because it enables the automatic differentiation of complex functions. This allows developers to focus on designing and implementing models, rather than manually computing gradients for each individual component of the model. As a result, DL has become more accessible and easier to develop with the help of software libraries such as Autograd. Besides, the success of DL is also largely due to the availability of computing power and big data. With the rise of cloud computing and the availability of powerful graphics processing units (GPUs), DL can now be trained on massive amounts of data in a relatively short amount of time. Furthermore, big data technologies such as Apache Spark and Hadoop have made it easier to store, process, and analyze large-scale datasets, which is essential for training DL algorithms.

Nowadays, DL algorithms are used to achieve state-of-the-art performance on many complex learning tasks. For example, in computer vision, CNNs have been used to achieve human-level performance on tasks such as image classification, object detection, and facial recognition. In natural language processing, RNNs have been used to achieve state-of-the-art performance on tasks such as language modeling, machine translation, and text classification. In speech recognition, deep neural networks have been used to achieve significant improvements in accuracy and speed, making it possible to develop real-time speech recognition systems. One recent development in DL is the transformer architecture, which has revolutionized the field of NLP. The transformer architecture was introduced in the seminal paper Attention Is All You Need by Vaswani et al. in 2017, and it has since become the standard architecture for many NLP tasks. The transformer architecture is based on the concept of self-attention, which allows the model to weigh the importance of different input tokens when generating output tokens. This attention mechanism has been shown to be highly effective for tasks such as language modeling, machine translation, and text summarization. DL algorithms have also been used in cybersecurity to detect and prevent cyberattacks. For example, deep neural networks have been used to detect malware and phishing emails, while deep reinforcement learning algorithms have been used to develop adaptive security policies that can respond to changing threats. Furthermore, DL algorithms have been used to analyze network traffic and detect anomalies that may indicate a security breach.

Overall, DL is a rapidly evolving field that holds tremendous promise for the future of AI. With the availability of computing power and big data, DL algorithms have achieved state-of-the-art performance on many complex tasks, and they are likely to play an increasingly important role in many areas of our lives, from healthcare to finance to transportation. While there are still challenges to be addressed, such as ethical and societal implications, the future of DL is bright, and continued research and innovation will be essential for unlocking its full potential.

In the rest of the book, you will learn more about DL, such as some widely used networks and how they can be implemented and applied in the cybersecurity domain. You will learn about their limitations and some of their security concerns in the rest of this chapter.

As AI becomes more advanced and ubiquitous, there are growing concerns about its security and safety. These concerns include issues related to hallucination, privacy leakage, intellectual property ownership, ethics, bias, fairness, social impact, and adversarial attacks, among others. In this section, you will learn the basics of those issues and concerns; we will cover them in more depth in the rest of this book.

One of the main concerns about AI is the potential for hallucination. This refers to situations where AI systems generate output that is not based on reality or does not reflect the true nature of the data they are processing. For example, an AI system trained on images of dogs may generate images of dogs with six legs or blue fur, which are not reflective of reality. This can be particularly problematic in applications where AI systems are used to make critical decisions, such as in healthcare or finance. For example, an AI system could generate the wrong treatment recommendation that a user might take as credible advice. Furthermore, it could give advice about investing money to a user that would cause financial losses. It heavily relies on users who already have the domain knowledge to determine whether the generated content is legitimate, or otherwise it could lead to harmful consequences.

Another concern related to AI is privacy leakage. As AI systems are trained on large amounts of data, there is a risk that sensitive information may be leaked or exposed. For example, an AI system trained on medical records may inadvertently reveal personal information about patients, such as their medical history or genetic information. This can have serious implications for privacy and can lead to ethical concerns. There is also research that provides evidence that a generative model is able to recover social security numbers or passwords, given a few hints.

Foundation models have become increasingly prevalent in the field of AI; however, the use of foundation models raises important questions about intellectual property ownership. As models become more advanced, they may generate output that is considered to be original work, such as music or art. This raises questions about who owns the rights to these works and how they should be protected. Additionally, there is a concern that foundation models may infringe on the intellectual property rights of others, such as by using copyrighted material to train the models. This can lead to legal challenges and disputes over ownership and licensing rights. Therefore, it is important for researchers and organizations to consider these issues and work together to ensure that foundation models are developed and used in a responsible and ethical manner.

AI bias and fairness are important considerations in the development of AI systems. These systems can amplify or perpetuate bias in the data they are trained on, leading to discrimination and unfairness. To address these issues, it is crucial to ensure that AI systems are developed and utilized in a responsible and ethical manner. This requires using diverse and regularly updated data to train these systems. Additionally, it is important to develop methods for detecting and mitigating bias in real time. The decision-making process of AI systems should also be transparent and explainable. These steps are necessary to ensure that AI benefits society as a whole and does not perpetuate or amplify bias. The social impact of AI is another concern. As AI systems become more advanced, they may significantly affect employment, the economy, and society. It is essential to consider the potential impact of AI on these areas and strive towards a future where AI enhances human capabilities rather than replaces them.

Adversarial attacks are a growing concern in AI. These attacks involve manipulating inputs to an AI system to cause unexpected and potentially harmful behavior. For example, an attacker could manipulate an image to cause a facial recognition system to misidentify a person. They could add small perturbations to an image of a stop sign to cause an autonomous vehicle to misinterpret it as a yield sign. Adversarial attacks can also be used to manipulate the output of NLP systems. An attacker could craft a message that appears benign to an email filter but could be a phishing attempt against a human.

There are several types of adversarial attacks, including evasion, poisoning, and model stealing attacks. Evasion attacks involve modifying inputs to an AI system in order to evade detection or classification. Poisoning attacks involve modifying the training data used to train an ML algorithm, in order to bias the algorithm towards a specific outcome. Model stealing attacks involve reverse-engineering an ML algorithm in order to obtain information about its architecture and parameters.

To mitigate the impact of these attacks, researchers are developing new methods and techniques, such as adversarial training and ensembles of ML models. It is important for individuals, organizations, and governments to work together to ensure that AI is developed and used in a responsible and ethical manner to minimize the risks associated with these attacks.

You have had an overview of the security and safety concerns around modern AI systems. From a cybersecurity perspective, every emerging technology always comes with emergent security risks. We should analyze the risks and adopt the technology carefully, as this is the only way to be responsible for society and the future while maximizing the benefits of new technology.

Let’s recap what we have learned in this chapter. We began our discussion with a brief introduction to the history of AI. You learned how it has evolved into ML and then DL. Then, we looked at different ways of defining the ML taxonomy, which gave you a systematic way of describing ML methods. In the taxonomy, you learned various types of ML algorithms and their applications, for instance, supervised learning, unsupervised learning, semi-supervised learning, and reinforcement learning. More details about those algorithms will be provided in the following chapters. In addition, you also learned about various data types that are common in ML and the definition of model modality. Finally, we shifted our focus to the recent advances in DL and reiterated its limitations and the security and safety concerns for AI.

The next chapter will further explore ML methods, including where they are applicable. You will extend your knowledge of this chapter and learn more about the formal definitions of different AI and ML methods.