Research Article

Network Traffic Obfuscation against Traffic Classification

Algorithm 3

Improved BIM using method 2.
Input: classifier f; loss function J; original sample x; authentic label y; disturbance size ; fixed number of iterations n; number of iterations T.
output: adversarial sample.
(1);
(2);
(3) for to do
(4)  get gradient of func f with respect to ;
(5)  //update adversarial sample
(6)  
(7)  if then
(8)   //modify
(9)   
(10)   set all elements>0 in the vector to 0;
(11)   ;
(12)  end if
(13) end for
(14) //according to truncate
(15) set all elements greater than 0 in the vector to ;
 return ;