Aligned Vector Quantization for Edge-Cloud Collabrative Vision-Language Models

Xiao Liu, Lijun Zhang, Deepak Ganesan, Hui GuanarXiv 2024 · DOI

Abstract

Vision-Language Models (VLMs) face significant deployment challenges due to high computational costs and bandwidth requirements for cloud-based inference. This paper introduces Aligned Vector Quantization (AlignedVQ), a task-aware compression framework for edge-cloud collaborative VLMs. By strategically placing quantization modules after layer normalization and employing dual linear projections, AlignedVQ achieves over 1300× compression of intermediate features. Experimental results on LLaVA demonstrate a 96.8% reduction in data transmission and up to 15× inference speedup in low-bandwidth environments, while maintaining or even improving original model accuracy.

Introduction

Vision-Language Models (VLMs) like LLaVA are powerful but computationally expensive, typically necessitating cloud deployment. This "cloud-only" approach suffers from two major flaws: bandwidth bottlenecks from transmitting high-resolution raw images and the underutilization of modern edge device AI chips.

While partitioned execution—where an edge device runs initial layers and sends intermediate features to the cloud—is a potential solution, these intermediate features are often significantly larger than the original image. Standard compression methods like JPEG are task-agnostic; they preserve visual fidelity for humans but often discard subtle data patterns essential for a VLM to answer questions accurately.

Methodology: Aligned Vector Quantization

The authors propose AlignedVQ, a lightweight compression module integrated into a VLM's vision encoder to facilitate efficient edge-cloud collaboration.

The AlignedVQ architecture showing training and deployment stages for edge-cloud collaboration.

The architecture relies on three key innovations:

  1. Normalized Feature Compression: AlignedVQ is placed immediately after Layer Normalization layers. Features here exhibit a lower coefficient of variation and lie on a structured hypersphere, making them significantly easier to quantize without information loss.
  2. Dual Linear Projection (DLP): To mitigate distribution shift between quantized data and pretrained model expectations, two lightweight adapters are used: one to "shape" features before quantization and another to "restore" them afterward.
  3. Joint Fine-tuning with LoRA: The system is trained by simultaneously updating the quantization codebook, DLP adapters, and a Low-Rank Adaptation (LoRA) module in the Large Language Model (LLM), allowing the LLM to learn to interpret compressed signals.

Experimental Evaluation

The model, LLaVA-AlignedVQ, was evaluated across eight diverse Vision Question Answering (VQA) benchmarks, including VQA-v2, GQA, VizWiz, TextVQA, and robustness benchmarks like POPE and MM-Vet.

Key Results

  • Bandwidth Efficiency: AlignedVQ reduces transmission data size to just 0.845 KB per sample—a 96.8% reduction compared to JPEG90-compressed images.
  • Inference Speedup: In low-bandwidth scenarios (0.25 Mbps), the system is 15× faster than cloud-only solutions, maintaining a 2× speedup even at higher bandwidths.
  • Accuracy Preservation: Across eight datasets, the model stayed within -2.23% to +1.6% of the original LLaVA model's accuracy. In several cases, the fine-tuning process actually improved model accuracy.
Accuracy vs. compressed data size comparison between AlignedVQ, JPEG, and other baselines.

Discussion and Insights

A critical insight from this work is that the placement of the quantization module is as important as the method itself. Quantizing after LayerNorm resulted in a negligible accuracy drop (~0.11%), whereas placement after Attention or Feed-Forward layers caused drops exceeding 10%. This suggests that structured data is inherently more compressible for task-specific needs.

Limitations and Future Work

Despite its success, AlignedVQ requires intensive fine-tuning (approximately 20 hours on four A100 GPUs). Additionally, while the principles are likely generalizable, the specific "sweet spots" for quantization may vary across different model architectures beyond the LLaVA-1.5 framework studied here. Future work will focus on scaling to larger models and optimizing for diverse real-world edge environments.

Summary updated

BibTeX
@misc{liu2024aligned,
  author = {Xiao Liu and Lijun Zhang and Deepak Ganesan and Hui Guan},
  title = {{Aligned Vector Quantization for Edge-Cloud Collabrative Vision-Language Models}},
  year = {2024},
  eprint = {2411.05961},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2411.05961},
}
Figure