Source-linked AI summary

FreSia: Frequency-Semantic Instantiation and Alignment for Multivariate Time Series Analysis

Yubo Wang, Hui He, Hezhe Qiao, Guoqing Ji, Zhendong Niu

arXiv:2610.05726v1cs.AI

TL;DR

LLMs have difficulty perceiving time-series structures such as seasonality when numerical data is represented as discrete tokens. FreSia maps frequency-domain structures into semantic prompts and uses CLS-driven calibration to align them with temporal representations. Across eight forecasting and five anomaly-detection benchmarks, the resulting frequency-semantic representations are reported as effective across both tasks.

  • Problem

    LLM representations do not naturally align with continuous time-series dynamics, leaving structures such as periodicity and seasonality implicit in numerical-token sequences.

    Source: §1 · p. 3
  • Method

    FreSia distills frequency-domain structure into semantic prompts and uses CLS-driven calibration to align those prompts with temporal representations.

    Source: §1 · pp. 3–4, §6 · p. 22
  • Results

    FreSia’s frequency-semantic representations are reported as effective across eight forecasting benchmarks and five anomaly-detection benchmarks.

    Source: §6 · p. 22
  • Takeaways & Limitations

    The paper presents frequency-semantic representations as applicable to both forecasting and reconstruction-based anomaly detection.

    Source: §6 · p. 22

Abstract

from arXiv · show

Large Language Models (LLMs) have shown strong potential in multivariate time series forecasting and anomaly detection. Existing studies predominantly inject temporal information into LLMs via direct numerical tokenization or heuristic textual descriptions. However, LLMs still face difficulty in perceiving the underlying structural patterns of numerical time series, particularly the seasonal and trend components obscured by discrete numerical tokens. To bridge this gap, we propose FreSia, a frequency-aware framework that establishes an effective alignment between the semantic space of LLMs and the frequency space of time series. Specifically, FGPrompt, a Frequency-Guided Prompt mechanism within FreSia, distills the frequency-domain structures of time series and projects them into prompts tailored to the semantic space of LLMs. Furthermore, we introduce a Global-driven Context Learning (GCL) component, which uses a global CLS-driven probe to generate global context to bridge the time-frequency domain gap and fuse the multi-modal information. Experiments on eight forecasting benchmarks show that FreSia achieves average improvements of 13.48% and 8.06% in MSE and MAE, respectively.

1. Introduction

LLMs’ discrete linguistic representations do not naturally align with continuous time-series dynamics, leaving structures such as periodicity and seasonality implicit. FreSia uses frequency-guided prompts and global-driven contextualization to align spectral structure with temporal context.

1. Introduction

  • Raw numerical serialization leaves periodicity and seasonality implicit, while LLM token representations are not naturally aligned with continuous numerical dynamics.Existing approaches also use time-domain statistical descriptions or textual prompts based on historical values and trends.Source: §1 · p. 3
  • With task-specific heads, FreSia achieves competitive results across the evaluated forecasting and anomaly-detection benchmarks.Source: §1 · p. 4
  • Top-3 and Top-5 dominant frequencies explain 74.5% and 82.1% of non-DC spectral energy on average across eight benchmark datasets.This motivates representing dense numerical sequences with a few dominant spectral primitives and natural-language descriptors.Source: §1 · p. 3
  • FGPrompt uses FFT to distill intrinsic frequency structure and maps Top-K frequencies into a Frequency Pool of structured spectral primitives.The pool lets the LLM retrieve frequency-domain structure rather than relying solely on numerical summary statistics.Source: §1 · p. 4
  • GCL uses a global CLS-driven probe to capture temporal context and fuse it with spectral primitives, bridging time- and frequency-domain representations.The design generates instance-specific residual offsets to calibrate the prompt space.Source: §1 · p. 4

2. Related work

Deep time-series methods model temporal and frequency patterns primarily in numerical representation space. LLM-based approaches align temporal data with semantic representations in varied ways, while FreSia introduces frequency-derived structure for forecasting and reconstruction-based anomaly detection.

2.1. Deep Time Series Analysis

  • Deep time-series methods model temporal dependencies, frequency components, or seasonal and trend patterns, but primarily remain in numerical representation space.Examples include multi-period modeling, frequency decomposition, and methods that extract cyclical variations across scales.Source: §2.1 · pp. 4–5
  • FreSia transforms dominant spectral structures into semantic cycle descriptors and aligns them with LLM representations.The section contrasts this approach with numerical-space methods and notes its use for reconstruction-based anomaly detection.Source: §2.1 · p. 5, §2.2 · p. 6

