Stratified Transformer for 3D Point Cloud Segmentation

Xin Lai, Jianhui Liu, Li Jiang, Hengshuang Zhao, Shu Liu, Xiaojuan Qi, Jiaya Jia

Abstract

This paper introduces the Stratified Transformer, a novel architecture designed to overcome the limitations of local window-based attention in 3D point cloud segmentation. By employing a stratified key-sampling strategy—sampling keys densely in local neighborhoods and sparsely in distant regions—the model effectively captures long-range contextual dependencies without the quadratic computational cost of standard Transformers. Evaluated on S3DIS and ScanNetv2, the Stratified Transformer achieves state-of-the-art performance and demonstrates significant robustness to data perturbations.

Introduction

3D point clouds are irregular, unordered collections of points in space, making them significantly more challenging to process than 2D image grids. While recent deep learning models excel at aggregating local features, they often struggle to capture long-range dependencies. For instance, correctly identifying a "desk" in a cluttered room may require the model to recognize a "bed" or "curtain" located across the room.

Standard Transformers could theoretically capture these global relationships, but their computational cost grows quadratically ($O(N^2)$) with the number of points, which is prohibitive for large 3D scenes. Previous window-based solutions, such as Swin Transformers, mitigate this cost but restrict the model's attention to small local boxes, leaving it "blind" to distant contextual cues. The Stratified Transformer addresses this bottleneck by bridging the gap between computational efficiency and global context.

Methods

The Stratified Transformer introduces several key innovations to enhance 3D scene understanding:

1. Stratified Key-Sampling Strategy

This is the core innovation of the architecture. For every query point, the model samples keys in two tiers:

  • Dense Local Keys: All points within a local window are sampled to capture fine-grained geometric details.
  • Sparse Distant Keys: A downsampled set of points is collected from a much larger surrounding area.
The Stratified Key-Sampling Strategy combines dense local keys with sparse distant keys to expand the effective receptive field.

This approach allows the model to "see" far-away objects without the massive memory overhead of attending to every single point in the scene.

2. First-Layer Point Embedding

Rather than a simple linear projection, the model utilizes a local aggregation layer (KPConv) at the start. This helps the model converge faster by capturing basic geometric structures immediately.

3. Contextual Relative Position Encoding (cRPE)

Since 3D coordinates are continuous, the authors proposed an adaptive encoding that generates positional bias based on both relative coordinates and the semantic features of the points, making the spatial understanding context-aware.

4. Memory-Efficient Implementation

To handle the varying number of points in 3D windows, the authors implemented custom CUDA kernels for "scatter/gather" operations. This avoids the memory waste of standard padding, saving approximately 57% of memory compared to vanilla implementations.

Key Insights and Results

The paper demonstrates that context is critical for accurate segmentation. Without stratified sampling, models often misclassify objects like desks as tables or floors because they lack the necessary global perspective.

Qualitative comparison showing how stratified sampling improves attention maps and segmentation accuracy by providing global context.

Quantitative Benchmarks

The Stratified Transformer achieved impressive gains across major datasets:

  • S3DIS: Reached 72.0% mIoU, outperforming the previous best (Point Transformer) by 1.6%.
  • ScanNetv2: Achieved 74.3% mIoU on the validation set, a 2.1% lead over previous methods.
  • Robustness: The model proved highly robust to data perturbations. In tests involving 90-degree rotations, performance remained stable (+0.63% mIoU), whereas previous models often saw significant drops.

Conclusion

The Stratified Transformer successfully addresses the trade-off between local detail and global context in 3D point cloud segmentation. While the stratified strategy adds a slight computational overhead (sampling roughly 10% more keys), the resulting performance and robustness gains are substantial. Future work may explore applying this stratified approach to other 3D tasks, such as object detection or scene completion, and further optimizing the custom CUDA kernels for broader hardware compatibility.

Summary updated

BibTeX
@inproceedings{lai2022stratified,
  author = {Xin Lai and Jianhui Liu and Li Jiang and Liwei Wang and Hengshuang Zhao and Shu Liu and Xiaojuan Qi and Jiaya Jia},
  title = {{Stratified Transformer for 3D Point Cloud Segmentation}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2022},
}
Figure