HyperTime: Implicit Neural Representation for Time Series

Elizabeth Fons, Alejandro Sztrajman, Yousef El-Laham, Alexandros Iosifidis, Svitlana VyetrenkoarXiv 2022 · DOI

Introduction

Traditional time series analysis typically treats data as discrete sequences or grids. However, this approach faces significant challenges when dealing with irregularly sampled data or missing values—common occurrences in fields such as finance and medicine. Furthermore, generating realistic synthetic time series that preserve underlying frequency characteristics remains a difficult task for existing generative models like GANs.

HyperTime addresses these issues by introducing a framework that represents time series as Implicit Neural Representations (INRs). Instead of discrete points, signals are treated as continuous functions $f(t)$ encoded within the weights of a neural network. This shift allows for seamless handling of missing data and high-fidelity signal reconstruction.

The HyperTime Framework

The authors propose a two-tier architecture designed to capture both local signal details and global dataset patterns:

  1. Base INR (SIREN): Unlike standard networks using ReLU activations, HyperTime utilizes Sinusoidal Representation Networks (SIREN). The periodic nature of sine wave activations makes them mathematically superior for capturing the high-frequency details and derivatives inherent in complex time-series signals.
  2. Hypernetwork Architecture: To scale across entire datasets, a Set Encoder compresses a subset of $(t, f(t))$ pairs into a latent embedding $Z$. A HyperNet then takes this embedding to predict the weights for a secondary "HypoNet," which serves as the actual INR for that specific sample.
  3. FFT-Based Loss: To ensure synthetic signals maintain the correct power spectrum, the model incorporates a loss function based on the Fast Fourier Transform (FFT), forcing the network to align with the original data's frequency domain.
The HyperTime architecture: A Set Encoder produces a latent embedding Z from input pairs, which a HyperNet uses to generate weights for the HypoNet INR to reconstruct the signal.

Experimental Results and Insights

HyperTime was evaluated against the UCR Archive, financial data, and energy datasets. The results highlight several key advantages of the INR approach:

  • Superiority of Sine Activations: Periodic activations outperform ReLU, Tanh, and Sigmoid by orders of magnitude. In reconstruction tasks on the NonInvasiveFetalECG dataset, SIREN achieved an MSE of $2.3 \times 10^{-5}$, while ReLU lagged at $2.8 \times 10^{-2}$.
  • Robust Imputation: Because the representation is continuous, missing data can be recovered by simply querying the network at the missing time coordinates. Even with 90% of data points missing, the combination of SIREN and a Total Variation (TV) prior outperformed classical linear and cubic interpolations.
  • Generative Performance: By interpolating between latent embeddings, HyperTime generates high-quality synthetic data. With the inclusion of the FFT loss, the model achieved a Predictive Score (MAE) of 0.005 on the NonInv dataset, significantly beating TimeGAN (0.028).
Comparison of activation functions: Sine-based INRs (SIREN) converge significantly faster to lower MSE levels and provide much more accurate qualitative reconstructions of the ground truth signal compared to ReLU or Sigmoid.

Conclusion

HyperTime demonstrates that treating time series as continuous functions via Implicit Neural Representations offers a powerful alternative to discrete sequence modeling. While future work is needed to address non-stationary signals and extreme scalability, the current framework provides a robust solution for reconstruction, imputation, and synthetic data generation. The learned latent embeddings also hold potential for downstream tasks like classification and anomaly detection.

Summary updated

Abstract

Implicit neural representations (INRs) have recently emerged as a powerful tool that provides an accurate and resolution-independent encoding of data. Their robustness as general approximators has been shown in a wide variety of data sources, with applications on image, sound, and 3D scene representation. However, little attention has been given to leveraging these architectures for the representation and analysis of time series data. In this paper, we analyze the representation of time series using INRs, comparing different activation functions in terms of reconstruction accuracy and training convergence speed. We show how these networks can be leveraged for the imputation of time series, with applications on both univariate and multivariate data. Finally, we propose a hypernetwork architecture that leverages INRs to learn a compressed latent representation of an entire time series dataset. We introduce an FFT-based loss to guide training so that all frequencies are preserved in the time series. We show that this network can be used to encode time series as INRs, and their embeddings can be interpolated to generate new time series from existing ones. We evaluate our generative method by using it for data augmentation, and show that it is competitive against current state-of-the-art approaches for augmentation of time series.
BibTeX
@misc{fons2022hypertime,
  author = {Elizabeth Fons and Alejandro Sztrajman and Yousef El-Laham and Alexandros Iosifidis and Svitlana Vyetrenko},
  title = {{HyperTime: Implicit Neural Representation for Time Series}},
  year = {2022},
  eprint = {2208.05836},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2208.05836},
}
Figure