2.2. LLM-empowered Time Series Analysis

  • LLM time-series methods use domain instructions, numerical-textual integration, tokenizer adapters, interaction modules, and contextual prompts for alignment.The surveyed approaches include cross-modal alignment, retrieval, and event-prediction uses of LLM agents.Source: §2.2 · p. 6
  • LLM anomaly-detection approaches use semantic interpretation or reconstruction, whereas FreSia incorporates frequency-derived structural information into semantic representations for reconstruction-based detection.Figure 2 identifies FGPrompt, a temporal encoder that generates a CLS representation, and GCL, which bridges the time-frequency gap and fuses multimodal information.Source: §2.2 · pp. 6–7, Figure 2 · p. 7

3. Preliminaries

The preliminaries define multivariate forecasting from a lookback window and anomaly detection as timestamp-wise binary prediction. They also describe semantic instructions by channel and reconstruction-error thresholding.

3. Preliminaries

  • Multivariate forecasting uses a lookback window of length L across C variables, together with instructions I, to predict a future sequence of length T.The observed multivariate data at time t is represented by x_t.Source: §3 · p. 7
  • Anomaly detection predicts a binary label for each timestamp, with 1 marking an anomaly and 0 marking normal data.In the reconstruction-based setup, a timestamp is anomalous when its reconstruction error exceeds a threshold.Source: §3 · p. 7

4. Methodology

FreSia combines frequency-guided prompts, a time-series encoder, and global-driven context learning to align semantic and temporal representations. Frequency and temporal descriptors inform the prompts, while a global CLS representation calibrates them for cross-modal fusion.

4.1. Frequency-Guided Prompt

  • FGPrompt converts dominant frequency-derived cycles, trend, and volatility into linguistic descriptors and a structured prompt, then encodes it with pretrained GPT-2.Cycle descriptors come from FFT frequencies and their periods; a linear fit estimates global trend, while variation in first-order differences characterizes local volatility.Source: §4.1 · pp. 8–9
  • A learnable frequency pool retrieves structural archetypes using amplitude and phase features, which are gated and fused with LLM-embedded prompt words.A lightweight MLP produces fusion weights, and a transformer-based PromptEncoder processes the resulting semantic embedding.Source: §4.1 · p. 9

4.2. TSEncoder

  • TSEncoder embeds patches from normalized time series and prepends a learnable CLS token that summarizes information across the look-back window.The localized patch representations are flattened and projected into the numerical sequence representation used in alignment.Source: §4.2 · p. 10

4.3. Global-driven Context Learning

  • Global-driven Context Learning calibrates prompt embeddings with instance-specific offsets from the global CLS representation, then cross-attention fuses them with temporal features for prediction.The numerical sequence supplies queries; calibrated semantic embeddings serve as keys and values, and the context-aware representation is added through a residual connection before the forecasting head.Source: §4.3 · pp. 10–11

4.4. Training and Loss function

  • FGPrompt prompts are encoded by a frozen pretrained language model and cached for reuse; training uses Huber loss with δ = 1.0.The cached semantic embeddings are used with the time-series input during training and inference, avoiding repeated online language-model calls; at δ = 1.0, Huber loss is equivalent to PyTorch SmoothL1 loss.Source: §4.4 · p. 11

5. Experiments

The experiments evaluate FreSia on multivariate forecasting and anomaly detection, reporting benchmark results and examining its components, prompting, calibration, loss functions, inference efficiency, and prompt-token use.

5.1. Experimental Setup

  • The experiments cover forecasting on eight datasets and anomaly detection on five, evaluated with MSE and MAE for forecasting and precision, recall, and F1 for anomaly detection.The anomaly benchmarks listed are SMD, PSM, SWaT, MSL, and SMAP.Source: §5.1 · pp. 12–14

5.2. Main Results

  • In long-term forecasting, at the dataset-average level, FreSia achieves the lowest MSE across all eight datasets and the lowest or tied-lowest MAE on seven.Source: §5.2 · pp. 14–15
  • On anomaly detection across five multivariate benchmarks, FreSia achieves the best average performance—91.58% precision, 85.58% recall, and 88.36% F1—outperforming strongest baseline FPT by 2.59 percentage points in average F1.FreSia obtains the best F1 score on four of five datasets: SMD, SWaT, MSL, and SMAP.Source: §5.2 · p. 15

