TL;DR
C-GSPN introduces a highly efficient foundation-scale vision encoder built on 2D spatial propagation rather than self-attention, bypassing the quadratic scaling bottleneck of Vision Transformers (ViTs) without flattening images into 1D streams. By combining a hardware-optimized CUDA kernel, a compressed latent-space block architecture, and a novel cross-operator distillation recipe, C-GSPN matches ViT performance with 15% fewer parameters while delivering a 4× block-level speedup at 2K resolution.
What Problem Does This Paper Address?
Vision Transformers (ViTs) are the bedrock of modern computer vision, powering everything from CLIP to diffusion models. However, they suffer from a fundamental flaw: the computational cost of self-attention scales quadratically ($O(N^2)$) with the number of tokens. As image resolution increases, memory and latency explode, forcing practical systems to cap input sizes or rely on complex tiling strategies.
Subquadratic alternatives like State-Space Models (SSMs) and linear attention reduce this cost, but they typically flatten 2D images into 1D token streams, discarding crucial spatial structure. Generalized Spatial Propagation Networks (GSPN) offer a promising alternative by propagating context directly across a 2D grid using line-scan recurrences, achieving near-linear complexity ($O(\sqrt{N})$). Despite this theoretical advantage, GSPN has not been used at foundation scale because its reference implementation is hardware-inefficient, its per-layer overhead is high, and training a brand-new operator from scratch at scale is prohibitively expensive.
Methods
The authors make 2D spatial propagation practical at scale through a three-tiered efficiency redesign called C-GSPN:
- System Efficiency (Fast GSPN Kernel): The original GSPN launched thousands of tiny CUDA kernels sequentially, bottlenecking the GPU. The authors design a single, fused, warp-specialized CUDA kernel that caches hidden states in shared memory, ensures coalesced memory access, and introduces channel-shared weights to prevent GPU concurrency saturation.
- Architecture Efficiency (Latent-Space Propagation): Even with a fast kernel, surrounding operations (projections, normalization) dominate block latency. C-GSPN projects features into a compressed latent space, runs the 2D spatial propagation there with a fused row-stochastic normalization kernel, and projects back up, stripping out attention-era residual overhead.
- Training Efficiency (Cross-Operator Distillation): Because C-GSPN cannot inherit pretrained ViT weights, the authors introduce a two-stage distillation recipe to transfer knowledge from a ViT teacher.
- Stage 1 (Sublayer-wise alignment): Each propagation sublayer is trained independently to match its corresponding teacher attention sublayer.
- Stage 2 (End-to-end distillation): The model is trained end-to-end using "dual taps"—supervising both post-propagation and post-block features via lightweight MLP feature adaptors. A small attention budget (replacing every 9th block with standard attention) is maintained to inject sparse pairwise mixing.
Datasets
The model was pretrained and distilled using:
- DataComp: A subset of 5M image-text pairs for lightweight pretraining, and a large-scale 600M curated image-text dataset for full foundation-scale distillation.
Evaluation was conducted across standard vision benchmarks:
- ImageNet-1K for image classification.
- ADE20K (and ADE20K-F) and PASCAL for semantic segmentation.
- COCO for object detection and text-to-image generation.
Key Insights and Ideas
- The Concurrency Wall: In standard GSPN, processing thousands of channels independently creates too many concurrent thread blocks, saturating the GPU's Streaming Multiprocessors (SMs) and causing severe queuing. Sharing propagation matrices across channels and using a low-dimensional proxy space bounds this concurrency pressure.
- Overhead Dominance: Optimizing the core operator is not enough. At standard resolutions, non-propagation components (like linear projections and residuals inherited from ViT templates) account for over 90% of layer latency. True model-level speedups require stripping away this structural baggage.
- Bridging the Operator Gap: Attention and spatial propagation mix information fundamentally differently (pairwise global vs. sequential local). Direct weight transfer fails, but dual-tap feature distillation with learnable adaptors successfully aligns their representation spaces.
Key Results
- Kernel Speedups: The fast GSPN kernel achieves over 90% of peak memory bandwidth, running 40–52× faster than the original GSPN reference implementation.
- Foundation-Scale Quality: When distilled on 600M pairs, C-GSPN matches an isomorphic ViT baseline's macro average performance while using 15% fewer parameters (365M vs 427M) and improving ADE20K segmentation by +2.1% mIoU.
- High-Resolution Scaling: At 2K resolution, C-GSPN delivers a 4× end-to-end block speedup over FlashAttention and enables single-pass, tiling-free inference.
Limitations and Future Work
While C-GSPN represents a major leap forward, the authors note several limitations:
- Low-Workload Underutilization: When the product of batch size and channel count is small, the fast GSPN kernel underutilizes the GPU's SMs because there are too few resident blocks.
- The New Bottleneck: Because C-GSPN accelerates the propagation sublayer so effectively, the feed-forward network (MLP) has become the dominant cost, accounting for 52% of block latency at resolutions $\ge$ 512.
- Missing Token Primitives: The current operator lacks native support for CLS and register tokens, which limits drop-in compatibility with certain ViT-dependent downstream pipelines.
Future work will focus on MLP compression, kernel fusion, and extending C-GSPN to video and multimodal long-context settings.
Summary updated