SlideShare a Scribd company logo
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)

More Related Content

PDF
Battista Biggio @ ECML PKDD 2013 - Evasion attacks against machine learning a...
PDF
Battista Biggio @ AISec 2014 - Poisoning Behavioral Malware Clustering
PDF
Secure Kernel Machines against Evasion Attacks
PDF
Battista Biggio @ ICML 2015 - "Is Feature Selection Secure against Training D...
PDF
Battista Biggio @ AISec 2013 - Is Data Clustering in Adversarial Settings Sec...
PDF
Battista Biggio, Invited Keynote @ AISec 2014 - On Learning and Recognition o...
PDF
Battista Biggio @ S+SSPR2014, Joensuu, Finland -- Poisoning Complete-Linkage ...
PDF
Is Deep Learning Safe for Robot Vision? Adversarial Examples against the iCub...
Battista Biggio @ ECML PKDD 2013 - Evasion attacks against machine learning a...
Battista Biggio @ AISec 2014 - Poisoning Behavioral Malware Clustering
Secure Kernel Machines against Evasion Attacks
Battista Biggio @ ICML 2015 - "Is Feature Selection Secure against Training D...
Battista Biggio @ AISec 2013 - Is Data Clustering in Adversarial Settings Sec...
Battista Biggio, Invited Keynote @ AISec 2014 - On Learning and Recognition o...
Battista Biggio @ S+SSPR2014, Joensuu, Finland -- Poisoning Complete-Linkage ...
Is Deep Learning Safe for Robot Vision? Adversarial Examples against the iCub...

What's hot (7)

PDF
Battista Biggio @ MCS 2015, June 29 - July 1, Guenzburg, Germany: "1.5-class ...
PDF
Machine Learning under Attack: Vulnerability Exploitation and Security Measures
PDF
“Practical Guide to Implementing Deep Neural Network Inferencing at the Edge,...
PDF
Workshop - Introduction to Machine Learning with R
PPTX
Using classifiers to compute similarities between face images. Prof. Lior Wol...
PDF
Research of adversarial example on a deep neural network
PDF
Automated In-memory Malware/Rootkit Detection via Binary Analysis and Machin...
Battista Biggio @ MCS 2015, June 29 - July 1, Guenzburg, Germany: "1.5-class ...
Machine Learning under Attack: Vulnerability Exploitation and Security Measures
“Practical Guide to Implementing Deep Neural Network Inferencing at the Edge,...
Workshop - Introduction to Machine Learning with R
Using classifiers to compute similarities between face images. Prof. Lior Wol...
Research of adversarial example on a deep neural network
Automated In-memory Malware/Rootkit Detection via Binary Analysis and Machin...
Ad

Viewers also liked (11)

PDF
Sparse Support Faces - Battista Biggio - Int'l Conf. Biometrics, ICB 2015, Ph...
PDF
Battista Biggio @ ICML2012: "Poisoning attacks against support vector machines"
PDF
Making neural programming architectures generalize via recursion
PDF
Generative adversarial networks
PPT
kls xii : Bab iii pers dlm masyarakat
PDF
Jft 13-desktop-optical-power-meter-jfopt
PPTX
The Creative Minds: Steps in enhancing your creativity
PDF
Comm skills1
PPT
2008111807581919
PDF
Spinal cord trauma
PDF
Ten years analysing large code bases: a perspective
Sparse Support Faces - Battista Biggio - Int'l Conf. Biometrics, ICB 2015, Ph...
Battista Biggio @ ICML2012: "Poisoning attacks against support vector machines"
Making neural programming architectures generalize via recursion
Generative adversarial networks
kls xii : Bab iii pers dlm masyarakat
Jft 13-desktop-optical-power-meter-jfopt
The Creative Minds: Steps in enhancing your creativity
Comm skills1
2008111807581919
Spinal cord trauma
Ten years analysing large code bases: a perspective
Ad

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

