Machine Learning Security

Fall 2023 Sam Bowne

Sat 11:00 am - 2:00 pm Online only

To attend class online:

For interactive help, connect to:
Password: student1

Schedule · Lecture Notes · Projects

Pirate Class

No official college credit

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

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


For class-related questions, please send messages inside Canvas or email


Sat 8-19  1 The Machine Learning Landscape
Demo: ML 130

Sat 8-26Quizzes Ch 1 and 2
Proj ML 130
2 End-to-End Machine Learning Project
Demo: ML 100

Sat 9-2 Holiday: No Class

Sat 9-9Quiz Ch 3
Proj ML 100
3 Classification
Demo: ML 105

Sat 9-16Quiz Ch 4
Proj ML 101 & ML 102
4 Training Models
Demo: ML 101, 102, 103

Sat 9-23Quiz Ch 5
Proj Ml 103 & ML 104
5 Support Vector Machines
Demo: ML 112

Sat 9-30Quiz Ch 6
Proj Ml 105 & ML 106
6 Decision Trees
Demo: ML 113

Sat 10-7Quiz Ch 7
Proj Ml 107 & ML 108
7 Ensemble Learning and Random Forests
Demo: ML 114

Sat 10-14Quiz Ch 8
Proj Ml 109 & ML 110
8 Dimensionailty Reduction
Demo: ML 115 and ML 109

Sat 10-21Quiz Ch 9
Proj Ml 111 & ML 120
9 Unsupervised Learning Techniques
Demo: ML 116

Sat 10-28Quiz Ch 10
Proj Ml 121 & ML 122
10 Introduction to Artificial Neural Networks

Sat 11-4Quiz Ch 11
11 Training Deep Neural Networks

Sat 11-11 Class Cancelled for CPTC

Sat 11-18Quiz Ch 12
12 Custom Models and Training with Tensorflow

Sat 11-25 Holiday: No Class

Sat 12-2 Class Cancelled for CCDC

Sat 12-9Quiz Ch 13 (extra credit)
Last Class: 13 Loading and Preprocessing Data with Tensorflow

Tue 12-12
Tue 12-19
  Final Exam available online throughout the week.
You can only take it once.

All Quizzes due 30 min. before class


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 KEY · PDF
13 Loading and Preprocessing Data with Tensorflow KEY · PDF

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 4 pm