Table of Contents
Fetching ...

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.

HOSC: A Periodic Activation Function for Preserving Sharp Features in Implicit Neural Representations

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 with a tunable sharpness , and AdaHOSC, which learns during training since . 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.
Paper Structure (12 sections, 4 equations, 7 figures)

This paper contains 12 sections, 4 equations, 7 figures.

Figures (7)

  • Figure 1: Reconstruction of an image using an MP running different activation functions. The process involved training a five-layer coordinate-based MLP with a width of $256$ for $100$ iterations for each of the activations. No positional encoding and no frequency initialization has been used.
  • Figure 2: Comparison of the sine, square, and HOSC waves for different values of the sharpness parameter $\beta \in \{1, 2, 4, 16\}$. As $\beta$ increases, HOSC starts to resemble a square wave.
  • Figure 3: Comparison of a ReLU, SIREN, and HOSC fitting the 'Cameraman' image for 1000 epochs and a high-frequency detail 'Cat' image for 5000 epochs. The plot to the right shows PSNRs of the model to ground truth per epoch of training; for the 'Cat' we used adaptively scheduled learning rate. Below each resulting model is the residual difference from the ground truth signal.
  • Figure 4: Top: Results of fitting a HOSC and a SIREN model to a high-resolution image. Bottom: A plot of PSNR per epoch for both methods.
  • Figure 5: Comparison of a ReLU, SIREN, and HOSC fitting an image of random square patches of dimension 1x1, 4x4, and 16x16. The plot to the right shows PSNRs of the model to ground truth per epoch of training.
  • ...and 2 more figures