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:
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
equal substeps of size \(\Delta t/K\). The model_specs options are
ode_num_sample_per_step (\(K_{\min}\), preset 2), ode_max_step
(\(s_{\max}\), unset by default; preset 0.5 in the dataset’s rescaled time
units), and ode_max_substeps (\(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 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. Configuration and presets
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.
trainer_config:
batch_size: 32
shuffle: True
optimizer: adam
learning_rate: 1.e-3
valid_freq: 1
use_tfb: False
metrics: [ 'acc', 'rmse' ]
seed: 2019
gpu: -1
model_config:
hidden_size: 4
time_emb_size: 4
num_layers: 1
sharing_param_layer: False
loss_integral_num_sample_per_step: 20
dropout_rate: 0.0
use_ln: False
model_specs:
ode_num_sample_per_step: 2
# Opt in to bounded dynamics and duration-based stepping.
ode_dynamics: tanh
ode_max_step: 0.5
ode_max_substeps: 64
thinning:
num_seq: 10
num_sample: 1
num_exp: 50 # number of i.i.d. Exp(intensity_bound) draws at one time in thinning algorithm
look_ahead_time: 10
patience_counter: 5 # the maximum iteration used in adaptive thinning
over_sample_rate: 5
num_samples_boundary: 21
dtime_max: 5
num_step_gen: 1