[论文解读] Highly Efficient Forward and Backward Propagation of Convolutional Neural Networks for Pixelwise Classification
该论文通过消除重叠图像块之间冗余计算,提出了一种针对像素级分类任务的卷积神经网络(CNN)前向和反向传播的高效算法。利用d-正则稀疏核,该方法实现了GPU上的连续内存访问,与逐块扫描相比,前向和反向传播速度提升超过1,500倍,且随着图像和块尺寸增大,性能提升进一步增强。
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.
研究动机与目标
- 解决基于CNN的像素级分类中逐块扫描的低效问题,其中重叠块导致大量冗余计算。
- 克服因计算成本过高导致的实时应用性能瓶颈,如图像分割、目标检测和场景标注。
- 通过使大规模反向传播在计算上可行,实现像素级任务的高效端到端CNN训练。
- 提供一种通用解决方案,兼容多种CNN架构及池化/卷积配置,尤其适用于大图像和大块尺寸。
- 通过在任意像素子集上实现快速、恒定复杂度的反向传播,支持动态、误差引导的训练块选择。
提出的方法
- 引入d-正则稀疏核,将标准卷积和池化操作与任意步长重新配置为等效的单步长操作,从而消除冗余。
- 通过利用重叠块的规则稀疏模式,将卷积和池化重新表述为GPU上的连续内存访问操作。
- 在CNN最后一层的误差图上应用掩码,仅选择部分块用于反向传播,同时保持恒定的计算复杂度。
- 通过核重排和内存访问优化,保留精确的梯度计算,确保与逐块扫描的数值等价性。
- 设计GPU优化核,支持连续内存访问,最大化带宽利用率并最小化延迟。
- 通过d-正则稀疏框架动态调整核和步长配置,支持任意输入块尺寸和网络架构。
实验结果
研究问题
- RQ1如何在像素级分类中,完全消除重叠图像块在CNN前向和反向传播中的冗余计算?
- RQ2能否设计一种通用算法,在不牺牲数值精度的前提下,实现对多样化CNN架构和块尺寸的高效处理?
- RQ3通过优化核结构和内存访问模式,像素级分类在前向和反向传播中可实现的最大加速比是多少?
- RQ4通过误差图掩码是否可使反向传播独立于采样块的数量,从而实现在大规模数据集上的高效训练?
- RQ5所提方法在图像和块尺寸增大时的可扩展性如何?与标准逐块扫描方法在实际应用中相比表现如何?
主要发现
- 所提算法与标准逐块扫描相比,前向和反向传播速度提升均超过1,500倍,且在多种图像和块尺寸下均得到验证。
- 随着图像和块尺寸增大,加速比进一步提升,在$644 \times 644$图像与$133 \times 133$块下达到1,815.9×。
- 使用误差掩码的反向传播保持恒定计算复杂度,无论选择多少个块(测试中为128、512、1024个像素),均支持高效子集训练。
- 与逐块扫描相比,该方法的数值差异小于$10^{-6}$,证实了梯度计算的完全等价性。
- 该方法实现了GPU上的连续内存访问,显著提升带宽利用率并降低延迟,尤其在大规模推理与训练中优势明显。
- 该框架可扩展至视频分析中的3D卷积与池化,其中冗余程度更高,预示在时间任务中可能实现更大的加速潜力。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。