Source-linked AI summary

Rethinking Time Series Tokenization from a Frequency Perspective

Zelong Tian, Ming Jin, Bo Du, Shirui Pan

arXiv:2610.28997v1cs.LGcs.AI

TL;DR

Existing time-series tokenizers can distort frequency information and change learned temporal patterns. TimeFT partitions and shifts frequency bands before Nyquist sampling, and experiments report improved results across several tasks. Its information-preserving conditions depend on the signal and tokenization setting.

  • Problem

    Patch windowing and phase downsampling can distort frequency information, causing token patterns to diverge from the original series and degrading model performance.

    Source: §1 · p. 2
  • Method

    TimeFT derives distortion boundary conditions and forms tokens through frequency-domain partitioning, spectral shifting, and Nyquist sampling.

    Source: §1 · pp. 2–3
  • Results

    TimeFT outperforms existing practices across forecasting, classification, and anomaly detection, with nearly 10% improvement in many cases as a plug-in module.

    Source: §1 · p. 3, §6 · p. 10
  • Takeaways & Limitations

    TimeFT is a parameter-free, lightweight tokenizer that can serve as a plug-in module for a wide range of models.

    Source: §1 · p. 2, §6 · p. 10

    Patch tokenization preserves all information only when its window covers every nonzero sample, or for periodic sequences when its length is a period multiple; these conditions rarely hold for general time series.

    Source: §3.1 · p. 4

Abstract

from arXiv · show

Tokenization that partitions time series into subsequences has become a foundational paradigm in modern time series modeling. However, we find that current tokenization strategies inherently introduce spectral distortions, forcing the learned representations to diverge from the true underlying patterns such as trend, periodicity, and seasonality, thereby impairing model performance. Through theoretical analysis from a frequency perspective, we derive the boundary conditions under which such distortions occur. To overcome this distortion, we propose TimeFT, a nearly distortion-free frequency-based tokenizer for time series data. TimeFT obtains tokens through frequency-domain partitioning, frequency shifting, and Nyquist sampling. The method is parameter-free, incurs negligible computational complexity, and can serve as a drop-in replacement for existing tokenizers. Our extensive experiments on diverse tasks such as forecasting, classification, and anomaly detection demonstrate that TimeFT consistently and significantly improves performance.

1 Introduction

Existing time-series tokenizers can distort frequency information and alter learned temporal patterns; TimeFT uses frequency-domain processing to preserve that information. Experiments report improved performance across forecasting, classification, and anomaly detection.

1 Introduction

  • Patch tokenization segments sequences, while phase tokenization downsamples them; their frequency-domain effects have remained largely unexplored.The paper identifies patch and phase tokens as two main classes of tokenization methods.Source: §1 · pp. 1–2
  • Patch windowing causes information loss and spectral leakage, while phase downsampling causes aliasing that can distort trend, periodicity, and seasonality.These distortions can lead models to learn erroneous patterns and degrade performance.Source: §1 · p. 2
  • The paper derives transformation relationships between time and frequency domains and establishes boundary conditions for tokenization distortions.It identifies tokenization distortions and sequence-length constraints on frequency as underlying factors.Source: §1 · pp. 2–3
  • TimeFT preserves frequency information through frequency-domain partitioning, spectral shifting, and Nyquist sampling.The method is parameter-free and designed as a model-agnostic tokenizer.Source: §1 · pp. 2–3
  • TimeFT achieves state-of-the-art performance across forecasting, classification, and anomaly detection, with nearly 10% improvement in many cases as a plug-in module.Its time cost is consistently less than 1.4% of training time per epoch.Source: §1 · p. 3

2 Preliminaries

This section defines time-series tokenization and analyzes how patch windowing and phase downsampling affect frequency information. It identifies spectral leakage, limited resolution, information loss, and aliasing as potential distortions.

2 Preliminaries

  • Tokenization discretizes a multivariate time series into a finite collection of tokens that models can learn.The input has V variates and sequence length N.Source: §2 · p. 3
  • Rectangular patch windowing creates spectral leakage, limits frequency resolution, and discards sequence information outside the window.Components spaced closer than half the mainlobe interval can merge, regardless of original sequence length.Source: §2 · p. 3
  • Phase tokenization is downsampling; when frequencies exceed the bound B, spectral replicas overlap and high-frequency components fold into lower frequencies.This aliasing is irreversible, and avoiding it requires Nyquist-compliant sampling.Source: §2 · p. 3
  • Downsampling is alias-free when the original signal is bandlimited to no more than the new Nyquist frequency, fs/2S.Sampling under this condition is called Nyquist sampling.Source: §2 · p. 3

