ScatterFormer: Efficient Voxel Transformer with Scattered Linear Attention

📄 arXiv: 2401.00912v2 📥 PDF

作者: Chenhang He, Ruihuang Li, Guowen Zhang, Lei Zhang

分类: cs.CV

发布日期: 2024-01-01 (更新: 2024-07-18)

备注: 14 pages, 6 figures, Accepted to ECCV2024

🔗 代码/项目: GITHUB


💡 一句话要点

提出ScatterFormer以解决点云处理中的注意力计算效率问题

🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture)

关键词: 点云处理 稀疏线性注意力 自动驾驶 三维场景理解 深度学习

📋 核心要点

  1. 现有方法在处理稀疏点云时,体素数量不均导致计算和内存开销显著,影响效率。
  2. ScatterFormer通过稀疏线性注意力模块,直接对不同窗口的体素进行注意力计算,提升了计算效率。
  3. 在Waymo和NuScenes数据集上,ScatterFormer分别达到了73.8 mAP和72.4 NDS,且检测速率为23 FPS,表现优异。

📝 摘要(中文)

基于窗口的变换器在大规模点云理解中表现出色,但由于点云的稀疏性,导致每个窗口的体素数量差异显著。现有方法通过排序和填充操作将体素分组为固定长度序列,造成计算和内存开销。本文提出ScatterFormer,首次直接对不同窗口的体素应用注意力作为单一序列。其核心是稀疏线性注意力模块(SLA),通过预计算键值对实现对可变长度体素序列的并行计算。利用GPU的层次结构和共享内存,提出的分块算法将SLA模块的延迟降低至1毫秒以下。此外,开发的跨窗口交互模块增强了不同窗口间体素特征的局部性和连通性,消除了大量窗口移动的需求。ScatterFormer在Waymo Open Dataset上实现73.8 mAP(L2),在NuScenes数据集上达到72.4 NDS,检测速率高达23 FPS。

🔬 方法详解

问题定义:本文旨在解决现有点云处理方法中,由于体素数量不均导致的计算和内存开销问题。现有方法通过排序和填充将体素分组为固定长度序列,造成效率低下。

核心思路:ScatterFormer的核心思路是直接对不同窗口的体素应用注意力作为单一序列,利用稀疏线性注意力模块(SLA)实现对可变长度体素序列的并行计算,从而提高效率。

技术框架:ScatterFormer的整体架构包括稀疏线性注意力模块和跨窗口交互模块。SLA模块负责处理体素的注意力计算,而跨窗口交互模块则增强了不同窗口间体素特征的连通性。

关键创新:ScatterFormer的主要创新在于首次实现了对不同窗口体素的直接注意力计算,避免了传统方法中的排序和填充操作,显著降低了计算延迟。

关键设计:在设计中,SLA模块利用预计算的键值对实现并行计算,分块算法将延迟降低至1毫秒以下,同时跨窗口交互模块的引入提升了特征的局部性和连通性。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

ScatterFormer在Waymo Open Dataset上实现了73.8 mAP(L2),在NuScenes数据集上达到了72.4 NDS,且检测速率高达23 FPS,表现出色,显著优于传统方法,展示了其在点云处理中的有效性和高效性。

🎯 应用场景

ScatterFormer在自动驾驶、机器人导航和三维场景理解等领域具有广泛的应用潜力。其高效的点云处理能力能够支持实时环境感知和决策制定,提升智能系统的反应速度和准确性。未来,该方法还可能扩展到更多需要处理稀疏数据的应用场景。

📄 摘要(原文)

Window-based transformers excel in large-scale point cloud understanding by capturing context-aware representations with affordable attention computation in a more localized manner. However, the sparse nature of point clouds leads to a significant variance in the number of voxels per window. Existing methods group the voxels in each window into fixed-length sequences through extensive sorting and padding operations, resulting in a non-negligible computational and memory overhead. In this paper, we introduce ScatterFormer, which to the best of our knowledge, is the first to directly apply attention to voxels across different windows as a single sequence. The key of ScatterFormer is a Scattered Linear Attention (SLA) module, which leverages the pre-computation of key-value pairs in linear attention to enable parallel computation on the variable-length voxel sequences divided by windows. Leveraging the hierarchical structure of GPUs and shared memory, we propose a chunk-wise algorithm that reduces the SLA module's latency to less than 1 millisecond on moderate GPUs. Furthermore, we develop a cross-window interaction module that improves the locality and connectivity of voxel features across different windows, eliminating the need for extensive window shifting. Our proposed ScatterFormer demonstrates 73.8 mAP (L2) on the Waymo Open Dataset and 72.4 NDS on the NuScenes dataset, running at an outstanding detection rate of 23 FPS.The code is available at \href{https://github.com/skyhehe123/ScatterFormer}{https://github.com/skyhehe123/ScatterFormer}.