Story Details

  • The Speed of VITs and CNNs

    Posted: 2025-05-02 04:53:46

    The blog post explores the relative speeds of Vision Transformers (ViTs) and Convolutional Neural Networks (CNNs), finding that while ViTs theoretically have lower computational complexity, they are often slower in practice. This discrepancy arises from optimized CNN implementations benefiting from decades of research and hardware acceleration. Specifically, highly optimized convolution operations, efficient memory access patterns, and specialized hardware like GPUs favor CNNs. While ViTs can be faster for very high-resolution images where their quadratic complexity is less impactful, they generally lag behind CNNs at common image sizes. The author concludes that focused optimization efforts are needed for ViTs to realize their theoretical speed advantages.

    Summary of Comments ( 0 )
    https://news.ycombinator.com/item?id=43866329

    The Hacker News comments discuss the surprising finding in the linked article that Vision Transformers (ViTs) can be faster than Convolutional Neural Networks (CNNs) under certain hardware and implementation conditions. Several commenters point out the importance of efficient implementations and hardware acceleration for ViTs, with some arguing that the article's conclusions might not hold true with further optimization of CNN implementations. Others highlight the article's focus on inference speed, noting that training speed is also a crucial factor. The discussion also touches on the complexities of performance benchmarking, with different hardware and software stacks yielding potentially different results, and the limitations of focusing solely on FLOPs as a measure of efficiency. Some users express skepticism about the long-term viability of ViTs given their memory bandwidth requirements.