3 Methodology

TimeFT divides the spectrum into sub-bands, shifts them to baseband, then samples and reshapes them into tokens. Its design relies on boundary conditions for preserving information during tokenization.

3 Methodology

  • TimeFT comprises frequency-domain decomposition, spectral shifting, and information-preserving token extraction.The pipeline uses a frequency threshold BN and Nyquist sampling to produce almost distortion-free tokens.Source: §3 · pp. 3–4, Figure 3 · p. 4

3.1 Boundary Conditions for Distortion-Free Tokenization

  • Patch tokens permit exact reconstruction when the window covers every nonzero sample; for periodic sequences, a window length that is a multiple of the period also suffices.The paper notes that these conditions rarely occur for general time series.Source: §3.1 · p. 4
  • Phase tokenization is information-preserving when the maximum frequency component is no greater than BN.Under this condition, the original sequence can be perfectly recovered from the tokens.Source: §3.1 · p. 4

3.2 Frequency Domain Decomposition Based on Boundary Conditions

  • TimeFT partitions the spectrum into contiguous blocks of BN bins, separating frequency components associated with patterns such as trend, periodicity, and seasonality.The final block is zero-padded when needed; the partitioning is the first step toward avoiding aliasing.Source: §3.2 · p. 5

3.3 Spectral Shifting

  • TimeFT shifts each high-frequency band to baseband so that subsequent downsampling does not fold its components into lower frequencies.The shift includes a phase factor that compensates for the frequency band's starting point; the simplified method ignores it for models.Source: §3.3 · p. 5

3.4 Information-Preserving Token Extraction

  • After inverse transforming each shifted band, TimeFT samples at every possible offset with stride S and reshapes the results into tokens.The dense sampling is lossless for each sub-band when S ≤ N/(2BN); the simplified shift introduces negligible loss at zero frequency.Source: §3.4 · p. 6

4 Experiments

The experiments evaluate TimeFT across forecasting, classification, and anomaly detection, alongside runtime, plug-in, ablation, reconstruction, and stride-sensitivity analyses. TimeFT performs strongly across tasks, transfers to existing architectures, and reduces reconstruction error compared with patch and phase tokenization.

4.1 Experimental Setup

  • The evaluation spans seven forecasting datasets, 10 UEA classification datasets, and five anomaly-detection benchmarks; PatchTST is the backbone except in plug-in experiments.Baselines include tokenization methods and classic time-series models; TSFMs are excluded as baselines and plug-in models because TimeFT is a general tokenization method and pre-training is expensive.Source: §4.1 · pp. 6–7

4.2 Main Results on Various Tasks

  • TimeFT leads across the evaluated tasks: it is best on most forecasting datasets and metrics, has the highest average classification accuracy, and reaches an average anomaly-detection F1-score of 86.12%.For classification, it is best or second-best on a majority of datasets; the forecasting comparison averages MSE and MAE across horizons, and anomaly detection covers five datasets.Source: Table 1 · p. 7, §4.2 · p. 7, Table 2 · p. 7

4.3 Time Complexity Analysis

  • TimeFT’s tokenization overhead is reported as negligible relative to training and evaluation, with complexity O(VN log N + VKN log N + VKN).The comparison reports tokenization time as a proportion of training time per epoch; identical inputs yield identical tokens across epochs, avoiding repeated execution.Source: §4.3 · pp. 7–8, Table 4 · p. 8

4.4 Plug-in Experiment

  • As a plug-in for PatchTST and PhaseFormer, TimeFT improves performance across all seven datasets without changing the base-model design.PatchTST improves by nearly 10% in many cases, while PhaseFormer improves by more than 5% in many cases.Source: §4.4 · p. 8, Table 5 · p. 8

4.5 Ablation Study

  • Removing any one of TimeFT’s three stages significantly degrades forecasting performance, supporting the contribution of each stage.The stages are frequency-domain decomposition, spectral shifting, and information-preserving token extraction; omitting them respectively introduces aliasing, aliases high-frequency components into low frequencies, or uses frequency components directly as tokens.Source: §4.5 · p. 8, Table 6 · p. 8

4.6 Distortion Comparison of Different Tokenizations

  • TimeFT reduces reconstruction error by more than 80% on many datasets compared with patch and phase tokens.The comparison uses mean absolute error between reconstructed and original sequences; the reconstruction transformations are described as theoretically invertible and lossless.Source: §4.6 · p. 9, Figure 4 · p. 9

