HOSC: A Periodic Activation Function for Preserving Sharp Features in Implicit Neural Representations
Danzel Serrano, Jakub Szymkowiak, Przemyslaw Musialski
TL;DR
The paper tackles preserving sharp features in implicit neural representations (INRs) without resorting to heavy positional encodings. It introduces Hyperbolic Oscillation (HOSC), a periodic activation $\mathrm{HOSC}(x;\beta) = \tanh(\beta \sin x)$ with a tunable sharpness $\beta$, and AdaHOSC, which learns $\beta$ during training since $\partial_{\beta} \mathrm{HOSC}(x;\beta) = \sin(x)(1 - \mathrm{HOSC}(x;\beta)^2)$. Across tasks including image fitting, gigapixel image approximation, and signed distance function (SDF) representations, HOSC and AdaHOSC outperform ReLU and SIREN in preserving high-frequency details and achieving higher PSNR/IoU, with performance approaching that of Fourier-feature methods in some cases. While effective and lightweight, the method exhibits spectral-bias limitations for certain domains (e.g., NeRFs, PDE solvers) and may benefit from integration with hybrid encodings or architectural enhancements in future work.
Abstract
Recently proposed methods for implicitly representing signals such as images, scenes, or geometries using coordinate-based neural network architectures often do not leverage the choice of activation functions, or do so only to a limited extent. In this paper, we introduce the Hyperbolic Oscillation function (HOSC), a novel activation function with a controllable sharpness parameter. Unlike any previous activations, HOSC has been specifically designed to better capture sudden changes in the input signal, and hence sharp or acute features of the underlying data, as well as smooth low-frequency transitions. Due to its simplicity and modularity, HOSC offers a plug-and-play functionality that can be easily incorporated into any existing method employing a neural network as a way of implicitly representing a signal. We benchmark HOSC against other popular activations in an array of general tasks, empirically showing an improvement in the quality of obtained representations, provide the mathematical motivation behind the efficacy of HOSC, and discuss its limitations.
