IEEE Circuits and Systems Magazine - Q3 2023 - 27

Table 7.
Updating real quantized graphs (int8) with SGD is difficult: the transfer learning accuracy falls behind the floatingpoint
counterpart (fp32), even with adaptive learning rate optimizers like Adam [148] and LARS [149]. QAS helps to
bridge the accuracy gap without memory overhead (slightly higher). The numbers are for updating the last two blocks
of MCUNet-5FPS [8] model.
Precision
fp32
int8
Optimizer
SGD-M
SGD-M
Adam [148]
LARS [149]
SGDM+QAS
Accuracy
(%) MCUNet backbone: 23 M MACs, 0.48 M Param)
Cars
56.7
31.2
54.0
5.1
55.2
CF10
86.0
75.4
84.5
64.8
86.9
CF100
63.4
54.5
61.0
39.5
64.6
CUB
56.2
55.1
58.5
9.6
57.8
Flowers
88.8
84.5
87.2
28.8
89.1
Food
67.1
52.5
62.6
46.5
64.4
Avg
Pets VWW Acc.
79.5
81.0
80.1
39.1
88.7
85.4
86.5
85.0
80.9
89.3
73.3
64.9
71.8
39.8
73.5
data type (int8 versus int 32) and thus have scaling
factors of very different magnitude, leading to the zigzag
pattern. To solve the issue, quantization-aware scaling
(QAS) is proposed by compensating the gradient of the
quantized graph according to Equation (3):

GG GG
,
WW W bb Wx b
=⋅ =⋅ ⋅= ⋅
G
−− −−
ss ss22 22
(4)
where sX
−2 is the scaling factor for quantizing input
x (a scalar following [146], note that s = sW ⋅ sX in
Equation (1).  
WG/
Figure 16 (int8+scale). After scaling, the gradient ratios
match the floating-point counterpart. It also improves
transfer learning accuracy (Table 7), matching the accuracy
of the floating-point counterpart without incurring
memory overhead.
3) Experiment Results. The last two blocks in Table 7
show the fine-tuning results (simulating low-cost finetuning)
of MCUNet on various downstream datasets.
With momentum SGD, the training accuracy of the quantized
model (int 8) falls behind the floating-point counterpart
due to the difficulty in optimization. Adaptive
learning rate optimizers like Adam [148] can improve the
accuracy, but it is still lower than the fp32 fine-tuning
results. It also consumes three times more memory due
to second-order momentum, which is not desired in TinyML
settings. LARS [149] does not converge well on
most datasets despite extensive hyperparameter tuning
(of both the learning rate and the " trust coefficient " ). The
aggressive gradient scaling rule of LARS makes the training
unstable. The accuracy gap is closed when applying
QAS, achieving the same accuracy as floating-point training
with no extra memory cost. Figure 16 shows the training
curve of TinyTraining on the Cars dataset with and
without QAS. QAS effectively improves optimization.
THIRD QUARTER 2023
curve with QAS is plotted in
B. Memory-Efficient Sparse Update
Though QAS makes optimizing a quantized model possible,
updating the whole model (or even the last several
blocks) requires a large amount of memory, which
is not affordable for the TinyML setting. To address
this, sparsely updating the layers and the tensors is
proposed.
1) Sparse Layer/Tensor Update. Pruning techniques
prove to be quite successful for achieving sparsity and
reducing model size [58], [59], [60], [61], [62], [63]. Instead
of pruning weights for inference, the gradient during
backpropagation, and updating the model sparsely are
pruned. Given a tight memory budget, updates of the less
important parameters are skipped to reduce memory usage
and computation cost. When updating a linear layer
y = Wx + b (similar analysis applies to convolutions), the
gradient update is GW = f1(Gy,x) and Gb=f2(Gy), given the
output gradient Gy from the later layer Notice that updating
the biases does not require saving the intermediate
activation x, leading to a lighter memory footprint [52],5
while updating the weights is more memory-intensive
but also more expressive. For hardware like microcontrollers,
an extra copy is needed for the updated parameters
since the original ones are stored in read-only
FLASH [8]. Given the different natures of updating rules,
three aspects of the sparse update rule are considered
(Figure 17): (1) Bias update: how many layers should be
backpropagated to and update the biases (bias update
is cheap, the bias terms can be always updated if the
layer is backpropagated). (2) Sparse layer update: select
a subset of layers to update the corresponding weights.
(3) Sparse tensor update: further allow updating a subset
of weight channels to reduce the cost.
5If many layers are updated, the intermediate activation could consume
a large memory [109].
IEEE CIRCUITS AND SYSTEMS MAGAZINE
27

