Machine Learning Security

Winter Working Connections, 2023, Sam Bowne

Mon, Dec 11 - Wed, Dec 13, 2023; Online only
10:00 am - 1:00 pm and 2:00 pm-6:30 pm Eastern

To attend class online:

For interactive help, connect to:
Password: student1

Schedule · Lecture Notes · Projects


Class Description

Every technical product is now incorporating machine learning at an explosive rate. But most people, even those with strong technical skills, don't understand how it works, what its capabilities are, and what security risks come with it. In this workshop, we'll make machine learning models using simple Python scripts, train them, and evaluate their value. Projects include computer vision, breaking a CAPTCHA, deblurring images, regression, and classification tasks. We will perform poisoning and evasion attacks on machine learning systems, and implement deep neural rejection to block such attacks.

No experience with programming or machine learning is required, and the only software required is a Web browser. We will use TensorFlow on free Google Colab cloud systems.


Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow Required

AI and Machine Learning for Coders: A Programmer's Guide to Artificial Intelligence Optional


The quizzes are multiple-choice, online, and open-book. However, you may not ask other people to help you during the quizzes. You will need to study the textbook chapter before the lecture covering it, and take the quiz before that class. Each quiz is due 30 min. before class. Each quiz has 5 questions, you have ten minutes to take it, and you can make two attempts. If you take the quiz twice, the higher score counts.

Don't use CCSF's Canvas system for this class. Instead, all students should use this Canvas server:

Enroll Here · View Course · Reset password



Mon, Dec 11 1 The Machine Learning Landscape
Project: ML 130: Prompt Injection

2 End-to-End Machine Learning Project
Project: ML 100: Machine Learning with TensorFlow

3 Classification
Project: ML 105: Classification

4 Training Models
Projects: ML 101: Computer Vision
                ML 102: Breaking a CAPTCHA
                ML 103: Deblurring Images

Tue, Dec 12 5 Support Vector Machines
Project: ML 112: Support Vector Machines

6 Decision Trees
Project: ML 113: Decision Trees

7 Ensemble Learning and Random Forests
Project: ML 114: Ensemble Learning and Random Forests

8 Dimensionailty Reduction
Projects: ML 115: Dimensionality Reduction
                ML 109: Poisoning Labels with SecML

Wed, Dec 13 9 Unsupervised Learning Techniques
Project: ML 116: k-Means Clustering

10 Introduction to Artificial Neural Networks
Project: ML 107: Evasion Attack with SecML

11 Training Deep Neural Networks
Project: ML 108: Evasion Attack on MNIST dataset

12 Custom Models and Training with Tensorflow
Projects: ML 111: Poisoning the MNIST dataset
                ML 140: Deep Neural Rejection


The Fundamentals of Machine Learning

1 The Machine Learning Landscape KEY · PDF
   OWASP Top 10 Machine Learning Security Risks · KEY · PDF
   OWASP Top 10 for LLM (PDF)
2 End-to-End Machine Learning Project KEY · PDF
3 Classification KEY · PDF
4 Training Models KEY · PDF
5 Support Vector Machines KEY · PDF
6 Decision Trees KEY · PDF
7 Ensemble Learning and Random Forests KEY · PDF
8 Dimensionailty Reduction KEY · PDF
9 Unsupervised Learning Techniques KEY · PDF

Neural Networks and Deep Learning

10 Introduction to Artificial Neural Networks KEY · PDF
11 Training Deep Neural Networks KEY · PDF

12 Custom Models and Training with Tensorflow
13 Loading and Preprocessing Data with Tensorflow
14 Deep Computer Vision Using Convolutional Neural Networks
15 Processing Sequences Using RNNs and CNNs
16 Natural Language Processing with RNNs and Attention

Last Updated: 12-11-23 6:58 am