Introduction
Real-time image segmentation is a foundational task for AR/VR, autonomous drones, and robotics. These applications require high-throughput processing (e.g., 60 FPS) on edge devices constrained by power budgets of just a few watts. While the U-Net architecture is highly effective and significantly lighter than modern Transformer-based models, running it on high-resolution video still exceeds the compute and memory limits of most edge hardware.
A natural solution is extreme quantization, specifically Binary Neural Networks (BNNs), which constrain weights and activations to 1-bit values (-1, +1). This replaces heavy floating-point math with highly efficient bitwise operations. However, BNNs face two major hurdles: severe accuracy degradation (especially for dense prediction tasks like segmentation) and a lack of practical GPU implementations, as most BNN research relies on custom FPGAs or ASICs rather than commodity hardware.
This paper introduces Masked Binary U-Net (MBU-Net), which selectively adds a "zero" state to binary neural networks based on a cost-aware strategy, recovering near full-precision accuracy. By mapping these masked weights to GPU Tensor Cores using a novel subtractive bit-encoding scheme, MBU-Net achieves over 2x speedups and 3.5x energy savings with minimal accuracy loss.
The Solution: Masked Binary U-Net (MBU-Net)
MBU-Net bridges the gap between binary efficiency and full-precision accuracy through two main innovations: a cost-aware masking strategy and subtractive bit-encoding for Tensor Cores.
Cost-Aware Masking Strategy
Instead of strictly using binary weights (-1, +1), the authors introduce a ternary state (-1, 0, +1) by applying "zero masking." Because masking adds computational overhead, they profile the network and prioritize masking layers where it is computationally cheap but highly beneficial for accuracy. For example, transposed convolutions are relatively cheap to compute but yield high accuracy returns when masked.
Subtractive Bit-Encoding for Tensor Cores
To run these ternary weights on hardware optimized for binary operations, the authors encode the masked weights using two bit-planes (a positive and a negative plane). They then map this encoding directly to NVIDIA GPU Tensor Cores using native BMMA (Bit Matrix Multiply-Accumulate) instructions. This allows the network to compute ternary-binary matrix multiplications using fast, hardware-native XOR and popcount operations.
Key Insights
- Zeros are crucial for BNNs: Pure binary networks force every connection to fire as either -1 or +1, offering no neutral state to suppress noisy or uncertain signals. Allowing an explicit "zero" state leads to massive sparsity (often >90% in masked layers) and substantially recovers the accuracy lost during binarization.
- Not all layers cost the same, but they all matter: Exhaustive testing of quantization configurations revealed that masking any single layer improves accuracy by a comparable amount. However, the compute cost of masking varies by orders of magnitude, making a cost-aware selection critical for efficiency.
- Repurposing binary hardware for ternary weights: By cleverly using subtractive bit-encoding, ternary weights can be processed using the exact same XOR/popcount logic designed for pure binary networks. This unlocks Tensor Core acceleration without requiring custom silicon.
Results & Hardware Performance
The authors evaluated MBU-Net on three standard segmentation datasets spanning different domains: Carvana (high-resolution cars), ISIC (skin lesions), and Nuclei (biomedical images).
- Accuracy: MBU-Net achieves near full-precision accuracy, suffering only a ~3% average drop across Dice, IoU, and F1 scores compared to 16-bit and 32-bit floating-point U-Nets.
- Speed: Across tested platforms, MBU-Net averages a 4.83x speedup over FP32 and a 2.04x speedup over FP16 implementations.
- Energy Efficiency: The model delivers an 8.53x energy reduction over FP32 and a 3.54x reduction over FP16.
- Hardware Portability: The framework was successfully deployed and benchmarked on a range of commodity GPUs, including datacenter cards (A100) and edge devices (Jetson Orin Nano, RTX 2080 Ti).
Limitations and Future Work
While MBU-Net demonstrates significant gains on current hardware, it faces limitations with newer architectures. The NVIDIA Hopper architecture (e.g., H100) removed native BMMA support, causing MBU-Net to lose its performance edge on this specific generation of hardware and highlighting a reliance on specific Tensor Core experimental features.
Looking forward, the authors note that while MBU-Net was designed for general-purpose GPUs, its low-bit arithmetic and masking make it an ideal candidate for custom ASICs. Deploying this architecture on dedicated silicon could yield even higher performance-per-watt and deterministic latency for strict edge deployments.
Summary updated