Manuscript Offprint

arXiv:2610.21695

ShiftQAT: Quantization-Aware Training for the Numerical Contract of a Fixed-Function Edge CNN Accelerator

Oguzhan Buyuksolak, Osman Erman Okman, Mehmet Gorkem Ulkar

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Fixed-function CNN accelerators make edge inference fast and energy-efficient, but they execute only networks that obey a precise numerical contract. On the MAX7800x family, this contract requires power-of-two, per-tensor, symmetric scales, 8-bit activations and biases, integer-only arithmetic, and one statically configured shift per layer. We present ShiftQAT, the quantization-aware training (QAT) flow we developed for this family, which produces networks satisfying the contract by construction. It is the default training path of ai8x-training, the family's open-source training toolchain. ShiftQAT resolves residual, concatenation, and weight-sharing dependencies so that activation scales propagate statically and each layer's requantization reduces to one offline-configured shift. It also trains weights and biases on a joint power-of-two grid that fits the 8-bit bias budget. Among the compared methods, only ShiftQAT satisfies all of the contract's scaling constraints, including signed 8-bit activation storage. Even so, on ImageNet it matches the W8A8 accuracy drop of less constrained QAT methods and stays within 2.9 percentage points of FP32 at W4A8. On MAX78002 silicon, ShiftQAT-trained MobileNetV2 and ResNet-18 classify ImageNet images in 14.6 and 8.4 ms at 5.1 and 2.8 mJ per inference.

1 INTRODUCTION

Deep neural networks are increasingly deployed on battery-powered edge devices, close to the sensors that produce their inputs. General-purpose microcontrollers offer only a few megabytes of memory and limited arithmetic throughput. This has motivated software stacks for running quantized models on MCUs (Lai et al., 2018; David et al., 2021; Lin et al., 2020), as well as dedicated low-power CNN accelerators integrated alongside the MCU core (Giordano et al., 2022; Huang et al., 2024). Quantization is the enabling step for both, because it shrinks the memory footprint and lets inference run in fixed-point arithmetic (Gholami et al., 2022; Nagel et al., 2021).

The quantization literature usually treats hardware friendliness as a spectrum of desirable properties, such as uniform, symmetric, power-of-two, and per-tensor scaling. Methods are then compared by how much accuracy they recover at a given bit-width. Fixed-function accelerators turn these properties into hard requirements. We call the complete set of arithmetic rules that an accelerator's datapath implements its numerical contract. A network either satisfies this contract or cannot be compiled for the device at all. On Analog Devices' MAX7800x family (Analog Devices Inc., 2023), the contract requires power-of-two, per-tensor, symmetric scales, 8-bit storage for activations and biases, and integer-only inference. Each layer has a single shift that is configured offline and cannot rescale dynamically where branches meet (Section 3). Prior hardware-friendly methods each satisfy part of this contract, but none of those we compare satisfies all of it (Tables 2 and 3).

This paper presents ShiftQAT, a QAT flow that produces networks satisfying the full contract by construction. We developed ShiftQAT at Analog Devices as the default quantization-aware training path of ai8x-training, the open-source training toolchain for the MAX7800x family. This paper documents its design, the datapath constraint behind each of its mechanisms, and its evaluation on ImageNet and on MAX78002 silicon. Each of its mechanisms answers a specific constraint of the datapath, and two of them carry the design. The first is static scale propagation. Because the datapath cannot rescale dynamically, ShiftQAT resolves all rescaling before deployment. It folds each layer's activation scale forward into the next layer's bias and shift, so that intermediate layers never recover real-valued scale. This requires positively homogeneous activations and a scale-consistent graph. ShiftQAT therefore resolves every residual addition, concatenation, and shared-weight layer so that propagation remains exact on real topologies. The second is a joint power-of-two weight/bias scale, re-estimated at every training iteration. Once biases have absorbed upstream activation scales and must still fit in 8 bits, weights and biases compete for the same power-of-two grid. Training on

1^{1}Analog Devices, Inc. Correspondence to: Oguzhan Buyuksolak oguzhan.buyuksolak@analog.com.

Preprint.

that grid lets the network adapt to it. The per-layer shift that the hardware applies is computed by training itself. A trained checkpoint therefore maps deterministically to integer weights, 8-bit biases, and shift values, with no separate calibration step.

Our contributions are:

• We formalize the numerical contract of a fixed-function edge CNN accelerator as seven datapath constraints (Table 1). None of the prior methods we compare satisfies all of them.

• We present ShiftQAT, which satisfies the full contract through topology dependency resolution, static scale propagation, and joint power-of-two weight/bias scaling, specified end-to-end in Algorithm 1.

• Under the contract’s scaling constraints, ShiftQAT matches the ImageNet accuracy drop of less constrained QAT methods at W8A8 and stays within 2.9 pp of FP32 at W4A8 on MobileNetV2 and ResNet-18. We quantify the gap to QAT methods that relax the contract at 4 bits.

• We deploy ShiftQAT-trained MobileNetV2 and ResNet-18 end-to-end on MAX78002 silicon and report measured latency, energy, and memory for ImageNet-scale inference on a microcontroller-class device.

• We distill five lessons for building training flows for fixed-function accelerators (Section 6). The complete flow is available as open source in ai8x-training.

Code availability. The code is published at ai8x-training, https://github.com/analogdevicesinc/ai8x-training.

References (25)