Skip to main content
. 2026 Mar 11;26(6):1780. doi: 10.3390/s26061780
Algorithm 1: Dynamic Threat-Aware Quantization
Require: Current threat level τt, thresholds τlow,τmed,τhigh
Ensure: Selected quantization bit-width qbt
  1.     If τ(t) <τlow then

  2.   qbt←4

  3.   Else if τ low ≤ τ(t) < τmed then

  4.   qbt←8

  5.   Else if τmed ≤ τ(t) < τhigh then

  6.   qbt←16

  7. Else

  8.   qbt←32

  9.   End if

  10.   Return  qbt

  11.    Update parameters: θ←θ−η⋅∇ θ L

  12.  end for

  13. Validate model on held-out validation set

  14. Apply learning rate decay if validation loss plateaus

  15. end for

  16. Return θ