Skip to main content
. 2024 Jun 30;24(13):4253. doi: 10.3390/s24134253
Algorithm 2 The Proposed Classification Network Algorithm
  • Input: 

    Multi-dimensional tensor representations of malware samples.

  • 1:

    Initialize: Set up neural network parameters, layer configurations, initialize weights and biases.

  • Output: 

    Classification of malware into predefined families.

  • 2:

    for b=1 to B epochs do

  • 3:

       TensorListbSaveMultiDimVectors(.pt) {Vectors from malicious software visualization}

  • 4:

       TensorListb={Tensorii=1,,n}

  • 5:

       TensoriRbatch_size×channels×height×width

  • 6:

       TrainDataconvert_to_numpy(TensorListb[1:0.9n])

  • 7:

       AdjustTrainDatareshape_for_network(TrainData)

  • 8:

       ValidationDataconvert_to_numpy(TensorListb[0.9n+1:n])

  • 9:

       ModelEvaluation(AdjustTrainData,ValidationData)

  • 10:

       Transform s using compressed sensing to μ×s×t

  • 11:

       Network training over 30 layers:

  • 12:

           Layer0:Input(μ×s×t×c)

  • 13:

           Layer1,2:Conv2D(3×3,stride=1,padding=same)

  • 14:

           Layer3:MaxPool2D(3×3,stride=2,padding=same)

  • 15:

           Layer424:ResidualShrinkageBlock(μ,s,t)

  • 16:

           Layer25:BatchNorm(decay=0.9)

  • 17:

           Layer26:ReLU()

  • 18:

           Layer27:GlobalAvgPool()

  • 19:

           Layer28:FullyConnected(softmax)

  • 20:

           Layer29:Momentum(lr=0.1,decay=0.1,step=20,000)

  • 21:

           Layer30:Regression(cross-entropy)

  • 22:

    end for

  • 23:

    return Malware family χ