-
Notifications
You must be signed in to change notification settings - Fork 0
/
data-poisoning2.tex
71 lines (59 loc) · 1.49 KB
/
data-poisoning2.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
\documentclass[tikz,border=1cm]{standalone}
\begin{document}
\usetikzlibrary{shapes.geometric, math, positioning}
\definecolor{ACMRed}{RGB}{253, 27, 20}
\definecolor{ACMPurple}{RGB}{101, 1, 107}
\tikzmath{
\yHeader= 1.8;
}
\tikzset{%
a/.style={
thick
},
ar/.style={
thick,
color=ACMRed,
},
box/.style={
rectangle,
draw,
rounded corners,
minimum height=2em,
text width=3.6em,
text centered,
},
hl/.style={
text=ACMRed,
},
hlout/.style={
text=ACMRed,
text width=10em,
},
database/.style={
cylinder,
shape border rotate=90,
aspect=0.25,
draw
}
}
\begin{tikzpicture}[font=\small]
% Header
\node[text=ACMPurple] at (-3, \yHeader) {Training phase};
\node[text=ACMPurple] at (3, \yHeader) {Test phase};
\draw[dashed, thick, color=ACMPurple] (0, \yHeader + 0.1) to (0,-1.3);
\draw[dashed, thick, color=ACMPurple] (-6, 1.5) to (6,1.5);
% Training phase
\node[database] (db) at (-4.5,0) {Data};
\node[box] (model) at (-1,0){Model};
\node[hl, above = 0.5 of db] (backdoor) {Backdoor};
\node[below = 0.2 of db] {Training set};
\draw[a, ->] (db) -- (model) node[above, pos=0.5, text width=4.5em] {Training or update};
\draw[ar, ->] (backdoor) -- (db);
% Testing phase
\node[box] (vmodel) at (3,0) {Model (victim)};
\node[hlout, right= 0.5 of vmodel] (out) {Target label};
\node[] at (5,0.7) {Output};
\draw[ar, ->, text width=4.5em] (0,0) -- (vmodel) node[pos=0.5, above] {Input with backdoor};
\draw[ar, ->] (vmodel) -- (out.west);
\end{tikzpicture}
\end{document}