Discrete Event, Continuous Time RNNs

Michael C. Mozer, Denis Kazakov, Robert V. LindseyarXiv 2017

Introduction

Most classic sequence models, such as those used for text processing, treat data as a series of discrete turns with no inherent timing. However, real-world event sequences—ranging from medical records and server logs to online purchase histories—occur in continuous time. In these contexts, the interval between events ($\Delta t$) can vary from seconds to months.

Standard Recurrent Neural Networks (RNNs), like the Gated Recurrent Unit (GRU), were not natively designed for continuous-time signals. Researchers typically adapt them by either discretizing time into fixed bins or feeding the time lag as a raw input feature. This paper investigates whether these "flexible" approaches are sufficient or if specialized architectures with explicit temporal inductive biases are required to truly master time scales.

Methods: The Continuous-Time GRU

The authors introduced the Continuous-Time GRU (CT-GRU), an architecture inspired by the spatial inductive biases that allow Convolutional Neural Networks (CNNs) to excel in vision tasks. The CT-GRU incorporates four specific temporal biases: temporal locality, position homogeneity, scale homogeneity, and scale interactions.

Comparison of the standard GRU (left) and the proposed CT-GRU (right) architectures. Note the memory bank in the CT-GRU designed for multi-scale decay.

Instead of a single hidden state, the CT-GRU maintains a bank of $M$ memory traces, each decaying at a different fixed rate (log-linearly spaced). When a new event arrives, the model's storage gate selects which time scale of memory is most appropriate for that information. Between events, these memory traces decay according to their specific time constants, allowing the model to treat time as a first-class citizen.

Key Insights and Results

The researchers tested their hypothesis on 11 datasets, including synthetic tasks designed to test temporal logic (like classifying rhythms) and naturalistic datasets such as Reddit post sequences and vocabulary learning records.

The "Null Result" Insight

The most significant finding was a "null result": the specialized CT-GRU did not outperform a standard GRU that simply received $\Delta t$ as an input. In almost every test, their performance was indistinguishable. As shown in the figure below, both models exhibit nearly identical output activation decay relative to the lag between storage and retrieval.

Performance parity between GRU and CT-GRU (a) and an analysis of how hidden units in the CT-GRU map to different time scales (b).

Gating as Scale Selection

The paper offers a novel perspective on RNN mechanics: gating can be viewed as a "selector" that chooses the appropriate duration (time scale) for storing a memory. The analysis of the CT-GRU's hidden units (Figure 5b) confirms that the model effectively utilizes short (S), medium (M), and long (L) time scales to represent information.

Conclusion

The results suggest that the inherent flexibility of standard GRUs is a major strength. These models are capable of learning their own internal representations of time decay without needing them hard-coded into the architecture. While the CT-GRU provides a more interpretable mechanism for handling time, the standard GRU's ability to emulate complex continuous-time dynamics remains a robust and effective solution for real-world event sequences.

Summary updated

BibTeX
@misc{mozer2017discrete,
  author = {Michael C. Mozer and Denis Kazakov and Robert V. Lindsey},
  title = {{Discrete Event, Continuous Time RNNs}},
  year = {2017},
  eprint = {1710.04110},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1710.04110},
}
Figure