4.7 Sensitivity Analysis

  • The best stride depends on input length: smaller strides suit N = 96, while larger strides are preferred at N = 720.Stride sets the Nyquist frequency and trades off temporal-detail coverage against downsampling; longer inputs generally yield better performance.Source: §4.7 · p. 9, Figure 5 · p. 9

5 Related Work

Related work centers on patch and phase tokenization, while pre-trained tokenizers and time-series foundation models also commonly use patches. The paper groups token-based methods into three categories.

Token-based methods

  • PatchTST established patching as a key component, followed by patch-based and dynamic-patching methods; PhaseFormer introduced phase tokens as an approximate transpose of patch tokenization.Other approaches include contextual information in SRSNet and a lightweight patch-length classifier in TimeMosaic.Source: §5 · p. 9

Pre-trained tokenizers

  • Pre-trained tokenizers TOTEM and EntroPE remain patch-token methods, using discrete embeddings or learned patch boundaries, respectively.Source: §5 · p. 9

Pre-trained foundation models

  • Recent state-of-the-art time-series foundation models adopt patch tokenization as preprocessing, reinforcing its role in TSFMs.The passage names Chronos-2, Sundial, TiRex, Moirai, and TimeFM as examples.Source: §5 · p. 10

6 Conclusion

TimeFT is presented as a lightweight, parameter-free tokenizer that nearly avoids spectral distortion and improves performance, with nearly 10% improvement as a plug-in module in many cases. The patch-tokenization analysis explains how rectangular-window truncation affects spectra through leakage, finite resolution, and discrete-frequency sampling.

6 Conclusion

  • TimeFT is parameter-free and lightweight, and experiments report nearly 10% improvement as a plug-in module in many cases.The conclusion describes it as a nearly distortion-free tokenizer that outperforms existing practices.Source: §6 · p. 10

A.1 Patch Tokenization

  • Rectangular-window sidelobes spread spectral energy and can mask weak components, while the main-lobe width limits resolution and merges sufficiently close peaks.Figure 6 illustrates leakage and weak-signal masking; the critical separation is 2π/L.Source: §A.1 · pp. 15–16, Figure 6 · p. 15
  • Slicing a windowed sequence to form a patch token leaves its magnitude spectrum unchanged, merely realigning the temporal origin.The leakage and resolution effects therefore also apply to the sliced patch token.Source: §A.1 · p. 17
  • With M = L and worst-case bin offset δ = 0.5, the observed peak-to-true-peak ratio is about 0.637, an amplitude reduction above 36% and nearly 4 dB.Increasing the number of frequency samples through zero-padding mitigates this picket-fence loss.Source: Figure 7 · p. 17, §A.1 · p. 18

A.2 Phase Tokenization

Phase tokenization is downsampling, which compresses the spectrum and overlays shifted replicas; aliasing occurs when the original spectrum extends beyond the alias-free band. The section formalizes the required bandlimit, including its physical-frequency interpretation.

A.2 Phase Tokenization

  • Downsampling compresses the original spectrum by S and shifts replicas by multiples of 2π/S; replicas overlap and irreversibly fold high frequencies into lower ones when energy extends beyond |ω| < π/S.Figure 8 illustrates high-frequency components appearing as spurious low-frequency components when the spectrum is not confined to (−π/S, π/S).Source: §A.2 · p. 20, Figure 8 · p. 20
  • Alias-free phase tokenization requires the original spectrum to be confined to (−π/S, π/S), so each frequency receives a contribution from only one replica.Under this condition, the replicas do not overlap and the original signal can in principle be recovered from the downsampled version.Source: §A.2 · p. 21
  • For a signal sampled at rate fs and downsampled by S, alias-free sampling requires bandlimiting to the new Nyquist frequency fs/(2S).The effective sampling rate is fs/S.Source: §A.2 · p. 21

A.3 Boundary Conditions for Distortion-Free Tokenization

  • The section then formalizes the distinct boundary conditions governing patch and phase tokenization to avoid irreversible distortion.Source: §A.3 · p. 21

A.3.1 Boundary Condition for Patch Tokenization

Patch-token reconstruction has different time- and frequency-domain conditions: lossless recovery depends on window coverage or periodicity, while finite window length imposes a resolution limit. Phase tokenization instead requires a bandlimited input to avoid aliasing.

