TasksSotADatasetsPapersMethodsSubmitAbout
Papers With Code 2

A community resource for machine learning research: papers, code, benchmarks, and state-of-the-art results.

Explore

Notable BenchmarksAll SotADatasetsPapersMethods

Community

Submit ResultsAbout

Data sourced from the PWC Archive (CC-BY-SA 4.0). Built by the community, for the community.

Papers/Is Attention Better Than Matrix Decomposition?

Is Attention Better Than Matrix Decomposition?

Zhengyang Geng, Meng-Hao Guo, Hongxu Chen, Xia Li, Ke Wei, Zhouchen Lin

2021-09-09ICLR 2021 1Semantic SegmentationImage GenerationConditional Image Generation
PaperPDFCodeCodeCode(official)

Abstract

As an essential ingredient of modern deep learning, attention mechanism, especially self-attention, plays a vital role in the global correlation discovery. However, is hand-crafted attention irreplaceable when modeling the global context? Our intriguing finding is that self-attention is not better than the matrix decomposition (MD) model developed 20 years ago regarding the performance and computational cost for encoding the long-distance dependencies. We model the global context issue as a low-rank recovery problem and show that its optimization algorithms can help design global information blocks. This paper then proposes a series of Hamburgers, in which we employ the optimization algorithms for solving MDs to factorize the input representations into sub-matrices and reconstruct a low-rank embedding. Hamburgers with different MDs can perform favorably against the popular global context module self-attention when carefully coping with gradients back-propagated through MDs. Comprehensive experiments are conducted in the vision tasks where it is crucial to learn the global context, including semantic segmentation and image generation, demonstrating significant improvements over self-attention and its variants.

Results

TaskDatasetMetricValueModel
Image GenerationImageNet 128x128FID14.8HamGAN
Image GenerationImageNet 128x128Inception score58.75HamGAN
Semantic SegmentationADE20K valmIoU51.5Light-Ham (VAN-Huge, 61M, IN-1k, MS)
Semantic SegmentationADE20K valmIoU51Light-Ham (VAN-Large, 46M, IN-1k, MS)
Semantic SegmentationADE20K valmIoU49.6Light-Ham (VAN-Base, 27M, IN-1k, MS)
Semantic SegmentationPASCAL ContextmIoU55.2HamNet (ResNet-101)
Semantic SegmentationADE20KGFLOPs (512 x 512)71.8Light-Ham (VAN-Huge)
Semantic SegmentationADE20KParams (M)61.1Light-Ham (VAN-Huge)
Semantic SegmentationADE20KValidation mIoU51.5Light-Ham (VAN-Huge)
Semantic SegmentationADE20KGFLOPs (512 x 512)55Light-Ham (VAN-Large)
Semantic SegmentationADE20KParams (M)45.6Light-Ham (VAN-Large)
Semantic SegmentationADE20KValidation mIoU51Light-Ham (VAN-Large)
Semantic SegmentationADE20KGFLOPs (512 x 512)34.4Light-Ham (VAN-Base)
Semantic SegmentationADE20KParams (M)27.4Light-Ham (VAN-Base)
Semantic SegmentationADE20KValidation mIoU49.6Light-Ham (VAN-Base)
Semantic SegmentationADE20KValidation mIoU46.8HamNet (ResNet-101)
Semantic SegmentationADE20KGFLOPs (512 x 512)15.8Light-Ham (VAN-Small, D=256)
Semantic SegmentationADE20KParams (M)13.8Light-Ham (VAN-Small, D=256)
Semantic SegmentationADE20KValidation mIoU45.2Light-Ham (VAN-Small, D=256)
Conditional Image GenerationImageNet 128x128FID14.8HamGAN
Conditional Image GenerationImageNet 128x128Inception score58.75HamGAN
10-shot image generationADE20K valmIoU51.5Light-Ham (VAN-Huge, 61M, IN-1k, MS)
10-shot image generationADE20K valmIoU51Light-Ham (VAN-Large, 46M, IN-1k, MS)
10-shot image generationADE20K valmIoU49.6Light-Ham (VAN-Base, 27M, IN-1k, MS)
10-shot image generationPASCAL ContextmIoU55.2HamNet (ResNet-101)
10-shot image generationADE20KGFLOPs (512 x 512)71.8Light-Ham (VAN-Huge)
10-shot image generationADE20KParams (M)61.1Light-Ham (VAN-Huge)
10-shot image generationADE20KValidation mIoU51.5Light-Ham (VAN-Huge)
10-shot image generationADE20KGFLOPs (512 x 512)55Light-Ham (VAN-Large)
10-shot image generationADE20KParams (M)45.6Light-Ham (VAN-Large)
10-shot image generationADE20KValidation mIoU51Light-Ham (VAN-Large)
10-shot image generationADE20KGFLOPs (512 x 512)34.4Light-Ham (VAN-Base)
10-shot image generationADE20KParams (M)27.4Light-Ham (VAN-Base)
10-shot image generationADE20KValidation mIoU49.6Light-Ham (VAN-Base)
10-shot image generationADE20KValidation mIoU46.8HamNet (ResNet-101)
10-shot image generationADE20KGFLOPs (512 x 512)15.8Light-Ham (VAN-Small, D=256)
10-shot image generationADE20KParams (M)13.8Light-Ham (VAN-Small, D=256)
10-shot image generationADE20KValidation mIoU45.2Light-Ham (VAN-Small, D=256)

Related Papers

SeC: Advancing Complex Video Object Segmentation via Progressive Concept Construction2025-07-21DiffOSeg: Omni Medical Image Segmentation via Multi-Expert Collaboration Diffusion Model2025-07-17SCORE: Scene Context Matters in Open-Vocabulary Remote Sensing Instance Segmentation2025-07-17Unified Medical Image Segmentation with State Space Modeling Snake2025-07-17A Privacy-Preserving Semantic-Segmentation Method Using Domain-Adaptation Technique2025-07-17fastWDM3D: Fast and Accurate 3D Healthy Tissue Inpainting2025-07-17Synthesizing Reality: Leveraging the Generative AI-Powered Platform Midjourney for Construction Worker Detection2025-07-17FashionPose: Text to Pose to Relight Image Generation for Personalized Fashion Visualization2025-07-17