On Security and Sparsity of Linear Classifiers for Adversarial Settings

Pluribus One
Pluribus OnePluribus One
Pattern	Recognition
and	Applications Lab
University
of	Cagliari,	Italy
Department	of
Electrical	and	Electronic	
Engineering
On Security and Sparsity of Linear Classifiers
for Adversarial Settings
Ambra	Demontis,	Paolo	Russu,	Battista	Biggio,
Giorgio	Fumera,	Fabio	Roli
battista.biggio@diee.unica.it
Dept.	Of	Electrical and	Electronic	Engineering
University of	Cagliari,	Italy
S+SSPR,	Merida,	Mexico,	Dec.	1	2016
http://pralab.diee.unica.it
Recent Applications of Machine Learning
• Consumer technologies for personal applications
2
http://pralab.diee.unica.it
iPhone 5s with Fingerprint Recognition…
3
http://pralab.diee.unica.it
… Cracked a Few Days After Its Release
4
EU FP7 Project: TABULA RASA
http://pralab.diee.unica.it
New Challenges for Machine Learning
• The use of machine learning opens up new big possibilities
but also new security risks
• Proliferation and sophistication
of attacks and cyberthreats
– Skilled / economically-motivated
attackers (e.g., ransomware)
• Several security systems use machine learning to detect attacks
– but … is machine learning secure enough?
5
http://pralab.diee.unica.it
Classifier Evasion
6
http://pralab.diee.unica.it
Is Machine Learning Secure Enough?
• Problem: how to evade a linear (trained) classifier?
Start 2007
with a bang!
Make WBFS
YOUR
PORTFOLIO’s
first winner
of the year
...
start
bang
portfolio
winner
year
...
university
campus
1
1
1
1
1
...
0
0
+6 > 0, SPAM
(correctly	classified)
f (x) = sign(wT
x)
x
start
bang
portfolio
winner
year
...
university
campus
+2
+1
+1
+1
+1
...
-3
-4
w
x’
St4rt 2007
with a b4ng!
Make WBFS
YOUR
PORTFOLIO’s
first winner
of the year
... campus
start
bang
portfolio
winner
year
...
university
campus
0
0
1
1
1
...
0
1
+3 -4 < 0, HAM
(misclassified	email)
f (x) = sign(wT
x)
7
http://pralab.diee.unica.it
Evasion of Linear Classifiers
• Formalized as an optimization problem
– Goal: to minimize the discriminant function
• i.e., to be classified as legitimate with the maximum confidence
– Constraints on input data manipulation
• e.g., number of words to be modified in each spam email
8
min$%	 𝑤(
𝑥′
𝑠. 𝑡. 					𝑑(𝑥, 𝑥%
) ≤ 𝑑34$
http://pralab.diee.unica.it
Dense and Sparse Evasion Attacks
• L2-norm noise corresponds to
dense evasion attacks
– All features are modified by
a small amount
• L1-norm noise corresponds to
sparse evasion attacks
– Few features are significantly
modified
9
min$% 𝑤(
𝑥′
𝑠. 𝑡. |𝑥 − 𝑥%
|7
7
≤ 𝑑34$
min$% 𝑤(
𝑥%
𝑠. 𝑡. |𝑥 − 𝑥%
|8 ≤ 𝑑34$
http://pralab.diee.unica.it
Examples on Handwritten Digits (9 vs 8)
10
original sample
5 10 15 20 25
5
10
15
20
25
SVM g(x)= −0.216
5 10 15 20 25
5
10
15
20
25
Sparse	evasion	attacks	
(l1-norm	constrained)
original sample
5 10 15 20 25
5
10
15
20
25
cSVM g(x)= 0.242
5 10 15 20 25
5
10
15
20
25
Dense	evasion	attacks	
(l2-norm	constrained)
manipulated sample
manipulated sample
http://pralab.diee.unica.it
Robustness and Regularization
11
http://pralab.diee.unica.it
• SVM learning is equivalent to a robust optimization problem
Robustness and Regularization
[Xu et al., JMLR 2009]
12
min
w,b
1
2
wT
w+C max 0,1− yi f (xi )( )
i
∑ min
w,b
max
ui∈U
max 0,1− yi f (xi +ui )( )
i
∑
1/margin classification error on
training	data	(hinge loss) bounded	perturbation!
http://pralab.diee.unica.it
Generalizing to Other Norms
• Optimal regularizer should use dual norm of noise uncertainty sets
13
l2-norm regularization is
optimal against l2-norm noise!
Infinity-norm regularization is
optimal against l1-norm noise!
min
w,b
1
2
wT
w+C max 0,1− yi f (xi )( )
i
∑ min
w,b
w ∞
+C max 0,1− yi f (xi )( )
i
∑ , w ∞
= max
i=1,...,d
wi
http://pralab.diee.unica.it
Interesting Fact
• Infinity-norm SVM is more secure against L1 attacks as it bounds
the maximum absolute value of the feature weights
• This explains the heuristic intuition of using more uniform feature
weights in previous work [Kolcz and Teo, 2009; Biggio et al., 2010]
14
weights
weights
http://pralab.diee.unica.it
Security and Sparsity of Linear Classifiers
15
http://pralab.diee.unica.it
Security vs Sparsity
• Problem: SVM and Infinity-norm SVM provide dense solutions!
• Trade-off between security (to l2 or l1 attacks) and sparsity
– Sparsity reduces computational complexity at test time!
16
weights
weights
http://pralab.diee.unica.it
Elastic-Net Regularization
[H. Zou & T. Hastie, 2005]
• Originally proposed for feature selection
– to group correlated features together
• Trade-off between sparsity and security against l2-norm attacks
17
𝑤 9:;9< = 1 − 𝜆 𝑤 8 +	
𝜆
2
𝑤 7
7
elastic	net l1 l2
http://pralab.diee.unica.it
Octagonal Regularization
• Trade-off between sparsity and security against l1-norm attacks
18
𝑤 BCD; = 1 − 𝜌 𝑤 8 + 	𝜌 𝑤 F
octagonal l1 infinity	(max)
http://pralab.diee.unica.it
Experimental Analysis
19
http://pralab.diee.unica.it
Linear Classifiers
• SVM
– quadratic prog.
• Infinity-norm SVM
– linear prog.
• 1-norm SVM
– linear prog.
• Elastic-net SVM
– quadratic prog.
• Octagonal SVM
– linear prog.
20
min
G,H
1
2
𝑤 7
7
+ 𝐶 J max	 0,1 − 𝑦O 𝑓 𝑥O
;
OQ8
min
G,H
𝑤 F + 𝐶 J max	 0,1 − 𝑦O 𝑓 𝑥O
;
OQ8
min
G,H
𝑤 8 + 𝐶 J max	 0,1 − 𝑦O 𝑓 𝑥O
;
OQ8
min
G,H
1 − 𝜆 𝑤 8 +	
𝜆
2
𝑤 7
7
+ 𝐶 J max	 0,1 − 𝑦O 𝑓 𝑥O
;
OQ8
min
G,H
1 − 𝜌 𝑤 8 + 	𝜌 𝑤 F + 𝐶 J max	 0,1 − 𝑦O 𝑓 𝑥O
;
OQ8
𝑓 𝑥 = 𝑤( 𝑥 + 𝑏
http://pralab.diee.unica.it
Security and Sparsity Measures
• Sparsity
– Fraction of weights equal to zero
• Security (Weight Evenness)
– E=1/d if only one weight is different from zero
– E=1 if all weights are equal in absolute value
• Parameter selection with 5-fold cross-validation optimizing:
AUC + 0.1 S + 0.1 E
21
𝑆 =
1
𝑑
𝑤T|𝑤T = 0, 𝑘 = 1, … , 𝑑
𝐸 =
1
𝑑
𝑤 8
𝑤 F
∈ [
1
𝑑
, 1]
http://pralab.diee.unica.it
Results on Spam Filtering
Sparse Evasion Attack
• 5000 samples from TREC 07 (spam/ham emails)
• 200 features (words) selected to maximize information gain
• Results averaged on 5 repetitions, using 500 TR/TS samples
• (S,E) measures reported in the legend (in %)
22
0 10 20 30 40
0
0.2
0.4
0.6
0.8
1
Spam Filtering
AUC10%
d max
SVM (0, 37)
∞−norm (4, 96)
1−norm (86, 4)
el−net (67, 6)
8gon (12, 88)
maximum	number	of	words	modified	in	each	spam
http://pralab.diee.unica.it
Results on PDF Malware Detection
Sparse Evasion Attack
• PDF: hierarchy of interconnected objects (keyword/value pairs)
23
0 20 40 60 80
0
0.2
0.4
0.6
0.8
1
PDF Malware DetectionAUC10%
d max
SVM (0, 47)
∞−norm (0, 100)
1−norm (91, 2)
el−net (55, 13)
8gon (69, 29)
maximum	number	of	keywords	added in	each	malicious	PDF	file
/Type 2
/Page 1
/Encoding 1
…
13	0	obj
<<	/Kids	[	1	0	R	11	0	R	]
/Type	/Page
... >>	end	obj
17	0	obj
<<	/Type	/Encoding	...>>
endobj
Features:	keyword	count
11,500	samples
5	reps	- 500	TR/TS	samples
114	features	(keywords)
selected	with	information	gain
http://pralab.diee.unica.it
Conclusions and Future Work
• We have shed light on the theoretical and practical implications
of sparsity and security in linear classifiers
• We have defined a novel regularizer to tune the trade-off
between sparsity and security against sparse evasion attacks
• Future work
– To investigate a similar trade-off for
• poisoning (training) attacks
• nonlinear classifiers
24
http://pralab.diee.unica.it
?Any questions
Thanks for	your attention!
26
http://pralab.diee.unica.it
Limited-Knowledge (LK) attacks
26
PD(X,Y)data
Surrogate
training data
f(x)
Send queries
Get labels
Learn
surrogate
classifier
f’(x)
1 of 26

Recommended

Battista Biggio @ ECML PKDD 2013 - Evasion attacks against machine learning a... by
Battista Biggio @ ECML PKDD 2013 - Evasion attacks against machine learning a...Battista Biggio @ ECML PKDD 2013 - Evasion attacks against machine learning a...
Battista Biggio @ ECML PKDD 2013 - Evasion attacks against machine learning a...Pluribus One
1.7K views16 slides
Battista Biggio @ AISec 2014 - Poisoning Behavioral Malware Clustering by
Battista Biggio @ AISec 2014 - Poisoning Behavioral Malware ClusteringBattista Biggio @ AISec 2014 - Poisoning Behavioral Malware Clustering
Battista Biggio @ AISec 2014 - Poisoning Behavioral Malware ClusteringPluribus One
2.1K views19 slides
Secure Kernel Machines against Evasion Attacks by
Secure Kernel Machines against Evasion AttacksSecure Kernel Machines against Evasion Attacks
Secure Kernel Machines against Evasion AttacksPluribus One
843 views30 slides
Battista Biggio @ ICML 2015 - "Is Feature Selection Secure against Training D... by
Battista Biggio @ ICML 2015 - "Is Feature Selection Secure against Training D...Battista Biggio @ ICML 2015 - "Is Feature Selection Secure against Training D...
Battista Biggio @ ICML 2015 - "Is Feature Selection Secure against Training D...Pluribus One
3.2K views19 slides
Battista Biggio @ AISec 2013 - Is Data Clustering in Adversarial Settings Sec... by
Battista Biggio @ AISec 2013 - Is Data Clustering in Adversarial Settings Sec...Battista Biggio @ AISec 2013 - Is Data Clustering in Adversarial Settings Sec...
Battista Biggio @ AISec 2013 - Is Data Clustering in Adversarial Settings Sec...Pluribus One
1.2K views22 slides
Battista Biggio, Invited Keynote @ AISec 2014 - On Learning and Recognition o... by
Battista Biggio, Invited Keynote @ AISec 2014 - On Learning and Recognition o...Battista Biggio, Invited Keynote @ AISec 2014 - On Learning and Recognition o...
Battista Biggio, Invited Keynote @ AISec 2014 - On Learning and Recognition o...Pluribus One
883 views40 slides

More Related Content

What's hot

Battista Biggio @ MCS 2015, June 29 - July 1, Guenzburg, Germany: "1.5-class ... by
Battista Biggio @ MCS 2015, June 29 - July 1, Guenzburg, Germany: "1.5-class ...Battista Biggio @ MCS 2015, June 29 - July 1, Guenzburg, Germany: "1.5-class ...
Battista Biggio @ MCS 2015, June 29 - July 1, Guenzburg, Germany: "1.5-class ...Pluribus One
700 views15 slides
Machine Learning under Attack: Vulnerability Exploitation and Security Measures by
Machine Learning under Attack: Vulnerability Exploitation and Security MeasuresMachine Learning under Attack: Vulnerability Exploitation and Security Measures
Machine Learning under Attack: Vulnerability Exploitation and Security MeasuresPluribus One
2.5K views55 slides
“Practical Guide to Implementing Deep Neural Network Inferencing at the Edge,... by
“Practical Guide to Implementing Deep Neural Network Inferencing at the Edge,...“Practical Guide to Implementing Deep Neural Network Inferencing at the Edge,...
“Practical Guide to Implementing Deep Neural Network Inferencing at the Edge,...Edge AI and Vision Alliance
808 views34 slides
Workshop - Introduction to Machine Learning with R by
Workshop - Introduction to Machine Learning with RWorkshop - Introduction to Machine Learning with R
Workshop - Introduction to Machine Learning with RShirin Elsinghorst
39.5K views60 slides
Using classifiers to compute similarities between face images. Prof. Lior Wol... by
Using classifiers to compute similarities between face images. Prof. Lior Wol...Using classifiers to compute similarities between face images. Prof. Lior Wol...
Using classifiers to compute similarities between face images. Prof. Lior Wol...yaevents
2K views54 slides
Research of adversarial example on a deep neural network by
Research of adversarial example on a deep neural networkResearch of adversarial example on a deep neural network
Research of adversarial example on a deep neural networkNAVER Engineering
1.3K views58 slides

What's hot(7)

Battista Biggio @ MCS 2015, June 29 - July 1, Guenzburg, Germany: "1.5-class ... by Pluribus One
Battista Biggio @ MCS 2015, June 29 - July 1, Guenzburg, Germany: "1.5-class ...Battista Biggio @ MCS 2015, June 29 - July 1, Guenzburg, Germany: "1.5-class ...
Battista Biggio @ MCS 2015, June 29 - July 1, Guenzburg, Germany: "1.5-class ...
Pluribus One700 views
Machine Learning under Attack: Vulnerability Exploitation and Security Measures by Pluribus One
Machine Learning under Attack: Vulnerability Exploitation and Security MeasuresMachine Learning under Attack: Vulnerability Exploitation and Security Measures
Machine Learning under Attack: Vulnerability Exploitation and Security Measures
Pluribus One2.5K views
“Practical Guide to Implementing Deep Neural Network Inferencing at the Edge,... by Edge AI and Vision Alliance
“Practical Guide to Implementing Deep Neural Network Inferencing at the Edge,...“Practical Guide to Implementing Deep Neural Network Inferencing at the Edge,...
“Practical Guide to Implementing Deep Neural Network Inferencing at the Edge,...
Workshop - Introduction to Machine Learning with R by Shirin Elsinghorst
Workshop - Introduction to Machine Learning with RWorkshop - Introduction to Machine Learning with R
Workshop - Introduction to Machine Learning with R
Shirin Elsinghorst39.5K views
Using classifiers to compute similarities between face images. Prof. Lior Wol... by yaevents
Using classifiers to compute similarities between face images. Prof. Lior Wol...Using classifiers to compute similarities between face images. Prof. Lior Wol...
Using classifiers to compute similarities between face images. Prof. Lior Wol...
yaevents2K views
Research of adversarial example on a deep neural network by NAVER Engineering
Research of adversarial example on a deep neural networkResearch of adversarial example on a deep neural network
Research of adversarial example on a deep neural network
NAVER Engineering1.3K views
Automated In-memory Malware/Rootkit Detection via Binary Analysis and Machin... by Malachi Jones
Automated In-memory Malware/Rootkit  Detection via Binary Analysis and Machin...Automated In-memory Malware/Rootkit  Detection via Binary Analysis and Machin...
Automated In-memory Malware/Rootkit Detection via Binary Analysis and Machin...
Malachi Jones1.1K views

Viewers also liked

Sparse Support Faces - Battista Biggio - Int'l Conf. Biometrics, ICB 2015, Ph... by
Sparse Support Faces - Battista Biggio - Int'l Conf. Biometrics, ICB 2015, Ph...Sparse Support Faces - Battista Biggio - Int'l Conf. Biometrics, ICB 2015, Ph...
Sparse Support Faces - Battista Biggio - Int'l Conf. Biometrics, ICB 2015, Ph...Pluribus One
707 views15 slides
Battista Biggio @ ICML2012: "Poisoning attacks against support vector machines" by
Battista Biggio @ ICML2012: "Poisoning attacks against support vector machines"Battista Biggio @ ICML2012: "Poisoning attacks against support vector machines"
Battista Biggio @ ICML2012: "Poisoning attacks against support vector machines"Pluribus One
2.1K views13 slides
Making neural programming architectures generalize via recursion by
Making neural programming architectures generalize via recursionMaking neural programming architectures generalize via recursion
Making neural programming architectures generalize via recursionKaty Lee
809 views19 slides
Generative adversarial networks by
Generative adversarial networksGenerative adversarial networks
Generative adversarial networks남주 김
33.3K views110 slides
kls xii : Bab iii pers dlm masyarakat by
kls xii : Bab iii pers dlm masyarakatkls xii : Bab iii pers dlm masyarakat
kls xii : Bab iii pers dlm masyarakatNovii Kanadia
664 views61 slides
Jft 13-desktop-optical-power-meter-jfopt by
Jft 13-desktop-optical-power-meter-jfoptJft 13-desktop-optical-power-meter-jfopt
Jft 13-desktop-optical-power-meter-jfoptJiafu fiber optic cable Co., Ltd
383 views5 slides

Viewers also liked(11)

Sparse Support Faces - Battista Biggio - Int'l Conf. Biometrics, ICB 2015, Ph... by Pluribus One
Sparse Support Faces - Battista Biggio - Int'l Conf. Biometrics, ICB 2015, Ph...Sparse Support Faces - Battista Biggio - Int'l Conf. Biometrics, ICB 2015, Ph...
Sparse Support Faces - Battista Biggio - Int'l Conf. Biometrics, ICB 2015, Ph...
Pluribus One707 views
Battista Biggio @ ICML2012: "Poisoning attacks against support vector machines" by Pluribus One
Battista Biggio @ ICML2012: "Poisoning attacks against support vector machines"Battista Biggio @ ICML2012: "Poisoning attacks against support vector machines"
Battista Biggio @ ICML2012: "Poisoning attacks against support vector machines"
Pluribus One2.1K views
Making neural programming architectures generalize via recursion by Katy Lee
Making neural programming architectures generalize via recursionMaking neural programming architectures generalize via recursion
Making neural programming architectures generalize via recursion
Katy Lee809 views
Generative adversarial networks by 남주 김
Generative adversarial networksGenerative adversarial networks
Generative adversarial networks
남주 김33.3K views
kls xii : Bab iii pers dlm masyarakat by Novii Kanadia
kls xii : Bab iii pers dlm masyarakatkls xii : Bab iii pers dlm masyarakat
kls xii : Bab iii pers dlm masyarakat
Novii Kanadia664 views
The Creative Minds: Steps in enhancing your creativity by History Lovr
The Creative Minds: Steps in enhancing your creativityThe Creative Minds: Steps in enhancing your creativity
The Creative Minds: Steps in enhancing your creativity
History Lovr701 views
Comm skills1 by Raj Kaur
Comm skills1Comm skills1
Comm skills1
Raj Kaur668 views
2008111807581919 by psy101618
20081118075819192008111807581919
2008111807581919
psy101618383 views
Ten years analysing large code bases: a perspective by Roberto Di Cosmo
Ten years analysing large code bases: a perspectiveTen years analysing large code bases: a perspective
Ten years analysing large code bases: a perspective
Roberto Di Cosmo1.1K views

Similar to On Security and Sparsity of Linear Classifiers for Adversarial Settings

Bat Algorithm_Basics by
Bat Algorithm_BasicsBat Algorithm_Basics
Bat Algorithm_BasicsDesignage Solutions
2.9K views21 slides
Lecture3 xing fei-fei by
Lecture3 xing fei-feiLecture3 xing fei-fei
Lecture3 xing fei-feiTianlu Wang
842 views93 slides
Deep Learning Based Voice Activity Detection and Speech Enhancement by
Deep Learning Based Voice Activity Detection and Speech EnhancementDeep Learning Based Voice Activity Detection and Speech Enhancement
Deep Learning Based Voice Activity Detection and Speech EnhancementNAVER Engineering
1.9K views32 slides
Chap 8. Optimization for training deep models by
Chap 8. Optimization for training deep modelsChap 8. Optimization for training deep models
Chap 8. Optimization for training deep modelsYoung-Geun Choi
1.5K views25 slides
System Monitoring by
System MonitoringSystem Monitoring
System Monitoringbutest
339 views18 slides
Data-Driven Recommender Systems by
Data-Driven Recommender SystemsData-Driven Recommender Systems
Data-Driven Recommender Systemsrecsysfr
762 views43 slides

Similar to On Security and Sparsity of Linear Classifiers for Adversarial Settings(20)

Lecture3 xing fei-fei by Tianlu Wang
Lecture3 xing fei-feiLecture3 xing fei-fei
Lecture3 xing fei-fei
Tianlu Wang842 views
Deep Learning Based Voice Activity Detection and Speech Enhancement by NAVER Engineering
Deep Learning Based Voice Activity Detection and Speech EnhancementDeep Learning Based Voice Activity Detection and Speech Enhancement
Deep Learning Based Voice Activity Detection and Speech Enhancement
NAVER Engineering1.9K views
Chap 8. Optimization for training deep models by Young-Geun Choi
Chap 8. Optimization for training deep modelsChap 8. Optimization for training deep models
Chap 8. Optimization for training deep models
Young-Geun Choi1.5K views
System Monitoring by butest
System MonitoringSystem Monitoring
System Monitoring
butest339 views
Data-Driven Recommender Systems by recsysfr
Data-Driven Recommender SystemsData-Driven Recommender Systems
Data-Driven Recommender Systems
recsysfr762 views
Monitoring Motor Patterns of Epileptic Seziures using Wearable Sensor Technol... by AnthonyDalton
Monitoring Motor Patterns of Epileptic Seziures using Wearable Sensor Technol...Monitoring Motor Patterns of Epileptic Seziures using Wearable Sensor Technol...
Monitoring Motor Patterns of Epileptic Seziures using Wearable Sensor Technol...
AnthonyDalton426 views
A review of Noise Suppression Technology for Real-Time Speech Enhancement by IRJET Journal
A review of Noise Suppression Technology for Real-Time Speech EnhancementA review of Noise Suppression Technology for Real-Time Speech Enhancement
A review of Noise Suppression Technology for Real-Time Speech Enhancement
IRJET Journal4 views
Introduction to Machine Learning by AI Summary
Introduction to Machine LearningIntroduction to Machine Learning
Introduction to Machine Learning
AI Summary265 views
Anomaly detection, part 1 by David Khosid
Anomaly detection, part 1Anomaly detection, part 1
Anomaly detection, part 1
David Khosid4.7K views
Accelerated Particle Swarm Optimization and Support Vector Machine for Busine... by Xin-She Yang
Accelerated Particle Swarm Optimization and Support Vector Machine for Busine...Accelerated Particle Swarm Optimization and Support Vector Machine for Busine...
Accelerated Particle Swarm Optimization and Support Vector Machine for Busine...
Xin-She Yang669 views
2021 itu challenge_reinforcement_learning by LASSEMedia
2021 itu challenge_reinforcement_learning2021 itu challenge_reinforcement_learning
2021 itu challenge_reinforcement_learning
LASSEMedia1.4K views
Predictive Analytics by rkpv2002
Predictive AnalyticsPredictive Analytics
Predictive Analytics
rkpv2002332 views
Predictive Analytics by rkpv2002
Predictive AnalyticsPredictive Analytics
Predictive Analytics
rkpv200294 views
Adaptive non-linear-filtering-technique-for-image-restoration by Cemal Ardil
Adaptive non-linear-filtering-technique-for-image-restorationAdaptive non-linear-filtering-technique-for-image-restoration
Adaptive non-linear-filtering-technique-for-image-restoration
Cemal Ardil467 views
TestowanieIoT2016 by kraqa
TestowanieIoT2016TestowanieIoT2016
TestowanieIoT2016
kraqa409 views

More from Pluribus One

Smart Textiles - Prospettive di mercato - Davide Ariu by
Smart Textiles - Prospettive di mercato - Davide Ariu Smart Textiles - Prospettive di mercato - Davide Ariu
Smart Textiles - Prospettive di mercato - Davide Ariu Pluribus One
296 views36 slides
Wild Patterns: A Half-day Tutorial on Adversarial Machine Learning - 2019 Int... by
Wild Patterns: A Half-day Tutorial on Adversarial Machine Learning - 2019 Int...Wild Patterns: A Half-day Tutorial on Adversarial Machine Learning - 2019 Int...
Wild Patterns: A Half-day Tutorial on Adversarial Machine Learning - 2019 Int...Pluribus One
2.3K views151 slides
Wild Patterns: A Half-day Tutorial on Adversarial Machine Learning. ICMLC 201... by
Wild Patterns: A Half-day Tutorial on Adversarial Machine Learning. ICMLC 201...Wild Patterns: A Half-day Tutorial on Adversarial Machine Learning. ICMLC 201...
Wild Patterns: A Half-day Tutorial on Adversarial Machine Learning. ICMLC 201...Pluribus One
2.9K views151 slides
Wild patterns - Ten years after the rise of Adversarial Machine Learning - Ne... by
Wild patterns - Ten years after the rise of Adversarial Machine Learning - Ne...Wild patterns - Ten years after the rise of Adversarial Machine Learning - Ne...
Wild patterns - Ten years after the rise of Adversarial Machine Learning - Ne...Pluribus One
3.5K views155 slides
WILD PATTERNS - Introduction to Adversarial Machine Learning - ITASEC 2019 by
WILD PATTERNS - Introduction to Adversarial Machine Learning - ITASEC 2019WILD PATTERNS - Introduction to Adversarial Machine Learning - ITASEC 2019
WILD PATTERNS - Introduction to Adversarial Machine Learning - ITASEC 2019Pluribus One
3.7K views123 slides
Zahid Akhtar - Ph.D. Defense Slides by
Zahid Akhtar - Ph.D. Defense SlidesZahid Akhtar - Ph.D. Defense Slides
Zahid Akhtar - Ph.D. Defense SlidesPluribus One
5K views46 slides

More from Pluribus One(18)

Smart Textiles - Prospettive di mercato - Davide Ariu by Pluribus One
Smart Textiles - Prospettive di mercato - Davide Ariu Smart Textiles - Prospettive di mercato - Davide Ariu
Smart Textiles - Prospettive di mercato - Davide Ariu
Pluribus One296 views
Wild Patterns: A Half-day Tutorial on Adversarial Machine Learning - 2019 Int... by Pluribus One
Wild Patterns: A Half-day Tutorial on Adversarial Machine Learning - 2019 Int...Wild Patterns: A Half-day Tutorial on Adversarial Machine Learning - 2019 Int...
Wild Patterns: A Half-day Tutorial on Adversarial Machine Learning - 2019 Int...
Pluribus One2.3K views
Wild Patterns: A Half-day Tutorial on Adversarial Machine Learning. ICMLC 201... by Pluribus One
Wild Patterns: A Half-day Tutorial on Adversarial Machine Learning. ICMLC 201...Wild Patterns: A Half-day Tutorial on Adversarial Machine Learning. ICMLC 201...
Wild Patterns: A Half-day Tutorial on Adversarial Machine Learning. ICMLC 201...
Pluribus One2.9K views
Wild patterns - Ten years after the rise of Adversarial Machine Learning - Ne... by Pluribus One
Wild patterns - Ten years after the rise of Adversarial Machine Learning - Ne...Wild patterns - Ten years after the rise of Adversarial Machine Learning - Ne...
Wild patterns - Ten years after the rise of Adversarial Machine Learning - Ne...
Pluribus One3.5K views
WILD PATTERNS - Introduction to Adversarial Machine Learning - ITASEC 2019 by Pluribus One
WILD PATTERNS - Introduction to Adversarial Machine Learning - ITASEC 2019WILD PATTERNS - Introduction to Adversarial Machine Learning - ITASEC 2019
WILD PATTERNS - Introduction to Adversarial Machine Learning - ITASEC 2019
Pluribus One3.7K views
Zahid Akhtar - Ph.D. Defense Slides by Pluribus One
Zahid Akhtar - Ph.D. Defense SlidesZahid Akhtar - Ph.D. Defense Slides
Zahid Akhtar - Ph.D. Defense Slides
Pluribus One5K views
Design of robust classifiers for adversarial environments - Systems, Man, and... by Pluribus One
Design of robust classifiers for adversarial environments - Systems, Man, and...Design of robust classifiers for adversarial environments - Systems, Man, and...
Design of robust classifiers for adversarial environments - Systems, Man, and...
Pluribus One827 views
Robustness of multimodal biometric verification systems under realistic spoof... by Pluribus One
Robustness of multimodal biometric verification systems under realistic spoof...Robustness of multimodal biometric verification systems under realistic spoof...
Robustness of multimodal biometric verification systems under realistic spoof...
Pluribus One708 views
Support Vector Machines Under Adversarial Label Noise (ACML 2011) - Battista ... by Pluribus One
Support Vector Machines Under Adversarial Label Noise (ACML 2011) - Battista ...Support Vector Machines Under Adversarial Label Noise (ACML 2011) - Battista ...
Support Vector Machines Under Adversarial Label Noise (ACML 2011) - Battista ...
Pluribus One1.6K views
Understanding the risk factors of learning in adversarial environments by Pluribus One
Understanding the risk factors of learning in adversarial environmentsUnderstanding the risk factors of learning in adversarial environments
Understanding the risk factors of learning in adversarial environments
Pluribus One675 views
Amilab IJCB 2011 Poster by Pluribus One
Amilab IJCB 2011 PosterAmilab IJCB 2011 Poster
Amilab IJCB 2011 Poster
Pluribus One573 views
Ariu - Workshop on Artificial Intelligence and Security - 2011 by Pluribus One
Ariu - Workshop on Artificial Intelligence and Security - 2011Ariu - Workshop on Artificial Intelligence and Security - 2011
Ariu - Workshop on Artificial Intelligence and Security - 2011
Pluribus One883 views
Ariu - Workshop on Applications of Pattern Analysis 2010 - Poster by Pluribus One
Ariu - Workshop on Applications of Pattern Analysis 2010 - PosterAriu - Workshop on Applications of Pattern Analysis 2010 - Poster
Ariu - Workshop on Applications of Pattern Analysis 2010 - Poster
Pluribus One422 views
Ariu - Workshop on Multiple Classifier Systems - 2011 by Pluribus One
Ariu - Workshop on Multiple Classifier Systems - 2011Ariu - Workshop on Multiple Classifier Systems - 2011
Ariu - Workshop on Multiple Classifier Systems - 2011
Pluribus One420 views
Ariu - Workshop on Applications of Pattern Analysis by Pluribus One
Ariu - Workshop on Applications of Pattern AnalysisAriu - Workshop on Applications of Pattern Analysis
Ariu - Workshop on Applications of Pattern Analysis
Pluribus One329 views
Ariu - Workshop on Multiple Classifier Systems 2011 by Pluribus One
Ariu - Workshop on Multiple Classifier Systems 2011Ariu - Workshop on Multiple Classifier Systems 2011
Ariu - Workshop on Multiple Classifier Systems 2011
Pluribus One493 views
Robustness of Multimodal Biometric Systems under Realistic Spoof Attacks agai... by Pluribus One
Robustness of Multimodal Biometric Systems under Realistic Spoof Attacks agai...Robustness of Multimodal Biometric Systems under Realistic Spoof Attacks agai...
Robustness of Multimodal Biometric Systems under Realistic Spoof Attacks agai...
Pluribus One1.1K views

Recently uploaded

GCSE Spanish by
GCSE SpanishGCSE Spanish
GCSE SpanishWestHatch
53 views166 slides
UNIDAD 3 6º C.MEDIO.pptx by
UNIDAD 3 6º C.MEDIO.pptxUNIDAD 3 6º C.MEDIO.pptx
UNIDAD 3 6º C.MEDIO.pptxMarcosRodriguezUcedo
139 views32 slides
Jibachha publishing Textbook.docx by
Jibachha publishing Textbook.docxJibachha publishing Textbook.docx
Jibachha publishing Textbook.docxDrJibachhaSahVetphys
53 views14 slides
EIT-Digital_Spohrer_AI_Intro 20231128 v1.pptx by
EIT-Digital_Spohrer_AI_Intro 20231128 v1.pptxEIT-Digital_Spohrer_AI_Intro 20231128 v1.pptx
EIT-Digital_Spohrer_AI_Intro 20231128 v1.pptxISSIP
407 views50 slides
Classification of crude drugs.pptx by
Classification of crude drugs.pptxClassification of crude drugs.pptx
Classification of crude drugs.pptxGayatriPatra14
104 views13 slides
Monthly Information Session for MV Asterix (November) by
Monthly Information Session for MV Asterix (November)Monthly Information Session for MV Asterix (November)
Monthly Information Session for MV Asterix (November)Esquimalt MFRC
91 views26 slides

Recently uploaded(20)

GCSE Spanish by WestHatch
GCSE SpanishGCSE Spanish
GCSE Spanish
WestHatch53 views
EIT-Digital_Spohrer_AI_Intro 20231128 v1.pptx by ISSIP
EIT-Digital_Spohrer_AI_Intro 20231128 v1.pptxEIT-Digital_Spohrer_AI_Intro 20231128 v1.pptx
EIT-Digital_Spohrer_AI_Intro 20231128 v1.pptx
ISSIP407 views
Classification of crude drugs.pptx by GayatriPatra14
Classification of crude drugs.pptxClassification of crude drugs.pptx
Classification of crude drugs.pptx
GayatriPatra14104 views
Monthly Information Session for MV Asterix (November) by Esquimalt MFRC
Monthly Information Session for MV Asterix (November)Monthly Information Session for MV Asterix (November)
Monthly Information Session for MV Asterix (November)
Esquimalt MFRC91 views
The Accursed House by Émile Gaboriau by DivyaSheta
The Accursed House  by Émile GaboriauThe Accursed House  by Émile Gaboriau
The Accursed House by Émile Gaboriau
DivyaSheta234 views
Narration lesson plan by TARIQ KHAN
Narration lesson planNarration lesson plan
Narration lesson plan
TARIQ KHAN64 views
AUDIENCE - BANDURA.pptx by iammrhaywood
AUDIENCE - BANDURA.pptxAUDIENCE - BANDURA.pptx
AUDIENCE - BANDURA.pptx
iammrhaywood131 views
Relationship of psychology with other subjects. by palswagata2003
Relationship of psychology with other subjects.Relationship of psychology with other subjects.
Relationship of psychology with other subjects.
palswagata200377 views

On Security and Sparsity of Linear Classifiers for Adversarial Settings

  • 1. Pattern Recognition and Applications Lab University of Cagliari, Italy Department of Electrical and Electronic Engineering On Security and Sparsity of Linear Classifiers for Adversarial Settings Ambra Demontis, Paolo Russu, Battista Biggio, Giorgio Fumera, Fabio Roli battista.biggio@diee.unica.it Dept. Of Electrical and Electronic Engineering University of Cagliari, Italy S+SSPR, Merida, Mexico, Dec. 1 2016
  • 2. http://pralab.diee.unica.it Recent Applications of Machine Learning • Consumer technologies for personal applications 2
  • 3. http://pralab.diee.unica.it iPhone 5s with Fingerprint Recognition… 3
  • 4. http://pralab.diee.unica.it … Cracked a Few Days After Its Release 4 EU FP7 Project: TABULA RASA
  • 5. http://pralab.diee.unica.it New Challenges for Machine Learning • The use of machine learning opens up new big possibilities but also new security risks • Proliferation and sophistication of attacks and cyberthreats – Skilled / economically-motivated attackers (e.g., ransomware) • Several security systems use machine learning to detect attacks – but … is machine learning secure enough? 5
  • 7. http://pralab.diee.unica.it Is Machine Learning Secure Enough? • Problem: how to evade a linear (trained) classifier? Start 2007 with a bang! Make WBFS YOUR PORTFOLIO’s first winner of the year ... start bang portfolio winner year ... university campus 1 1 1 1 1 ... 0 0 +6 > 0, SPAM (correctly classified) f (x) = sign(wT x) x start bang portfolio winner year ... university campus +2 +1 +1 +1 +1 ... -3 -4 w x’ St4rt 2007 with a b4ng! Make WBFS YOUR PORTFOLIO’s first winner of the year ... campus start bang portfolio winner year ... university campus 0 0 1 1 1 ... 0 1 +3 -4 < 0, HAM (misclassified email) f (x) = sign(wT x) 7
  • 8. http://pralab.diee.unica.it Evasion of Linear Classifiers • Formalized as an optimization problem – Goal: to minimize the discriminant function • i.e., to be classified as legitimate with the maximum confidence – Constraints on input data manipulation • e.g., number of words to be modified in each spam email 8 min$% 𝑤( 𝑥′ 𝑠. 𝑡. 𝑑(𝑥, 𝑥% ) ≤ 𝑑34$
  • 9. http://pralab.diee.unica.it Dense and Sparse Evasion Attacks • L2-norm noise corresponds to dense evasion attacks – All features are modified by a small amount • L1-norm noise corresponds to sparse evasion attacks – Few features are significantly modified 9 min$% 𝑤( 𝑥′ 𝑠. 𝑡. |𝑥 − 𝑥% |7 7 ≤ 𝑑34$ min$% 𝑤( 𝑥% 𝑠. 𝑡. |𝑥 − 𝑥% |8 ≤ 𝑑34$
  • 10. http://pralab.diee.unica.it Examples on Handwritten Digits (9 vs 8) 10 original sample 5 10 15 20 25 5 10 15 20 25 SVM g(x)= −0.216 5 10 15 20 25 5 10 15 20 25 Sparse evasion attacks (l1-norm constrained) original sample 5 10 15 20 25 5 10 15 20 25 cSVM g(x)= 0.242 5 10 15 20 25 5 10 15 20 25 Dense evasion attacks (l2-norm constrained) manipulated sample manipulated sample
  • 12. http://pralab.diee.unica.it • SVM learning is equivalent to a robust optimization problem Robustness and Regularization [Xu et al., JMLR 2009] 12 min w,b 1 2 wT w+C max 0,1− yi f (xi )( ) i ∑ min w,b max ui∈U max 0,1− yi f (xi +ui )( ) i ∑ 1/margin classification error on training data (hinge loss) bounded perturbation!
  • 13. http://pralab.diee.unica.it Generalizing to Other Norms • Optimal regularizer should use dual norm of noise uncertainty sets 13 l2-norm regularization is optimal against l2-norm noise! Infinity-norm regularization is optimal against l1-norm noise! min w,b 1 2 wT w+C max 0,1− yi f (xi )( ) i ∑ min w,b w ∞ +C max 0,1− yi f (xi )( ) i ∑ , w ∞ = max i=1,...,d wi
  • 14. http://pralab.diee.unica.it Interesting Fact • Infinity-norm SVM is more secure against L1 attacks as it bounds the maximum absolute value of the feature weights • This explains the heuristic intuition of using more uniform feature weights in previous work [Kolcz and Teo, 2009; Biggio et al., 2010] 14 weights weights
  • 16. http://pralab.diee.unica.it Security vs Sparsity • Problem: SVM and Infinity-norm SVM provide dense solutions! • Trade-off between security (to l2 or l1 attacks) and sparsity – Sparsity reduces computational complexity at test time! 16 weights weights
  • 17. http://pralab.diee.unica.it Elastic-Net Regularization [H. Zou & T. Hastie, 2005] • Originally proposed for feature selection – to group correlated features together • Trade-off between sparsity and security against l2-norm attacks 17 𝑤 9:;9< = 1 − 𝜆 𝑤 8 + 𝜆 2 𝑤 7 7 elastic net l1 l2
  • 18. http://pralab.diee.unica.it Octagonal Regularization • Trade-off between sparsity and security against l1-norm attacks 18 𝑤 BCD; = 1 − 𝜌 𝑤 8 + 𝜌 𝑤 F octagonal l1 infinity (max)
  • 20. http://pralab.diee.unica.it Linear Classifiers • SVM – quadratic prog. • Infinity-norm SVM – linear prog. • 1-norm SVM – linear prog. • Elastic-net SVM – quadratic prog. • Octagonal SVM – linear prog. 20 min G,H 1 2 𝑤 7 7 + 𝐶 J max 0,1 − 𝑦O 𝑓 𝑥O ; OQ8 min G,H 𝑤 F + 𝐶 J max 0,1 − 𝑦O 𝑓 𝑥O ; OQ8 min G,H 𝑤 8 + 𝐶 J max 0,1 − 𝑦O 𝑓 𝑥O ; OQ8 min G,H 1 − 𝜆 𝑤 8 + 𝜆 2 𝑤 7 7 + 𝐶 J max 0,1 − 𝑦O 𝑓 𝑥O ; OQ8 min G,H 1 − 𝜌 𝑤 8 + 𝜌 𝑤 F + 𝐶 J max 0,1 − 𝑦O 𝑓 𝑥O ; OQ8 𝑓 𝑥 = 𝑤( 𝑥 + 𝑏
  • 21. http://pralab.diee.unica.it Security and Sparsity Measures • Sparsity – Fraction of weights equal to zero • Security (Weight Evenness) – E=1/d if only one weight is different from zero – E=1 if all weights are equal in absolute value • Parameter selection with 5-fold cross-validation optimizing: AUC + 0.1 S + 0.1 E 21 𝑆 = 1 𝑑 𝑤T|𝑤T = 0, 𝑘 = 1, … , 𝑑 𝐸 = 1 𝑑 𝑤 8 𝑤 F ∈ [ 1 𝑑 , 1]
  • 22. http://pralab.diee.unica.it Results on Spam Filtering Sparse Evasion Attack • 5000 samples from TREC 07 (spam/ham emails) • 200 features (words) selected to maximize information gain • Results averaged on 5 repetitions, using 500 TR/TS samples • (S,E) measures reported in the legend (in %) 22 0 10 20 30 40 0 0.2 0.4 0.6 0.8 1 Spam Filtering AUC10% d max SVM (0, 37) ∞−norm (4, 96) 1−norm (86, 4) el−net (67, 6) 8gon (12, 88) maximum number of words modified in each spam
  • 23. http://pralab.diee.unica.it Results on PDF Malware Detection Sparse Evasion Attack • PDF: hierarchy of interconnected objects (keyword/value pairs) 23 0 20 40 60 80 0 0.2 0.4 0.6 0.8 1 PDF Malware DetectionAUC10% d max SVM (0, 47) ∞−norm (0, 100) 1−norm (91, 2) el−net (55, 13) 8gon (69, 29) maximum number of keywords added in each malicious PDF file /Type 2 /Page 1 /Encoding 1 … 13 0 obj << /Kids [ 1 0 R 11 0 R ] /Type /Page ... >> end obj 17 0 obj << /Type /Encoding ...>> endobj Features: keyword count 11,500 samples 5 reps - 500 TR/TS samples 114 features (keywords) selected with information gain
  • 24. http://pralab.diee.unica.it Conclusions and Future Work • We have shed light on the theoretical and practical implications of sparsity and security in linear classifiers • We have defined a novel regularizer to tune the trade-off between sparsity and security against sparse evasion attacks • Future work – To investigate a similar trade-off for • poisoning (training) attacks • nonlinear classifiers 24
  • 26. http://pralab.diee.unica.it Limited-Knowledge (LK) attacks 26 PD(X,Y)data Surrogate training data f(x) Send queries Get labels Learn surrogate classifier f’(x)