A.3.1 Boundary Condition for Patch Tokenization

  • For a finite sequence, patch-token reconstruction is lossless when the window covers all non-zero samples; with n0 = 0, this requires L ≥ N.For a periodic signal with fundamental period T, choosing L = mT also suffices for reconstruction by periodic extension.Source: §A.3.1 · p. 21
  • For periodic signals with L = mT, coherent sampling eliminates leakage at DFT harmonic bins, but sidelobes remain between bins and the resolution limit persists.Source: §A.3.1 · p. 21
  • Patch-token frequency resolution requires sinusoid separation of at least 2π/L, independently of whether the time-domain lossless condition is satisfied.The summary states that rectangular-window leakage is otherwise unavoidable, except at DFT bins for coherently sampled periodic signals.Source: §A.3.1 · pp. 21–22

A.3.2 Boundary Condition for Phase Tokenization

  • Phase tokenization is distortion-free only when the original signal satisfies the alias-free bandlimit; energy outside |ω| ≤ π/S folds into the baseband.Source: §A.3.2 · p. 22

A.4.1 Analysis of Distortion

TimeFT partitions the spectrum into sub-bands, shifts them to baseband, and applies Nyquist sampling so each sub-band can be transferred to tokens without aliasing. The analysis also explains why direct coefficient copying preserves phase on the original-length grid, how this differs from processing multiple distorted tokens, and why time-series quantization falls outside the paper’s tokenization scope.

A.4.1 Analysis of Distortion

  • Alias-free sub-bands are shifted to baseband and Nyquist-sampled, transferring their information to tokens almost perfectly apart from a negligible imaginary DC component loss.The chosen bandwidth satisfies the alias-free condition for downsampling by stride S.Source: §A.4.1 · pp. 22–23

A.4.2 Linear Phase Induced by Frequency Shifting

  • Directly copying shifted coefficients preserves the original relative phases when TimeFT uses an N-point inverse RFFT before decimation.A shorter inverse transform would require an explicit phase-compensation factor.Source: §A.4.2 · pp. 23–24

A.4.3 Analysis of Multiple Tokens

  • Independent patch tokens retain distorted patterns despite collectively covering the sequence, while TimeFT tokens can almost losslessly reconstruct it.Cross-token learning can partially alleviate distortion but cannot fully recover missing structure; experiments report no harmful redundancy from TimeFT.Source: §A.4.3 · p. 24

A.5 Difference between Quantization Methods and Our Main Topic

  • Time-series quantization discretizes individual values without subsequence partitioning, so it lies outside this analysis; the paper presents TimeFT as a parameter-free tokenizer grounded in frequency-domain distortion theory.The authors describe their work as the first rigorous frequency-domain foundation for these distortions and their boundary conditions.Source: §A.5 · p. 24

B Reconstruction Methods

The reconstruction procedures expose different limits: patch reconstruction cannot recover discarded information, phase-token reconstruction depends on bandlimiting, and TimeFT reconstruction is nearly exact under its alias-free bandwidth condition. The accompanying experiments cover forecasting, classification, anomaly detection, and additional analyses.

B.1 Reconstruction from Patch Tokens

  • Patch-token reconstruction pads each token and returns it to its temporal position, but discarded information is permanently lost.The token is formed by windowing the sequence and discarding the zero entries.Source: §B.1 · pp. 24–25

B.2 Reconstruction from Phase Tokens

  • Phase-token reconstruction uses Fourier-based sinc interpolation, but energy above |ω| = π/S aliases into low frequencies and cannot be distinguished during upsampling.The reconstruction quality therefore depends on the original signal being bandlimited to |ω| ≤ π/S.Source: §B.2 · p. 25

B.3 Reconstruction from TimeFT Tokens

  • TimeFT reconstruction differs only through discarded imaginary parts of block DC coefficients, with no aliasing when bandwidth B satisfies B ≤ N/(2S).The reconstruction is otherwise algebraically equivalent to ideal bandpass filtering followed by synthesis, unlike patch information loss and phase-token aliasing.Source: §B.3 · p. 26

C Full Experiment Results

  • The full experiments cover forecasting, classification, and anomaly detection, plus computational efficiency, plug-in use, ablations, sensitivity, and reconstruction comparisons.Experiments used an Intel Core i7-13700H CPU and NVIDIA GeForce RTX 4060 GPU.Source: C Full Experiment Results · p. 26

C.1 Long-Term Forecasting Task

Across long-term forecasting, classification, and anomaly detection benchmarks, TimeFT is reported to perform strongly against tokenization baselines. The reported outcomes include best performance on most forecasting datasets and metrics, highest average classification accuracy, and highest average anomaly-detection F1-score.

