arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.22435cs.LGcs.AIcs.DC
收藏

TRACE:用于通信高效分布式边缘推理的Transformer残差激活码本编码

TRACE: Transformer Residual Activation Codebook Encoding for Communication-efficient Distributed Edge Inference

Aarhus University(奥胡斯大学);Tampere University(坦佩雷大学)

Muhammad Azlan Qazi, Alexandros Iosifidis, Qi Zhang

AI总结:

提出Trace框架,在Transformer层后残差处用VQ编码激活值,实现通信计算重叠,在多个模型数据集上较现有方案提升准确率、速度并降低通信开销。

摘要:

在位于同一位置的边缘设备上进行分布式Transformer推理时,由于在序列并行分区之间交换激活值会在普通边缘带宽下主导推理延迟,因此该过程本质上受通信限制。现有压缩方案可降低此成本,但仍存在结构瓶颈:接收的数据仍需经过键/值投影才能进行注意力计算,导致计算被通信串行化。本文提出Transformer残差激活码本编码(Trace)框架,以解决这些限制。Trace在每个Transformer层的注意力后残差处放置向量量化器(VQ),并预计算码本索引的键/值表示。推理时,交换的激活值被编码为紧凑的码本索引,使接收方可通过查表直接恢复键和值,而非执行推导所需的下游计算。通过消除接收数据的下游计算,Trace实现了通信与计算的重叠,并减少了分布式Transformer推理中的关键延迟瓶颈。进一步通过层次聚类将学习到的码本构建为多分辨率层次结构,支持无需重新训练即可在运行时调整通信比特率。该框架支持两种操作变体:一种优先考虑准确率,另一种通过缓冲区兼容量化平衡准确率与效率。在ViT-Base(ImageNet-1K和CIFAR-100)和ViViT-B(UCF-101)上的实验表明,与最先进的基于VQ的分布式推理框架相比,Trace的准确率最高提升1.89%,端到端推理速度最高提升1.27倍;与未压缩的序列并行推理相比,Trace的通信开销最高降低22624倍。

英文摘要:

Distributed Transformer inference across co-located edge devices is fundamentally communication-bound, as exchanging activations between sequence-parallel partitions dominates inference latency under commodity edge bandwidths. Existing compression schemes reduce this cost but retain a structural bottleneck: the received data must still undergo key/value projection before attention can proceed, serializing computation behind communication. This paper presents Transformer Residual Activation Codebook Encoding (Trace), a framework that addresses these limitations. Trace places a Vector Quantizer (VQ) at the post-attention residual of every Transformer layer and precomputes codebook-indexed key/value representations. During inference, exchanged activations are encoded into compact codebook indices, allowing receivers to directly recover keys and values through table lookup instead of executing the downstream computations required to derive them. By eliminating the received data downstream computation, Trace enables communication--computation overlap and reduces a key latency bottleneck in distributed Transformer inference. A hierarchical clustering further structures the learned codebook into a multi-resolution hierarchy, enabling runtime adaptation of the communication bitrate without retraining. The framework supports two operating variants: one prioritizing accuracy and the other balancing accuracy and efficiency through buffer-compatible quantization. Experiments on ViT-Base (ImageNet-1K and CIFAR-100) and ViViT-B (UCF-101) show that Trace achieves up to 1.89% higher accuracy and up to 1.27x end-to-end inference speedup compared with the state-of-the-art VQ-based distributed inference framework. Compared with uncompressed sequence-parallel inference, Trace reduces communication overhead by up to 22,624x.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