SlideShare uma empresa Scribd logo
1 de 55
Baixar para ler offline
Machine Duping
Pwning Deep Learning Systems
CLARENCE CHIO
MLHACKER
@cchio
adapted from
Dave Conway
HACKING MATH & STATS
MACHINE
LEARNING
1337
HAX0R ACADEMIC
RESEARCH
Deep Learning
deep neural networks (DNN)
• Not a new toy - history goes back to 1943
• MUCH MORE DATA EVERYWHERE
• Revived due to improvements in computational hardware (esp. GPUs)
• Multiple concurrent matrix operations can be performed
• MYTH: “Modeled after how the human brain works”
Nvidia
ImageNet
Google Inc.
Google DeepMind
UMass, Facial Recognition
Nvidia DRIVE
Nvidia
Invincea Malware Detection System
Deep Learning
why would someone choose to use it?
(Semi)Automated
feature/representation
learning
One infrastructure for
multiple problems (sort of)
Hierarchical learning:
Divide task across
multiple layers
Efficient,
easily distributed &
parallelized
Definitely not one-size-fits-all
Source: Deep Learning: Goodfellow et. al.
softmaxfunction
[0.34, 0.57, 0.09]
predicted class: 1
correct class: 0
np.argmax
logits prediction
𝒇
hidden
layer
input
layer
output
layer
𝑊
activation
function
bias units
4-5-3 Neural Net Architecture
[17.0, 28.5, 4.50]
𝒇
𝒇
𝒇
𝒇
𝒇
𝒇
𝒇
𝒇
𝒇
𝒇
𝒇
Training Deep Neural Networks
Step 1 of 2: Feed Forward
1. Each unit receives output of the neurons in the previous layer (+ bias
signal)
2. Computes weighted average of inputs
3. Apply weighted average through nonlinear activation function
4. For DNN classifier, send final layer output through softmax function
softmax
function
[0.34, 0.57, 0.09]logits
prediction
𝒇
𝑊1
activation
function
[17.0, 28.5, 4.50]
𝒇 𝒇
activation
function
activation
function
input 𝑊2
b1 b2
bias
unit
bias
unit
Training Deep Neural Networks
Step 2 of 2: Backpropagation
1. If the model made a wrong prediction, calculate the error
1. In this case, the correct class is 0, but the model predicted 1 with 57% confidence - error is thus 0.57
2. Assign blame: trace backwards to find the units that contributed to this wrong
prediction (and how much they contributed to the total error)
1. Partial differentiation of this error w.r.t. the unit’s activation value
3. Penalize those units by decreasing their weights and biases by an amount proportional
to their error contribution
4. Do the above efficiently with optimization algorithm e.g. Stochastic Gradient Descent
0.57
total error
𝒇
𝑊1
activation
function
28.5
𝒇 𝒇
activation
function
activation
function
𝑊2
b1 b2
bias
unit
bias
unit
HOW?
DEMO
Beyond Multi Layer Perceptrons
Source: iOS Developer Library
vImage Programming Guide
Convolutional Neural Network
Beyond Multi Layer Perceptrons
Source: LeNet 5, LeCun et. al.
Convolutional Neural Network
Beyond Multi Layer Perceptrons
Recurrent Neural Network
neural
network
input output
loop(s)
• Just a DNN with a feedback loop
• Previous time step feeds all
intermediate and final values into
next time step
• Introduces the concept of “memory”
to neural networks
Beyond Multi Layer Perceptrons
Recurrent Neural Network
input
output
time steps
network
depth
Y O L O !
Beyond Multi Layer Perceptrons
Disney, Finding Dory
Long Short-Term Memory (LSTM) RNN
• To make good predictions, we sometimes
need more context
• We need long-term memory capabilities
without extending the network’s recursion
indefinitely (unscalable)
Colah’s Blog, “Understanding LSTM Networks"
Carla et. al., “Phone Recognition on the TIMIT Database”
Deng et. al. “Deep Learning: Methods and Applications”
Beyond Multi Layer Perceptrons
Recursive Neural Tensor Network
Socher, 2013, “Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank"
(for sentiment analysis)
• Handles multiplicity in the data
• Window/batch of events
• i.e. a phrase of words
• i.e. 24 frames of a video
Deep Neural Networks
So much is going on in this space now
Research in this field is still very active
Deep Neural Networks
State of the art optimizations that you can use out of the box
Dropout
Regularization technique:
randomly drop units & connections during training
dropout factor 0.5 found to perform well across
many applications
Srivastava et. al., 2014
The Foothill Dragon Press
Deep Neural Networks
State of the art optimizations that you can use out of the box
PCA Whitening
Dimensionality Reduction
frequently used for noisy image inputs
changes the input vector into a white noise vector
Stanford CS231n
Deep Neural Networks
State of the art optimizations that you can use out of the box
Leaky Rectified Linear Unit (ReLU)
Activation Function
Popular activation function (other popular ones are
sigmoid, tanh, ReLU)
He et. al., 2015
Deep Neural Networks
State of the art optimizations that you can use out of the box
Loss function
optimization methods
DatumBox, 2013
HOW TO PWN?
Attack Taxonomy
ExploratoryCausative
(Manipulative test samples)
Applicable also to online-learning
models that continuously learn
from real-time test data
(Manipulative training samples)
Targeted
Indiscriminate
Training samples that move
classifier decision boundary in an
intentional direction
Training samples that increase FP/FN
→ renders classifier unusable
Adversarial input crafted to cause
an intentional misclassification
n/a
DEMO
MNIST MISCLASSIFICATION
SENTIMENT MISCLASSIFICATION
Why can we do this?
vs.
Statistical learning models don’t learn concepts the same way that we do.
BLINDSPOTS:
Adversarial Deep Learning
Intuitions
1. Run input x through the classifier model (or substitute/approximate model)
2. Based on model prediction, derive a perturbation tensor that
maximizes chances of misclassification:
1. Traverse the manifold to find blind spots in input space; or
2. Linear perturbation in direction of neural network’s cost function gradient; or
3. Select only input dimensions with high saliency* to perturb by the model’s Jacobian matrix
3. Scale the perturbation tensor by some magnitude, resulting in the
effective perturbation (δx) to x
1. Larger perturbation == higher probability for misclassification
2. Smaller perturbation == less likely for human detection
* saliency: amount of influence a selected dimension has on the entire model’s output
Adversarial Deep Learning
Intuitions
Szegedy, 2013: Traverse the manifold to find blind spots in the input space
• Adversarial samples == pockets in the manifold
• Difficult to efficiently find by brute force (high dimensional input)
• Optimize this search, take gradient of input w.r.t. target output class
Adversarial Deep Learning
Intuitions
Goodfellow, 2015: Linear adversarial perturbation
• Developed a linear view of adversarial examples
• Can just take the cost function gradient w.r.t. the sample (x) and original
predicted class (y)
• Easily found by backpropagation
Adversarial Deep Learning
Intuitions
Papernot, 2015: Saliency map + Jacobian matrix perturbation
• More complex derivations for why the Jacobian of the learned neural network
function is used
• Obtained with respect to input features rather than network parameters
• Forward propagation is used instead of backpropagation
• To reduce probability of human detection, only perturb the dimensions that
have the greatest impact on the output (salient dimensions)
Threat Model:
Adversarial Knowledge
Model hyperparameters,
variables, training tools
Architecture
Training data
Black box
Increasing
attacker
knowledge
Deep Neural Network Attacks
Adversary
knowledge
Attack
complexity
DIFFICULT
EASY
Architecture,
Training Tools,
Hyperparameters
Architecture
Training data
Oracle
Labeled Test
samples
Confidence
Reduction
Untargeted
M
isclassification
Targeted
M
isclassification
Source/Target
M
isclassification
Murphy, 2012 Szegedy, 2014
Papernot, 2016
Goodfellow, 2016
Xu, 2016
Nguyen, 2014
What can you do with limited knowledge?
• Quite a lot.
• Make good guesses: Infer the methodology from the task
• Image classification: ConvNet
• Speech recognition: LSTM-RNN
• Amazon ML, ML-as-a-service etc.: Shallow feed-forward network
• What if you can’t guess?
STILL CAN PWN?
DEMO
Black box attack methodology
1. Transferability
Adversarial samples that fool model A have a
good chance of fooling a previously unseen
model B
SVM, scikit-learn
Decision Tree
Matt's Webcorner, Stanford
Linear Classifier
(Logistic Regression)
Spectral Clustering, scikit-learn
Feed Forward Neural Network
Black box attack methodology
2. Substitute model
train a new model by treating the target model’s
output as a training labels
then, generate adversarial samples with
substitute model
input data
target
black box
model
training label
backpropagate
black box prediction
substitute
model
Why is this possible?
• Transferability?
• Still an open research problem
• Manifold learning problem
• Blind spots
• Model vs. Reality dimensionality mismatch
• IN GENERAL:
• Is the model not learning anything
at all?
What this means for us
• Deep learning algorithms (Machine Learning in general) are susceptible to
manipulative attacks
• Use with caution in critical deployments
• Don’t make false assumptions about what/how the model learns
• Evaluate a model’s adversarial resilience - not just accuracy/precision/recall
• Spend effort to make models more robust to tampering
Defending the machines
• Distillation
• Train model 2x, feed first DNN output logits into second DNN input layer
• Train model with adversarial samples
• i.e. ironing out imperfect knowledge learnt in the model
• Other miscellaneous tweaks
• Special regularization/loss-function methods (simulating adversarial content during training)
• DATAGRAD
DEEP-PWNING“metasploit for machine learning”
WHY DEEP-PWNING?
• lol why not
• “Penetration testing” of statistical/machine learning systems
• Train models with adversarial samples for increased robustness
DEMO
PLEASE PLAY WITH IT &
CONTRIBUTE!
Deep Learning and Privacy
• Deep learning also sees challenges in other areas relating to security &
privacy
• Adversary can reconstruct training samples from a trained black box
DNN model (Fredrikson, 2015)
• Can we precisely control the learning objective of a DNN model?
• Can we train a DNN model without the training agent having complete
access to all training data? (Shokri, 2015)
WHY IS THIS IMPORTANT?
WHY DEEP-PWNING?
• MORE CRITICAL SYSTEMS RELY ON MACHINE LEARNING → MORE IMPORTANCE
ON ENSURING THEIR ROBUSTNESS
• WE NEED PEOPLE WITH BOTH SECURITY AND STATISTICAL SKILL SETS TO
DEVELOP ROBUST SYSTEMS AND EVALUATE NEW INFRASTRUCTURE
LEARN IT OR BECOME IRRELEVANT
@cchio
MLHACKER

