[Paper Review] BOAT: Bilateral Local Attention Vision Transformer
BOAT introduces a bilateral local attention mechanism that combines image-space local attention with feature-space local attention using balanced hierarchical clustering, improving performance over Swin and CSWin backbones on several vision tasks. It extends both BOAT-Swin and BOAT-CSWin with consistent gains.
Vision Transformers achieved outstanding performance in many computer vision tasks. Early Vision Transformers such as ViT and DeiT adopt global self-attention, which is computationally expensive when the number of patches is large. To improve efficiency, recent Vision Transformers adopt local self-attention mechanisms, where self-attention is computed within local windows. Despite the fact that window-based local self-attention significantly boosts efficiency, it fails to capture the relationships between distant but similar patches in the image plane. To overcome this limitation of image-space local attention, in this paper, we further exploit the locality of patches in the feature space. We group the patches into multiple clusters using their features, and self-attention is computed within every cluster. Such feature-space local attention effectively captures the connections between patches across different local windows but still relevant. We propose a Bilateral lOcal Attention vision Transformer (BOAT), which integrates feature-space local attention with image-space local attention. We further integrate BOAT with both Swin and CSWin models, and extensive experiments on several benchmark datasets demonstrate that our BOAT-CSWin model clearly and consistently outperforms existing state-of-the-art CNN models and vision Transformers.
Motivation & Objective
- Motivate improving Vision Transformer efficiency and accuracy by capturing long-range relations not only in image space but also in feature space.
- Propose a Bilateral Local Attention (BLA) block that fuses image-space local attention (ISLA) with feature-space local attention (FSLA).
- Introduce balanced hierarchical clustering to form equally sized feature-space clusters for efficient FSLA computation.
- Demonstrate improvements on image classification, semantic segmentation, and object detection benchmarks over state-of-the-art local-attention transformers.
Proposed method
- Implement a Bilateral Local Attention (BLA) block comprising: an image-space local attention (ISLA) module, a feature-space local attention (FSLA) module, LN layers, and an MLP with residual connections.
- FSLA groups tokens by content using balanced hierarchical clustering with multiple levels to form equal-sized clusters, enabling efficient parallel attention within clusters.
- Introduce overlapping balanced hierarchical clustering to enlarge receptive fields at the final level.
- Apply locally-enhanced positional encoding in FSLA to preserve spatial information within feature-based attention.
Experimental results
Research questions
- RQ1Can feature-space local attention complement image-space local attention to capture distant but content-related patch relations?
- RQ2Does balanced hierarchical clustering enable efficient and effective FSLA without sacrificing parallelism or performance?
- RQ3Do BOAT variants consistently outperform their Swin and CSWin baselines on classification, segmentation, and detection tasks?
Key findings
- BOAT-Swin-T and BOAT-CSWin-T outperform their vanilla counterparts on ImageNet-1K by increasing accuracy with modest parameter and FLOP overhead.
- BOAT-Swin-S and BOAT-CSWin-S achieve higher Top-1 accuracy than their base models across tiny, small, and base settings.
- BOAT-Swin-B and BOAT-CSWin-B show consistent accuracy gains over Swin-B and CSWin-B, respectively.
- Ablations show FSLA is more effective than ISLA alone (82.3% vs 81.5% on a Tiny variant in Table 3), and overlapping balanced hierarchical clustering yields higher accuracy than non-overlapping versions (e.g., 83.7% vs 83.3% for BOAT-CSWin-T).
- In semantic segmentation on ADE20K, BOAT-Swin-T/S and BOAT-CSWin-T/S achieve higher mIoU than their vanilla counterparts; analogous gains are observed for BOAT-Swin-B/CSWin-B.
- In object detection on MS-COCO with Mask R-CNN, BOAT-Swin-T/S surpass Swin-T/S in mAP Box and mAP Mask under similar budgets.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.