Manuscript Offprint

arXiv:2610.12986

Scan-Parallel Variational Inference for event-driven Latent Jump Models

Vansh Bansal, Min Chen, James G. Scott

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Continuous-time latent state-space models are widely used for irregularly observed time series, typically representing uncertainty through a random initial state followed by smooth ordinary differential equation (ODE) dynamics, or Brownian perturbations accumulated by a stochastic differential equation (SDE). While these constructions are natural for smooth or diffusive systems, they do not directly encode a finite set of unobserved shocks whose timing, magnitude, and effect on memory are themselves uncertain. We instead introduce latent jump models (LJMs): the latent state follows closed-form deterministic dynamics between Poisson-driven event times and undergoes a learned instantaneous jump at each event, with state-dependent intensity and mark distributions. This defines a time-homogeneous Markov process whose jumps are intrinsic state transitions rather than numerical integration steps. For training, we derive a tractable event-augmented path-space evidence lower bound (ELBO) and introduce Scan-Parallel Variational Inference (SPVI): an observation-conditioned variational posterior samples the complete latent event configuration before the state recurrence is evaluated using triangular affine scans. This enables fast and scalable training for LJMs in logarithmic temporal depth. Across synthetic stochastic systems and real irregular time series, LJMs remain competitive with continuous-time latent baselines in forecast accuracy, often with fewer latent updates than numerical solver evaluations, while training one to two orders of magnitude faster than the sequential baselines.

1 Introduction

Continuous-time latent state-space models provide a natural language for irregularly observed time series: a latent state evolves between observation times, and an emission model relates that state to the measurements. Latent ODE models are especially appropriate when the dynamics are smooth and nearly deterministic conditional on the initial state [Chen et al., 2018, Rubanova et al., 2019]. Latent SDE models add Brownian motion, allowing uncertainty to accumulate continuously and producing rough but continuous latent paths [Li et al., 2020]. These choices give expressive models of smooth and diffusive evolution but many systems instead evolve through relatively regular motion interrupted by a finite number of abrupt, unobserved changes: interventions, failures, spikes, flares, price shocks, or transitions between operating conditions. In the latter regime, it may be scientifically and computationally preferable to model their times and marks as latent random variables rather than forcing them to appear as a steep continuous vector field or as the accumulation of many Gaussian perturbations.

We take this event-driven perspective and develop latent jump models (LJMs), representing stochasticity through a sequence of latent events governed by a marked point process with Poisson

*Corresponding author: Vansh Bansal (vansh@utexas.edu)

LJM (ours)

Latent ODE

Latent SDE

SDE Matching

Latent NSF

Figure

Figure 1: Comparison across four event-driven and smooth systems. All models use identical history-encoder and emission architectures. Solver step sizes are coarsened for baselines at evaluation to approach LJM event budget; NFE labels show the number of dynamics evaluations. LJM shows better reconstruction and forecast quality at fewer NFE. Latent SDE diverges on the regular PDMP, while Latent ODE and Neural Stochastic Flow (solver-free) exhibit errors in several examples.

noise. A continuous-time latent state evolves through closed-form decay between random event times and undergoes a learned marked-jump at each event. The observations remain (irregular) time-series measurements; however, the events themselves are latent. Therefore, events act as stochastic drivers of the latent state, whose intensity determines when the state is likely to jump and a random mark determines its character. Both the prior event intensity and mark distribution depend on the current state, so the consequences of one event may change the distribution of the later ones.

This produces a latent piecewise-deterministic Markov process (PDMP) [Davis, 1984], admitting a Chapman–Kolmogorov semigroup. Its trajectories can be simulated exactly, without numerical ODE or SDE solvers, by combining the closed-form flow with jumps induced by the latent event process. This differs from neural point process models in which events themselves are typically the observed data. Therefore, learned events in LJMs may differ from the (typically unidentifiable) events of the data-generating process, however still provide adaptive stochastic updates to the latent representation which are learned rather than enforced by numerical solvers; see Figure 1. Moreover, as we show in Section 4.3, replacing diffusion with jumps does not even require giving up variational learning on the path space. By constructing the variational posterior as a controlled marked Poisson process, we derive a path-space evidence lower bound (ELBO) using a change-of-measure formula for marked-point processes [Brémaud, 1981]. The posterior shares its deterministic dynamics with prior process, but acts as a control policy on the latent state, adjusting the initial state law, intensity at which events occur and shaping the distribution of event marks in response to observed data.