Mais conteúdo relacionado

Mais procurados

Transfer Learning and Fine-tuning Deep Neural Networks
 Transfer Learning and Fine-tuning Deep Neural Networks Transfer Learning and Fine-tuning Deep Neural Networks
Transfer Learning and Fine-tuning Deep Neural Networks
PyData
 
Deep learning - a primer
Deep learning - a primerDeep learning - a primer
Deep learning - a primer
Uwe Friedrichsen
 

Mais procurados (20)

Transfer Learning and Fine-tuning Deep Neural Networks
 Transfer Learning and Fine-tuning Deep Neural Networks Transfer Learning and Fine-tuning Deep Neural Networks
Transfer Learning and Fine-tuning Deep Neural Networks
 
Convolutional Neural Network for Alzheimer’s disease diagnosis with Neuroim...
Convolutional Neural Network for Alzheimer’s disease diagnosis with Neuroim...Convolutional Neural Network for Alzheimer’s disease diagnosis with Neuroim...
Convolutional Neural Network for Alzheimer’s disease diagnosis with Neuroim...
 
Introduction to Deep Learning
Introduction to Deep LearningIntroduction to Deep Learning
Introduction to Deep Learning
 
From Conventional Machine Learning to Deep Learning and Beyond.pptx
From Conventional Machine Learning to Deep Learning and Beyond.pptxFrom Conventional Machine Learning to Deep Learning and Beyond.pptx
From Conventional Machine Learning to Deep Learning and Beyond.pptx
 
