On Friday, August 12, 2016 at 12:59:07 PM UTC+3, Bob Carpenter wrote:
> If we really cared about fast neural networks, we could just
> code up the layers as custom functions rather than building them
> up out of tanh(alpha * beta) [alpha a vector, beta a matrix, tanh
> vectorized].
I guess it's the same for GP covariance functions?
> > Do you have a specific application where Toeplitz is applicable? I
> > have found it rare case to be able to use Toeplitz form although we
> > have one case in GPstuff, too.
>
> I thought the use case was for time-series GPs. For that,
> we'd want to represent a symmetric K x K Toeplitz matrix as
> a (K / 2 + 1)-vector.
Yes, if the observation times are regular and there are no hierarchical model for several time-series.
> > For Markov random fields, support for sparse precision matrix
> > computations similar to what INLA does would be a huge speed-up (again
> > assuming small expression tree).
>
> I don't know what this is. Is there a reference somewhere I'll
> be able to understand (assume I was a mediocre student in undergrad
> linear algebra at best).
GMRFs naturally produce sparse precision matrices with lot of zeros.
Here's good intro to sparse matrix linear algebra (although it does not contain the latest algorithm developments)
Following two references give connection to INLA, GMRF and sparse matrix computation
Section 2.1 in
http://onlinelibrary.wiley.com/doi/10.1111/j.1467-9868.2008.00700.x/abstract
Section 2 in
http://www.sciencedirect.com/science/article/pii/S0378375807000845
These papers also discuss deterministic posterior approximations, but you can ignore that (for now).
Aki
This discussion started on Twitter, moved to email, but let's continue on stan-dev.
I also noticed you have been working on to speed-up gradient
computation of regular matrix-matrix multiplications. How about
gradients of vector-matrix multiplications?
How about gradients of
unary functions for matrices (e.g. element-wise operation exp(A) or
A.^2), which currently produce a big expression tree? These changes
would make user defined vectorized covariance functions and neural
networks (which Bob just tested) faster.
Do you have a specific application where Toeplitz is applicable? I
have found it rare case to be able to use Toeplitz form although we
have one case in GPstuff, too.
Dense SPDs are common for my GP models. Matlab doesn't have a specific
data type for symmetric, but checks it on-the-fly and based on that
chooses appropriate algorithm from BLAS/LAPACK. But since Stan is
using strong typing, it would be natural to have new matrix types,
too. For my GP models the speedup would come mostly if the gradients
would be computed using matrix derivatives instead of elementwise
autodiff. Taking into account the symmetricity would help a bit more.
For Markov random fields, support for sparse precision matrix
computations similar to what INLA does would be a huge speed-up (again
assuming small expression tree). There are tons of useful MRF models,
which would be nice to have in Stan.
For GPs with compact support covariance functions, support for sparse
covariance matrices might be useful, too.
I can also talk with you on Google-hangout, but the current Stan meeting time is not good for me.
Aki