Continuous Time Attention for Irregular Sequences

This direction is no longer present in the current build. Its last version stays readable and citable here.

Version 1 of 124 papers31 conceptsfrozen 2026-10-04

Standard Transformers treat sequences as a series of discrete steps. In this view, the distance between "Step 1" and "Step 2" is always the same. However, real-world data—from electronic health records to user behavior—is rarely so rhythmic. A patient might visit a clinic twice in one week and then not again for a year. Treating these intervals as identical discrete steps loses the critical context of when events occurred.

To solve this, researchers have developed mechanisms that move attention from discrete indices to continuous time. By treating time as a fluid dimension rather than a sequence of integers, these models can dynamically scale the influence of past events based on the exact duration of the gaps between them.

From Discrete Indices to Temporal Intensity

In a traditional attention mechanism, the weight assigned to a past event is determined by its relevance to the current query. In continuous-time models, this weight is further modulated by a temporal "intensity function."

Chao Chen and colleagues introduced self-modulating attention in Learning Self-Modulating Attention in Continuous Time Space with Applications to Sequential Recommendation. Instead of a static weight, they use a conditional intensity function—a concept from temporal point process theory—to act as a time-dependent gate. If a user bought a coffee five minutes ago, that action is highly relevant to their next move; if they bought it five months ago, the intensity function attenuates that event's influence, even if the sequential "distance" is the same.

This approach allows the model to distinguish between identical sequences of events that happen at different speeds. As noted in their follow-up work, this effectively "tunes out" irrelevant historical noise by focusing on the sparse set of behaviors that remain temporally salient.

Attention as a Continuous Integral

While some models use time to scale discrete weights, others rethink the attention operation entirely. In ContiFormer: Continuous-Time Transformer for Irregular Time Series Modeling, Dongsheng Li and Yuqi Chen propose that attention should be an integral over continuous latent trajectories.

Instead of a dot product between two static vectors ($Q$ and $K$), attention becomes the integral of the inner product between continuous query and key functions over a time interval. This formulation treats the input not as a set of points, but as a continuous signal. This is particularly powerful for irregular sampling because the model can "fill in" the gaps between observations using the underlying dynamics of the system, measuring the alignment of signals across the entire time domain rather than just at the moments they were recorded.

Co-Evolving Dynamics with Neural ODEs

A major challenge in continuous modeling is that the "importance" of an event might change as the model's internal representation evolves. Sheo Yon Jhin addressed this in ACE-NODE: Attentive Co-Evolving Neural Ordinary Differential Equations.

In this architecture, the attention weights themselves are governed by a differential equation that evolves alongside the hidden state. As the data "flows" through the model, the attention mechanism dynamically adjusts its focus. This breaks the topological rigidity of standard Neural ODEs, allowing the model to prioritize different parts of the history at different points in the continuous flow.

Applications in High-Stakes Domains

The intuition that "time-distance" matters has led to significant breakthroughs in fields where timing is a diagnostic signal:

  • Healthcare: In Time-Aware Attention for Enhanced Electronic Health Records Modeling, Junhan Yu and Tianxi Cai demonstrate that replacing discrete time buckets with continuous variables preserves fine-grained nuances in disease progression. Similarly, Thomas Z. Li used "time-distance" vision transformers to improve lung cancer diagnosis from longitudinal CT scans, accounting for the erratic intervals between patient check-ups here.
  • Mobility and Infrastructure: For predicting electric vehicle charging patterns, Robert Marlin utilized continuous timestamps within self-attention to capture high-resolution temporal dependencies in H-FLTN, achieving higher precision than categorical time methods.
  • Event Prediction: Vinayak Gupta showed in ProActive that combining self-attention with temporal normalizing flows can reduce timestamp prediction error by up to 27% by treating activity sequences as continuous-time processes.

By moving away from the "fixed-bin" or "discrete-step" mindset, these models gain the flexibility to handle the messy, asynchronous nature of the real world, where the space between events is often as informative as the events themselves.

Papers in this version

History & citationVersion 1 · 2026-10-04

No longer present in the current build · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_continuous_time_attention_for_irregular__5339af21,
  title = {Continuous Time Attention for Irregular Sequences},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/continuous-time-attention-for-irregular-sequences/rdr_5339af214af24c8093aef2c6e51f7c1d},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-25},
}

This exact version (version 1, frozen text):

@misc{lacuna_continuous_time_attention_for_irregular__5339af21_v1,
  title = {Continuous Time Attention for Irregular Sequences},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/continuous-time-attention-for-irregular-sequences/rdr_5339af214af24c8093aef2c6e51f7c1d/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-25},
}