Overview of TensorFlow For Natural Language Processing
Overview of TensorFlow For Natural Language ProcessingOverview of TensorFlow For Natural Language Processing
Overview of TensorFlow For Natural Language Processing
 
Deep Learning - A Literature survey
Deep Learning - A Literature surveyDeep Learning - A Literature survey
Deep Learning - A Literature survey
 
Deep Learning
Deep LearningDeep Learning
Deep Learning
 
Deep Learning For Practitioners, lecture 2: Selecting the right applications...
Deep Learning For Practitioners,  lecture 2: Selecting the right applications...Deep Learning For Practitioners,  lecture 2: Selecting the right applications...
Deep Learning For Practitioners, lecture 2: Selecting the right applications...
 
Deep learning - a primer
Deep learning - a primerDeep learning - a primer
Deep learning - a primer
 
Artificial Intelligence Course: Linear models
Artificial Intelligence Course: Linear models Artificial Intelligence Course: Linear models
Artificial Intelligence Course: Linear models
 
An introduction to Machine Learning (and a little bit of Deep Learning)
An introduction to Machine Learning (and a little bit of Deep Learning)An introduction to Machine Learning (and a little bit of Deep Learning)
An introduction to Machine Learning (and a little bit of Deep Learning)
 
Transfer Learning: An overview
Transfer Learning: An overviewTransfer Learning: An overview
Transfer Learning: An overview
 