5.3. Sensitivity of Frequency Pool Size

  • The frequency-pool size affects ETTh2 720-horizon forecasting: too small a pool may miss latent features, while too large a pool adds redundancy and affects predictions.The sensitivity analysis is shown in Figure 3.Source: §5.3 · p. 15, Figure 3 · p. 16

5.4. Ablation

  • Removing the TSE causes the largest forecasting degradation, removing the LLM also increases errors, and excluding the frequency pool consistently impairs precision.The Prompt Encoder has a relatively minor impact but facilitates cross-modal alignment.Source: §5.4 · pp. 16–17
  • Removing CLS-driven calibration reduces accuracy on several datasets, while replacing cross-attention with concatenation yields inferior results.The authors associate global profiling with handling regime shifts and attention-based fusion with modeling complex interactions.Source: §5.4 · p. 17

5.5. Analysis

  • Removing the LLM raises average error from 0.713/0.479 to 0.784/0.495; removing the frequency path yields 0.743/0.489, and raw-value-style prompting yields 0.732/0.485.The results indicate that semantic encoding and explicit frequency-domain information both contribute to performance, and frequency-guided prompts provide more effective structural cues than raw numerical serialization.Source: §5.5 · p. 17
  • On Exchange, mixed prompting achieves the lowest errors, 0.339 MSE and 0.394 MAE, reducing MSE/MAE by 28.0%/10.3% versus no mixing and 37.8%/14.2% versus fully generic prompting.Source: §5.5 · p. 18
  • CLS-driven calibration changes some channel responses while leaving others stable, suggesting adaptive reweighting and structured alignment between semantic prompts and temporal features.The authors note that removing CLS causes performance degradation in the ablation study.Source: §5.5 · pp. 18–19
  • Frequency Pool weights align with prominent low-frequency peaks and multiple high-frequency components, supporting FFT-driven indexing and relatively decoupled frequency-domain prototypes.The case studies show forecasting results, FFT frequency distributions, and corresponding Frequency Pool weights.Source: Figure 6 · p. 19, §5.5 · p. 20
  • The ETTh1 Frequency Pool cosine-similarity matrix is near-identity, with diagonal elements approaching 1 and off-diagonal entries near 0, indicating unique frequency-domain prototypes.The near-orthogonality applies to the prompts within the pool.Source: §5.5 · p. 20, Figure 8 · p. 20
  • Huber loss outperforms MSE and MAE losses, which the authors attribute to balancing sensitivity to small errors with robustness to large residuals.Figure 9 compares the three loss choices.Source: §5.5 · p. 20, Figure 9 · p. 21
  • Under the cached-prompt evaluation setting, FreSia records 11.29 seconds of test time, faster than TimeCMA and TimeKAN, while using 2936 MiB GPU memory and 28.29M parameters.Source: §5.5 · p. 21
  • FreSia’s prompt contains approximately 32 tokens versus approximately 226 for TimeCMA under the same tokenization setting, a 7.1× reduction.The comparison concerns token consumption of the two prompting strategies.Source: §5.5 · p. 22

6. Conclusion

FreSia converts frequency-domain structures into semantic prompts and uses CLS-driven calibration to align them with temporal representations. The paper reports that these representations are effective across forecasting and anomaly-detection benchmarks.

6. Conclusion

  • FreSia converts frequency-domain structures into semantic prompts and uses CLS-driven calibration to align them with temporal representations.The framework is presented for multivariate time-series forecasting and anomaly detection.Source: §6 · p. 22
  • Experiments on eight forecasting benchmarks and five anomaly-detection benchmarks show that the resulting frequency-semantic representations are effective across both tasks.Source: §6 · p. 22

7. Authorship contribution statement

The contribution statement assigns conceptualization, methodology, validation, visualization, investigation, drafting, editing, and supervision roles across the listed authors.

7. Authorship contribution statement

  • Yubo Wang is credited with conceptualization, methodology, validation, visualization, and writing the original draft, as well as review and editing.Source: §7 · p. 22
  • Hui He and Hezhe Qiao are credited with conceptualization, investigation, and writing review and editing; Hui He is also credited with supervision.Source: §7 · p. 22
  • Guoqing Ji is credited with investigation and writing review, while Zhendong Niu is credited with conceptualization, investigation, review and editing, and supervision.Source: §7 · p. 22

