[Paper Review] Highly Efficient Forward and Backward Propagation of Convolutional Neural Networks for Pixelwise Classification
This paper proposes highly efficient forward and backward propagation algorithms for convolutional neural networks (CNNs) in pixelwise classification tasks by eliminating redundant computation across overlapping image patches. Using d-regularly sparse kernels, the method enables continuous GPU memory access, achieving over 1,500× speedup in both forward and backward passes compared to patch-by-patch scanning, with further gains as image and patch sizes increase.
We present highly efficient algorithms for performing forward and backward propagation of Convolutional Neural Network (CNN) for pixelwise classification on images. For pixelwise classification tasks, such as image segmentation and object detection, surrounding image patches are fed into CNN for predicting the classes of centered pixels via forward propagation and for updating CNN parameters via backward propagation. However, forward and backward propagation was originally designed for whole-image classification. Directly applying it to pixelwise classification in a patch-by-patch scanning manner is extremely inefficient, because surrounding patches of pixels have large overlaps, which lead to a lot of redundant computation. The proposed algorithms eliminate all the redundant computation in convolution and pooling on images by introducing novel d-regularly sparse kernels. It generates exactly the same results as those by patch-by-patch scanning. Convolution and pooling operations with such kernels are able to continuously access memory and can run efficiently on GPUs. A fraction of patches of interest can be chosen from each training image for backward propagation by applying a mask to the error map at the last CNN layer. Its computation complexity is constant with respect to the number of patches sampled from the image. Experiments have shown that our proposed algorithms speed up commonly used patch-by-patch scanning over 1500 times in both forward and backward propagation. The speedup increases with the sizes of images and patches.
Motivation & Objective
- Address the inefficiency of patch-by-patch scanning in CNN-based pixelwise classification, where overlapping patches cause massive redundant computation.
- Overcome the performance bottleneck in real-time applications such as image segmentation, object detection, and scene labeling due to high computational cost.
- Enable efficient, end-to-end training of CNNs for pixelwise tasks by making backward propagation computationally feasible at scale.
- Provide a general-purpose solution compatible with various CNN architectures and pooling/convolution configurations, especially for large images and patches.
- Facilitate dynamic, error-guided training patch selection by enabling fast, constant-complexity backward propagation on arbitrary subsets of pixels.
Proposed method
- Introduce d-regularly sparse kernels that reconfigure standard convolution and pooling operations with arbitrary strides into equivalent 1-stride operations, eliminating redundancy.
- Reformulate convolution and pooling as continuous memory-access operations on GPUs by exploiting the regular sparsity pattern of overlapping patches.
- Apply a mask to the error map at the final CNN layer to selectively sample only a fraction of patches for backward propagation, maintaining constant computational complexity.
- Ensure numerical equivalence to patch-by-patch scanning by preserving exact gradient computation through kernel reorganization and memory access optimization.
- Design GPU-optimized kernels that support continuous memory access, maximizing bandwidth utilization and minimizing latency.
- Support arbitrary input patch sizes and network architectures by dynamically adjusting kernel and stride configurations via the d-regularly sparse framework.
Experimental results
Research questions
- RQ1How can redundant computation in CNN forward and backward propagation be completely eliminated for overlapping image patches in pixelwise classification?
- RQ2Can a general-purpose algorithm be designed to achieve high efficiency across diverse CNN architectures and patch sizes without sacrificing numerical accuracy?
- RQ3What is the maximum achievable speedup in forward and backward propagation for pixelwise classification using optimized kernel structures and memory access patterns?
- RQ4Can backward propagation be made independent of the number of sampled patches by using error map masking, enabling efficient training on large-scale datasets?
- RQ5To what extent does the proposed method scale with increasing image and patch sizes, and how does it compare to standard patch-by-patch approaches in practice?
Key findings
- The proposed algorithm achieves over 1,500× speedup in both forward and backward propagation compared to standard patch-by-patch scanning, with results validated across multiple image and patch sizes.
- Speedup increases with larger image and patch dimensions, reaching 1,815.9× for a $644 \times 644$ image with a $133 \times 133$ patch.
- Backward propagation with error masks maintains constant computation complexity regardless of the number of selected patches (tested with 128, 512, 1024 pixels), enabling efficient training on subsets.
- Numerical differences between the proposed method and patch-by-patch scanning are smaller than $10^{-6}$, confirming exact equivalence in gradient computation.
- The method enables continuous memory access on GPUs, significantly improving bandwidth utilization and reducing latency, especially for large-scale inference and training.
- The framework is extensible to 3D convolution and pooling in video analysis, where redundancy is even higher, suggesting potential for even greater speedups in temporal tasks.
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.