Introduction to Deep learning
Introduction to Deep learningIntroduction to Deep learning
Introduction to Deep learning
 
Deep Learning in Recommender Systems - RecSys Summer School 2017
Deep Learning in Recommender Systems - RecSys Summer School 2017Deep Learning in Recommender Systems - RecSys Summer School 2017
Deep Learning in Recommender Systems - RecSys Summer School 2017
 
Scene understanding
Scene understandingScene understanding
Scene understanding
 
Language translation with Deep Learning (RNN) with TensorFlow
Language translation with Deep Learning (RNN) with TensorFlowLanguage translation with Deep Learning (RNN) with TensorFlow
Language translation with Deep Learning (RNN) with TensorFlow
 
Convolutional Neural Network
Convolutional Neural NetworkConvolutional Neural Network
Convolutional Neural Network
 
Deep Learning With Neural Networks
Deep Learning With Neural NetworksDeep Learning With Neural Networks
Deep Learning With Neural Networks
 
Image captioning
Image captioningImage captioning
Image captioning
 
Geek Night 17.0 - Artificial Intelligence and Machine Learning
Geek Night 17.0 - Artificial Intelligence and Machine LearningGeek Night 17.0 - Artificial Intelligence and Machine Learning
Geek Night 17.0 - Artificial Intelligence and Machine Learning
 

Semelhante a DEF CON 24 - Clarence Chio - machine duping 101

Deep learning - a primer
Deep learning - a primerDeep learning - a primer
Deep learning - a primer
Shirin Elsinghorst
 
Deep Learning Made Easy with Deep Features
Deep Learning Made Easy with Deep FeaturesDeep Learning Made Easy with Deep Features
Deep Learning Made Easy with Deep Features
Turi, Inc.
 
Separating Hype from Reality in Deep Learning with Sameer Farooqui
 Separating Hype from Reality in Deep Learning with Sameer Farooqui Separating Hype from Reality in Deep Learning with Sameer Farooqui
Separating Hype from Reality in Deep Learning with Sameer Farooqui
Databricks
 

Semelhante a DEF CON 24 - Clarence Chio - machine duping 101 (20)

Introduction to deep learning
Introduction to deep learningIntroduction to deep learning
Introduction to deep learning
 
Deep learning from a novice perspective
Deep learning from a novice perspectiveDeep learning from a novice perspective
Deep learning from a novice perspective
 
AI and Deep Learning
AI and Deep Learning AI and Deep Learning
AI and Deep Learning
 
Deep learning - a primer
Deep learning - a primerDeep learning - a primer
Deep learning - a primer
 
An Introduction to Deep Learning (May 2018)
An Introduction to Deep Learning (May 2018)An Introduction to Deep Learning (May 2018)
An Introduction to Deep Learning (May 2018)
 
Deep Learning: Evolution of ML from Statistical to Brain-like Computing- Data...
Deep Learning: Evolution of ML from Statistical to Brain-like Computing- Data...Deep Learning: Evolution of ML from Statistical to Brain-like Computing- Data...
Deep Learning: Evolution of ML from Statistical to Brain-like Computing- Data...
 
Introduction to deep learning
Introduction to deep learningIntroduction to deep learning
Introduction to deep learning
 
Deep Learning Made Easy with Deep Features
Deep Learning Made Easy with Deep FeaturesDeep Learning Made Easy with Deep Features
Deep Learning Made Easy with Deep Features
 
deeplearning
deeplearningdeeplearning
deeplearning
 
MDEC Data Matters Series: machine learning and Deep Learning, A Primer
MDEC Data Matters Series: machine learning and Deep Learning, A PrimerMDEC Data Matters Series: machine learning and Deep Learning, A Primer
MDEC Data Matters Series: machine learning and Deep Learning, A Primer
 
Introduction to deep learning
Introduction to deep learningIntroduction to deep learning
Introduction to deep learning
 
Few shot learning/ one shot learning/ machine learning
Few shot learning/ one shot learning/ machine learningFew shot learning/ one shot learning/ machine learning
Few shot learning/ one shot learning/ machine learning
 
Deep learning: Cutting through the Myths and Hype
Deep learning: Cutting through the Myths and HypeDeep learning: Cutting through the Myths and Hype
Deep learning: Cutting through the Myths and Hype
 