PDF
Deep Learning Opening Workshop - Robust Information Bottleneck - Poh-Ling Loh...
PDF
Lec17 sparse signal processing & applications
DOCX
dl unit 4.docx for deep learning in b tech
PPTX
adversarial robustness lecture
PPT
Keyboards, Privacy, and Sensor Webs (Part II)
PDF
And Then There Are Algorithms - Danilo Poccia - Codemotion Rome 2018
PDF
lec3_annotated.pdf ml csci 567 vatsal sharan
PPT
Machine Learning and Statistical Analysis
PPT
Machine Learning and Statistical Analysis
PPT
Machine Learning and Statistical Analysis
PPT
Machine Learning and Statistical Analysis
PPT
Machine Learning and Statistical Analysis
PPT
Machine Learning and Statistical Analysis
PPT
Machine Learning and Statistical Analysis
PPTX
Subverting Machine Learning Detections for fun and profit
PPT
Lecture 1
PDF
chapter 11 HANDS ON MACHINE LEARNING SCIKIT
PDF
Sparsenet
PDF
Doubly Accelerated Stochastic Variance Reduced Gradient Methods for Regulariz...
PPTX
Group 10 - DNN Presentation for UOM.pptx
Deep Learning Opening Workshop - Robust Information Bottleneck - Poh-Ling Loh...
Lec17 sparse signal processing & applications
dl unit 4.docx for deep learning in b tech
adversarial robustness lecture
Keyboards, Privacy, and Sensor Webs (Part II)
And Then There Are Algorithms - Danilo Poccia - Codemotion Rome 2018
lec3_annotated.pdf ml csci 567 vatsal sharan
Machine Learning and Statistical Analysis
Machine Learning and Statistical Analysis
Machine Learning and Statistical Analysis
Machine Learning and Statistical Analysis
Machine Learning and Statistical Analysis
Machine Learning and Statistical Analysis
Machine Learning and Statistical Analysis
Subverting Machine Learning Detections for fun and profit
Lecture 1
chapter 11 HANDS ON MACHINE LEARNING SCIKIT
Sparsenet
Doubly Accelerated Stochastic Variance Reduced Gradient Methods for Regulariz...
Group 10 - DNN Presentation for UOM.pptx

More from Pluribus One (18)

PDF
Smart Textiles - Prospettive di mercato - Davide Ariu
PDF
Wild Patterns: A Half-day Tutorial on Adversarial Machine Learning - 2019 Int...
PDF
Wild Patterns: A Half-day Tutorial on Adversarial Machine Learning. ICMLC 201...
PDF
Wild patterns - Ten years after the rise of Adversarial Machine Learning - Ne...
PDF
WILD PATTERNS - Introduction to Adversarial Machine Learning - ITASEC 2019
PDF
Zahid Akhtar - Ph.D. Defense Slides
PDF
Design of robust classifiers for adversarial environments - Systems, Man, and...
PDF
Robustness of multimodal biometric verification systems under realistic spoof...
PDF
Support Vector Machines Under Adversarial Label Noise (ACML 2011) - Battista ...
PDF
Understanding the risk factors of learning in adversarial environments
PDF
Amilab IJCB 2011 Poster
PDF
Ariu - Workshop on Artificial Intelligence and Security - 2011
PDF
Ariu - Workshop on Applications of Pattern Analysis 2010 - Poster
PDF
Ariu - Workshop on Multiple Classifier Systems - 2011
PDF
Ariu - Workshop on Applications of Pattern Analysis
PDF
Ariu - Workshop on Multiple Classifier Systems 2011
PDF
Robustness of Multimodal Biometric Systems under Realistic Spoof Attacks agai...
PDF
Wiamis2010 poster
Smart Textiles - Prospettive di mercato - Davide Ariu
Wild Patterns: A Half-day Tutorial on Adversarial Machine Learning - 2019 Int...
Wild Patterns: A Half-day Tutorial on Adversarial Machine Learning. ICMLC 201...
Wild patterns - Ten years after the rise of Adversarial Machine Learning - Ne...
WILD PATTERNS - Introduction to Adversarial Machine Learning - ITASEC 2019
Zahid Akhtar - Ph.D. Defense Slides
Design of robust classifiers for adversarial environments - Systems, Man, and...
Robustness of multimodal biometric verification systems under realistic spoof...
Support Vector Machines Under Adversarial Label Noise (ACML 2011) - Battista ...
Understanding the risk factors of learning in adversarial environments
Amilab IJCB 2011 Poster
Ariu - Workshop on Artificial Intelligence and Security - 2011
Ariu - Workshop on Applications of Pattern Analysis 2010 - Poster
Ariu - Workshop on Multiple Classifier Systems - 2011
Ariu - Workshop on Applications of Pattern Analysis
Ariu - Workshop on Multiple Classifier Systems 2011
Robustness of Multimodal Biometric Systems under Realistic Spoof Attacks agai...
Wiamis2010 poster

Recently uploaded (20)

PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPTX
Cell Types and Its function , kingdom of life
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PPTX
master seminar digital applications in india
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
01-Introduction-to-Information-Management.pdf
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
Basic Mud Logging Guide for educational purpose
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
O5-L3 Freight Transport Ops (International) V1.pdf
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Cell Types and Its function , kingdom of life
O7-L3 Supply Chain Operations - ICLT Program
2.FourierTransform-ShortQuestionswithAnswers.pdf
STATICS OF THE RIGID BODIES Hibbelers.pdf
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Microbial diseases, their pathogenesis and prophylaxis
Abdominal Access Techniques with Prof. Dr. R K Mishra
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
master seminar digital applications in india
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
01-Introduction-to-Information-Management.pdf
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Basic Mud Logging Guide for educational purpose
Final Presentation General Medicine 03-08-2024.pptx
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx

On Security and Sparsity of Linear Classifiers for Adversarial Settings