HUGE2: a Highly Untangled Generative-model Engine for Edge-computing

Feng Shi, Ziheng Xu, Tao Yuan, Song-Chun ZhuarXiv 2019

Introduction

Generative AI models, such as Generative Adversarial Networks (GANs) and Variational Autoencoders (VAEs), have revolutionized tasks ranging from image synthesis to semantic segmentation. However, deploying these "creative" models on resource-constrained edge devices—like robots, IoT sensors, or mobile platforms—remains a significant challenge. The primary bottleneck lies in upsampling operations, which are computationally expensive and memory-intensive. HUGE² (Highly Untangled Generative-model Engine) is a novel framework designed to accelerate these models by "untangling" complex operations into efficient, hardware-friendly matrix multiplications.

The Challenge of Upsampling

Standard deep learning frameworks are highly optimized for dense convolutions. However, generative models rely heavily on transposed convolutions (often called deconvolutions) and dilated convolutions to increase image resolution. These operations typically involve inserting a large number of zeros into the input data or filters to achieve the desired output size.

Comparison between standard convolution and transposed convolution, highlighting the zero-insertion overhead.

This "zero-padding" approach introduces three major inefficiencies:

  1. Wasteful Computation: Processors spend valuable cycles performing multiplications by zero.
  2. Memory Inefficiency: Non-consecutive memory access patterns disrupt cache locality, leading to "cache thrashing."
  3. Resource Constraints: On edge devices with limited memory bandwidth and power, these inefficiencies often make real-time inference impossible.

The HUGE² Architecture

HUGE² addresses these bottlenecks through a three-step "untangling" process that transforms messy upsampling into standard, zero-free operations:

  1. Kernel Decomposition: Instead of sliding a large kernel over a zero-padded input, HUGE² decomposes the kernel into smaller, distinct sub-patterns. For instance, a stride-2 transposed convolution is broken down into four patterns where non-zero kernel elements align with non-zero input elements.
  2. Untangling via 1x1 Convolutions: This is the core innovation. These decomposed patterns are transformed into a series of 1x1 convolutions. By treating the problem as a set of dense matrix multiplications, HUGE² leverages highly optimized Basic Linear Algebra Subprograms (BLAS) libraries, completely bypassing the need for zero-insertion.
  3. Scatter and Combine: The results of these efficient sub-operations are then "scattered" and combined into the final output tensor.
The HUGE² workflow: decomposing kernels into sub-patterns to eliminate zero-padding and enable efficient computation.

This approach effectively turns a complex upsampling problem into a standard math problem that modern hardware is already designed to solve rapidly.

Performance Analysis

The researchers evaluated HUGE² on the Nvidia Jetson TX2 platform using DCGAN and cGAN architectures pretrained on the CIFAR-100 dataset. The results demonstrate substantial improvements over baseline implementations like Darknet:

  • Execution Speed: HUGE² achieved nearly a 5x speedup on embedded GPUs and a 10x speedup on embedded CPUs.
  • Memory Efficiency: Memory access was reduced by 30% to 70%, a critical factor for bandwidth-limited edge hardware.
  • Data Locality: By utilizing a specific memory layout ($C \times N \times R \times S$), the engine ensures "coalesced" memory access, allowing the hardware to fetch contiguous blocks of useful data.

The study found that shallower layers with more kernels benefited most from computational untangling, while deeper layers with larger feature maps saw the greatest gains from reduced memory overhead.

Conclusion and Future Work

HUGE² provides a powerful path for bringing generative AI to the edge by eliminating the "zero tax" inherent in traditional upsampling. While the current work focuses primarily on inference, preliminary results suggest it can also accelerate the back-propagation phase in training. Future developments may include automating the engine to support a broader range of non-standard convolution strides and dilation factors, further expanding its utility across diverse generative architectures.

Summary updated

BibTeX
@misc{shi2019huge,
  author = {Feng Shi and Ziheng Xu and Tao Yuan and Song-Chun Zhu},
  title = {{HUGE2: a Highly Untangled Generative-model Engine for Edge-computing}},
  year = {2019},
  eprint = {1907.11210},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1907.11210},
}
Figure