deepnet-lourentzou.ppt
deepnet-lourentzou.pptdeepnet-lourentzou.ppt
deepnet-lourentzou.ppt
 
Separating Hype from Reality in Deep Learning with Sameer Farooqui
 Separating Hype from Reality in Deep Learning with Sameer Farooqui Separating Hype from Reality in Deep Learning with Sameer Farooqui
Separating Hype from Reality in Deep Learning with Sameer Farooqui
 
Large Scale Distributed Deep Networks
Large Scale Distributed Deep NetworksLarge Scale Distributed Deep Networks
Large Scale Distributed Deep Networks
 
Deep learning tutorial 9/2019
Deep learning tutorial 9/2019Deep learning tutorial 9/2019
Deep learning tutorial 9/2019
 
Deep Learning Tutorial
Deep Learning TutorialDeep Learning Tutorial
Deep Learning Tutorial
 
Facial Emotion Detection on Children's Emotional Face
Facial Emotion Detection on Children's Emotional FaceFacial Emotion Detection on Children's Emotional Face
Facial Emotion Detection on Children's Emotional Face
 
Apache MXNet ODSC West 2018
Apache MXNet ODSC West 2018Apache MXNet ODSC West 2018
Apache MXNet ODSC West 2018
 

Mais de Felipe Prado

Mais de Felipe Prado (20)

DEF CON 24 - Sean Metcalf - beyond the mcse red teaming active directory
DEF CON 24 - Sean Metcalf - beyond the mcse red teaming active directoryDEF CON 24 - Sean Metcalf - beyond the mcse red teaming active directory
DEF CON 24 - Sean Metcalf - beyond the mcse red teaming active directory
 
DEF CON 24 - Bertin Bervis and James Jara - exploiting and attacking seismolo...
DEF CON 24 - Bertin Bervis and James Jara - exploiting and attacking seismolo...DEF CON 24 - Bertin Bervis and James Jara - exploiting and attacking seismolo...
DEF CON 24 - Bertin Bervis and James Jara - exploiting and attacking seismolo...
 
DEF CON 24 - Tamas Szakaly - help i got ants
DEF CON 24 - Tamas Szakaly - help i got antsDEF CON 24 - Tamas Szakaly - help i got ants
DEF CON 24 - Tamas Szakaly - help i got ants
 
DEF CON 24 - Ladar Levison - compelled decryption
DEF CON 24 - Ladar Levison - compelled decryptionDEF CON 24 - Ladar Levison - compelled decryption
DEF CON 24 - Ladar Levison - compelled decryption
 
DEF CON 24 - Chris Rock - how to overthrow a government
DEF CON 24 - Chris Rock - how to overthrow a governmentDEF CON 24 - Chris Rock - how to overthrow a government
DEF CON 24 - Chris Rock - how to overthrow a government
 
DEF CON 24 - Fitzpatrick and Grand - 101 ways to brick your hardware
DEF CON 24 - Fitzpatrick and Grand - 101 ways to brick your hardwareDEF CON 24 - Fitzpatrick and Grand - 101 ways to brick your hardware
DEF CON 24 - Fitzpatrick and Grand - 101 ways to brick your hardware
 
DEF CON 24 - Rogan Dawes and Dominic White - universal serial aBUSe remote at...
DEF CON 24 - Rogan Dawes and Dominic White - universal serial aBUSe remote at...DEF CON 24 - Rogan Dawes and Dominic White - universal serial aBUSe remote at...
DEF CON 24 - Rogan Dawes and Dominic White - universal serial aBUSe remote at...
 
DEF CON 24 - Jay Beale and Larry Pesce - phishing without frustration
DEF CON 24 - Jay Beale and Larry Pesce - phishing without frustrationDEF CON 24 - Jay Beale and Larry Pesce - phishing without frustration
DEF CON 24 - Jay Beale and Larry Pesce - phishing without frustration
 
DEF CON 24 - Gorenc Sands - hacker machine interface
DEF CON 24 - Gorenc Sands - hacker machine interfaceDEF CON 24 - Gorenc Sands - hacker machine interface
DEF CON 24 - Gorenc Sands - hacker machine interface
 
DEF CON 24 - Allan Cecil and DwangoAC - tasbot the perfectionist
DEF CON 24 - Allan Cecil and DwangoAC -  tasbot the perfectionistDEF CON 24 - Allan Cecil and DwangoAC -  tasbot the perfectionist
DEF CON 24 - Allan Cecil and DwangoAC - tasbot the perfectionist
 
