CS代考 Since 𝑓𝑓(1, 3) = [2 −1] �3� + 0.5 = −1 + 0.5 = −0.5 < 0, the point (1, 3) i

Since 𝑓𝑓(1, 3) = [2 −1] �3� + 0.5 = −1 + 0.5 = −0.5 < 0, the point (1, 3) is initially classified into Answer to Exercise 1 Class 2, and the corresponding adversarial sample 𝑥𝑥′ = �𝑥𝑥1′ � should be classified into Class 1, i.e., 𝑓𝑓 ( 𝑥𝑥 1′ , 𝑥𝑥 2′ ) > 0 . 𝑥𝑥 2′
𝜕𝜕𝑓𝑓=𝜕𝜕𝜕𝜕∙𝑥𝑥+𝑏𝑏=𝜕𝜕=[2 −1] 𝜕𝜕𝑥𝑥 𝜕𝜕𝑥𝑥

Copyright By PowCoder代写 加微信 powcoder

�2� ← 𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶 ��1�+1∙𝑠𝑠𝑠𝑠𝑠𝑠�� 2 ��� 2 33 2−1
Since 𝑓𝑓(2,2) = [2 −1]�2� + 0.5 = 2 + 0.5 = 2.5 > 0, i.e., (2,2) is classified into the other class, it is the adversarial sample for (1, 3).
In this case, in order to generate an adversarial sample, we perturb a given input in the direction orthogonal to the decision boundary hyperplane.

Answer to Exercise 2
y = v5 + v5
𝑣𝑣=𝑥𝑥=2 −1 1
Forward evaluation trace (start from top to bottom)
𝑣𝑣0 =𝑥𝑥2 =4
𝑣𝑣1=𝑒𝑒𝑣𝑣−1=𝑒𝑒2
𝑣𝑣2 = 𝑣𝑣−1⁄𝑣𝑣0 = 0.5
𝑣𝑣3 =2∙𝑣𝑣0 =8
𝑣𝑣4 = 𝑣𝑣1 − 𝑣𝑣2 = 𝑒𝑒2 − 0.5
𝑣𝑣5 = 𝑣𝑣3 + 𝑣𝑣4 = 𝑒𝑒2 + 7.5 − 𝑦𝑦 = 𝑣𝑣5
v-1 = x1 x1
Forward derivative trace
×2 v3 v0 = x2
1. For calculating 𝜕𝜕𝑥𝑥1 (start from top to bottom)
𝑣𝑣̇ =𝑥𝑥̇=1 −1 1
𝑣𝑣 0̇ = 𝑥𝑥 2̇ = 0
𝑣𝑣̇=𝑒𝑒𝑣𝑣 ∙𝑣𝑣̇=𝑒𝑒2 1 −1
𝑣𝑣̇−1∙𝑣𝑣 −𝑣𝑣 ∙𝑣𝑣̇ 1×4−2×0 1 𝑣𝑣 2̇ = − 1 0 𝑣𝑣 0 2 − 1 0 = 1 6 = 4
𝑣𝑣3̇ =2∙𝑣𝑣0̇ =0
𝑣𝑣 4̇ = 𝑣𝑣 1̇ − 𝑣𝑣 2̇ = 𝑒𝑒 2 − 4
1 𝑣𝑣 5̇ = 𝑣𝑣 3̇ + 𝑣𝑣 4̇ = 𝑒𝑒 2 − 14
𝑦𝑦 ̇ = 𝑣𝑣 5̇ = 𝑒𝑒 2 − 14 𝜕𝜕 𝜕𝜕
𝑣𝑣̇=𝑥𝑥̇=0 𝜕𝜕𝑥𝑥2 −1 1
(start from top to bottom)
2. For calculating
𝑣𝑣 0̇ = 𝑥𝑥 2̇ = 1
𝑣𝑣 ̇ = 𝑒𝑒 𝑣𝑣 ∙ 𝑣𝑣 ̇ =1 0 1 −1
𝑣𝑣 ̇ − 1 ∙ 𝑣𝑣 − 𝑣𝑣8 ∙ 𝑣𝑣 ̇ 0 × 4 − 2 × 1 1 𝑣𝑣̇= 1= =−
−1 0𝑣𝑣02−1 0 16 8
𝑣𝑣 3̇ = 2 ∙ 𝑣𝑣 0̇ =1 2 8 𝑣𝑣 4̇ = 𝑣𝑣 1̇ − 𝑣𝑣 2̇ 8 =
𝑣𝑣 5̇ = 𝑣𝑣 3̇ + 𝑣𝑣 4̇ = 2 𝑦𝑦 ̇ = 𝑣𝑣 5̇ = 2

1 −1 2 4 𝑥𝑥̅=𝑣𝑣̅ =𝑒𝑒−1
Reverse adjoint trace (start from bottom to top)
𝑥𝑥 ̅ 2 = 𝑣𝑣 ̅ 0 = 2 18 𝜕𝜕 𝑣𝑣 1 1
𝑣𝑣̅−1 =𝑣𝑣̅−1 +𝑣𝑣1̅ ∙𝜕𝜕𝑣𝑣1 =−4+1×𝑒𝑒𝑣𝑣−1 =−4+𝑒𝑒2
𝜕𝜕𝑣𝑣−1 𝑣𝑣1 𝑣𝑣̅ =𝑣𝑣̅ +𝑣𝑣̅ ∙ 2 =2+(−1)×�− −1�=2+
002𝜕𝜕𝑣𝑣0 𝑣𝑣02 8
𝑣𝑣̅ =𝑣𝑣̅ ∙𝜕𝜕𝑣𝑣2 =−1×1=−1
−12𝜕𝜕𝑣𝑣 𝑣𝑣4 𝜕𝜕𝑣𝑣 −1 0
𝑣𝑣̅0 = 𝑣𝑣̅3 ∙ 𝜕𝜕𝑣𝑣3 = 2
𝑣𝑣̅ =𝑣𝑣̅ ∙𝜕𝜕𝑣𝑣0=−1 2 4𝜕𝜕𝑣𝑣4
𝑣𝑣̅ =𝑣𝑣̅ ∙𝜕𝜕𝑣𝑣2=1
𝑣𝑣̅=𝑣𝑣̅∙ 1=1 3 5𝜕𝜕𝑣𝑣5
𝑣𝑣̅ =𝑣𝑣̅ ∙𝜕𝜕𝑣𝑣3=1 4 5𝜕𝜕𝑣𝑣5
𝑣𝑣 ̅ 5 = 𝑦𝑦� = 1 4

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com