Skip to main content
. 2023 Jan 23;25(2):220. doi: 10.3390/e25020220
Algorithm 1 Offline poisoned training sample detection
  • Input :

    Suspicious training data D0, local poisoned data Dp, local benign data Dc, DNN model f.

  • 1:

    Train f using D0, Dp, and Dc

  • 2:

    for all xDp do

  • 3:

        Ax← Deep features of the poisoned data extracted by model f

  • 4:

        Add Ax to the backdoor feature set Ap

  • 5:

    end for

  • 6:

    for all xDc do

  • 7:

        Ax← Deep features of the benign data extracted by model f

  • 8:

        Add Ax to the benign feature set Ac

  • 9:

    end for

  • 10:

    Train fc using Ap and Ac

  • 11:

    for all xD0 do

  • 12:

        Ax← Deep features extracted by model f

  • 13:

        if fcAx=benign then

  • 14:

            Retention

  • 15:

        else

  • 16:

            Delete x from D0

  • 17:

        end if

  • 18:

    end for

  • 19:

    Train f with the cleaned D0 to obtain a no-backdoor DNN model.