DEF CON 24 - Rose and Ramsey - picking bluetooth low energy locks
DEF CON 24 - Rose and Ramsey - picking bluetooth low energy locksDEF CON 24 - Rose and Ramsey - picking bluetooth low energy locks
DEF CON 24 - Rose and Ramsey - picking bluetooth low energy locks
 
DEF CON 24 - Rich Mogull - pragmatic cloud security
DEF CON 24 - Rich Mogull - pragmatic cloud securityDEF CON 24 - Rich Mogull - pragmatic cloud security
DEF CON 24 - Rich Mogull - pragmatic cloud security
 
DEF CON 24 - Grant Bugher - Bypassing captive portals
DEF CON 24 - Grant Bugher - Bypassing captive portalsDEF CON 24 - Grant Bugher - Bypassing captive portals
DEF CON 24 - Grant Bugher - Bypassing captive portals
 
DEF CON 24 - Patrick Wardle - 99 problems little snitch
DEF CON 24 - Patrick Wardle - 99 problems little snitchDEF CON 24 - Patrick Wardle - 99 problems little snitch
DEF CON 24 - Patrick Wardle - 99 problems little snitch
 
DEF CON 24 - Plore - side -channel attacks on high security electronic safe l...
DEF CON 24 - Plore - side -channel attacks on high security electronic safe l...DEF CON 24 - Plore - side -channel attacks on high security electronic safe l...
DEF CON 24 - Plore - side -channel attacks on high security electronic safe l...
 
DEF CON 24 - Six Volts and Haystack - cheap tools for hacking heavy trucks
DEF CON 24 - Six Volts and Haystack - cheap tools for hacking heavy trucksDEF CON 24 - Six Volts and Haystack - cheap tools for hacking heavy trucks
DEF CON 24 - Six Volts and Haystack - cheap tools for hacking heavy trucks
 
DEF CON 24 - Dinesh and Shetty - practical android application exploitation
DEF CON 24 - Dinesh and Shetty - practical android application exploitationDEF CON 24 - Dinesh and Shetty - practical android application exploitation
DEF CON 24 - Dinesh and Shetty - practical android application exploitation
 
DEF CON 24 - Klijnsma and Tentler - stargate pivoting through vnc
DEF CON 24 - Klijnsma and Tentler - stargate pivoting through vncDEF CON 24 - Klijnsma and Tentler - stargate pivoting through vnc
DEF CON 24 - Klijnsma and Tentler - stargate pivoting through vnc
 
DEF CON 24 - Antonio Joseph - fuzzing android devices
DEF CON 24 - Antonio Joseph - fuzzing android devicesDEF CON 24 - Antonio Joseph - fuzzing android devices
DEF CON 24 - Antonio Joseph - fuzzing android devices
 
DEF CON 24 - workshop - Craig Young - brainwashing embedded systems
DEF CON 24 - workshop - Craig Young - brainwashing embedded systemsDEF CON 24 - workshop - Craig Young - brainwashing embedded systems
DEF CON 24 - workshop - Craig Young - brainwashing embedded systems
 

