Research Article
Detection of Trojaning Attack on Neural Networks via Cost of Sample Classification
Algorithm 1
Calculate distribution of node sensitivity.
Input: Untrusted model , test dataset , number of layers in the model | Output: The node sensitivity on each layer | (1) | for each sample in test dataset : | (2) | Calculate the prediction | (3) | Calculate | (4) | Calculate the distribution of node sensitivity of the layer obtained from the sample | (5) | | (6) | while do: | (7) | | (8) | | (9) | end | (10) | end for | (11) | for to do: | (12) | | (13) | end for | (14) | return |
|