arXiv:2504.19026cs.LGmath.OC2025-04被引 3

提出可微分的平滑取整函数,用于优化与机器学习。

Smooth Approximations of the Rounding Function

  • 用移位sigmoid差值模拟取整的阶梯特性
  • 通过局部密度加权实现整数间的平滑插值
  • 计算量低且适合梯度下降等场景

本文提出新型平滑近似取整函数,适用于可微优化与机器学习。方法一基于中心位于各整数处的局部sigmoid窗函数,通过移位sigmoid的差值逼近取整的阶跃行为;方法二则利用sigmoid导数的归一化加权和表示局部密度,实现整数间的平滑插值。两种方法在尖锐参数k趋于无穷时均点态收敛至经典取整函数,且可在平滑性与精度间灵活权衡。通过限制求和范围至最近邻整数,计算开销保持较低而精度不受影响。这些构造提供了完全可微的硬取整替代方案,在依赖梯度的方法中具有重要价值。

原文摘要 · Abstract (English)

We propose novel smooth approximations to the classical rounding function, suitable for differentiable optimization and machine learning applications. Our constructions are based on two approaches: (1) localized sigmoid window functions centered at each integer, and (2) normalized weighted sums of sigmoid derivatives representing local densities. The first method approximates the step-like behavior of rounding through differences of shifted sigmoids, while the second method achieves smooth interpolation between integers via density-based weighting. Both methods converge pointwise to the classical rounding function as the sharpness parameter k tends to infinity, and allow controlled trade-offs between smoothness and approximation accuracy. We demonstrate that by restricting the summation to a small set of nearest integers, the computational cost remains low without sacrificing precision. These constructions provide fully differentiable alternatives to hard rounding, which are valuable in contexts where gradient-based methods are essential.

可微优化取整近似平滑函数

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。