8. Declaration of generative AI and AI-assisted technologies in the manuscript preparation process

The authors disclose using ChatGPT and Gemini to translate and polish the manuscript, then reviewing and editing the content and taking responsibility for it. Appendix A motivates dominant-frequency selection through DFT energy preservation and defines a retained-energy ratio for top-frequency components.

8. Declaration of generative AI and AI-assisted technologies in the manuscript preparation process

  • The authors used ChatGPT and Gemini to translate and polish the manuscript, then reviewed and edited the content and took full responsibility for it.Source: §8 · p. 22

Appendix A. Energy-preserving property of DFT

  • The appendix defines a retained non-DC spectral energy ratio for the top-K frequency indices, using DFT energy preservation to motivate dominant frequencies as compact structural primitives.A large ratio indicates that a small number of dominant components preserve most one-sided non-DC spectral energy and approximate main temporal variations.Source: Appendix A · pp. 23–24

Appendix B. Reconstruction for anomaly detection

Appendix B compares reconstruction-based anomaly scores and finds that point-wise Time Residual performs best, while window-level frequency residuals limit point-wise localization. FreSia therefore retains the standard reconstruction-error score for anomaly detection.

Appendix B. Reconstruction for anomaly detection

  • Across five datasets, Time Residual has the highest average F1 (0.884), versus Time-Freq. Residual (0.598) and Freq. Residual (0.501).Table B.1 compares the three anomaly-scoring rules.Source: Table B.1 · p. 24, Appendix B · p. 25
  • Time-Freq. Residual combines normalized time- and frequency-domain residuals with equal weight (α = 0.5) in the diagnostic setting.Both scores are normalized using training-set means and standard deviations.Source: Appendix B · pp. 24–25
  • Time Residual uses point-wise reconstruction error, preserving temporal localization because each timestamp receives its own anomaly score.Source: Appendix B · p. 24
  • Freq. Residual measures window-level spectral mismatch and assigns that score to every timestamp, so it does not provide point-wise localization.It is computed from the average magnitude difference between original and reconstructed spectra after removing the DC component.Source: Appendix B · p. 24
  • Because window-level frequency residuals weaken point-wise localization, the standard reconstruction-error score is retained and anomaly detection evaluates representation generalization, not a new anomaly-specific method.The reported frequency-only and combined scores have lower average F1 than Time Residual.Source: Appendix B · p. 25

Appendix C. Comparison with Frequency-domain Models

FreSia converts dominant frequency components into semantic cycle descriptors and aligns them with LLM representations. It outperforms frequency-domain baselines overall, though TexFilter performs slightly better on ECL.

Appendix C. Comparison with Frequency-domain Models

  • Unlike baselines that model spectral patterns through numerical transformations or filtering, FreSia turns dominant frequencies into semantic cycle descriptors aligned with LLM representations.The results suggest frequency-semantic instantiation adds benefits beyond purely numerical frequency-domain modeling.Source: Appendix C · p. 25
  • TexFilter performs slightly better on ECL, indicating frequency filtering remains effective in some settings; nevertheless, FreSia shows stronger overall performance across diverse benchmarks.Table C.1 uses an input sequence length of 36 for the ILI dataset.Source: Appendix C · p. 25, Table C.1 · p. 26
  • FreSia achieves the best average performance on 7 of 8 datasets and ranks first on 14 of 16 dataset-level average metrics.Table C.1 compares FreSia with representative frequency-domain forecasting models.Source: Appendix C · p. 25, Table C.1 · p. 26

Appendix D. Robustness to Auxiliary Trend / Volatility Mappings

Appendix D tests whether FreSia depends on fixed trend and volatility thresholds. Comparable results across mapping variants indicate limited sensitivity to threshold design, while frequency-derived cycle descriptors remain the main structural cues.

Appendix D. Robustness to Auxiliary Trend / Volatility Mappings

  • Adaptive-quantile and continuous trend/volatility mappings achieve results comparable to the default mapping, indicating that FreSia is not sensitive to a specific threshold design.The alternatives replace fixed thresholds with training-set quantiles or continuous scores.Source: Appendix D · pp. 26–27, Table D.1 · p. 27
  • The freq-only variant remains close to the full model even after removing all trend and volatility descriptors.Source: Appendix D · p. 27
  • Frequency-derived cycle descriptors are identified as the core structural cues, rather than hard-coded trend and volatility mappings.Source: Appendix D · p. 27
Loading 2610.05726v1…