Smooth Approximations of the Rounding Function

Stanislav Semenov
4/26/2025
cs.LGmath.OC

No confident code implementation found for this paper.

Abstract

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{semenov2025smooth,
  title  = {Smooth Approximations of the Rounding Function},
  author = {Stanislav Semenov},
  year   = {2025},
  eprint = {2504.19026},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2504.19026v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2504.19026.svg)](https://codeofpaper.com/paper/2504.19026)

Discussion