arXiv:2602.12139cs.LG2026-02

用阻尼振子模型替代传统方法,实现高效不规则时间序列建模。

Oscillators Are All You Need: Irregular Time Series Modelling via Damped Harmonic Oscillators with Closed-Form Solutions

  • 将查询、键、值建模为阻尼驱动振子,通过解析解避免数值求解开销。
  • 在多个不规则时间序列数据集上达到当前最优性能,速度提升数个数量级。
  • 理论保证可逼近任意连续注意力矩阵,适合需要高效建模的工业场景。

Transformer 通过注意力机制擅长捕捉长期时间模式,但其假设时间间隔均匀,难以处理不规则时间序列。神经微分方程(NODEs)能有效建模不规则序列,但依赖耗时的数值求解器。ContiFormers 虽结合两者,仍受限于计算瓶颈。本文提出用具有解析解的线性阻尼谐振子替代 NODEs,将键和值建模为阻尼驱动振子,查询以正弦基展开至有限模态。该方法将注意力建模为共振现象,天然契合 Transformer 结构。封闭形式解彻底消除数值求解开销,同时保持表达能力。我们证明该参数化方式保留连续注意力的通用逼近性质:任意由 ContiFormer 实现的离散注意力矩阵,均可被固定振子模态任意逼近。方法兼具理论保障与可扩展性,在不规则时间序列基准上达当前最优表现,且速度提升数个数量级。

原文摘要 · Abstract (English)

Transformers excel at time series modelling through attention mechanisms that capture long-term temporal patterns. However, they assume uniform time intervals and therefore struggle with irregular time series. Neural Ordinary Differential Equations (NODEs) effectively handle irregular time series by modelling hidden states as continuously evolving trajectories. ContiFormers arxiv:2402.10635 combine NODEs with Transformers, but inherit the computational bottleneck of the former by using heavy numerical solvers. This bottleneck can be removed by using a closed-form solution for the given dynamical system - but this is known to be intractable in general! We obviate this by replacing NODEs with a novel linear damped harmonic oscillator analogy - which has a known closed-form solution. We model keys and values as damped, driven oscillators and expand the query in a sinusoidal basis up to a suitable number of modes. This analogy naturally captures the query-key coupling that is fundamental to any transformer architecture by modelling attention as a resonance phenomenon. Our closed-form solution eliminates the computational overhead of numerical ODE solvers while preserving expressivity. We prove that this oscillator-based parameterisation maintains the universal approximation property of continuous-time attention; specifically, any discrete attention matrix realisable by ContiFormer's continuous keys can be approximated arbitrarily well by our fixed oscillator modes. Our approach delivers both theoretical guarantees and scalability, achieving state-of-the-art performance on irregular time series benchmarks while being orders of magnitude faster. Acknowledgement: This work was done in collaboration with Dirac Labs.

时间序列振子模型连续时间注意力机制

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。