通过引入两种新型空值处理机制,显著提升神经影像U-Net推理速度。
Conservative & Aggressive NaNs Accelerate U-Nets for Neuroimaging
- 用NaN标记数值不稳定的体素,跳过无关计算以减少冗余操作。
- 在超过三分之二数据为NaN时,平均提速1.67倍,卷积次数减少30%。
- 无需修改模型结构,适合高噪声神经影像任务的高效推理场景。
神经影像领域的深度学习模型日益依赖大型网络架构,尽管硬件不断进步,效率仍是长期挑战。通过对卷积神经网络(CNN)数值不确定性的分析,我们发现许多运算作用于受数值噪声主导的值,对模型输出影响极小,在某些模型中高达三分之二的卷积操作是冗余的。为此,我们提出保守型与激进型NaNs两种新型最大池化与反池化变体,识别数值不稳定的体素并替换为NaN,使后续层可跳过无关数据的计算。两种方法均基于PyTorch实现,无需改变网络结构。我们在四个涵盖神经影像与图像分类任务的CNN模型上评估该方法。当输入含至少50% NaN时,运行时间持续优化;在超过三分之二数据为NaN的神经影像常见情形下,平均推理速度提升1.67倍。保守型NaNs在各模型与数据集上平均减少30%卷积操作,特定层最多跳过64.64%卷积,性能无明显下降;激进型NaNs最多可跳过69.30%卷积,但可能偶尔影响精度。结果表明,利用数值不确定性可有效削减冗余计算,提升CNN推理效率。
原文摘要 · Abstract (English)
Deep learning models for neuroimaging increasingly rely on large architectures, making efficiency a persistent concern despite advances in hardware. Through an analysis of numerical uncertainty of convolutional neural networks (CNNs), we observe that many operations are applied to values dominated by numerical noise and have negligible influence on model outputs. In some models, up to two-thirds of convolution operations appear redundant. We introduce Conservative & Aggressive NaNs, two novel variants of max pooling and unpooling that identify numerically unstable voxels and replace them with NaNs, allowing subsequent layers to skip computations on irrelevant data. Both methods are implemented within PyTorch and require no architectural changes. We evaluate these approaches on four CNN models spanning neuroimaging and image classification tasks. For inputs containing at least 50% NaNs, we observe consistent runtime improvements; for data with more than two-thirds NaNs )common in several neuroimaging settings) we achieve an average inference speedup of 1.67x. Conservative NaNs reduces convolution operations by an average of 30% across models and datasets, with no measurable performance degradation, and can skip up to 64.64% of convolutions in specific layers. Aggressive NaNs can skip up to 69.30% of convolutions but may occasionally affect performance. Overall, these methods demonstrate that numerical uncertainty can be exploited to reduce redundant computation and improve inference efficiency in CNNs.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。