Skip to main content
. 2024 Mar 19;26(3):269. doi: 10.3390/e26030269
Algorithm 2 HAG-NET generate adversarial embedding examples
Input: Carrier image Ico, target attack label Tco, accompanying switch, secret message Min, pre-trained target classification network C, maximum training number e.
Output: Encoder parameters , decoder parameters γ and adversarial stego example IE
1: 0 ← rand, γ0← rand, θ0←rand//parameter initialization
2: for  i ←1,…, e do
3:      Mini ← rand
4:     Generating IA by Algorithm 1
5:      IEi  =  Eθi1Ico,Mini
6:      Mouti  =  Di1IEi
7:      If   switch = True  then
8:          I~IA,IEi
9:      Else
10:          I~Ico,IEi
11:      end if
12:      LAi  =  LAAγi1I~
13:     γγi//Update the parameters γ to γi
14:      LEi  =  LEI~
15:      LGi  =  LGAγIEi
16:      LDi  =  LDMini,Mouti
17:      LCi  =  LCIEi,Tco
18:     Backward λE×LEi+λG×LGi+LDi+λC×LCi
19:     Update encoder’s parameters θi and decoder’s parameters i
20 end for
21: θ=θe, =e//Save the optimal parameters of encoder E, decoder D
22: IE = EθIco,Min//Output Adversarial Steganographic example