C.1 Long-Term Forecasting Task

  • TimeFT achieves the best performance on a majority of long-term forecasting datasets and metrics across the evaluated benchmarks.Table 8 evaluates horizons 96, 192, 336, and 720 with a fixed input length of 320.Source: §C.1 · p. 27, Table 8 · p. 28

C.2 Classification

  • On 10 UEA datasets, TimeFT achieves the highest average accuracy and the best or second-best result on a majority of datasets.The comparison evaluates accuracy across the 10 datasets.Source: §C.2 · p. 27, Table 9 · p. 28

C.3 Anomaly Detection

  • TimeFT achieves the highest average F1-score of 86.12% across five anomaly-detection benchmarks.The evaluation compares tokenization baselines and classic time-series models.Source: §C.3 · p. 29, Table 11 · p. 29

C.4 Settings for Other Experiments

The reconstruction comparison reports that TimeFT tokens are nearly distortion-free and reduce reconstruction error substantially on many datasets. Additional experiments examine tokenizer settings, parameter counts, and the effects of stride and input length.

C.4 Settings for Other Experiments

  • The additional experiments test complexity on ETTm1, replace tokenizers while leaving other components unchanged, assess ablations, and vary stride S and input length N.The complexity setting uses input length 320 and prediction length 336; the ablation setting uses input length 320 and prediction length 96.Source: §C.4 · pp. 29–30

C.5 Variation in Model Parameters

  • TimeFT increases embedding parameters because of changed input dimensionality, but the increase is negligible relative to total model parameters.The comparison holds hyperparameters identical across experiments.Source: §C.5 · p. 30, Table 12 · p. 30

C.6 Reconstruction Performance of Different Token Types

  • TimeFT tokens are almost distortion-free and reduce reconstruction error by more than 80% on many datasets relative to the best other tokenization method.The comparison uses mean absolute error with hyperparameters held identical.Source: §C.6 · p. 30, Table 13 · p. 30

D Visualization of TimeFT

Figures 9–15 compare tokenization in the time domain, frequency domain, and after reconstruction, showing TimeFT’s tokenization is almost distortion-free.

D Visualization of TimeFT

  • Patch tokens produce a different frequency spectrum and lose information outside the window, while phase tokens alias above-Nyquist components into low frequencies; TimeFT nearly avoids these distortions.The comparison includes token representations and equivalent reconstructions.Source: D Visualization of TimeFT · p. 30
  • The visualizations cover ETTh1, ETTh2, ETTm1, and ETTm2 datasets.These captions identify the datasets visualized across time, frequency, and reconstruction views.Source: Figure 9 · p. 31, Figure 10 · p. 31, Figure 11 · p. 31
  • The visualizations also cover Weather, Electricity, and Traffic datasets.Each caption describes views across time, frequency, and reconstruction.Source: Figure 13 · p. 32, Figure 14 · p. 32, Figure 15 · p. 33

E Limitations and Social Impacts

This section describes TimeFT’s evaluation and applicability limits, its potential use as a module across time-series applications, and checklist disclosures about human subjects, crowdsourcing, and LLM use.

E Limitations and Social Impacts

  • TimeFT’s benefits in pre-training and fine-tuning remain unverified, and it does not directly improve models that process raw sequences without tokenization.The authors leave evaluation under TSFM regimes to future work; their experiments omit pre-trained TSFMs because of the computational expense of pre-training large-scale models.Source: E Limitations and Social Impacts · p. 33
  • The authors say TimeFT could enhance forecasting, anomaly detection, and classification methods, with potential applications in healthcare, transportation, and economics.Source: E Limitations and Social Impacts · p. 33

NeurIPS Paper Checklist

  • The checklist states that the paper discusses its limitations and addresses potential positive and negative societal impacts in Appendix E.Source: NeurIPS Paper Checklist · pp. 34, 38
  • The checklist reports that experiments were repeated three times, with the best results reported in tables, and that hyperparameter sensitivity was evaluated.Source: NeurIPS Paper Checklist · p. 37
  • The paper marks human-subjects research and crowdsourcing as not applicable.The checklist states that the research does not involve either.Source: NeurIPS Paper Checklist · p. 40
  • The paper marks LLM disclosure as not applicable because LLMs were not an important, original, or non-standard component of the core method.The checklist says this declaration is unnecessary for the described use.Source: NeurIPS Paper Checklist · p. 40
Loading 2610.28997v1…