arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2404.15244cs.CVcs.LG
收藏

针对计算效率的Transformer编码器特定适应

Image-Specific Adaptation of Transformer Encoders for Compute-Efficient Segmentation

NEC Laboratories, America(美国NEC实验室);University of California, Riverside(加州大学河滨分校);University of California, San Diego(加州大学圣地亚哥分校)

Manyi Yao, Abhishek Aich, Yumin Suh, Amit Roy-Chowdhury, Christian Shelton, Manmohan Chandraker

AI总结:

本文提出ECO-M2F方法,通过自适应选择编码器层数来提升分割任务的计算效率,同时保持性能并适应不同计算资源。

摘要:

基于视觉变换器的模型在图像分割任务中带来了显著改进。尽管这些架构在不同分割任务中具有强大能力,但其计算资源消耗可能对部署设备造成负担。为解决此问题,本文引入ECO-M2F或EffiCient TransfOrmer Encoders for Mask2Former-style模型。注意到M2F风格模型的编码器模块具有高资源消耗,ECO-M2F提供了一种策略,根据输入图像自选择编码器的隐藏层数量。为实现性能与计算效率的平衡,本文提出三步方案:第一步是训练父架构以实现编码器的早退;第二步是创建每个训练示例所需的理想编码器层数的衍生数据集;第三步是利用上述数据集训练一个门控网络,根据输入图像预测应使用的编码器层数。此外,为了改变计算-准确性权衡,仅需重复第二和第三步即可显著减少重训练时间。在公共数据集上的实验表明,所提方法在降低预期编码器计算成本的同时保持性能,适应各种用户计算资源,架构配置灵活,并可扩展到目标检测任务。

英文摘要:

Vision transformer based models bring significant improvements for image segmentation tasks. Although these architectures offer powerful capabilities irrespective of specific segmentation tasks, their use of computational resources can be taxing on deployed devices. One way to overcome this challenge is by adapting the computation level to the specific needs of the input image rather than the current one-size-fits-all approach. To this end, we introduce ECO-M2F or EffiCient TransfOrmer Encoders for Mask2Former-style models. Noting that the encoder module of M2F-style models incur high resource-intensive computations, ECO-M2F provides a strategy to self-select the number of hidden layers in the encoder, conditioned on the input image. To enable this self-selection ability for providing a balance between performance and computational efficiency, we present a three step recipe. The first step is to train the parent architecture to enable early exiting from the encoder. The second step is to create an derived dataset of the ideal number of encoder layers required for each training example. The third step is to use the aforementioned derived dataset to train a gating network that predicts the number of encoder layers to be used, conditioned on the input image. Additionally, to change the computational-accuracy tradeoff, only steps two and three need to be repeated which significantly reduces retraining time. Experiments on the public datasets show that the proposed approach reduces expected encoder computational cost while maintaining performance, adapts to various user compute resources, is flexible in architecture configurations, and can be extended beyond the segmentation task to object detection.

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

↑