Vulnerabilities, security and privacy for machine learning models

by | Mar 5, 2024 | Uncategorized | 0 comments

Can you tell the difference between a cat and guacamole? It might sound like the setup to a bad joke, but it’s actually an important consideration when discussing how adversarial examples (inputs designed to intentionally trip up machines) can impact machine learning.

In a recent Stanford webinar entitled “Hacking AI: Security and Privacy of Machine Learning Models,” Cryptography Professor Dan Boneh explores common concerns related to machine learning pipeline vulnerabilities, how to protect machine learning data in the cloud, and techniques for securing the privacy of training data.

Boneh is co-Academic Director of the Advanced Cybersecurity Program and a professor of computer science and electrical engineering at Stanford.

During his talk, Boneh provides a high-level introduction to some of the latest research in the area. Here are some of the key points.

The machine learning pipeline and its vulnerabilities

There are three phases of the machine learning pipeline for supervised learning: data collection, training, and inference. Attacks, unfortunately, are possible in each phase of the pipeline, according to Boneh. He shares a few instances of malicious activities that could take place during the training and inference stages.

Training attacks

One corrupt entry can lead the model astray. Boneh cites an example involving a classifier that was trained to identify images of dogs and fish. After adding low-volume noise to just one image in the dataset of 6,000 pictures, the training algorithm produced an incorrect model.

Inference attacks

Adversarial examples are data entries constructed to thwart a given model.There are many adversarial examples that can affect a given model in the inference phase, says Boneh. For instance, after a model was trained to identify cats, an adversarial example could be constructed by adding noise such as a pixelated overlay to one of the images. While the visual perturbation might be imperceptible to humans, it distorts the picture enough for the model to misidentify a cat…as guacamole!

Additional instances include:

  • 3D-printed eyeglasses that fool a facial recognition model into thinking the wearer is Brad Pitt
  • A small number of seemingly randomly placed stickers on a sign that tricks a model into perceiving a stop sign as a speed limit marker
  • White noise misinterpreted by voice assistants as providing a command to open a specific website

Because models learn an approximation of a true concept, small perturbations can have a big impact. As adversarial examples are created, they help us identify what our models are actually learning and shine light on areas where attack vulnerabilities exist.

Ad blocking is yet another type of an inference attack. Boneh shares an example of an attempt to create a machine learning model that could execute perceptual ad blocking. The concept involved training a model to look at the pixels of a webpage and identify the ads on it.

All it took to thwart this model was to cover the page with a transparent background – invisible to human viewers, yet visible to the machine model. With this simple modification the model could no longer identify ads.

Alternatively, it was suggested that training a model to recognize logos for advertisements could achieve the same desired outcome. However, this tactic was still susceptible to a similar flaw. Adversarial examples could also be created to outmaneuver models that identified AdChoices logos.

Clever attacks require clever defenses

Boneh explains that this has led to a cat-and-mouse game in which defensive techniques are created, and almost as quickly, broken. People can craft effective defenses for specific datasets to safeguard against individual perturbations. However, using a more general strategy is often less successful.

Since comprehensive defenses are difficult to construct, Boneh urges viewers to always investigate what a given machine learning model is doing about adversarial examples.

How to protect machine learning data in the cloud

With the potential for large volumes of machine learning data stored in the cloud, including hundreds of thousands of images, there comes the possibility for attacks and vulnerabilities. How might one protect them? What if you don’t trust the cloud provider?

Boneh shares how hardware enclaves provide protection for data, even safeguarding it against interference from the provider’s designated administrator. This technique requires some additional support, though. Graphics processing units (GPUs) sit idle because they do not have enclaves on them. You can avoid this problem by running Slalom.

“If you do want to run your jobs in an enclave in the cloud, there’s still a way to use GPUs and gain performance improvements over running everything inside the enclave,” says Boneh.

How to preserve the privacy of training data

Boneh also provides an overview of how to safeguard the privacy of training data.

If you want to train a model, how do you ensure that the underlying data remains private? Options include:

  • Private gradient descent
    This technique can achieve strong results for privacy; it requires a tradeoff in accuracy.
  • Using handcrafted features
    “Simple, handcrafted features using linear models can beat the deep neural nets where privacy is required,” says Boneh.
  • Private deep learning
    “It turns out, if you have enough data, eventually the deep neural nets, with privacy, will actually beat the handcrafted features,” Boneh continues.
  • Starting with public data
    With transfer learning, you can start with using public data to train features. Then, you move to private data, reducing the number of steps in the gradient descent process.

During the Q&A section of the webinar, Boneh responds to questions about using machine learning for malware analysis, how adversarial examples play out in relation to natural language processing and the difficulty of training models to identify perturbations.

Take a look at the webinar for a more in-depth exploration of these topics. If you’re interested in learning more about the latest cybersecurity concerns and their solutions, consider enrolling in our Cybersecurity Program and Courses.