rtqichen / torchdiffeq

Differentiable ODE solvers with full GPU support and O(1)-memory backpropagation.
MIT License
5.5k stars 909 forks source link

Poisson Process Likelihoods #18

Closed melaurent closed 5 years ago

melaurent commented 5 years ago

Hello, I'm trying to re-implement the part of the paper about modeling an inhomogeneous Poisson process, however I don't see how the compensator (negative part of the likelihood) can be computed "in a single call to an ODE solver". Do you just evaluate the intensity at random points in [t_start, t_end] and like so perform a Monte Carlo estimation of the integral ? Thanks !

duvenaud commented 5 years ago

We do compute the compensator using a single call to an ODE solver. In fact, we evaluated it as part of the same solve that computes the trajectory z(t). We just augmented the state with an accumulator variable that starts at 0 at t0, and whose dynamics are given by the rate lambda(z(t)). We parameterized lambda as the exp of another neural network, to make sure it's always positive.

melaurent commented 5 years ago

Thanks ! Amazing work btw !