Book Image

Machine Learning Security Principles

By : John Paul Mueller
Book Image

Machine Learning Security Principles

By: John Paul Mueller

Overview of this book

Businesses are leveraging the power of AI to make undertakings that used to be complicated and pricy much easier, faster, and cheaper. The first part of this book will explore these processes in more depth, which will help you in understanding the role security plays in machine learning. As you progress to the second part, you’ll learn more about the environments where ML is commonly used and dive into the security threats that plague them using code, graphics, and real-world references. The next part of the book will guide you through the process of detecting hacker behaviors in the modern computing environment, where fraud takes many forms in ML, from gaining sales through fake reviews to destroying an adversary’s reputation. Once you’ve understood hacker goals and detection techniques, you’ll learn about the ramifications of deep fakes, followed by mitigation strategies. This book also takes you through best practices for embracing ethical data sourcing, which reduces the security risk associated with data. You’ll see how the simple act of removing personally identifiable information (PII) from a dataset lowers the risk of social engineering attacks. By the end of this machine learning book, you'll have an increased awareness of the various attacks and the techniques to secure your ML systems effectively.
Table of Contents (19 chapters)
1
Part 1 – Securing a Machine Learning System
5
Part 2 – Creating a Secure System Using ML
12
Part 3 – Protecting against ML-Driven Attacks
15
Part 4 – Performing ML Tasks in an Ethical Manner

To get the most out of this book

This book assumes that you’re a manager, researcher, or data scientist with at least a passing understanding of machine learning and machine learning techniques. It doesn’t assume detailed knowledge. To use the example code, it also pays to have some knowledge of working with Python because there are no tutorials provided in the book. All of the coded examples have been tested on both Google Colab and with Anaconda. The Setting up for the book section of Chapter 1, Defining Machine Learning Security, provides detailed setup instructions for the book examples.

The advantages of using Google Colab are that you can code anywhere (even your smartphone or television set, both of which have been tested by other readers) and you don’t have to set anything up. The disadvantages of using Google Colab are that not all of the book examples will run in this environment (especially Chapter 7) and your code will tend to run slower (especially Chapter 10). When working with Google Colab, all you need do is direct your browser to https://colab.research.google.com/notebooks/welcome.ipynb and create a new notebook.

The advantage of using Anaconda is that you have more control over your work environment and you can perform more tasks. The disadvantage of using Anaconda is that you need a desktop system with the required hardware and software, as described in the following table, for most of the book examples. (The MLSec; 01; Check Versions.ipynb example shows how to verify the version numbers of your software.) Some examples will require additional setup requirements and those requirements are covered as part of the example description (for example, when creating the Pix2Pix GAN in Chapter 10, you need to install and configure TensorFlow).

General software covered in the book

Operating system and hardware requirements

Anaconda 3, 2020.07

Windows 7, 10, or 11

macOS 10.13 or above

Linux (Ubuntu, RedHat, and CentOS 7+ all tested)

Python 3.8 or higher (version 3.9.x is highly recommended, versions above 3.10.7 aren’t recommended or tested)

The test system uses this hardware, which is considered minimal:

Intel i7 CPU

8 GB RAM

500 GB hard drive

NumPy 1.18.5 or greater (version 1.21.x is highly recommended)

Scikit-learn 0.23.1 or greater (version 1.0.x is highly recommended)

Pandas 1.1.3 or greater (version 1.4.x is highly recommended)

When working with any version of the book, downloading the downloadable source code is highly recommended to avoid typos. Copying and pasting code from the digital version of the book will very likely result in errors. Remember that Python is a language that depends on formatting to deal with things like structure and to show where programming constructs such as for loops begin and end. The source code downloading instructions appear in the next section.