Último

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Último (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 

DEF CON 24 - Clarence Chio - machine duping 101

  • 1. Machine Duping Pwning Deep Learning Systems CLARENCE CHIO MLHACKER @cchio
  • 2. adapted from Dave Conway HACKING MATH & STATS MACHINE LEARNING 1337 HAX0R ACADEMIC RESEARCH
  • 3. Deep Learning deep neural networks (DNN) • Not a new toy - history goes back to 1943 • MUCH MORE DATA EVERYWHERE • Revived due to improvements in computational hardware (esp. GPUs) • Multiple concurrent matrix operations can be performed • MYTH: “Modeled after how the human brain works”
  • 5. ImageNet Google Inc. Google DeepMind UMass, Facial Recognition Nvidia DRIVE Nvidia Invincea Malware Detection System
  • 6. Deep Learning why would someone choose to use it? (Semi)Automated feature/representation learning One infrastructure for multiple problems (sort of) Hierarchical learning: Divide task across multiple layers Efficient, easily distributed & parallelized
  • 8. Source: Deep Learning: Goodfellow et. al.
  • 9. softmaxfunction [0.34, 0.57, 0.09] predicted class: 1 correct class: 0 np.argmax logits prediction 𝒇 hidden layer input layer output layer 𝑊 activation function bias units 4-5-3 Neural Net Architecture [17.0, 28.5, 4.50] 𝒇 𝒇 𝒇 𝒇 𝒇 𝒇 𝒇 𝒇 𝒇 𝒇 𝒇
  • 10. Training Deep Neural Networks Step 1 of 2: Feed Forward 1. Each unit receives output of the neurons in the previous layer (+ bias signal) 2. Computes weighted average of inputs 3. Apply weighted average through nonlinear activation function 4. For DNN classifier, send final layer output through softmax function softmax function [0.34, 0.57, 0.09]logits prediction 𝒇 𝑊1 activation function [17.0, 28.5, 4.50] 𝒇 𝒇 activation function activation function input 𝑊2 b1 b2 bias unit bias unit
  • 11. Training Deep Neural Networks Step 2 of 2: Backpropagation 1. If the model made a wrong prediction, calculate the error 1. In this case, the correct class is 0, but the model predicted 1 with 57% confidence - error is thus 0.57 2. Assign blame: trace backwards to find the units that contributed to this wrong prediction (and how much they contributed to the total error) 1. Partial differentiation of this error w.r.t. the unit’s activation value 3. Penalize those units by decreasing their weights and biases by an amount proportional to their error contribution 4. Do the above efficiently with optimization algorithm e.g. Stochastic Gradient Descent 0.57 total error 𝒇 𝑊1 activation function 28.5 𝒇 𝒇 activation function activation function 𝑊2 b1 b2 bias unit bias unit
  • 12. HOW?
  • 13. DEMO
  • 14. Beyond Multi Layer Perceptrons Source: iOS Developer Library vImage Programming Guide Convolutional Neural Network
  • 15. Beyond Multi Layer Perceptrons Source: LeNet 5, LeCun et. al. Convolutional Neural Network
  • 16. Beyond Multi Layer Perceptrons Recurrent Neural Network neural network input output loop(s) • Just a DNN with a feedback loop • Previous time step feeds all intermediate and final values into next time step • Introduces the concept of “memory” to neural networks
  • 17. Beyond Multi Layer Perceptrons Recurrent Neural Network input output time steps network depth Y O L O !
  • 18. Beyond Multi Layer Perceptrons Disney, Finding Dory Long Short-Term Memory (LSTM) RNN • To make good predictions, we sometimes need more context • We need long-term memory capabilities without extending the network’s recursion indefinitely (unscalable) Colah’s Blog, “Understanding LSTM Networks"
  • 19. Carla et. al., “Phone Recognition on the TIMIT Database”
  • 20. Deng et. al. “Deep Learning: Methods and Applications”
  • 21. Beyond Multi Layer Perceptrons Recursive Neural Tensor Network Socher, 2013, “Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank" (for sentiment analysis) • Handles multiplicity in the data • Window/batch of events • i.e. a phrase of words • i.e. 24 frames of a video
  • 22. Deep Neural Networks So much is going on in this space now Research in this field is still very active
  • 23. Deep Neural Networks State of the art optimizations that you can use out of the box Dropout Regularization technique: randomly drop units & connections during training dropout factor 0.5 found to perform well across many applications Srivastava et. al., 2014 The Foothill Dragon Press
  • 24. Deep Neural Networks State of the art optimizations that you can use out of the box PCA Whitening Dimensionality Reduction frequently used for noisy image inputs changes the input vector into a white noise vector Stanford CS231n
  • 25. Deep Neural Networks State of the art optimizations that you can use out of the box Leaky Rectified Linear Unit (ReLU) Activation Function Popular activation function (other popular ones are sigmoid, tanh, ReLU) He et. al., 2015
  • 26. Deep Neural Networks State of the art optimizations that you can use out of the box Loss function optimization methods DatumBox, 2013
  • 28. Attack Taxonomy ExploratoryCausative (Manipulative test samples) Applicable also to online-learning models that continuously learn from real-time test data (Manipulative training samples) Targeted Indiscriminate Training samples that move classifier decision boundary in an intentional direction Training samples that increase FP/FN → renders classifier unusable Adversarial input crafted to cause an intentional misclassification n/a
  • 29. DEMO
  • 32. Why can we do this? vs. Statistical learning models don’t learn concepts the same way that we do. BLINDSPOTS:
  • 33. Adversarial Deep Learning Intuitions 1. Run input x through the classifier model (or substitute/approximate model) 2. Based on model prediction, derive a perturbation tensor that maximizes chances of misclassification: 1. Traverse the manifold to find blind spots in input space; or 2. Linear perturbation in direction of neural network’s cost function gradient; or 3. Select only input dimensions with high saliency* to perturb by the model’s Jacobian matrix 3. Scale the perturbation tensor by some magnitude, resulting in the effective perturbation (δx) to x 1. Larger perturbation == higher probability for misclassification 2. Smaller perturbation == less likely for human detection * saliency: amount of influence a selected dimension has on the entire model’s output
  • 34. Adversarial Deep Learning Intuitions Szegedy, 2013: Traverse the manifold to find blind spots in the input space • Adversarial samples == pockets in the manifold • Difficult to efficiently find by brute force (high dimensional input) • Optimize this search, take gradient of input w.r.t. target output class
  • 35. Adversarial Deep Learning Intuitions Goodfellow, 2015: Linear adversarial perturbation • Developed a linear view of adversarial examples • Can just take the cost function gradient w.r.t. the sample (x) and original predicted class (y) • Easily found by backpropagation
  • 36. Adversarial Deep Learning Intuitions Papernot, 2015: Saliency map + Jacobian matrix perturbation • More complex derivations for why the Jacobian of the learned neural network function is used • Obtained with respect to input features rather than network parameters • Forward propagation is used instead of backpropagation • To reduce probability of human detection, only perturb the dimensions that have the greatest impact on the output (salient dimensions)
  • 37. Threat Model: Adversarial Knowledge Model hyperparameters, variables, training tools Architecture Training data Black box Increasing attacker knowledge
  • 38. Deep Neural Network Attacks Adversary knowledge Attack complexity DIFFICULT EASY Architecture, Training Tools, Hyperparameters Architecture Training data Oracle Labeled Test samples Confidence Reduction Untargeted M isclassification Targeted M isclassification Source/Target M isclassification Murphy, 2012 Szegedy, 2014 Papernot, 2016 Goodfellow, 2016 Xu, 2016 Nguyen, 2014
  • 39. What can you do with limited knowledge? • Quite a lot. • Make good guesses: Infer the methodology from the task • Image classification: ConvNet • Speech recognition: LSTM-RNN • Amazon ML, ML-as-a-service etc.: Shallow feed-forward network • What if you can’t guess?
  • 41. DEMO
  • 42. Black box attack methodology 1. Transferability Adversarial samples that fool model A have a good chance of fooling a previously unseen model B SVM, scikit-learn Decision Tree Matt's Webcorner, Stanford Linear Classifier (Logistic Regression) Spectral Clustering, scikit-learn Feed Forward Neural Network
  • 43. Black box attack methodology 2. Substitute model train a new model by treating the target model’s output as a training labels then, generate adversarial samples with substitute model input data target black box model training label backpropagate black box prediction substitute model
  • 44. Why is this possible? • Transferability? • Still an open research problem • Manifold learning problem • Blind spots • Model vs. Reality dimensionality mismatch • IN GENERAL: • Is the model not learning anything at all?
  • 45. What this means for us • Deep learning algorithms (Machine Learning in general) are susceptible to manipulative attacks • Use with caution in critical deployments • Don’t make false assumptions about what/how the model learns • Evaluate a model’s adversarial resilience - not just accuracy/precision/recall • Spend effort to make models more robust to tampering
  • 46. Defending the machines • Distillation • Train model 2x, feed first DNN output logits into second DNN input layer • Train model with adversarial samples • i.e. ironing out imperfect knowledge learnt in the model • Other miscellaneous tweaks • Special regularization/loss-function methods (simulating adversarial content during training) • DATAGRAD
  • 48. WHY DEEP-PWNING? • lol why not • “Penetration testing” of statistical/machine learning systems • Train models with adversarial samples for increased robustness
  • 49. DEMO
  • 50. PLEASE PLAY WITH IT & CONTRIBUTE!
  • 51. Deep Learning and Privacy • Deep learning also sees challenges in other areas relating to security & privacy • Adversary can reconstruct training samples from a trained black box DNN model (Fredrikson, 2015) • Can we precisely control the learning objective of a DNN model? • Can we train a DNN model without the training agent having complete access to all training data? (Shokri, 2015)
  • 52. WHY IS THIS IMPORTANT?
  • 53. WHY DEEP-PWNING? • MORE CRITICAL SYSTEMS RELY ON MACHINE LEARNING → MORE IMPORTANCE ON ENSURING THEIR ROBUSTNESS • WE NEED PEOPLE WITH BOTH SECURITY AND STATISTICAL SKILL SETS TO DEVELOP ROBUST SYSTEMS AND EVALUATE NEW INFRASTRUCTURE
  • 54. LEARN IT OR BECOME IRRELEVANT