IEEE Circuits and Systems Magazine - Q3 2023

Table of Contents for the Digital Edition of IEEE Circuits and Systems Magazine - Q3 2023

Contents
IEEE Circuits and Systems Magazine - Q3 2023 - Cover1
IEEE Circuits and Systems Magazine - Q3 2023 - Cover2
IEEE Circuits and Systems Magazine - Q3 2023 - Contents
IEEE Circuits and Systems Magazine - Q3 2023 - 2
IEEE Circuits and Systems Magazine - Q3 2023 - 3
IEEE Circuits and Systems Magazine - Q3 2023 - 4
IEEE Circuits and Systems Magazine - Q3 2023 - 5
IEEE Circuits and Systems Magazine - Q3 2023 - 6
IEEE Circuits and Systems Magazine - Q3 2023 - 7
IEEE Circuits and Systems Magazine - Q3 2023 - 8
IEEE Circuits and Systems Magazine - Q3 2023 - 9
IEEE Circuits and Systems Magazine - Q3 2023 - 10
IEEE Circuits and Systems Magazine - Q3 2023 - 11
IEEE Circuits and Systems Magazine - Q3 2023 - 12
IEEE Circuits and Systems Magazine - Q3 2023 - 13
IEEE Circuits and Systems Magazine - Q3 2023 - 14
IEEE Circuits and Systems Magazine - Q3 2023 - 15
IEEE Circuits and Systems Magazine - Q3 2023 - 16
IEEE Circuits and Systems Magazine - Q3 2023 - 17
IEEE Circuits and Systems Magazine - Q3 2023 - 18
IEEE Circuits and Systems Magazine - Q3 2023 - 19
IEEE Circuits and Systems Magazine - Q3 2023 - 20
IEEE Circuits and Systems Magazine - Q3 2023 - 21
IEEE Circuits and Systems Magazine - Q3 2023 - 22
IEEE Circuits and Systems Magazine - Q3 2023 - 23
IEEE Circuits and Systems Magazine - Q3 2023 - 24
IEEE Circuits and Systems Magazine - Q3 2023 - 25
IEEE Circuits and Systems Magazine - Q3 2023 - 26
IEEE Circuits and Systems Magazine - Q3 2023 - 27
IEEE Circuits and Systems Magazine - Q3 2023 - 28
IEEE Circuits and Systems Magazine - Q3 2023 - 29
IEEE Circuits and Systems Magazine - Q3 2023 - 30
IEEE Circuits and Systems Magazine - Q3 2023 - 31
IEEE Circuits and Systems Magazine - Q3 2023 - 32
IEEE Circuits and Systems Magazine - Q3 2023 - 33
IEEE Circuits and Systems Magazine - Q3 2023 - 34
IEEE Circuits and Systems Magazine - Q3 2023 - 35
IEEE Circuits and Systems Magazine - Q3 2023 - 36
IEEE Circuits and Systems Magazine - Q3 2023 - 37
IEEE Circuits and Systems Magazine - Q3 2023 - 38
IEEE Circuits and Systems Magazine - Q3 2023 - 39
IEEE Circuits and Systems Magazine - Q3 2023 - 40
IEEE Circuits and Systems Magazine - Q3 2023 - 41
IEEE Circuits and Systems Magazine - Q3 2023 - 42
IEEE Circuits and Systems Magazine - Q3 2023 - 43
IEEE Circuits and Systems Magazine - Q3 2023 - 44
IEEE Circuits and Systems Magazine - Q3 2023 - 45
IEEE Circuits and Systems Magazine - Q3 2023 - 46
IEEE Circuits and Systems Magazine - Q3 2023 - 47
IEEE Circuits and Systems Magazine - Q3 2023 - 48
IEEE Circuits and Systems Magazine - Q3 2023 - 49
IEEE Circuits and Systems Magazine - Q3 2023 - 50
IEEE Circuits and Systems Magazine - Q3 2023 - 51
IEEE Circuits and Systems Magazine - Q3 2023 - 52
IEEE Circuits and Systems Magazine - Q3 2023 - 53
IEEE Circuits and Systems Magazine - Q3 2023 - 54
IEEE Circuits and Systems Magazine - Q3 2023 - 55
IEEE Circuits and Systems Magazine - Q3 2023 - 56
IEEE Circuits and Systems Magazine - Q3 2023 - 57
IEEE Circuits and Systems Magazine - Q3 2023 - 58
IEEE Circuits and Systems Magazine - Q3 2023 - 59
IEEE Circuits and Systems Magazine - Q3 2023 - 60
IEEE Circuits and Systems Magazine - Q3 2023 - 61
IEEE Circuits and Systems Magazine - Q3 2023 - 62
IEEE Circuits and Systems Magazine - Q3 2023 - 63
IEEE Circuits and Systems Magazine - Q3 2023 - 64
IEEE Circuits and Systems Magazine - Q3 2023 - 65
IEEE Circuits and Systems Magazine - Q3 2023 - 66
IEEE Circuits and Systems Magazine - Q3 2023 - 67
IEEE Circuits and Systems Magazine - Q3 2023 - 68
IEEE Circuits and Systems Magazine - Q3 2023 - 69
IEEE Circuits and Systems Magazine - Q3 2023 - 70
IEEE Circuits and Systems Magazine - Q3 2023 - 71
IEEE Circuits and Systems Magazine - Q3 2023 - 72
IEEE Circuits and Systems Magazine - Q3 2023 - 73
IEEE Circuits and Systems Magazine - Q3 2023 - 74
IEEE Circuits and Systems Magazine - Q3 2023 - 75
IEEE Circuits and Systems Magazine - Q3 2023 - 76
IEEE Circuits and Systems Magazine - Q3 2023 - 77
IEEE Circuits and Systems Magazine - Q3 2023 - 78
IEEE Circuits and Systems Magazine - Q3 2023 - 79
IEEE Circuits and Systems Magazine - Q3 2023 - 80
IEEE Circuits and Systems Magazine - Q3 2023 - 81
IEEE Circuits and Systems Magazine - Q3 2023 - 82
IEEE Circuits and Systems Magazine - Q3 2023 - 83
IEEE Circuits and Systems Magazine - Q3 2023 - 84
IEEE Circuits and Systems Magazine - Q3 2023 - 85
IEEE Circuits and Systems Magazine - Q3 2023 - 86
IEEE Circuits and Systems Magazine - Q3 2023 - 87
IEEE Circuits and Systems Magazine - Q3 2023 - 88
IEEE Circuits and Systems Magazine - Q3 2023 - Cover3
IEEE Circuits and Systems Magazine - Q3 2023 - Cover4
https://www.nxtbook.com/nxtbooks/ieee/circuitsandsystems_2023Q3
https://www.nxtbook.com/nxtbooks/ieee/circuitsandsystems_2023Q2
https://www.nxtbook.com/nxtbooks/ieee/circuitsandsystems_2023Q1
https://www.nxtbook.com/nxtbooks/ieee/circuitsandsystems_2022Q4
https://www.nxtbook.com/nxtbooks/ieee/circuitsandsystems_2022Q3
https://www.nxtbook.com/nxtbooks/ieee/circuitsandsystems_2022Q2
https://www.nxtbook.com/nxtbooks/ieee/circuitsandsystems_2022Q1
https://www.nxtbook.com/nxtbooks/ieee/circuitsandsystems_2021Q4
https://www.nxtbook.com/nxtbooks/ieee/circuitsandsystems_2021q3
https://www.nxtbook.com/nxtbooks/ieee/circuitsandsystems_2021q2
https://www.nxtbook.com/nxtbooks/ieee/circuitsandsystems_2021q1
https://www.nxtbook.com/nxtbooks/ieee/circuitsandsystems_2020q4
https://www.nxtbook.com/nxtbooks/ieee/circuitsandsystems_2020q3
https://www.nxtbook.com/nxtbooks/ieee/circuitsandsystems_2020q2
https://www.nxtbook.com/nxtbooks/ieee/circuitsandsystems_2020q1
https://www.nxtbook.com/nxtbooks/ieee/circuitsandsystems_2019q4
https://www.nxtbook.com/nxtbooks/ieee/circuitsandsystems_2019q3
https://www.nxtbook.com/nxtbooks/ieee/circuitsandsystems_2019q2
https://www.nxtbook.com/nxtbooks/ieee/circuitsandsystems_2019q1
https://www.nxtbook.com/nxtbooks/ieee/circuitsandsystems_2018q4
https://www.nxtbook.com/nxtbooks/ieee/circuitsandsystems_2018q3
https://www.nxtbook.com/nxtbooks/ieee/circuitsandsystems_2018q2
https://www.nxtbook.com/nxtbooks/ieee/circuitsandsystems_2018q1
https://www.nxtbookmedia.com