ODETPP ====== Summary ------- A temporal-only simplification of a neural spatio-temporal process, with neural ODE evolution between additive event updates. Intensity and objective ----------------------- ``forward`` evolves the previous right-limit state with ``layer_neural_ode``, then adds the current event-type embedding: .. math:: h_i^-&=\operatorname{NeuralODE}(h_{i-1}^+,\Delta t_i),\\ h_i^+&=h_i^-+e_{k_i},\\ \lambda_k(t)&=\operatorname{softplus}([Wh(t)+b]_k). Old configs keep the previous unbounded ReLU DNN and exactly ``ode_num_sample_per_step`` fixed substeps. When ``ode_dynamics`` is omitted, it defaults to ``relu``; duration-based stepping is enabled only when ``model_specs.ode_max_step`` is set. The shipped preset explicitly opts in to ``ode_dynamics: tanh`` and ``ode_max_step: 0.5``. Its vector field is ``tanh(event_model(h))``, bounding each component of the state derivative to [-1, 1]. Parameter names and shapes are unchanged, so old checkpoints load unchanged with their old configs. The solver is ``rk4_step_method``. With ``ode_max_step`` set, each duration uses .. math:: K = \min(K_{\max}, \max(K_{\min}, \lceil\Delta t / s_{\max}\rceil)) equal substeps of size :math:`\Delta t/K`. The ``model_specs`` options are ``ode_num_sample_per_step`` (:math:`K_{\min}`, preset 2), ``ode_max_step`` (:math:`s_{\max}`, unset by default; preset 0.5 in the dataset's rescaled time units), and ``ode_max_substeps`` (:math:`K_{\max}`, default ``max(64, ode_num_sample_per_step)``; preset 64). The cap limits computation; durations above 32 may use steps larger than 0.5 with the preset. These options must be positive, and the maximum count must be at least the minimum. Event-time left limits and sample-time states use the same solver and step count rule. Each query evolves independently of the other query times. Padded events contribute neither ODE evolution nor event embeddings, and padded durations are zeroed before loss sampling. To retain the previous dynamics and fixed-step discretization, omit the new options (or select ``relu`` and leave ``ode_max_step`` unset). Bounded dynamics limit growth between events; they do not bound additive event updates or guarantee accuracy for arbitrarily stiff learned dynamics. This implementation has no spatial density. The loss is the negative marked event log-intensity sum plus the integrated total intensity, using the shared :doc:`../likelihood_integration` helper. Implementation: `easy_tpp/model/ode_tpp.py `_. The formulas above summarize this implementation, including its numerical choices, rather than asserting equivalence to every variant in the reference. Original reference ------------------ `Neural Spatio-Temporal Point Processes (simplified) `_ (as listed in the repository README). Shipped preset -------------- This is the packaged model fragment. :doc:`/user_manual/configuration` explains how it merges with the dataset and shared trainer presets. The preset uses Adam with learning rate 0.001 and shuffled batches. The unused ``time_factor`` option has been removed; time rescaling belongs in the data configuration. .. literalinclude:: ../../../../easy_tpp/configs/model/ODETPP.yaml :language: yaml API --- :class:`easy_tpp.model.ODETPP` ยท :doc:`/api/models`