Learning High-Frequency Functions Made Easy with Sinusoidal Positional Encoding

Chuanhao Sun, Zhihang Yuan, Kai Xu, Luo Mai, N. Siddharth +2 more
7/12/2024
cs.LG

No official code found. Best implementation: zhyuan11/SPE (5 stars, MIT, last commit 2024-10-10).

Abstract

Fourier features based positional encoding (PE) is commonly used in machine learning tasks that involve learning high-frequency features from low-dimensional inputs, such as 3D view synthesis and time series regression with neural tangent kernels. Despite their effectiveness, existing PEs require manual, empirical adjustment of crucial hyperparameters, specifically the Fourier features, tailored to each unique task. Further, PEs face challenges in efficiently learning high-frequency functions, particularly in tasks with limited data. In this paper, we introduce sinusoidal PE (SPE), designed to efficiently learn adaptive frequency features closely aligned with the true underlying function. Our experiments demonstrate that SPE, without hyperparameter tuning, consistently achieves enhanced fidelity and faster training across various tasks, including 3D view synthesis, Text-to-Speech generation, and 1D regression. SPE is implemented as a direct replacement for existing PEs. Its plug-and-play nature lets numerous tasks easily adopt and benefit from SPE.

View on arXivView PDF

Code Implementations(1)

zhyuan11/SPECommunity100%
MIT

Official Implementation for Sinusoidal Positional Encoding (SPE)

51Shell, PythonFeb 15, 20242 years agoMIT

Cite this paper

@article{sun2024learning,
  title  = {Learning High-Frequency Functions Made Easy with Sinusoidal Positional Encoding},
  author = {Chuanhao Sun and Zhihang Yuan and Kai Xu and Luo Mai and N. Siddharth and Shuo Chen and Mahesh K. Marina},
  year   = {2024},
  eprint = {2407.09370},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2407.09370v2},
  journal = {ICML 2024 2024}
}

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/2407.09370.svg)](https://codeofpaper.com/paper/2407.09370)

Discussion