I can answer this from the inlabru perspective;
in "plain" INLA, all the likelihoods and their derivatives with
respect to the linear predictor are hand-coded (I believe). Since each
observation is linked to the latent field via a single element of the
linear predictor, the chain rule is explicit; just the individual
likelihood derivatives, combined with the fixed model matrix for the
linear predictor. For that AD wouldn't really add anything except the
possibility of simplifying some kind of user-defined likelihood
capability.
For inlabru however, we _would_ benefit from AD for models with
non-linear predictors, as it currently uses numerical derivatives to
evaluate the Jacobian and construct the sequence of linearised
predictor models that is passed on to INLA.
Currently, this linearisation step is slow for some models in ways
that AD might help with. The "bru_mapper" system used to construct
the link between latent variables, effects, and the predictor
expression, is setup to facilitate some simple AD behaviour, but if it
could "hook" into an existing AD system for R expressions, that could
speed things up (though inlabru 2.9.0 saw some significant speedups
just from dealing with the most obvious bottlenecks indicated by the R
profiler).
Finn
> --
> You received this message because you are subscribed to the Google Groups "R-inla discussion group" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
r-inla-discussion...@googlegroups.com.
> To view this discussion on the web, visit
https://groups.google.com/d/msgid/r-inla-discussion-group/a97b74ef-9e83-4d38-86eb-973c7ace519dn%40googlegroups.com.
--
Finn Lindgren
email:
finn.l...@gmail.com