arXiv:2609.01683cs.CVSep 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2609.01683

FORGE: Forward-Only Test-Time Adaptation for Integer-Only Vision Models on Microcontrollers

Muhammad Rehan, Haider Ali, Muhammad Ali Munir, Moaz Amjad

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

Abstract

Vision models deployed on microcontrollers (MCUs) are quantized to integer-only arithmetic and run in inference-only runtimes that do not carry the machinery backpropagation needs: the standard tool for adapting a model to the distribution shift (sensor noise, blur, lighting) it meets in the field. Existing forward-only test-time adaptation (TTA) methods either run only on server- or edge-GPU-class models (not true microcontroller integer execution), or require the batch-normalization (BN) layers that integer deployment fuses away. We present a forward-only TTA method that operates on deployed, BN-folded, integer-only convolutional networks. The key observation is that fusing BN into the preceding convolution, a mandatory step for integer inference, destroys the statistics that normalization-based adaptation relies on. We restore adaptation by re-normalizing each folded convolution's per-channel output to its clean training statistics, using only forward-pass estimates. The method (i) recovers most of gradient-based TENT's accuracy gain (+20.9 vs. +24.9 points) and matches forward-only BN adaptation, while being the only method that runs on a folded integer-only model; (ii) needs to adapt only 3 of 21 layers (selected without seeing the test corruptions) to recover 93% of the benefit; (iii) survives single-sample streaming with a batch-size-scaled momentum; and (iv) generalizes across three datasets (up to 200 classes) and two architectures. We validate bit-exact int8 convolution execution and deploy on an ESP32-S3, where, measured with a Nordic PPK2 power profiler, the forward-only adaptation (a lightweight fp32 recalibration around the int8 convolutions) costs only 8.3 mJ (6.8% of inference energy) and 21.9 ms on the deployed SIMD-optimized model: forward-only adaptation is cheap on a real microcontroller.

1 Introduction

On-device vision on microcontrollers is attractive for privacy, latency, and energy: no data leaves the device and no network is required. To fit kilobytes of SRAM and run on integer-only arithmetic units, models are

Figure

Figure 1: Forge in one view. (1) Deploying a CNN to a microcontroller folds batch normalization into the preceding convolutions and quantizes to int8; the normalization statistics that test-time adaptation relies on are baked in, so adaptation out of the box recovers nothing (+0.0). (2) FORGE restores adaptation forward-only: under corruption each folded channel's output distribution drifts (red), and FORGE re-centers it onto its clean training target (β,∣γ∣\beta, |\gamma|) (blue) from running per-channel statistics, using no gradients. (3) On an ESP32-S3 this recovers +20.9 accuracy points at a measured 6.8% extra energy (8.3 mJ) and 21.9 ms on ESP-NN SIMD kernels, profiled with a Nordic PPK2.

quantized to int8 and their batch normalization (BN) layers are folded into the preceding convolutions. This is mandatory for efficient integer inference (TFLite-Micro, CMSIS-NN, ESP-NN), but it has a consequence that is rarely discussed: the deployed model can no longer be adapted.

Models degrade under distribution shift (noise, blur, weather, compression) that they never saw during training (Hendrycks & Dietterich, 2019). On a server, one simply fine-tunes or runs test-time adaptation (TTA). On the deployed MCU model this is out of reach for two compounding reasons. First, the deployed inference-only runtime does not carry the machinery backpropagation needs (an autograd graph, fp32 master weights, optimizer state), so gradient-based TTA such as TENT (Wang et al., 2021) or CoTTA (Wang et al., 2022) does not run on it as deployed; on-device training frameworks can backpropagate through quantized models (Lin et al., 2022; Deutel et al., 2024; Buron et al., 2025), but only by reintroducing that machinery at substantial memory and compute cost (Sec. 2). Second, the forward-only alternative, recalibrating BN statistics (Schneider et al., 2020; Dong et al., 2025), requires BN layers, which folding has removed. The deployed model thus degrades exactly as much as its float counterpart, but none of the existing remedies apply to it.

Recent forward-only TTA methods do not close this gap. FOA (Niu et al., 2024), ZOA (Deng et al., 2025), and PACE (Sójka et al., 2026) are gradient-free but are demonstrated on server- and edge-GPU-class hardware, not under true microcontroller integer execution; PEA (Ma et al., 2026) is gradient-free but does not target quantization; and TinyTTA (Jia et al., 2024) runs on an MCU but is gradient-based (it only reduces backprop memory). None reports the one quantity that matters for a battery device: measured on-device energy.

We close this gap. Our contributions are:

  • We identify and empirically demonstrate the adaptation gap: folding BN for integer deployment removes the statistics that forward-only normalization adaptation needs, eliminating its +20-point recovery (Sec. 3.2).

  • We propose FORGE (Forward-Only Recalibration for the edge), a forward-only per-channel recalibration that restores adaptation on the deployed folded integer-only model, recovering most of gradient-based TENT's gain and matching forward-only BN adaptation, while being uniquely deployable (Sec. 3, Table 2).

  • We show adaptation is needed at only a few layers: 3 of 21 layers, selected on held-out corruptions, recover 93% of the benefit, and adapting the right subset exceeds adapting all layers (Sec. 3.3).

  • We characterize single-sample streaming and show a batch-size-scaled momentum rescues it; and we demonstrate generalization across three datasets (CIFAR-10, CIFAR-100, and Tiny-ImageNet, spanning up to 200 classes) and two architectures.

  • We validate bit-exact int8 convolution execution and deploy on an ESP32-S3, reporting the first measured energy cost of forward-only TTA on an MCU: 8.3 mJ (6.8% of inference energy), 21.9 ms, on ESP-NN SIMD kernels (Sec. 4.7). The adaptation is mixed-precision by design (int8 convolutions with a lightweight fp32 recalibration); we report its data types and costs explicitly (Sec. 4.7).

A central message is that adapting a deployed integer-only model does not require a complex algorithm; it requires recognizing what folding removes and restoring it cheaply. The adaptation step itself is intentionally minimal: no gradients, no learnable parameters, and no extra forward passes. That minimalism is precisely what makes it run, at negligible energy, inside a deployed runtime that does not backpropagate. The novelty is in the problem (the deployment gap), the efficiency (only a few layers, single-sample streaming), and the evidence (bit-exact int8 execution on real hardware with measured energy), not in the adaptation rule.

References (35)