Hardware-Friendly Token-Group Activation Quantization for Low-Bit Mamba Super-Resolution

Jinwoo Chung, Jangho KimNeurIPS 2026

TL;DR

Mamba architectures are great at sharpening blurry images (super-resolution) without the heavy compute of Transformers, but shrinking them down to 4-bit or 2-bit integers for edge devices ruins image quality because Mamba's core operator scatters pixel tokens into wildly different numerical ranges. This paper solves the bottleneck with Token-Group Quantization: a tiny neural predictor looks at features before the Mamba operator, guesses which numerical bucket each token will land in afterward, and assigns tailored quantization bounds from a fixed lookup table. The result is crisp, high-frequency image restoration that runs $2.23\times$ faster on an edge GPU without needing messy runtime statistics.

What Problem Does This Paper Address?

Single-image super-resolution (SR) reconstructs crisp, high-res images from low-res inputs. Recently, Mamba-based models have emerged as sleek alternatives to Transformers, capturing long-range spatial details in linear time using an input-dependent state-space operator called selective scan.

To run these models on edge hardware, engineers use Post-Training Quantization (PTQ) to compress 32-bit floating-point numbers into low-bit integers (like 4-bit or 2-bit) without retraining the whole model. Standard PTQ sets a single clipping range (minimum and maximum cutoff) for an entire layer.

Here’s the catch: because selective scan adapts dynamically to each spatial token, it blows up the variation between tokens. After passing through selective scan, some tokens have tiny numerical ranges while others have massive ones—an average $1.80\times$ increase in range dispersion across layers.

Figure 1: Selective scan induces token-wise activation heterogeneity. (a) Post-scan activations exhibit a broader distribution than pre-scan activations in a representative ASSM layer (layer 18). (b) Per-token range CoV increases after selective scan in most ASSM layers.

With a one-size-fits-all layer bound, you face a losing trade-off: set the bound wide, and you waste precious bit-resolution on quiet tokens; set it tight, and you clip off the intense tokens responsible for sharp edges. Grouping tokens after the scan fixes quality, but stalls hardware execution because the chip has to pause and calculate statistics on the fly.

Methods

The authors design a static, hardware-friendly way to approximate an idealized "post-scan oracle" without ever pausing at runtime:

  1. Offline Quantization-Aware Pseudo-Labels: During calibration on a small sample of images, the authors inspect activations after the selective scan. They summarize each token's rounding-vs.-clipping behavior (using quantiles, RMS, and max values) and run K-means clustering ($K=8$) to group tokens that prefer similar clipping bounds.
  2. Pre-Scan Group Predictor: Because selective scan generates its parameters from pre-scan features, the clues to a token's fate are already present beforehand. The authors train a tiny, shared two-layer feed-forward network (FFN) to predict a token's post-scan group using only pre-scan inputs. At inference, this frozen predictor simply routes each token to a pre-calibrated lookup table of clipping bounds—zero runtime statistics needed.
Figure 3: Overview of Token-Group Quantization. A frozen pre-scan predictor predicts token groups, and grouped INT sites use offline-calibrated clipping-bound tables without runtime statistics.
  1. Frequency-Preserving Refinement (FPR): Standard pixel-level calibration losses focus too much on smooth, low-frequency areas, leaving quantized images blurry. The authors introduce a teacher-student distillation objective in the Fourier domain, aligning both amplitude (preserving high-frequency texture energy) and phase (preventing shifted edges) between the full-precision model and the quantized model.

Datasets

Following standard SR PTQ protocols, no new benchmarks are introduced:

  • Calibration: 96 low-resolution patches sampled from the DF2K training split (requires no high-resolution ground-truth targets), plus DIV2K validation patches for activation analysis.
  • Evaluation: Five classic SR benchmarks—Set5, Set14, BSD100, Urban100, and Manga109 (and ImageNet for Vision Mamba classification transfer tests in the appendices).

