Agents that adapt to changing environments usually work out what has changed by looking at a short window of recent observations. They then infer a hidden "context," such as the current wind strength or a robot's payload mass, and condition their policy on it. This approach quietly assumes the agent's clock is reliable. Every observation is taken to sit at a fixed, known interval after the last one, so a window of four steps always covers the same slice of physical time. Neuroscience has spent two decades showing that biological systems break this assumption. From trial to trial the brain runs the same computation faster or slower, or starts it later. These shifts are coordinated across a whole population of neurons rather than independent noise in each cell, and naively averaging over them destroys the signal. Brain-computer interfaces, neuromorphic sensors, and robots with variable-latency perception pipelines all face the same problem. Their observations come from a single shared clock that drifts.
This note proposes to give a non-stationary RL agent an explicit, low-dimensional model of its own clock distortion. That model is a monotone time warp, shared across all observation channels, which maps the agent's step counter to physical time. The agent estimates it online and separately from the environment's hidden factors. Put in two sentences: when timing jitter is present, today's context-inference methods misread "the agent's clock ran slow" as "the physics changed," and their policies suffer for it. We borrow the shared-warp structure that neuroscience uses to align neural recordings, estimate the warp online against the agent's own learned dynamics model instead of against repeated trials, and test whether this restores both context identification and return.
Core Claim
The claim is testable. Suppose each episode's observation stream carries a hidden, shared affine or piecewise-linear time warp, possibly drifting slowly within the episode. Then the latent factors learned by window-based context inference will absorb the warp and lose their correlation with the true physical factors. Return will fall with them. An agent that factors its inference into a two- to four-parameter shared warp plus the usual environment latents should recover most of the lost identification and return. It should also beat the alternative of simply giving the context encoder more capacity and more history.
The key ingredients are the sharing constraint and the low dimensionality of the warp, not alignment in general. Both are imported from neural data analysis. There, Linear-Nonlinear-Time-Warp-Poisson models and robust interpretable time warping show that jitter is a population-level event in which spikes and field potentials co-warp identically. In the second paper, a shift-only or linear warp fitted by coordinate descent recovers reach onset at $R^2 \approx 0.9$.
Why This Is Not Already Done
The work closest to this proposal is on the RL side. Ada-Diffuser infers evolving latent factors from a window of four consecutive observations and proves that window suffices under its assumptions. It reports latents that correlate with ground truth at $R^2$ between 0.86 and 0.93. That guarantee rests on uniformly spaced observations. Under a hidden rate change, the same four steps cover different dynamic phases, and our setting is designed to break exactly that assumption. Factored Adaptation for Non-Stationary RL (FANS-RL) separates dynamics-change factors from reward-change factors. We extend its argument that structured factoring beats one monolithic context vector with a third, timing factor, which FANS-RL does not have. ProST (Tempo Adaptation in Non-stationary RL) treats tempo as the mismatch between how fast the agent computes and how fast the world drifts in wall-clock time. That is an external scheduling problem. Our tempo is internal: it distorts the agent's perception and action timing, and the agent cannot read it off a clock.
On the neural side, the alignment methods all need offline batches. Nested-GP alignment with svGPFA models firing rates as $f_i(\gamma_r(t))$, a shared latent trajectory composed with a per-trial warp. It predicts monkey reaction times at $R^2 = 0.90$, against 0.52 for a switching linear dynamical system. Neural Latent Aligner learns warps end-to-end, but only through contrastive pairs of repeated identical trials, and its authors say it cannot handle unrepeated behaviour. WCBLE iteratively re-aligns ERP epochs to a classifier template, but works offline and trial-locked. These papers supply our method (shared monotone warps, regularized low-parameter fitting) and motivate the gap (no repeated trials exist in an RL stream). What is new here is the substitute for the repeated-trial template: the agent's own learned dynamics model plays that role.
Research Program
Setting. The physical simulator advances in true time $t$. The agent acts and observes on its own step counter $k$. Physical time elapsed at step $k$ is $\tau(k) = a + \sum_{j<k} b_j \Delta_0$, where $\Delta_0$ is the nominal control interval. The offset $a$ is a hidden perception latency. The local rate $b_j$ is hidden and either constant within an episode ("jitter") or drifting as a slow Ornstein-Uhlenbeck process ("tempo drift," a stand-in for fatigue or changing processing load). The warp applies to every observation channel at once, mirroring the co-warping in the neural data. Environment factors such as wind or mass drift independently, as in the existing benchmarks.
Template learning without repeated trials. We fit a canonical dynamics model $g(s, a, \delta)$ that predicts the next state after a physical interval $\delta$. Neural warping methods alternate between fitting a template and fitting per-trial warps. We do the same, with $g$ as the template and $(a, b)$ per segment as the warps. Regularization follows the bi-cross-validation approach of robust time warping, whose authors warn that unconstrained warps overfit noise. The objective for a segment of observations $o_{1:K}$ is
$$ \hat{a}, \hat{b} = \arg\min_{a,b} \sum_{k} \lVert o_{k+1} - g(o_k, a_k, b\,\Delta_0) \rVert^2 + \lambda (b-1)^2 , $$
where $\lambda$ sets how strongly the rate is pulled toward nominal. In the drifting case the per-segment estimates are smoothed by a slow filter.
Factored context. Environment latents are then inferred from the warp-corrected stream. We implement this on two backbones: Ada-Diffuser's VAE identifier, and FANS-RL's factored encoder. This lets us show the gain is not tied to one architecture. The policy receives both the warp estimate and the environment latents.
The confound we must face. Some physical changes are exactly equivalent to a change in time rate. A pendulum with gravity scaled by $c$ behaves like one whose clock runs at rate $\sqrt{c}$, a relation that follows from dimensional analysis. From passive observation alone the two cannot be told apart. The symmetry breaks only because the agent's actions are held for $b\Delta_0$ of physical time, so a slow clock also stretches action durations, whereas a gravity change does not. We will include a pendulum-family task where this matters. We will report whether the estimator uses action-timing evidence to tell the two apart, or fails.
Baselines
The naive reference is a standard SAC agent and a standard Diffuser, each run on the jittered tasks with no context inference. This shows how much damage the jitter does at all.
The strongest existing method is Ada-Diffuser, run unmodified on jittered streams. On the original Cheetah-Wind task it reports a reward of −68.9, against −120.4 for standard Diffuser, with latent $R^2$ of 0.86–0.93 at a 20–30% compute overhead (Ada-Diffuser). We will first reproduce these numbers without jitter. Any reproduction gap will be stated, and our comparisons will use our reproduced figures. FANS-RL is the second strong competitor, because it is the main existing argument for factored contexts. Its reported Sawyer-Peg pixel return is 18.01, against 12.45 for ZeUS and 6.38 for Meld (FANS-RL). There is no reported result on Lacuna for any of these methods under observation timing jitter.
A strengthened competitor removes the "you just gave it more information" objection. This is Ada-Diffuser or FANS-RL with a 4× longer history window, an extra latent block of the same size as our warp parameters, and training-time randomization over the same distribution of offsets and rates. An oracle agent that receives the true $(a, b)$ sets the ceiling. A DTW-preprocessing baseline aligns each segment to the nearest stored trajectory before inference.
Two ablations isolate the key ingredient. In the first, warp parameters are fitted separately per observation channel, testing the sharing constraint. In the second, the warp is replaced by an unconstrained neural time-encoder, testing the low-dimensional monotone structure.
All methods get the same environment steps, the same backbone sizes (our warp estimator's parameters are counted against our budget), and the same number of hyperparameter-search trials. Results are averaged over ten seeds. Beating the field means two things on jittered tasks. First, mean return must be significantly above the strengthened Ada-Diffuser and FANS-RL across seeds. Second, environment-latent $R^2$ must return to within roughly 0.05 of the unjittered figure, while the competitors' $R^2$ stays degraded.
Why not just…?
Why not just give the context encoder a longer history and randomize delays during training? This is the most serious threat. A large enough recurrent encoder could in principle learn to marginalize the warp. The FANS-RL comparison against monolithic contexts (18.01 vs 12.45 and 6.38) suggests unstructured contexts waste samples. That evidence concerns reward-versus-dynamics factoring, though, not timing. The strengthened baseline above is exactly this alternative, run at matched capacity. If it matches our method on return and latent $R^2$, we would conclude the structure buys only interpretability and report that. Our prediction is that it falls behind most in the tempo-drift condition, where the warp changes within an episode and randomized training covers it poorly.
Why not just run dynamic time warping as preprocessing? DTW needs a reference sequence, which an open-ended stream does not provide. Robust time warping reports that unconstrained DTW overfits noise in single trials. Neural Latent Aligner outperforms DTW in phoneme alignment accuracy. The DTW baseline is included so these results can be checked in the control setting rather than assumed.
Why not just treat timing as one more latent factor inside Ada-Diffuser or FANS-RL? The unconstrained time-encoder ablation tests this directly. The risk is not that it lacks capacity. The risk is that, without the sharing and monotonicity constraints, the learned "timing" dimensions mix with physical factors, which is the confound the pendulum task exposes. We will measure this with a cross-correlation matrix between learned latents and the true warp and physical factors.
Why not just timestamp the observations? If true physical timestamps were available, feeding $\Delta t$ to the network would be the right answer; the oracle baseline is exactly that. The proposal targets the regime where the latency is endogenous and unobserved: decoded neural intent, event cameras behind variable compute, or a learned perception module. The neural experiment below checks that this regime is real.
Proposed Experiments
The main benchmark is a jittered version of the non-stationary MuJoCo suite used by Ada-Diffuser, FANS-RL, and ProST. It covers Cheetah-Wind and Half-Cheetah with wind and gravity changes. We add jittered DeepMind Control Suite Walker and Quadruped tasks with the Ornstein-Uhlenbeck mass drift protocol from fast-and-slow successor features, plus a pendulum task for the gravity–tempo confound. Jitter severity is swept from $b \in [0.9, 1.1]$ up to $[0.6, 1.4]$, with offsets up to three nominal steps. We report return, environment-latent $R^2$, warp-recovery $R^2$, and wall-clock overhead relative to Ada-Diffuser's 20–30%.
The first decisive check is the degradation curve. Ada-Diffuser's latent $R^2$ should fall as jitter severity rises, and ours should stay flat. If Ada-Diffuser's latents do not degrade, the premise is wrong and the project stops there.
The second decisive check is the drift condition. When the clock rate drifts within episodes, our method's gap over the strengthened baseline should widen relative to fixed per-episode jitter. If it does not, the explicit warp is not earning its keep.
The third decisive check grounds the setting in real neural timing. On the macaque variable-delay reaching data, we run our online estimator with only short causal windows and no repeated-trial batch. We compare its recovered reaction-time correlation against the offline svGPFA figure of $R^2 = 0.90$ (nested-GP alignment). On CVSA-ERP, we ask whether a template derived from a dynamics model, used inside a causal decoder, recovers part of WCBLE's reported 5.55-point covert-attention gain over time-locked LDA (WCBLE). Approaching these offline numbers would show that the online, template-from-dynamics estimator is a credible alignment tool in its own right. That result would be useful to closed-loop BCI work independently of the RL results.
References
- Linear-nonlinear-time-warp-poisson models of neural activity
- Discovering Precise Temporal Patterns in Large-Scale Neural Recordings through Robust and Interpretable Time Warping
- Ada-Diffuser: Latent-Aware Adaptive Diffusion for Decision-Making
- Factored Adaptation for Non-Stationary Reinforcement Learning
- Tempo Adaptation in Non-stationary Reinforcement Learning
- Temporal alignment and latent Gaussian process factor inference in population spike trains
- Neural Latent Aligner: Cross-trial Alignment for Learning Representations of Complex, Naturalistic Neural Data
- Correcting for ERP latency jitter improves gaze-independent BCI decoding
- DeepMind Control Suite
- Balancing Plasticity and Stability with Fast and Slow Successor Features