Skip to Content
Machine Learning for High-Risk Applications
book

Machine Learning for High-Risk Applications

by Patrick Hall, James Curtis, Parul Pandey
April 2023
Intermediate to advanced
466 pages
14h 40m
English
O'Reilly Media, Inc.
Content preview from Machine Learning for High-Risk Applications

Chapter 11. Red-Teaming XGBoost

In Chapter 5, we introduced a number of concepts related to the security of machine learning models. Now we will put them into practice. In this chapter, we’ll explain how to hack our own models so that we can add red-teaming into our model debugging repertoire. The main idea of the chapter is that when we know what hackers will try to do to our model, then we can try it out first and devise effective defenses. We’ll start out with a concept refresher that reintroduces common ML attacks and countermeasures, then we’ll dive into examples of attacking an XGBoost classifier trained on structured data.1 We’ll then introduce two XGBoost models, one trained with the standard unexplainable approach, and one trained with constraints and a high degree of L2 regularization. We’ll use these two models to explain the attacks and to test whether transparency and L2 regularization are adequate countermeasures. After that, we’ll jump into attacks that are likely to be performed by external adversaries against an unexplainable ML API: model extraction and adversarial example attacks. From there, we’ll try out insider attacks that involve making deliberate changes to an ML modeling pipeline: data poisoning and model backdoors. As a reminder, the chapter’s code examples are available online. Now, let’s get started—remember to bring your tinfoil hat, and your adversarial mindset from Chapter 5.

Note

The web and academic literature abound with examples of, and tools ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Building Machine Learning Powered Applications

Building Machine Learning Powered Applications

Emmanuel Ameisen
Architecting Data and Machine Learning Platforms

Architecting Data and Machine Learning Platforms

Marco Tranquillin, Valliappa Lakshmanan, Firat Tekiner

Publisher Resources

ISBN: 9781098102425Errata Page