Key Insights and Ideas

  • Not Outliers, But Populations: Much of LLM quantization focuses on taming rare, extreme channel outliers (often via mathematical rotations). Here, the authors show Mamba's issue isn't isolated outliers, but distinct populations of tokens operating in different regimes. Better yet, their token-axis grouping composes cleanly with channel-axis rotation methods like SpinQuant.
  • Causality Works in Your Favor: You don't need to observe the output of selective scan to quantize it well. Since pre-scan features dictate scan dynamics, a tiny FFN can predict downstream numerical ranges before entering the low-bit execution path, recovering over 81% of the theoretical oracle's performance gain.
  • Structure–Magnitude Decoupling: A single shared predictor works across all 20 layers. The FFN learns general structural cues about tokens, while layer-specific lookup tables absorb the actual numerical magnitude shifts from layer to layer.
Violin plots showing how predicted groups successfully separate tokens into distinct clipping-scale regimes, mimicking the oracle.

Key Results

Tested primarily on MambaIRv2-Light under both strict Weight-freeze PTQ and LoRA-assisted PTQ across 4-bit (W4A4) and 2-bit (W2A2) settings:

  • Near-Lossless 4-Bit SR: When combined with LoRA rectifiers at 4-bit, the method nearly matches the 32-bit floating-point baseline—dropping just 0.12 dB PSNR on BSD100 ($\times 2$ scale) and 0.14 dB ($\times 4$ scale). Under Weight-freeze W4A4 ($\times 2$ on Urban100), it reaches 31.34 dB, beating prior Mamba and SR baselines like Quamba (30.54 dB) and OAQ-SR (30.49 dB) by ~0.8 dB.
  • Real Hardware Speedups: Using byte-aligned integer kernels on an edge Jetson Orin Nano, the 4-bit model achieves a $2.23\times$ speedup over FP16 (1410.7 ms vs. 3149.6 ms)—almost identical to naive 4-bit quantization ($2.28\times$). In contrast, computing dynamic groups at runtime ("Oracle") completely wipes out the speedup ($0.98\times$).
  • Crisper Visuals: Qualitatively, text contours and architectural lines in Urban100 remain sharp and straight, avoiding the mushy blur seen in competing 4-bit baselines.

Limitations and Future Work

Running the pre-scan FFN predictor and indexing into group-wise bound tables isn't completely free—it introduces a tiny latency overhead compared to basic layer-wise 4-bit quantization (1410.7 ms vs. 1380.1 ms on Jetson Orin Nano) and adds ~8 minutes to offline calibration. For future work, the authors suggest extending this static token-adaptive framework beyond GPUs to specialized on-device accelerators like mobile NPUs, DSPs, and vendor-specific low-bit runtimes.

Summary updated

Abstract

Mamba-based super-resolution models are efficient alternatives to Transformer-based restoration backbones, but their low-bit post-training quantization remains challenging because selective scan, Mamba's input-dependent state-space operator, induces different activation ranges across spatial tokens. Thus, a single layer-wise clipping range poorly matches all tokens. We propose Token-Group Quantization, a hardware-friendly activation PTQ framework that statically approximates a hardware-unfriendly post-scan grouping oracle, where tokens with similar preferred clipping ranges are assigned to the same group. To avoid runtime post-scan grouping in static low-bit inference, a lightweight predictor infers the groups from pre-scan features available before the quantized scan path. During calibration, we form pseudo-labels by clustering post-scan activation descriptors that capture similar rounding-clipping behavior. At inference, the frozen predictor maps pre-scan features to groups and selects entries from offline-calibrated group-wise clipping-bound tables, without runtime statistics collection, dynamic clipping updates, or post-scan group assignment. To address low-bit restoration degradation, we further introduce a Frequency-Preserving Refinement (FPR) objective for clipping-bound calibration. FPR aligns Fourier amplitude and phase between full-precision teacher and quantized student outputs to preserve high-frequency structures. Across PTQ protocols, bit-widths, backbones, and tasks, our method consistently outperforms prior Mamba and SR PTQ baselines, transfers to Transformer SR and Vision Mamba classification, composes with rotation-based quantization, and achieves $2.23\times$ speedup on Jetson Orin Nano over FP16. Code is available here.
BibTeX
@inproceedings{chung2026hardware,
  author = {Jinwoo Chung and Jangho Kim},
  title = {{Hardware-Friendly Token-Group Activation Quantization for Low-Bit Mamba Super-Resolution}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=46hNfjRw3m},
}
Figure