TL;DR
When you shrink state-of-the-art optical flow networks down to 4-bit integers so they can run on tiny robot chips, their accuracy completely falls apart. The authors discover that this failure happens almost entirely in the very last layer—which acts like a rigid ruler trying to measure both kilometers and millimeters—and fix it by teaching the network to output predictions in scientific notation instead. Armed with this simple trick, their tiny new model (NibbleFlow) runs on low-power edge hardware while slashing error rates by nearly half compared to existing deployable models.
What Problem Does This Paper Address?
Optical flow—figuring out how every pixel moves from one video frame to the next—is how tiny drones and robots see motion, dodge obstacles, and track their own position. Today’s best optical flow models work by iterative refinement: they make a rough guess at the motion, and then run a loop that nudges that guess closer and closer to the truth.
That works great on a power-hungry desktop GPU using 32-bit floating-point numbers (FP32). Put it on a battery-powered robot, though, and you hit two walls. Edge AI accelerators (like the Hailo-8 or Coral Edge TPU) sip just a few watts of power because they only run static integer graphs, often squeezing neural network weights down to just 4 bits (a "nibble").
First, standard refinement warps images dynamically based on the current flow guess, which breaks static graphs (though recent work called TinyFlow showed how to bypass warping). Second—and the focus of this paper—under 4-bit quantization, iterative networks lose virtually all their accuracy. Why? Because early iterations need giant leaps to catch fast motion, while final iterations need microscopic nudges to polish edges—spanning more than a factor of 100 in step size. A standard linear output layer acts like a fixed-point number: 4-bit rounding adds a constant, absolute noise floor to every step. When that rounding error is bigger than the tiny polishing steps you need, those small steps get wiped out, and the errors snowball across iterations.
Methods
Instead of predicting a raw linear number for each pixel's flow update, the authors borrow the oldest trick in computer arithmetic: floating-point representation. They replace the final linear layer with SEM (Sign-Exponent-Mantissa) Refinement.
For each horizontal and vertical update, the network predicts three bounded pieces:
- Sign: $\tanh(a) \in (-1, 1)$, setting the direction (and allowing smooth shrinkage to zero).
- Exponent: A softmax probability distribution over powers of two ($2^k$, e.g., from $2^{-6}$ to $2^1$), picking the order of magnitude.
- Mantissa: $2\sigma(b) \in (0, 2)$, smoothly fine-tuning the value within that scale.
Multiply them together, and you get your step. Because every piece lives in a neat, bounded range, 8-bit integer activations can represent them effortlessly. Better yet, any 4-bit weight rounding error now perturbs the logarithm of the step—meaning errors scale proportionally to the step size rather than swamping small updates.
Around this SEM head, the authors build NibbleFlow, a compact (0.51M parameter) architecture built for static integer chips. Rather than warping images, it correlates features along fixed, pre-set compass directions across a coarse-to-fine pyramid ($1/32$, $1/16$, and $1/8$ resolution) and feeds those into a shared SEM update block.
Datasets
No new datasets are introduced; the authors rely on standard synthetic and real-world benchmarks:
- Training: FlyingChairs and FlyingThings3D (synthetic image pairs with ground-truth flow).
- Optical Flow Evaluation: MPI Sintel (Clean and Final passes, unseen during training/calibration) and FlyingChairs validation.
- Downstream Visual Odometry: Eight synthetic trajectories from TartanAir and three real-world drone racing flights from UZH-FPV.
Key Insights and Ideas
- Quantization collapse comes down to a single layer: In diagnostic tests on RAPIDFlow, quantizing only the final linear output layer to 4 bits caused 4.98 pixels of the 5.00 total Endpoint Error (EPE) lost when quantizing the entire network! Keeping that single layer in 8 bits—or swapping in SEM at 4 bits—rescues the network.
- Dynamic range in octaves: At the coarsest pyramid level, needed flow steps span 7 octaves (factors of two). Measurements show a standard linear head saturates early and covers only 5.6 octaves, whereas SEM cleanly tracks all 7.0 octaves.
- Plug-and-play resilience: You don't have to redesign existing architectures to benefit. Dropping SEM into established models like RAFT-small, RAPIDFlow, and IRR-PWC—with zero hyperparameter tuning—preserves their FP32 accuracy while erasing up to 86% of the 4-bit quantization error.
Key Results
Endpoint Error (EPE) on Sintel Clean comparing FP32, 4-bit linear, and 4-bit SEM across networks
- Hardware Deployment: Compiled onto a real Hailo-8 accelerator (with 86% of weights in 4 bits and 8-bit activations), NibbleFlow runs at 15.19 FPS (and 2.25 FPS on a Raspberry Pi 5 CPU alone).
- Accuracy vs. Edge Baselines: On Sintel (Clean / Final), INT4 NibbleFlow achieves an EPE of 4.76 / 5.68—losing less than 1 pixel compared to its FP32 self (3.88 / 4.76). This cuts the error of the best deployable baseline, EdgeFlowNet (8.65 / 9.22 in INT4), by up to 45% while using 5.4$\times$ fewer parameters (0.51M vs. 2.75M).
- Visual Odometry: When estimating camera trajectories from INT4 optical flow alone, NibbleFlow achieves the lowest trajectory error (ATE) on 7 out of 11 sequences, cutting mean error on real UZH-FPV drone flights to 5.46 m compared to EdgeFlowNet’s 8.89 m and NanoFlowNet's 18.76 m.
Limitations and Future Work
- Accuracy vs. Unconstrained Models: Unconstrained iterative models like RAFT-small and RAPIDFlow that dynamically warp features still achieve lower error in FP32 (2.57–2.84 EPE on Sintel Clean vs. NibbleFlow's 3.88), though they cannot compile onto static integer accelerators.
- Speed vs. Single-Pass Tiny Nets: Because NibbleFlow runs 14 refinement iterations across scales, ultra-lightweight single-pass networks like NanoFlowNet (120.55 FPS on Hailo-8) and EdgeFlowNet (76.30 FPS) run faster, trading away substantial accuracy.
- Future Directions: The authors note that representing iterative updates in Sign-Exponent-Mantissa form isn't specific to optical flow—it should naturally extend to any iterative regression task running on fixed-point hardware, such as monocular depth or stereo disparity refinement.
Summary updated