However, a tractable event likelihood is not enough. Event-driven simulation alone does not remove sequential state unrolling. The situation mirrors Latent ODEs and SDEs, whose training integrates the posterior path with a numerical solver: every step reads the state produced by the previous one, so the depth of a forward–backward pass grows with the number of solver steps, and stiff or long windows are paid for in sequential time [Chen et al., 2018, Li et al., 2020]. A latent jump model inherits the same structure through its events. With a random number L of events in a window, a general neural jump map Fθ(z,u)F_{\theta}(z,u) has to be applied L times in order, because the state entering event n is the state produced by event n - 1. Sampling every event time and mark in advance does not remove this: the recurrence is in the state, not in the events; this serial depth makes training slow. Recent work removes simulation from continuous-time training in different ways including matching posterior marginals via SDE Matching [Bartosh et al., 2025] and by learning stochastic transition laws for solver-free sampling via Neural Stochastic Flows [Kiyohara et al., 2025]. We take a different route: we keep an explicit finite event configuration and a standard path-space objective, and change the transition so that the recurrence itself can be evaluated in parallel.

Hence, we introduce Scan-Parallel Variational Inference (SPVI) that enables fast and scalable path-space training of event-driven state space models. Our central construction parallelizes this chain so that its depth scales logarithmically in the number of events L without approximating the dynamics. Two design decisions make it possible. First, the variational event process is exogenous: its initial state law, intensities and mark laws are functions of the observations through an encoder network, not of the sampled latent state. Therefore the complete event configuration, i.e., event times and marks, can be drawn before any state is computed. Second, the jump map is constructed to be block-triangular and affine within a block. The state is split into J ordered blocks. Write zn(j)z_n^{(j)} for block j just after event n and z~n(j)\tilde{z}_n^{(j)} for the same block just before it, i.e., the value after event n - 1 carried forward by the closed-form decay. Event n then updates block j as

zn(j)=R(j)⊙z~n(j)+B(j),z_{n}^{(j)}=R^{(j)}\odot\tilde{z}_{n}^{(j)}+B^{(j)},

where the retention gates R(j)∈(0,1)R^{(j)} \in (0,1) and the shifts B(j)B^{(j)} are produced by a neural network from three inputs: mark of event nn, lower blocks z~n(<j)\tilde{z}_n^{(<j)} just before, and lower blocks zn(<j)z_n^{(<j)} just after the event nn. The network never reads block jj's own value z~n(j)\tilde{z}_n^{(j)}, and it reads nothing from any later event.

Together, these decisions make every step of block j an element-wise affine map whose coefficients are known before the state is. The marks are known because events are sampled first and the lower blocks because they are computed first. We emphasize that nonlinearity is relocated rather than removed: the coefficient networks are arbitrary functions of the marks and of the lower blocks, so the transition is nonlinear across blocks. However, the closure property of affine maps enables a parallel prefix scan [Kogge and Stone, 1973, Ladner and Fischer, 1980] which yields the state of block j after every event in O(log⁡(1+L))O(\log(1+L)) dependent stages. A recurrence of length L therefore becomes J parallel scans yielding O(Jlog⁡(1+L))O(J\log(1+L)) depth. SPVI therefore reproduces the chronological trajectory exactly while changing the order of computation from a length-L event recurrence to J parallel scans, each with logarithmic temporal depth, enabling fast and scalable training for long time series.

We evaluate our method on six synthetic continuous-time systems spanning smooth rotations, cyclic jumps and piecewise-deterministic processes, and on two real benchmarks, REFIT [Murray et al., 2017] electrical load measurement and USHCN [Menne et al., 2010] climate datasets. On event-driven systems, LJM matches the best forecast error with a fraction of the baselines' dynamics evaluations while remaining competitive even on smooth rotations. On both real datasets, LJM remains competitive with baselines in terms of forecasting error, at one to two orders of magnitude less training time.

Summary of contributions. We introduce a finite-activity latent jump model with state-dependent event laws, derive its event-augmented variational objective, and develop a triangular transition architecture that enables scan-parallel posterior computation. Experiments characterize the predictive role of latent events and demonstrate shorter training times than the evaluated baselines, with matched-model benchmarks isolating the benefit of scan-based execution.

References (68)