Introduction
Kernels are the central object in a broad range of estimation problems, including kernel methods in statistics [1 , 2 ] , kernel methods in machine learning [3 ] , most notably Gaussian process (GP) regression [4 ] , and kernel-based regularization methods for system identification [5 , 6 , 7 ] . Across these fields, kernel design is a crucial step: the kernel function should be parameterized such that it incorporates suitable prior knowledge about the function being estimated while, ideally, inducing a kernel matrix with favorable mathematical structure that enables efficient computation. Kernels can be designed in many ways; in this paper, we consider kernels that are induced by a linear time-invariant (LTI) stochastic differential equation (SDE). This construction achieves both design goals at once: prior knowledge about the function to be estimated is embedded in the state-space matrices of the SDE, and the resulting kernel matrix is guaranteed to admit a sequentially semiseparable (SSS) representation for ordered one-dimensional inputs. This SSS structure, in turn, enables linear-time algorithms for the matrix computations that underlie kernel-based estimation.
GP regression with one-dimensional inputs is a setting in which the connection between SDEs and Markovian state-space realizations has been studied extensively. Classical approaches exploit this connection by converting the regression problem into Kalman filtering and Rauch–Tung–Striebel (RTS) smoothing on the latent state [8 , 9 , 10 , 11 ] , giving linear complexity for important kernels such as Matérn kernels with half-integer smoothness and spline-related kernels. This perspective, however, treats the SDE model chiefly as a computational device for GP inference. The complementary perspective adopted in this paper is that the SDE is itself a kernel design tool: it specifies how prior structural knowledge about the process, such as smoothness or decay rate, is encoded in the state-space representation of the SDE, and it simultaneously fixes the rank structure of the resulting kernel matrix. Kernel design from prior structural or physical knowledge is a long-standing theme in system identification [7 , 5 , 6 , 12 ] , but, to our knowledge, LTI SDE models have not previously been exploited as an explicit route to structured kernel matrices outside of the state-space GP regression literature.
We show that the covariance matrix of the observed process itself admits an SSS representation, and that this remains true even when the corresponding precision matrix is not block tridiagonal. The SSS representation therefore provides a direct structured-matrix route to kernel-based estimation. In particular, we show that the standard matrix computations required for GP regression can all be expressed as linear-time recursions on SSS generators.
We start by formally defining the class of kernels that we consider in this paper.
Definition 1.1 (LTI-SDE-induced kernel). A function k : R × R → R d × d k : \mathbb{R} \times\mathbb{R} \to\mathbb{R}^{d \times d} k : R × R → R d × d is an LTI-SDE-induced kernel if it is the matrix-valued covariance function of a stochastic process y ( t ) \mathbf{y}(t) y ( t ) admitting a state-space representation of the form [10 , 9 ]
d x ( t ) d t = F x ( t ) + G w ( t ) , (1) \frac{\mathrm{d}\mathbf{x}(t)}{\mathrm{d}t} = \mathbf{F}\mathbf{x}(t) + \mathbf{G}\mathbf{w}(t), \tag*{(1)} d t d x ( t ) = Fx ( t ) + Gw ( t ) , (1) y ( t ) = C ( t ) x ( t ) , (2) \mathbf{y}(t) = \mathbf{C}(t)\mathbf{x}(t), \tag*{(2)} y ( t ) = C ( t ) x ( t ) , (2)
where F ∈ R p × p \mathbf{F} \in\mathbb{R}^{p \times p} F ∈ R p × p , G ∈ R p × r \mathbf{G} \in\mathbb{R}^{p \times r} G ∈ R p × r , and C ( t ) ∈ R d × p \mathbf{C}(t) \in\mathbb{R}^{d \times p} C ( t ) ∈ R d × p . Here, w ( t ) ∈ R r \mathbf{w}(t) \in\mathbb{R}^{r} w ( t ) ∈ R r denotes zero-mean Gaussian white noise, i.e., the formal derivative of a Brownian motion with diffusion matrix Q w ∈ R r × r \mathbf{Q}_{\mathbf{w}} \in\mathbb{R}^{r \times r} Q w ∈ R r × r , so that E [ w ( t ) w ( t ′ ) T ] = Q w δ ( t − t ′ ) \mathbb{E}[\mathbf{w}(t)\mathbf{w}(t')^{\mathsf{T}}] = \mathbf{Q}_{\mathbf{w}}\delta(t-t') E [ w ( t ) w ( t ′ ) T ] = Q w δ ( t − t ′ ) .
Remark. The state equation in (1a) is understood as shorthand for the corresponding Itô SDE
d x ( t ) = F x ( t ) d t + G Q w 1 / 2 d W ( t ) , \mathrm{d}\mathbf{x}(t) = \mathbf{F}\mathbf{x}(t)\mathrm{d}t + \mathbf{G}\mathbf{Q}_{\mathbf{w}}^{1/2}\mathrm{d}\mathbf{W}(t), d x ( t ) = Fx ( t ) d t + G Q w 1/2 d W ( t ) ,
where W ( t ) \mathbf{W}(t) W ( t ) is a standard r r r -dimensional Brownian motion. The process y ( t ) \mathbf{y}(t) y ( t ) is then a zero-mean Gaussian process with kernel function k k k .
The model (1) will often depend on a vector of n h n_{\mathrm{h}} n h hyperparameters, which will be denoted by θ = ( θ 1 , … , θ n h ) \boldsymbol{\theta} = (\theta_1, \ldots, \theta_{n_{\mathrm{h}}}) θ = ( θ 1 , … , θ n h ) , in which case we write
k ( t , t ′ ; θ ) = cov ( y ( t ; θ ) , y ( t ′ ; θ ) ) , k(t,t';\boldsymbol{\theta}) = \operatorname{cov}(\mathbf{y}(t;\boldsymbol{\theta}),\mathbf{y}(t';\boldsymbol{\theta})), k ( t , t ′ ; θ ) = cov ( y ( t ; θ ) , y ( t ′ ; θ )) ,
where cov ( u , v ) = E [ u v T ] − E [ u ] E [ v T ] \operatorname{cov}(\mathbf{u},\mathbf{v}) = \mathbb{E}[\mathbf{u}\mathbf{v}^{\mathsf{T}}] - \mathbb{E}[\mathbf{u}]\mathbb{E}[\mathbf{v}^{\mathsf{T}}] cov ( u , v ) = E [ u v T ] − E [ u ] E [ v T ] denotes the cross-covariance of vector random variables u \mathbf{u} u and v \mathbf{v} v . To simplify notation, we will frequently omit θ \boldsymbol{\theta} θ . Throughout, the term state-space representation refers to the latent state-space model (1) that defines the process y ( t ) \mathbf{y}(t) y ( t ) and induces the kernel k k k .
Given a nondecreasing sequence of inputs ( t 1 , … , t n ) (t_1,\ldots,t_n) ( t 1 , … , t n ) , we define the covariance matrix K ∈ R n d × n d \mathbf{K} \in\mathbb{R}^{nd \times nd} K ∈ R n d × n d with d × d d \times d d × d blocks K i j = k ( t i , t j ) \mathbf{K}_{ij} = k(t_i,t_j) K ij = k ( t i , t j ) . We will show that K \mathbf{K} K admits an SSS representation of the form
K = U ( I − N p T ) − 1 N p V T + V ( N p ) T ( I − T T ( N p ) T ) − 1 U T + D , \mathbf{K} = \mathbf{U}(\mathbf{I} - \mathbf{N}^{p}\mathbf{T})^{-1}\mathbf{N}^{p}\mathbf{V}^{\mathsf{T}} + \mathbf{V}(\mathbf{N}^{p})^{\mathsf{T}}(\mathbf{I} - \mathbf{T}^{\mathsf{T}}(\mathbf{N}^{p})^{\mathsf{T}})^{-1}\mathbf{U}^{\mathsf{T}} + \mathbf{D}, K = U ( I − N p T ) − 1 N p V T + V ( N p ) T ( I − T T ( N p ) T ) − 1 U T + D ,
where U \mathbf{U} U , V \mathbf{V} V , T \mathbf{T} T , and D \mathbf{D} D are block-diagonal matrices and N \mathbf{N} N is the lower shift matrix such that N p \mathbf{N}^{p} N p is a Toeplitz matrix with ones on the p p p th subdiagonal and zeros elsewhere. The matrix K \mathbf{K} K can be expanded as a block matrix with blocks K i j K_{ij} K ij given by
K i j = { U i T i − 1 : j + 1 V j T , i > j , D i , i = j , V i ( T j − 1 : i + 1 ) T U j T , i < j . (3) K_{ij} =
\begin{cases}
U_i T_{i-1:j+1} V_j^{\mathsf{T}}, & i > j,\\
D_i, & i = j,\\
V_i(T_{j-1:i+1})^{\mathsf{T}} U_j^{\mathsf{T}}, & i < j.
\end{cases} \tag*{(3)} K ij = ⎩ ⎨ ⎧ U i T i − 1 : j + 1 V j T , D i , V i ( T j − 1 : i + 1 ) T U j T , i > j , i = j , i < j . (3)
where U i ∈ R d × p U_i \in\mathbb{R}^{d \times p} U i ∈ R d × p , V i ∈ R d × p V_i \in\mathbb{R}^{d \times p} V i ∈ R d × p , T i ∈ R p × p T_i \in\mathbb{R}^{p \times p} T i ∈ R p × p , and D i ∈ R d × d D_i \in\mathbb{R}^{d \times d} D i ∈ R d × d denote the blocks of U U U , V V V , T T T , and D D D , respectively, and T i : j T_{i:j} T i : j denotes the descending-index chain product of square matrices T i , … , T j T_i,\ldots,T_j T i , … , T j , defined as
T i : j = { T i T i − 1 ⋯ T j , i > j , T i , i = j , I , i < j . (4) T_{i:j} =
\begin{cases}
T_iT_{i-1}\cdots T_j, & i > j,\\
T_i, & i = j,\\
I, & i < j.
\end{cases} \tag*{(4)} T i : j = ⎩ ⎨ ⎧ T i T i − 1 ⋯ T j , T i , I , i > j , i = j , i < j . (4)
§ 3 uses only this symmetric covariance form to connect (1) and (2). We note that in the special case where T 1 , … , T n T_1,\ldots,T_n T 1 , … , T n are all identity matrices, the SSS representation (2) reduces to a generator representation of a semiseparable matrix [13 , 14 ] . A more general nonsymmetric SSS representation, which is useful for certain matrix-vector products and trace computations in GP regression, will be introduced in § 2 .
This work is related to several existing approaches for scalable temporal GP regression and kernel-based estimation. A state-space formulation of a GP provides a natural way to perform inference by exploiting the finite-dimensional state-space representation of the underlying stochastic process via Kalman filtering and RTS smoothing. Rank-structured covariance methods instead work directly with generator-representable semiseparable kernel matrices, as in celerite [15 ] and related algorithms [13 , 16 ] . Sparse-precision approaches use the Markov structure of the latent state process, leading to banded or block-tridiagonal precision matrices [17 , 18 , 7 ] . A subtle but important distinction is that the Markov property applies to the latent state x ( t ) x(t) x ( t ) , not necessarily to the observed process y ( t ) = C ( t ) x ( t ) y(t) = C(t)x(t) y ( t ) = C ( t ) x ( t ) . After marginalizing or projecting the state through C ( t ) C(t) C ( t ) , the covariance matrix of y ( t 1 ) , … , y ( t n ) y(t_1),\ldots,y(t_n) y ( t 1 ) , … , y ( t n ) remains structured, but its inverse need not be block tridiagonal; see Appendix § 8 .§ 3 . Hence sparse-precision methods based on the latent state do not directly apply in this setting. A parallel line of work in system identification designs kernel matrices directly and separately exploits their semiseparable structure for regularized estimation [7 , 12 , 13 ] , without deriving the kernel from an explicit SDE. The present paper connects these perspectives: SDE-based kernel design supplies the state-space parameterization ( F , G , C ) (F, G, C) ( F , G , C ) used throughout state-space GP regression, control, and system identification, while the SSS representation of the resulting kernel matrix in (2) supplies the structure that both GP regression and kernel-based regularization methods can exploit for efficient computation.
The proposed approach is not intended to replace Kalman filtering and RTS smoothing as a state-space inference method. Rather, it provides an equivalent matrix formulation in which the standard kernel-based estimation primitives are expressed directly as structured matrix operations. This perspective is particularly convenient for deriving marginal-likelihood gradients, selected posterior variances, and Matern-type posterior sampling rules.
Contributions The main contributions of this paper are as follows:
SDE-based kernel design and SSS representations of output covariance matrices: We show how covariance matrices generated by observed outputs of continuous-time LTI SDEs admit block-SSS representations for ordered one-dimensional inputs, covering both stationary and nonstationary kernels. This connects the SDE-based kernel design perspective used in state-space GP regression with the semiseparable structure exploited by kernel-based regularization methods for system identification.
Efficient recursive algorithms: We derive linear-time SSS recursions for the GP matrix primitives required for training and inference: factorization, triangular solves, log determinants, selected inverse diagonals, and structured matrix-vector products. These algorithms generalize existing algorithms for generator-representable semiseparable matrices to the more general SSS setting and circumvent known numerical issues associated with the generator representation of semiseparable matrices [15 , 13 ] .
Novel trace computation: We derive a trace recursion for tr ( ( K + Σ ) − 1 A ) \operatorname{tr}((K+\Sigma)^{-1}A) tr (( K + Σ ) − 1 A ) when K K K and A A A are given in SSS form and Σ \Sigma Σ is block diagonal and symmetric positive definite, enabling analytic marginal-likelihood gradients without forming dense matrices or intermediate SSS products.
Examples: We demonstrate the resulting framework on LTI-SDE-induced kernels, including Matérn, spline, celerite, DC, TC, and stable spline kernels.
Outline Section 2 outlines notation and reviews the necessary background on SSS matrices. Section 3 shows how SDE-induced kernels give rise to SSS covariance matrices and illustrates the construction for stationary, nonstationary, and transformed kernels. Section 4 derives the linear-time SSS algorithms, which are used in Section 5 as building blocks for GP training, inference, and sampling routines. Section 6 presents numerical experiments, and Section 7 concludes.
Background
We now introduce the notation and summarize the key properties of SSS matrices that will be used in the subsequent sections. We also provide a brief review of a general SSS matrix representation that we will need for some of the GP primitives.
Notation
The set N \mathbb{N} N denotes the natural numbers { 1 , 2 , … } \{1,2,\ldots\} { 1 , 2 , … } , Z \mathbb{Z} Z denotes the set of integers, and Z + \mathbb{Z}_{+} Z + is the set of nonnegative integers. Similarly, R n \mathbb{R}^{n} R n is the standard Euclidean space of dimension n n n , and R m × n \mathbb{R}^{m \times n} R m × n is the set of m × n m \times n m × n real matrices. The vector e k e_k e k denotes the k k k th canonical basis vector, with dimension inferred from context, and I n I_n I n denotes the identity matrix of order n n n , or simply I I I when the order can be inferred from context.
Given a sequence ( t 1 , … , t n ) (t_1,\ldots,t_n) ( t 1 , … , t n ) of real numbers, we define Δ t i = t i + 1 − t i \Delta t_i = t_{i+1} - t_i Δ t i = t i + 1 − t i for i ∈ { 1 , … , n − 1 } i \in\{1,\ldots,n-1\} i ∈ { 1 , … , n − 1 } and, for ease of notation, we define Δ t n = 0 \Delta t_n = 0 Δ t n = 0 . Given n n n vectors x 1 , … , x n ∈ R d x_1,\ldots,x_n \in\mathbb{R}^{d} x 1 , … , x n ∈ R d , we write their vertical concatenation as x = ( x 1 , … , x n ) ∈ R n d x = (x_1,\ldots,x_n) \in\mathbb{R}^{nd} x = ( x 1 , … , x n ) ∈ R n d . Similarly, for matrices X 1 , … , X n ∈ R r × s X_1,\ldots,X_n \in\mathbb{R}^{r \times s} X 1 , … , X n ∈ R r × s , we denote by X = blkdiag ( X 1 , … , X n ) ∈ R n r × n s X = \operatorname{blkdiag}(X_1,\ldots,X_n) \in\mathbb{R}^{nr \times ns} X = blkdiag ( X 1 , … , X n ) ∈ R n r × n s the block-diagonal matrix with diagonal blocks X 1 , … , X n X_1,\ldots,X_n X 1 , … , X n .
The square matrix N n N_n N n denotes the down-shift matrix of order n n n , which has ones on the first subdiagonal and zeros elsewhere. The subscript will be dropped when the order can be inferred from context. We will frequently use the block down-shift identity N n ⊗ I s = N n s N_n \otimes I_s = N_{ns} N n ⊗ I s = N n s . where ⊗ \otimes ⊗ denotes the Kronecker product. Thus, if X = blkdiag ( X 1 , … , X n ) X = \operatorname{blkdiag}(X_1,\ldots,X_n) X = blkdiag ( X 1 , … , X n ) for X 1 , … , X n ∈ R s × s X_1,\ldots,X_n \in\mathbb{R}^{s \times s} X 1 , … , X n ∈ R s × s , then the block-matrices I − N n s s X I - N_{ns}^{s}X I − N n s s X and ( I − N n s s X ) − 1 N n s s (I - N_{ns}^{s}X)^{-1}N_{ns}^{s} ( I − N n s s X ) − 1 N n s s are given by
I − N s X = [ I − X 1 I − X 2 I ⋱ ⋱ − X n − 1 I ] , ( I − N s X ) − 1 N s = [ 0 I 0 X 2 : 2 I ⋱ ⋮ ⋮ ⋱ ⋱ X n − 1 : 2 X n − 1 : 3 ⋯ I 0 ] (5) I-N^{s}X =
\begin{bmatrix}
I & & & \\
-X_1 & I & & \\
& -X_2 & I & \\
& & \ddots& \ddots\\
& & & -X_{n-1} & I
\end{bmatrix},
\qquad
(I-N^{s}X)^{-1}N^{s} =
\begin{bmatrix}
0 & & & \\
I & 0 & & \\
X_{2:2} & I & \ddots& \\
\vdots& \vdots& \ddots& \ddots\\
X_{n-1:2} & X_{n-1:3} & \cdots& I & 0
\end{bmatrix} \tag*{(5)} I − N s X = I − X 1 I − X 2 I ⋱ ⋱ − X n − 1 I , ( I − N s X ) − 1 N s = 0 I X 2 : 2 ⋮ X n − 1 : 2 0 I ⋮ X n − 1 : 3 ⋱ ⋱ ⋯ ⋱ I 0 (5)
Sequentially semiseparable matrices
Semiseparable and sequentially semiseparable matrices are classes of rank-structured matrices. Our main focus will be the class of SSS matrices. This class and the associated numerical linear algebra routines have been studied extensively in the numerical linear algebra community and have been applied to a wide range of problems, including integral equations and time-variant systems [19 , 20 , 21 , 14 , 22 , 23 ] . SSS matrices also arise in application areas such as automatic control, machine learning, and scientific computing, for example, in Gaussian process regression for system identification [13 , 15 , 24 , 16 ] and modern deep learning sequence models [25 , 26 , 27 ] .
A square matrix A ∈ R n d × n d A \in\mathbb{R}^{nd \times nd} A ∈ R n d × n d is said to be SSS if there exist integers p , q ≥ 1 p,q \ge1 p , q ≥ 1 and block-diagonal matrices T ∈ R n p × n p T \in\mathbb{R}^{np \times np} T ∈ R n p × n p , U , V ∈ R n d × n p U,V \in\mathbb{R}^{nd \times np} U , V ∈ R n d × n p , R ∈ R n q × n q R \in\mathbb{R}^{nq \times nq} R ∈ R n q × n q , P , Q ∈ R n d × n q P,Q \in\mathbb{R}^{nd \times nq} P , Q ∈ R n d × n q , and D ∈ R n d × n d D \in\mathbb{R}^{nd \times nd} D ∈ R n d × n d , with blocks
T i ∈ R p × p , U i , V i ∈ R d × p , R i ∈ R q × q , P i , Q i ∈ R d × q , D i ∈ R d × d , T_i \in\mathbb{R}^{p \times p}, \qquad U_i,V_i \in\mathbb{R}^{d \times p}, \qquad R_i \in\mathbb{R}^{q \times q}, \qquad P_i,Q_i \in\mathbb{R}^{d \times q}, \qquad D_i \in\mathbb{R}^{d \times d}, T i ∈ R p × p , U i , V i ∈ R d × p , R i ∈ R q × q , P i , Q i ∈ R d × q , D i ∈ R d × d ,
such that [19 , 20 ]
A = U ( I − N p T ) − 1 N p V T + P ( N q ) T ( I − N q R ) − T Q T + D . (6) A = U(I-N^{p}T)^{-1}N^{p}V^{\mathsf{T}} + P(N^{q})^{\mathsf{T}}(I-N^{q}R)^{-{\mathsf{T}}}Q^{\mathsf{T}} + D. \tag*{(6)} A = U ( I − N p T ) − 1 N p V T + P ( N q ) T ( I − N q R ) − T Q T + D . (6)
The integers p p p and q q q are called the lower and upper order of the representation. We note that U 1 U_1 U 1 , T 1 T_1 T 1 , T n T_n T n , V n V_n V n , Q 1 Q_1 Q 1 , R 1 R_1 R 1 , R n R_n R n , and P n P_n P n are included for notational convenience and consistency with state-space models; these matrices do not have any direct influence on A A A in (5). Indeed, the full structure of the SSS representation expands to
A = [ D 1 P 1 Q 2 T P 1 R 2 T Q 3 T ⋯ P 1 R 2 T ⋯ R n − 1 T Q n T U 2 V 1 T D 2 P 2 Q 3 T ⋯ P 2 R 3 T ⋯ R n − 1 T Q n T U 3 T 2 V 1 T U 3 V 2 T D 3 ⋯ P 3 R 4 T ⋯ R n − 1 T Q n T ⋮ ⋮ ⋮ ⋱ ⋮ U n T n − 1 : 2 V 1 T U n T n − 1 : 3 V 2 T U n T n − 1 : 4 V 3 T ⋯ D n ] . (7) A =
\begin{bmatrix}
D_1 & P_1Q_2^{\mathsf{T}} & P_1R_2^{\mathsf{T}}Q_3^{\mathsf{T}} & \cdots& P_1R_2^{\mathsf{T}}\cdots R_{n-1}^{\mathsf{T}}Q_n^{\mathsf{T}} \\
U_2V_1^{\mathsf{T}} & D_2 & P_2Q_3^{\mathsf{T}} & \cdots& P_2R_3^{\mathsf{T}}\cdots R_{n-1}^{\mathsf{T}}Q_n^{\mathsf{T}} \\
U_3T_2V_1^{\mathsf{T}} & U_3V_2^{\mathsf{T}} & D_3 & \cdots& P_3R_4^{\mathsf{T}}\cdots R_{n-1}^{\mathsf{T}}Q_n^{\mathsf{T}} \\
\vdots& \vdots& \vdots& \ddots& \vdots\\
U_nT_{n-1:2}V_1^{\mathsf{T}} & U_nT_{n-1:3}V_2^{\mathsf{T}} & U_nT_{n-1:4}V_3^{\mathsf{T}} & \cdots& D_n
\end{bmatrix}. \tag*{(7)} A = D 1 U 2 V 1 T U 3 T 2 V 1 T ⋮ U n T n − 1 : 2 V 1 T P 1 Q 2 T D 2 U 3 V 2 T ⋮ U n T n − 1 : 3 V 2 T P 1 R 2 T Q 3 T P 2 Q 3 T D 3 ⋮ U n T n − 1 : 4 V 3 T ⋯ ⋯ ⋯ ⋱ ⋯ P 1 R 2 T ⋯ R n − 1 T Q n T P 2 R 3 T ⋯ R n − 1 T Q n T P 3 R 4 T ⋯ R n − 1 T Q n T ⋮ D n . (7)
The SSS representation can be stored efficiently by storing its generators T i \mathbf{T}_i T i , U i \mathbf{U}_i U i , V i \mathbf{V}_i V i , R i \mathbf{R}_i R i , P i \mathbf{P}_i P i , Q i \mathbf{Q}_i Q i , and D i \mathbf{D}_i D i for i ∈ { 1 , … , n } i \in\{1,\ldots,n\} i ∈ { 1 , … , n } , which requires O ( n ( d ( p + q ) ) + d 2 + p 2 + q 2 ) O(n(d(p+q))+d^2+p^2+q^2) O ( n ( d ( p + q )) + d 2 + p 2 + q 2 ) storage. Moreover, key linear algebra operations such as matrix-vector multiplication, triangular solves, and factorizations can be performed efficiently with linear complexity with respect to n n n [19 , 28 , 16 , 29 , 21 ] . The structure of the SSS representation may be linked to forward and backward recursions [19 ] . This is readily seen from the multiplication with the strictly lower triangular part, i.e., y L = U ( I − N p T ) − 1 N p V T x y^{L}=\mathbf{U}(\mathbf{I}-\mathbf{N}^{p}\mathbf{T})^{-1}\mathbf{N}^{p}\mathbf{V}^{\mathsf{T}}x y L = U ( I − N p T ) − 1 N p V T x , which may be viewed as a two-step process where h = ( I − N p T ) − 1 N p V T x h=(\mathbf{I}-\mathbf{N}^{p}\mathbf{T})^{-1}\mathbf{N}^{p}\mathbf{V}^{\mathsf{T}}x h = ( I − N p T ) − 1 N p V T x is first computed via forward substitution and then scaled by U \mathbf{U} U , i.e.,
[ I − T 1 I ⋱ ⋱ − T n − 1 I ] [ h 1 h 2 ⋮ h n ] = [ 0 V 1 T 0 ⋱ ⋱ V n − 1 T 0 ] [ x 1 x 2 ⋮ x n ] , [ y 1 y 2 ⋮ y n ] = [ U 1 U 2 ⋱ U n ] [ h 1 h 2 ⋮ h n ] . \begin{bmatrix}
\mathbf{I} & & & \\
-\mathbf{T}_1 & \mathbf{I} & & \\
& \ddots& \ddots& \\
& & -\mathbf{T}_{n-1} & \mathbf{I}
\end{bmatrix}
\begin{bmatrix}
h_1\\h_2\\\vdots\\h_n
\end{bmatrix}
=
\begin{bmatrix}
\mathbf{0} & & & \\
\mathbf{V}_1^{\mathsf{T}} & \mathbf{0} & & \\
& \ddots& \ddots& \\
& & \mathbf{V}_{n-1}^{\mathsf{T}} & \mathbf{0}
\end{bmatrix}
\begin{bmatrix}
x_1\\x_2\\\vdots\\x_n
\end{bmatrix},
\qquad
\begin{bmatrix}
y_1\\y_2\\\vdots\\y_n
\end{bmatrix}
=
\begin{bmatrix}
\mathbf{U}_1 & & & \\
& \mathbf{U}_2 & & \\
& & \ddots& \\
& & & \mathbf{U}_n
\end{bmatrix}
\begin{bmatrix}
h_1\\h_2\\\vdots\\h_n
\end{bmatrix}. I − T 1 I ⋱ ⋱ − T n − 1 I h 1 h 2 ⋮ h n = 0 V 1 T 0 ⋱ ⋱ V n − 1 T 0 x 1 x 2 ⋮ x n , y 1 y 2 ⋮ y n = U 1 U 2 ⋱ U n h 1 h 2 ⋮ h n .
An analogous recursion based on backward substitution yields matrix-vector products with the strictly block-upper-triangular part of A \mathbf{A} A , namely y U = P ( N q ) T ( I − N q R ) − T Q T x y^{U}=\mathbf{P}(\mathbf{N}^{q})^{\mathsf{T}}(\mathbf{I}-\mathbf{N}^{q}\mathbf{R})^{-\mathsf{T}}\mathbf{Q}^{\mathsf{T}}x y U = P ( N q ) T ( I − N q R ) − T Q T x . Thus, the matrix-vector multiplication with A \mathbf{A} A can be computed efficiently as y = A x = y L + y U + D x y=\mathbf{A}x=y^{L}+y^{U}+\mathbf{D}x y = A x = y L + y U + D x .
A well-known result is that the triangular factors of an LDU factorization of an SSS matrix A \mathbf{A} A are also SSS with the same transition and output matrices, i.e., A \mathbf{A} A has an LDU factorization of the form [21 ]
A = [ U ( I − N p T ) − 1 N p V ~ T + I ] D ~ [ Q ( I − N q R ) − 1 N q P ~ T + I ] T , (8) \mathbf{A}=
\left[
\mathbf{U}(\mathbf{I}-\mathbf{N}^{p}\mathbf{T})^{-1}\mathbf{N}^{p}\widetilde{\mathbf{V}}^{\mathsf{T}}+\mathbf{I}
\right]
\widetilde{\mathbf{D}}
\left[
\mathbf{Q}(\mathbf{I}-\mathbf{N}^{q}\mathbf{R})^{-1}\mathbf{N}^{q}\widetilde{\mathbf{P}}^{\mathsf{T}}+\mathbf{I}
\right]^{\mathsf{T}}, \tag*{(8)} A = [ U ( I − N p T ) − 1 N p V T + I ] D [ Q ( I − N q R ) − 1 N q P T + I ] T , (8)
where V ~ \widetilde{\mathbf{V}} V , D ~ \widetilde{\mathbf{D}} D , and P ~ \widetilde{\mathbf{P}} P are block-diagonal matrices. Similar results hold for LU, LDLT ^{\mathsf{T}} T , and Cholesky factorizations; we derive the Cholesky factorization in § 4.1 and the LDLT ^{\mathsf{T}} T factorization in Appendix § 9 . Another useful property of SSS matrices is that the class is closed under inversion; that is, the inverse of an SSS matrix is also SSS [29 ] . This implies that the inverse of a lower triangular SSS matrix remains SSS (Appendix § 8 .§ 2 ). Specifically, for a nonsingular, lower-triangular SSS matrix L = U ( I − N p T ) − 1 N p V T + D \mathbf{L}=\mathbf{U}(\mathbf{I}-\mathbf{N}^{p}\mathbf{T})^{-1}\mathbf{N}^{p}\mathbf{V}^{\mathsf{T}}+\mathbf{D} L = U ( I − N p T ) − 1 N p V T + D , it holds that
L − 1 = U ‾ ( I − N p T ‾ ) − 1 N p V ‾ T + D ‾ − 1 , (9) \mathbf{L}^{-1}=\overline{\mathbf{U}}(\mathbf{I}-\mathbf{N}^{p}\overline{\mathbf{T}})^{-1}\mathbf{N}^{p}\overline{\mathbf{V}}^{\mathsf{T}}+\overline{\mathbf{D}}^{-1}, \tag*{(9)} L − 1 = U ( I − N p T ) − 1 N p V T + D − 1 , (9)
where the block-diagonal matrices U ‾ \overline{\mathbf{U}} U , T ‾ \overline{\mathbf{T}} T , and V ‾ \overline{\mathbf{V}} V can be computed from U \mathbf{U} U , T \mathbf{T} T , V \mathbf{V} V , and D \mathbf{D} D using Algorithm 7, which is included in Appendix § 8 .
From SDE-induced kernels to sequentially semiseparable covariance matrices
Recall that the process y ( t ) \mathbf{y}(t) y ( t ) defined by the LTI SDE model in (1) is a zero-mean Gaussian process with kernel function
k ( t , t ′ ) = cov ( y ( t ) , y ( t ′ ) ) = C ( t ) cov ( x ( t ) , x ( t ′ ) ) C ( t ′ ) T . k(t,t')=\operatorname{cov}(\mathbf{y}(t),\mathbf{y}(t'))=\mathbf{C}(t)\operatorname{cov}(\mathbf{x}(t),\mathbf{x}(t'))\mathbf{C}(t')^{\mathsf{T}}. k ( t , t ′ ) = cov ( y ( t ) , y ( t ′ )) = C ( t ) cov ( x ( t ) , x ( t ′ )) C ( t ′ ) T .
We will now show that for any nondecreasing sequence ( t 1 , … , t n ) (t_1,\ldots,t_n) ( t 1 , … , t n ) , the symmetric matrix K \mathbf{K} K with blocks K i j = k ( t i , t j ) \mathbf{K}_{ij}=k(t_i,t_j) K ij = k ( t i , t j ) admits an SSS representation of the form (2).
Without loss of generality, we may assume that the state process x ( t ) \mathbf{x}(t) x ( t ) is defined for t ≥ t 0 t \ge t_0 t ≥ t 0 with initial condition x ( t 0 ) ∼ N ( 0 , P 0 ) \mathbf{x}(t_0)\sim\mathcal{N}(\mathbf{0},\mathbf{P}_0) x ( t 0 ) ∼ N ( 0 , P 0 ) . For t ≥ t ′ ≥ t 0 t\ge t'\ge t_0 t ≥ t ′ ≥ t 0 , the covariance between x ( t ) \mathbf{x}(t) x ( t ) and x ( t ′ ) \mathbf{x}(t') x ( t ′ ) then takes the form [10 ]
cov ( x ( t ) , x ( t ′ ) ) = e F t P 0 e F T t ′ + ∫ t 0 t ′ e F ( t − τ ) G Q w G T e F T ( t ′ − τ ) d τ = e F ( t − t ′ ) P ( t ′ ) , \operatorname{cov}(\mathbf{x}(t),\mathbf{x}(t'))=\mathrm{e}^{\mathbf{F}t}\mathbf{P}_0\mathrm{e}^{\mathbf{F}^{\mathsf{T}}t'}+\int_{t_0}^{t'}\mathrm{e}^{\mathbf{F}(t-\tau)}\mathbf{G}\mathbf{Q}_{\mathbf{w}}\mathbf{G}^{\mathsf{T}}\mathrm{e}^{\mathbf{F}^{\mathsf{T}}(t'-\tau)}\,\mathrm{d}\tau=\mathrm{e}^{\mathbf{F}(t-t')}\mathbf{P}(t'), cov ( x ( t ) , x ( t ′ )) = e F t P 0 e F T t ′ + ∫ t 0 t ′ e F ( t − τ ) G Q w G T e F T ( t ′ − τ ) d τ = e F ( t − t ′ ) P ( t ′ ) ,
where
P ( t ′ ) = cov ( x ( t ′ ) , x ( t ′ ) ) = e F t ′ P 0 e F T t ′ + ∫ t 0 t ′ e F ( t ′ − τ ) G Q w G T e F T ( t ′ − τ ) d τ . \mathbf{P}(t')=\operatorname{cov}(\mathbf{x}(t'),\mathbf{x}(t'))=\mathrm{e}^{\mathbf{F}t'}\mathbf{P}_0\mathrm{e}^{\mathbf{F}^{\mathsf{T}}t'}+\int_{t_0}^{t'}\mathrm{e}^{\mathbf{F}(t'-\tau)}\mathbf{G}\mathbf{Q}_{\mathbf{w}}\mathbf{G}^{\mathsf{T}}\mathrm{e}^{\mathbf{F}^{\mathsf{T}}(t'-\tau)}\,\mathrm{d}\tau. P ( t ′ ) = cov ( x ( t ′ ) , x ( t ′ )) = e F t ′ P 0 e F T t ′ + ∫ t 0 t ′ e F ( t ′ − τ ) G Q w G T e F T ( t ′ − τ ) d τ .
Thus, the kernel function k ( t , t ′ ) = cov ( y ( t ) , y ( t ′ ) ) k(t,t')=\operatorname{cov}(\mathbf{y}(t),\mathbf{y}(t')) k ( t , t ′ ) = cov ( y ( t ) , y ( t ′ )) can be expressed as
k ( t , t ′ ) = cov ( C ( t ) x ( t ) , C ( t ′ ) x ( t ′ ) ) = { C ( t ) e F ( t − t ′ ) P ( t ′ ) C ( t ′ ) T , t ≥ t ′ , C ( t ) P ( t ) e F T ( t ′ − t ) C ( t ′ ) T , t < t ′ . (10) k(t,t')=\operatorname{cov}(\mathbf{C}(t)\mathbf{x}(t),\mathbf{C}(t')\mathbf{x}(t'))=
\begin{cases}
\mathbf{C}(t)\mathrm{e}^{\mathbf{F}(t-t')}\mathbf{P}(t')\mathbf{C}(t')^{\mathsf{T}}, & t\ge t',\\
\mathbf{C}(t)\mathbf{P}(t)\mathrm{e}^{\mathbf{F}^{\mathsf{T}}(t'-t)}\mathbf{C}(t')^{\mathsf{T}}, & t<t'.
\end{cases} \tag*{(10)} k ( t , t ′ ) = cov ( C ( t ) x ( t ) , C ( t ′ ) x ( t ′ )) = { C ( t ) e F ( t − t ′ ) P ( t ′ ) C ( t ′ ) T , C ( t ) P ( t ) e F T ( t ′ − t ) C ( t ′ ) T , t ≥ t ′ , t < t ′ . (10)
This leads to the following result, connecting the SDE representation of the process y ( t ) \mathbf{y}(t) y ( t ) to an SSS representation of the covariance matrix K \mathbf{K} K .
Theorem 3.1 (SSS representation of LTI-SDE-induced kernels). Let y ( t ) \mathbf{y}(t) y ( t ) be a zero-mean Gaussian process defined by the LTI SDE model in (1) with kernel function k ( t , t ′ ) = cov ( y ( t ) , y ( t ′ ) ) k(t,t') = \operatorname{cov}(\mathbf{y}(t),\mathbf{y}(t')) k ( t , t ′ ) = cov ( y ( t ) , y ( t ′ )) . For any nondecreasing sequence ( t 1 , … , t n ) (t_1,\ldots,t_n) ( t 1 , … , t n ) , the covariance matrix K \mathbf{K} K with blocks K i j = k ( t i , t j ) K_{ij}=k(t_i,t_j) K ij = k ( t i , t j ) admits an SSS representation of the form (2) with generators
U i = C ( t i ) , T i = e F Δ t i , V i = C ( t i ) P ( t i ) T i T , D i = C ( t i ) P ( t i ) C ( t i ) T , i ∈ { 1 , … , n } . (11) \mathbf{U}_i=\mathbf{C}(t_i),\quad\mathbf{T}_i=e^{\mathbf{F}\Delta t_i},\quad\mathbf{V}_i=\mathbf{C}(t_i)\mathbf{P}(t_i)\mathbf{T}_i^{\mathsf{T}},\quad\mathbf{D}_i=\mathbf{C}(t_i)\mathbf{P}(t_i)\mathbf{C}(t_i)^{\mathsf{T}},\quad i\in\{1,\ldots,n\}. \tag*{(11)} U i = C ( t i ) , T i = e F Δ t i , V i = C ( t i ) P ( t i ) T i T , D i = C ( t i ) P ( t i ) C ( t i ) T , i ∈ { 1 , … , n } . (11)
Proof. The SSS representation of K \mathbf{K} K follows directly from (9) and the definition of the chain product in (3), which implies that for any τ ∈ [ t ′ , t ] \tau\in[t',t] τ ∈ [ t ′ , t ] , we have e F ( t − t ′ ) = e F ( t − τ ) e F ( τ − t ′ ) e^{\mathbf{F}(t-t')}=e^{\mathbf{F}(t-\tau)}e^{\mathbf{F}(\tau-t')} e F ( t − t ′ ) = e F ( t − τ ) e F ( τ − t ′ ) . Using this property, we find that for i > j i>j i > j ,
k ( t i , t j ) = C ( t i ) e F ( t i − t j ) P ( t j ) C ( t j ) T = C ( t i ) e F Δ t i − 1 ⋯ e F Δ t j + 1 e F Δ t j P ( t j ) C ( t j ) T = C ( t i ) T i − 1 : j + 1 T j P ( t j ) C ( t j ) T . \begin{aligned}
k(t_i,t_j)&=\mathbf{C}(t_i)e^{\mathbf{F}(t_i-t_j)}\mathbf{P}(t_j)\mathbf{C}(t_j)^{\mathsf{T}}\\
&=\mathbf{C}(t_i)e^{\mathbf{F}\Delta t_{i-1}}\cdots e^{\mathbf{F}\Delta t_{j+1}}e^{\mathbf{F}\Delta t_j}\mathbf{P}(t_j)\mathbf{C}(t_j)^{\mathsf{T}}\\
&=\mathbf{C}(t_i)\mathbf{T}_{i-1:j+1}\mathbf{T}_j\mathbf{P}(t_j)\mathbf{C}(t_j)^{\mathsf{T}}.
\end{aligned} k ( t i , t j ) = C ( t i ) e F ( t i − t j ) P ( t j ) C ( t j ) T = C ( t i ) e F Δ t i − 1 ⋯ e F Δ t j + 1 e F Δ t j P ( t j ) C ( t j ) T = C ( t i ) T i − 1 : j + 1 T j P ( t j ) C ( t j ) T .
Comparing with (2), we see that K i j = U i T i − 1 : j + 1 V j T K_{ij}=\mathbf{U}_i\mathbf{T}_{i-1:j+1}\mathbf{V}_j^{\mathsf{T}} K ij = U i T i − 1 : j + 1 V j T for i > j i>j i > j . The cases i = j i=j i = j and i < j i<j i < j follow similarly.
Remark. An analogous result holds when the sequence ( t 1 , … , t n ) (t_1,\ldots,t_n) ( t 1 , … , t n ) is nonincreasing. Indeed, if K \mathbf{K} K has the form (2) and J n \mathbf{J}_n J n is the exchange (reversal) matrix of order n n n , then the symmetric block permutation ( J n ⊗ I d ) K ( J n ⊗ I d ) (\mathbf{J}_n\otimes\mathbf{I}_d)\mathbf{K}(\mathbf{J}_n\otimes\mathbf{I}_d) ( J n ⊗ I d ) K ( J n ⊗ I d ) preserves the SSS structure: ( J n ⊗ I d ) K ( J n ⊗ I d ) (\mathbf{J}_n\otimes\mathbf{I}_d)\mathbf{K}(\mathbf{J}_n\otimes\mathbf{I}_d) ( J n ⊗ I d ) K ( J n ⊗ I d ) is again symmetric and SSS with the representation
( J n ⊗ I d ) K ( J n ⊗ I d ) = V ^ ( I − N p T ^ T ) − 1 N p U ^ T + U ^ ( N T ) p ( I − N p T ^ T ) − T V ^ T + D ^ , (\mathbf{J}_n\otimes\mathbf{I}_d)\mathbf{K}(\mathbf{J}_n\otimes\mathbf{I}_d)=\widehat{\mathbf{V}}(\mathbf{I}-\mathbf{N}^{p}\widehat{\mathbf{T}}^{\mathsf{T}})^{-1}\mathbf{N}^{p}\widehat{\mathbf{U}}^{\mathsf{T}}+\widehat{\mathbf{U}}(\mathbf{N}^{\mathsf{T}})^{p}(\mathbf{I}-\mathbf{N}^{p}\widehat{\mathbf{T}}^{\mathsf{T}})^{-\mathsf{T}}\widehat{\mathbf{V}}^{\mathsf{T}}+\widehat{\mathbf{D}}, ( J n ⊗ I d ) K ( J n ⊗ I d ) = V ( I − N p T T ) − 1 N p U T + U ( N T ) p ( I − N p T T ) − T V T + D ,
where U ^ \widehat{\mathbf{U}} U , T ^ \widehat{\mathbf{T}} T , V ^ \widehat{\mathbf{V}} V , and D ^ \widehat{\mathbf{D}} D denote the block diagonal matrices obtained from U \mathbf{U} U , T \mathbf{T} T , V \mathbf{V} V , and D \mathbf{D} D by reversing the order of the blocks.
Computing the matrix exponential is inherently challenging [30 ] , and obtaining accurate SSS generators requires particular care. If a Jordan decomposition F = Υ J Υ − 1 \mathbf{F}=\mathbf{\Upsilon}\mathbf{J}\mathbf{\Upsilon}^{-1} F = ΥJ Υ − 1 is available, we readily obtain an alternative SSS representation of K \mathbf{K} K with generators
U i = C ( t i ) Υ , T i = e J Δ t i , V i = C ( t i ) P ( t i ) Υ − T T i T , D i = C ( t i ) P ( t i ) C ( t i ) T , (12) \mathbf{U}_i=\mathbf{C}(t_i)\mathbf{\Upsilon},\quad\mathbf{T}_i=e^{\mathbf{J}\Delta t_i},\quad\mathbf{V}_i=\mathbf{C}(t_i)\mathbf{P}(t_i)\mathbf{\Upsilon}^{-\mathsf{T}}\mathbf{T}_i^{\mathsf{T}},\quad\mathbf{D}_i=\mathbf{C}(t_i)\mathbf{P}(t_i)\mathbf{C}(t_i)^{\mathsf{T}}, \tag*{(12)} U i = C ( t i ) Υ , T i = e J Δ t i , V i = C ( t i ) P ( t i ) Υ − T T i T , D i = C ( t i ) P ( t i ) C ( t i ) T , (12)
for i ∈ { 1 , … , n } i\in\{1,\ldots,n\} i ∈ { 1 , … , n } . We note that kernel matrix K \mathbf{K} K is also generator-representable semiseparable, corresponding to the SSS generators
U i = C ( t i ) e F t i , T i = I , V i = C ( t i ) P ( t i ) e − F T t i , D i = C ( t i ) P ( t i ) C ( t i ) T , \mathbf{U}_i=\mathbf{C}(t_i)e^{\mathbf{F}t_i},\quad\mathbf{T}_i=\mathbf{I},\quad\mathbf{V}_i=\mathbf{C}(t_i)\mathbf{P}(t_i)e^{-\mathbf{F}^{\mathsf{T}}t_i},\quad\mathbf{D}_i=\mathbf{C}(t_i)\mathbf{P}(t_i)\mathbf{C}(t_i)^{\mathsf{T}}, U i = C ( t i ) e F t i , T i = I , V i = C ( t i ) P ( t i ) e − F T t i , D i = C ( t i ) P ( t i ) C ( t i ) T ,
for i ∈ { 1 , … , n } i\in\{1,\ldots,n\} i ∈ { 1 , … , n } . However, this representation comes with some numerical caveats: the generators may diverge, and the problem of evaluating the products U i V j T \mathbf{U}_i\mathbf{V}_j^{\mathsf{T}} U i V j T may be severely ill-conditioned, which can lead to numerical issues in finite precision arithmetic.
We proceed in three steps, considering examples of stationary kernels, nonstationary kernels, and transformations that preserve the SSS structure.
Stationary kernels
For a stationary process x ( t ) \mathbf{x}(t) x ( t ) , the covariance between x ( t ) \mathbf{x}(t) x ( t ) and x ( t ′ ) \mathbf{x}(t') x ( t ′ ) takes the form
cov ( x ( t ) , x ( t ′ ) ) = { e F ( t − t ′ ) P ∞ , t ≥ t ′ , P ∞ e F T ( t ′ − t ) , t < t ′ , (13) \operatorname{cov}(\mathbf{x}(t),\mathbf{x}(t'))=
\begin{cases}
e^{\mathbf{F}(t-t')}\mathbf{P}_{\infty}, & t\ge t',\\
\mathbf{P}_{\infty}e^{\mathbf{F}^{\mathsf{T}}(t'-t)}, & t<t',
\end{cases} \tag*{(13)} cov ( x ( t ) , x ( t ′ )) = { e F ( t − t ′ ) P ∞ , P ∞ e F T ( t ′ − t ) , t ≥ t ′ , t < t ′ , (13)
where P ∞ \mathbf{P}_{\infty} P ∞ is the solution to the Lyapunov equation
F P ∞ + P ∞ F T + G Q w G T = 0. (14) \mathbf{F}\mathbf{P}_{\infty}+\mathbf{P}_{\infty}\mathbf{F}^{\mathsf{T}}+\mathbf{G}\mathbf{Q}_{\mathbf{w}}\mathbf{G}^{\mathsf{T}}=0. \tag*{(14)} F P ∞ + P ∞ F T + G Q w G T = 0. (14)
An SSS representation of the covariance matrix K \mathbf{K} K is then readily obtained from Theorem 3.1 by substituting P ( t ) = P ∞ \mathbf{P}(t)=\mathbf{P}_{\infty} P ( t ) = P ∞ into (10).
We now consider two examples of stationary kernels that admit LTI SDE representations, namely the Matérn and celerite kernels, and show how to obtain SSS representations of the corresponding covariance matrices.
The Matérn kernel
The Matérn kernel is a stationary kernel that is parameterized by a smoothness parameter ν \nu ν and a length scale parameter ℓ \ell ℓ . For half-integer values of ν \nu ν , i.e., ν = m + 1 / 2 \nu=m+1/2 ν = m + 1/2 for m ∈ Z + m\in\mathbb{Z}_{+} m ∈ Z + , the Matérn kernel becomes the product of an exponential and a polynomial of degree m m m [31 , 32 ] , i.e.,
k ( t , t ′ ) = σ 2 e − α ∣ t − t ′ ∣ m ! ( 2 m ) ! ∑ k = 0 m ( m + k ) ! k ! ( m − k ) ! ( 2 α ∣ t − t ′ ∣ ) m − k , (15) k(t,t')=\sigma^2 e^{-\alpha|t-t'|}\frac{m!}{(2m)!}\sum_{k=0}^{m}\frac{(m+k)!}{k!(m-k)!}(2\alpha|t-t'|)^{m-k}, \tag*{(15)} k ( t , t ′ ) = σ 2 e − α ∣ t − t ′ ∣ ( 2 m )! m ! k = 0 ∑ m k ! ( m − k )! ( m + k )! ( 2 α ∣ t − t ′ ∣ ) m − k , (15)
where σ 2 \sigma^2 σ 2 is a variance parameter and α = 2 ν / ℓ \alpha=\sqrt{2\nu}/\ell α = 2 ν / ℓ . In this case, the kernel can be derived from the SDE [9 ]
d x ( t ) d t = [ 0 1 ⋱ ⋱ 0 1 − c 0 ⋯ − c m − 1 − c m ] ⏟ F x ( t ) + e m + 1 w ( t ) , y ( t ) = e 1 T x ( t ) , (16) \frac{\mathrm{d}x(t)}{\mathrm{d}t}=
\underbrace{\begin{bmatrix}
0 & 1 & & \\
& \ddots& \ddots& \\
& & 0 & 1 \\
-c_0 & \cdots& -c_{m-1} & -c_m
\end{bmatrix}}_{\mathbf{F}}
x(t)+\mathbf{e}_{m+1}w(t),\qquad y(t)=\mathbf{e}_1^{\mathsf{T}}x(t), \tag*{(16)} d t d x ( t ) = F 0 − c 0 1 ⋱ ⋯ ⋱ 0 − c m − 1 1 − c m x ( t ) + e m + 1 w ( t ) , y ( t ) = e 1 T x ( t ) , (16)
where w ( t ) w(t) w ( t ) is a white-noise process with diffusion coefficient
q w = σ 2 ( 2 α ) 2 m + 1 ( 2 m m ) − 1 , q_w=\sigma^2(2\alpha)^{2m+1}\binom{2m}{m}^{-1}, q w = σ 2 ( 2 α ) 2 m + 1 ( m 2 m ) − 1 ,
with α = 2 ν / ℓ \alpha=\sqrt{2\nu}/\ell α = 2 ν / ℓ , and c 0 , … , c m c_0,\ldots,c_m c 0 , … , c m are the coefficient of the characteristic polynomial
det ( λ I − F ) ( α + λ ) m + 1 = ∑ k = 0 m + 1 ( m + 1 k ) α m + 1 − k λ k = c 0 + c 1 λ + ⋯ + c m λ m + λ m + 1 . \det(\lambda\mathbf{I}-\mathbf{F})(\alpha+\lambda)^{m+1}=\sum_{k=0}^{m+1}\binom{m+1}{k}\alpha^{m+1-k}\lambda^k=c_0+c_1\lambda+\cdots+c_m\lambda^m+\lambda^{m+1}. det ( λ I − F ) ( α + λ ) m + 1 = k = 0 ∑ m + 1 ( k m + 1 ) α m + 1 − k λ k = c 0 + c 1 λ + ⋯ + c m λ m + λ m + 1 .
Under the assumption that the state x ( t ) x(t) x ( t ) is stationary, the state covariance is given by (12). In this particular case, the Lyapunov equation (13) can be reduced to a system of m + 1 m+1 m + 1 linear equations in m + 1 m+1 m + 1 unknowns, as outlined in Appendix C. Table 1 includes P ∞ \mathbf{P}_{\infty} P ∞ for m ∈ { 0 , 1 , 2 } m\in\{0,1,2\} m ∈ { 0 , 1 , 2 } as well as a matrix Υ \mathbf{\Upsilon} Υ whose columns comprise a Jordan chain of F \mathbf{F} F at − α -\alpha − α . Given P ∞ \mathbf{P}_{\infty} P ∞ and Υ \mathbf{\Upsilon} Υ , we can directly use the SSS representation of K \mathbf{K} K in (11).
Table 1. Stationary covariance P ∞ \mathbf{P}_{\infty} P ∞ for the Matérn process with parameter ν = m + 1 / 2 \nu=m+1/2 ν = m + 1/2 . The Jordan form of F \mathbf{F} F is given by J = Υ − 1 F Υ = − α I + N T \mathbf{J}=\mathbf{\Upsilon}^{-1}\mathbf{F}\mathbf{\Upsilon}=-\alpha\mathbf{I}+\mathbf{N}^{\mathsf{T}} J = Υ − 1 FΥ = − α I + N T .
The celerite kernel
Another example of a stationary kernel is the celerite kernel, proposed as a model of stellar variations in astronomical time series in [15 ] . The same formulation was proposed as a model of displacements in structural dynamics in [33 ] , where it is referred to as the “single degree of freedom” (SDOF) kernel. The celerite kernel can be expressed as
k ( t , t ′ ) = σ 2 e − α ∣ t − t ′ ∣ ( cosh ( ω ∣ t − t ′ ∣ ) + α ω sinh ( ω ∣ t − t ′ ∣ ) ) , (17) k(t,t')=\sigma^2 e^{-\alpha|t-t'|}\left(\cosh(\omega|t-t'|)+\frac{\alpha}{\omega}\sinh(\omega|t-t'|)\right), \tag*{(17)} k ( t , t ′ ) = σ 2 e − α ∣ t − t ′ ∣ ( cosh ( ω ∣ t − t ′ ∣ ) + ω α sinh ( ω ∣ t − t ′ ∣ ) ) , (17)
where α = ω 0 / ( 2 Q ) \alpha=\omega_0/(2Q) α = ω 0 / ( 2 Q ) and ω = α 2 − ω 0 2 \omega=\sqrt{\alpha^2-\omega_0^2} ω = α 2 − ω 0 2 for some ω 0 > 0 \omega_0>0 ω 0 > 0 and Q > 0 Q>0 Q > 0 . The kernel can be derived from a stochastically driven simple harmonic oscillator,
[ d 2 d t 2 + ω 0 Q d d t + ω 0 2 ] y ( t ) = w ( t ) , \left[\frac{\mathrm{d}^2}{\mathrm{d}t^2}+\frac{\omega_0}{Q}\frac{\mathrm{d}}{\mathrm{d}t}+\omega_0^2\right]y(t)=w(t), [ d t 2 d 2 + Q ω 0 d t d + ω 0 2 ] y ( t ) = w ( t ) ,
where ω 0 \omega_0 ω 0 is the undamped angular frequency, Q Q Q is the quality factor, and w ( t ) w(t) w ( t ) is a Gaussian white noise process with diffusion coefficient q w = 2 σ 2 ω 0 2 / Q q_w = 2\sigma^2\omega_0^2/Q q w = 2 σ 2 ω 0 2 / Q . An equivalent state-space representation is given by
d x ( t ) d t = [ 0 1 − ω 0 2 − ω 0 / Q ] x ( t ) + [ 0 1 ] w ( t ) , y ( t ) = e 1 T x ( t ) , (18) \frac{\mathrm{d}x(t)}{\mathrm{d}t} =
\begin{bmatrix}
0 & 1 \\
-\omega_0^2 & -\omega_0/Q
\end{bmatrix}x(t) +
\begin{bmatrix}
0 \\
1
\end{bmatrix}w(t), \qquad y(t) = \mathbf{e}_1^{\mathsf{T}}x(t), \tag*{(18)} d t d x ( t ) = [ 0 − ω 0 2 1 − ω 0 / Q ] x ( t ) + [ 0 1 ] w ( t ) , y ( t ) = e 1 T x ( t ) , (18)
where the eigenvalues of F \mathbf{F} F are λ ± = − α ± ω \lambda_{\pm} = -\alpha\pm\omega λ ± = − α ± ω . The stationary covariance P ∞ \mathbf{P}_{\infty} P ∞ is obtained by solving the Lyapunov equation in (14) , which yields
P ∞ = σ 2 [ 1 0 0 ω 0 2 ] . \mathbf{P}_{\infty} = \sigma^2
\begin{bmatrix}
1 & 0 \\
0 & \omega_0^2
\end{bmatrix}. P ∞ = σ 2 [ 1 0 0 ω 0 2 ] .
The special case where Q = 1 / 2 Q = 1/2 Q = 1/2 corresponds to the critically damped case, where the eigenvalues of F \mathbf{F} F are equal and real, and F \mathbf{F} F is defective and has a Jordan decomposition F = Υ J Υ − 1 \mathbf{F} = \mathbf{\Upsilon}\mathbf{J}\mathbf{\Upsilon}^{-1} F = ΥJ Υ − 1 with
J = [ − ω 0 1 0 − ω 0 ] , Υ = [ 1 0 − ω 0 1 ] . \mathbf{J} =
\begin{bmatrix}
-\omega_0 & 1 \\
0 & -\omega_0
\end{bmatrix}, \qquad
\mathbf{\Upsilon} =
\begin{bmatrix}
1 & 0 \\
-\omega_0 & 1
\end{bmatrix}. J = [ − ω 0 0 1 − ω 0 ] , Υ = [ 1 − ω 0 0 1 ] .
This is equivalent to the Matérn-3/2 process (m = 1 m = 1 m = 1 ) with α = 3 / ℓ = ω 0 \alpha= \sqrt{3}/\ell= \omega_0 α = 3 / ℓ = ω 0 . For other values of Q Q Q , the eigenvalues are either real, distinct, and negative (Q < 1 / 2 Q < 1/2 Q < 1/2 ) or complex conjugates (Q > 1 / 2 Q > 1/2 Q > 1/2 ), and F \mathbf{F} F is diagonalizable:
F = Υ Λ Υ − 1 , Λ = [ λ + 0 0 λ − ] , Υ = [ 1 1 λ + λ − ] . \mathbf{F} = \mathbf{\Upsilon}\mathbf{\Lambda}\mathbf{\Upsilon}^{-1}, \qquad
\mathbf{\Lambda} =
\begin{bmatrix}
\lambda_+ & 0 \\
0 & \lambda_-
\end{bmatrix}, \qquad
\mathbf{\Upsilon} =
\begin{bmatrix}
1 & 1 \\
\lambda_+ & \lambda_-
\end{bmatrix}. F = ΥΛ Υ − 1 , Λ = [ λ + 0 0 λ − ] , Υ = [ 1 λ + 1 λ − ] .
This eigendecomposition can be used to obtain an SSS representation of K \mathbf{K} K via (12) with J = Λ \mathbf{J} = \mathbf{\Lambda} J = Λ , but care must be taken to avoid numerical issues when Q Q Q is close to 1 / 2 1/2 1/2 , in which case Υ \mathbf{\Upsilon} Υ is nearly singular. An alternative is to express e F τ \mathrm{e}^{\mathbf{F}\tau} e F τ as a polynomial e F τ = a ( τ ) I + b ( τ ) F \mathrm{e}^{\mathbf{F}\tau} = a(\tau)\mathbf{I} + b(\tau)\mathbf{F} e F τ = a ( τ ) I + b ( τ ) F (see [34 , 35 ] ), which yields
e F τ = e − α τ ( cosh ( ω τ ) I + sinh ( ω τ ) ω ( F + α I ) ) . (19) \mathrm{e}^{\mathbf{F}\tau} = \mathrm{e}^{-\alpha\tau}\left(\cosh(\omega\tau)\mathbf{I} + \frac{\sinh(\omega\tau)}{\omega}(\mathbf{F}+\alpha\mathbf{I})\right). \tag*{(19)} e F τ = e − α τ ( cosh ( ω τ ) I + ω sinh ( ω τ ) ( F + α I ) ) . (19)
We note that the algorithms developed in [15 ] , which are based on the generator representation of semiseparable matrices, are not applicable when Q = 1 / 2 Q = 1/2 Q = 1/2 . The SSS representation of K \mathbf{K} K does not have this limitation.
Nonstationary kernels
We now consider an example of nonstationary kernel that admit LTI SDE representations and show how to obtain SSS representations of the corresponding covariance matrices.
The spline kernel
The spline kernel of order m ∈ N m \in\mathbb{N} m ∈ N can be expressed as [1 ]
k ( t , t ′ ) = ∫ 0 min ( t , t ′ ) ( t − u ) m − 1 ( m − 1 ) ! ( t ′ − u ) m − 1 ( m − 1 ) ! d u . (20) k(t,t') = \int_0^{\min(t,t')} \frac{(t-u)^{m-1}}{(m-1)!}\frac{(t'-u)^{m-1}}{(m-1)!}\,\mathrm{d}u. \tag*{(20)} k ( t , t ′ ) = ∫ 0 m i n ( t , t ′ ) ( m − 1 )! ( t − u ) m − 1 ( m − 1 )! ( t ′ − u ) m − 1 d u . (20)
It can be derived from the ( m − 1 ) (m-1) ( m − 1 ) -times integrated Wiener process, which may be characterized by the m m m th-order stochastic differential equation
d m y ( t ) d t m = w ( t ) \frac{\mathrm{d}^m y(t)}{\mathrm{d}t^m} = w(t) d t m d m y ( t ) = w ( t )
where w ( t ) w(t) w ( t ) is a Gaussian white noise process with diffusion coefficient q w = σ 2 q_w = \sigma^2 q w = σ 2 . A state-space representation is given by [36 , 5 , 6 , 13 ]
d x ( t ) d t = F x ( t ) + e 1 w ( t ) , y ( t ) = e m T x ( t ) , (21) \frac{\mathrm{d}x(t)}{\mathrm{d}t} = \mathbf{F}x(t) + \mathbf{e}_1w(t), \qquad y(t) = \mathbf{e}_m^{\mathsf{T}}x(t), \tag*{(21)} d t d x ( t ) = F x ( t ) + e 1 w ( t ) , y ( t ) = e m T x ( t ) , (21)
where F = N \mathbf{F} = \mathbf{N} F = N is the lower shift matrix of order m m m . Taking y ( t ) y(t) y ( t ) and its first m − 1 m-1 m − 1 derivatives to be zero at t 0 = 0 t_0 = 0 t 0 = 0 , corresponding to the initial state x ( 0 ) = 0 x(0) = 0 x ( 0 ) = 0 , leads to the state covariance
P ( t ) = cov ( x ( t ) , x ( t ) ) = q w ∫ 0 t e F ( t − s ) e 1 e 1 T e F T ( t − s ) d s , t ≥ 0. \mathbf{P}(t) = \operatorname{cov}(x(t),x(t)) = q_w\int_0^t \mathrm{e}^{\mathbf{F}(t-s)}\mathbf{e}_1\mathbf{e}_1^{\mathsf{T}}\mathrm{e}^{\mathbf{F}^{\mathsf{T}}(t-s)}\,\mathrm{d}s,\qquad t \ge0. P ( t ) = cov ( x ( t ) , x ( t )) = q w ∫ 0 t e F ( t − s ) e 1 e 1 T e F T ( t − s ) d s , t ≥ 0.
Noting that
e 1 T e F T τ = [ φ 0 ( τ ) φ 1 ( τ ) ⋯ φ m − 1 ( τ ) ] , where φ i ( τ ) = τ i i ! , i ∈ Z + , \mathbf{e}_1^{\mathsf{T}}\mathrm{e}^{\mathbf{F}^{\mathsf{T}}\tau} = [\varphi_0(\tau)\ \varphi_1(\tau)\ \cdots\ \varphi_{m-1}(\tau)], \qquad\text{where }\varphi_i(\tau) = \frac{\tau^i}{i!},\ i \in\mathbb{Z}_+, e 1 T e F T τ = [ φ 0 ( τ ) φ 1 ( τ ) ⋯ φ m − 1 ( τ )] , where φ i ( τ ) = i ! τ i , i ∈ Z + ,
and
∫ 0 t φ i ( t − s ) φ j ( t − s ) d s = t i + j + 1 i ! j ! ( i + j + 1 ) , i , j ∈ Z + , \int_0^t \varphi_i(t-s)\varphi_j(t-s)\,\mathrm{d}s=\frac{t^{i+j+1}}{i!j!(i+j+1)},\qquad i,j\in\mathbb{Z}_+, ∫ 0 t φ i ( t − s ) φ j ( t − s ) d s = i ! j ! ( i + j + 1 ) t i + j + 1 , i , j ∈ Z + ,
we can express P ( t ) \mathbf{P}(t) P ( t ) as a diagonally-scaled Hankel matrix,
P ( t ) = σ 2 Q [ t t 2 2 ⋯ t m m t 2 2 t 3 3 ⋯ t m + 1 m + 1 ⋮ ⋮ ⋱ ⋮ t m m t m + 1 m + 1 ⋯ t 2 m − 1 2 m − 1 ] Q , Q = diag ( 0 ! , 1 ! , … , ( m − 1 ) ! ) − 1 . (22) \mathbf{P}(t)=\sigma^2\mathbf{Q}
\begin{bmatrix}
t & \frac{t^2}{2} & \cdots& \frac{t^m}{m}\\
\frac{t^2}{2} & \frac{t^3}{3} & \cdots& \frac{t^{m+1}}{m+1}\\
\vdots& \vdots& \ddots& \vdots\\
\frac{t^m}{m} & \frac{t^{m+1}}{m+1} & \cdots& \frac{t^{2m-1}}{2m-1}
\end{bmatrix}
\mathbf{Q},\qquad\mathbf{Q}=\operatorname{diag}(0!,1!,\ldots,(m-1)!)^{-1}. \tag*{(22)} P ( t ) = σ 2 Q t 2 t 2 ⋮ m t m 2 t 2 3 t 3 ⋮ m + 1 t m + 1 ⋯ ⋯ ⋱ ⋯ m t m m + 1 t m + 1 ⋮ 2 m − 1 t 2 m − 1 Q , Q = diag ( 0 ! , 1 ! , … , ( m − 1 )! ) − 1 . (22)
Noting that e F τ = ∑ i = 0 m − 1 φ i ( τ ) N i \mathrm{e}^{\mathbf{F}\tau}=\sum_{i=0}^{m-1}\varphi_i(\tau)\mathbf{N}^i e F τ = ∑ i = 0 m − 1 φ i ( τ ) N i , we readily obtain an SSS representation of K \mathbf{K} K from (10). Table 2 provides expressions for P ( t ) \mathbf{P}(t) P ( t ) and e F τ \mathrm{e}^{\mathbf{F}\tau} e F τ for m ∈ { 1 , 2 , 3 } m\in\{1,2,3\} m ∈ { 1 , 2 , 3 } .
Table 2. Covariance P ( t ) \mathbf{P}(t) P ( t ) and e F τ \mathrm{e}^{\mathbf{F}\tau} e F τ for the m m m th-order spline kernel.
Output modulation, time warping, and sums
The SSS structure of the covariance matrix K \mathbf{K} K is preserved under certain transformations of the kernel function k ( t , t ′ ) k(t,t') k ( t , t ′ ) . We will discuss three basic operations that preserve sequential semiseparability: output modulation, time warping, and kernel sums. These operations allow us to construct new kernels from existing ones while maintaining the SSS property of the corresponding covariance matrices.
Output modulation
Let ψ : R → R \psi:\mathbb{R}\to\mathbb{R} ψ : R → R be a given function, and define y ~ ( t ) = ψ ( t ) y ( t ) \tilde{y}(t)=\psi(t)y(t) y ~ ( t ) = ψ ( t ) y ( t ) . Then
k ~ ( t , t ′ ) = cov ( y ~ ( t ) , y ~ ( t ′ ) ) = ψ ( t ) C ( t ) cov ( x ( t ) , x ( t ′ ) ) C ( t ′ ) T ψ ( t ′ ) . \tilde{k}(t,t')=\operatorname{cov}(\tilde{y}(t),\tilde{y}(t'))=\psi(t)\mathbf{C}(t)\operatorname{cov}(x(t),x(t'))\mathbf{C}(t')^\mathsf{T}\psi(t'). k ~ ( t , t ′ ) = cov ( y ~ ( t ) , y ~ ( t ′ )) = ψ ( t ) C ( t ) cov ( x ( t ) , x ( t ′ )) C ( t ′ ) T ψ ( t ′ ) .
Thus, output modulation may be viewed as simply replacing C ( t ) \mathbf{C}(t) C ( t ) by C ~ ( t ) = ψ ( t ) C ( t ) \tilde{\mathbf{C}}(t)=\psi(t)\mathbf{C}(t) C ~ ( t ) = ψ ( t ) C ( t ) in (1), and hence the SSS structure is preserved.
As a simple but important example, consider a stationary Matérn-1/2 process
d x ( t ) d t = − α x ( t ) + w ( t ) , y ( t ) = x ( t ) , \frac{\mathrm{d}x(t)}{\mathrm{d}t}=-\alpha x(t)+w(t),\qquad y(t)=x(t), d t d x ( t ) = − α x ( t ) + w ( t ) , y ( t ) = x ( t ) ,
with diffusion coefficient q w = 2 α σ 2 q_w=2\alpha\sigma^2 q w = 2 α σ 2 . Applying the output modulation ψ ( t ) = e − β t \psi(t)=\mathrm{e}^{-\beta t} ψ ( t ) = e − β t with β > 0 \beta>0 β > 0 gives
y ~ ( t ) = e − β t x ( t ) , \tilde{y}(t)=\mathrm{e}^{-\beta t}x(t), y ~ ( t ) = e − β t x ( t ) ,
and hence
k ~ ( t , t ′ ) = σ 2 e − β ( t + t ′ ) − α ∣ t − t ′ ∣ . (23) \tilde{k}(t,t')=\sigma^2\mathrm{e}^{-\beta(t+t')-\alpha\lvert t-t'\rvert}. \tag*{(23)} k ~ ( t , t ′ ) = σ 2 e − β ( t + t ′ ) − α ∣ t − t ′ ∣ . (23)
This kernel function is known as the diagonal-correlated (DC) kernel in system identification [37 , 5 ] . The tuned-correlated (TC) kernel is obtained as the special case where β = α \beta=\alpha β = α , which yields
k ~ ( t , t ′ ) = σ 2 e − 2 α max ( t , t ′ ) . (24) \tilde{k}(t,t')=\sigma^2\mathrm{e}^{-2\alpha\max(t,t')}. \tag*{(24)} k ~ ( t , t ′ ) = σ 2 e − 2 α m a x ( t , t ′ ) . (24)
Thus, both the DC and TC kernels inherit the SSS property directly from the output-modulated Matérn-1/2 process.
Time warp
Let ϕ : R → R \phi:\mathbb{R}\to\mathbb{R} ϕ : R → R be a monotone function, and define y ˇ ( t ) = y ( ϕ ( t ) ) \check{y}(t)=y(\phi(t)) y ˇ ( t ) = y ( ϕ ( t )) with kernel function
k ˇ ( t , t ′ ) = cov ( y ( ϕ ( t ) ) , y ( ϕ ( t ′ ) ) ) = k ( ϕ ( t ) , ϕ ( t ′ ) ) . (25) \check{k}(t,t')=\operatorname{cov}(y(\phi(t)),y(\phi(t')))=k(\phi(t),\phi(t')). \tag*{(25)} k ˇ ( t , t ′ ) = cov ( y ( ϕ ( t )) , y ( ϕ ( t ′ ))) = k ( ϕ ( t ) , ϕ ( t ′ )) . (25)
The requirement that ϕ \phi ϕ be monotone ensures that the kernel matrix K \mathbf{K} K with blocks K i j = k ˇ ( t i , t j ) \mathbf{K}_{ij}=\check{k}(t_i,t_j) K ij = k ˇ ( t i , t j ) is SSS. Without monotonicity, there exists a permutation function π \pi π such that ( ϕ ( t π ( 1 ) ) , … , ϕ ( t π ( n ) ) ) (\phi(t_{\pi(1)}),\ldots,\phi(t_{\pi(n)})) ( ϕ ( t π ( 1 ) ) , … , ϕ ( t π ( n ) )) is nondecreasing, which implies that the kernel matrix with blocks k ˇ ( t π ( i ) , t π ( j ) ) \check{k}(t_{\pi(i)},t_{\pi(j)}) k ˇ ( t π ( i ) , t π ( j ) ) is SSS.
The stable-spline family provide an example of time warping. Let k m k_m k m denote the m m m th-order spline kernel. Applying the monotone time warp ϕ ( t ) = e − α t \phi(t)=e^{-\alpha t} ϕ ( t ) = e − α t with α > 0 \alpha>0 α > 0 gives
k ˇ m ( t , t ′ ) = k m ( e − α t , e − α t ′ ) . (26) \check{k}_m(t,t')=k_m(e^{-\alpha t},e^{-\alpha t'}). \tag*{(26)} k ˇ m ( t , t ′ ) = k m ( e − α t , e − α t ′ ) . (26)
Since ϕ \phi ϕ is monotone, the resulting kernel matrix remains SSS after ordering the data points. The corresponding hyperparameter derivatives can also be represented in SSS form; we return to this point in § 5.1 . We note that the family of first-order stable spline kernels is equivalent to the family of TC kernels.
Remark. We note that while the time warp ϕ ( t ) = e − α t \phi(t)=e^{-\alpha t} ϕ ( t ) = e − α t is monotone, it maps a nondecreasing sequence of time points t 1 , … , t n t_1,\ldots,t_n t 1 , … , t n to a nonincreasing sequence of time points ϕ ( t 1 ) , … , ϕ ( t n ) \phi(t_1),\ldots,\phi(t_n) ϕ ( t 1 ) , … , ϕ ( t n ) . The resulting kernel matrix is still SSS, but the SSS generators are defined in reverse order; see as remarked following Theorem 3.1 .
Kernel sums
A sum of kernels of the form
k ( t , t ′ ) = ∑ i = 1 m k i ( t , t ′ ) k(t,t')=\sum_{i=1}^{m} k_i(t,t') k ( t , t ′ ) = i = 1 ∑ m k i ( t , t ′ )
leads to a kernel matrix of the form K = ∑ i = 1 m K i \mathbf{K}=\sum_{i=1}^{m}\mathbf{K}_i K = ∑ i = 1 m K i , where K i \mathbf{K}_i K i is the kernel matrix generated by k i k_i k i . The matrix K \mathbf{K} K is SSS if K 1 , … , K m \mathbf{K}_1,\ldots,\mathbf{K}_m K 1 , … , K m are SSS. We may view k ( t , t ′ ) k(t,t') k ( t , t ′ ) as the covariance of the sum of m m m independent processes, i.e.,
y ( t ) = ∑ i = 1 m y i ( t ) , k ( t , t ′ ) = cov ( y ( t ) , y ( t ′ ) ) , y(t)=\sum_{i=1}^{m}y_i(t),\qquad k(t,t')=\operatorname{cov}(y(t),y(t')), y ( t ) = i = 1 ∑ m y i ( t ) , k ( t , t ′ ) = cov ( y ( t ) , y ( t ′ )) ,
where y i ( t ) y_i(t) y i ( t ) is described by an SDE
d x i ( t ) d t = F i x i ( t ) + G i w i ( t ) , y i ( t ) = C i ( t ) x i ( t ) , i ∈ { 1 , … , m } . \frac{\mathrm{d}x_i(t)}{\mathrm{d}t}=\mathbf{F}_i x_i(t)+\mathbf{G}_i w_i(t),\qquad y_i(t)=\mathbf{C}_i(t)x_i(t),\qquad i\in\{1,\ldots,m\}. d t d x i ( t ) = F i x i ( t ) + G i w i ( t ) , y i ( t ) = C i ( t ) x i ( t ) , i ∈ { 1 , … , m } .
The process y ( t ) y(t) y ( t ) can then be described by the SDE
d x ( t ) d t = blkdiag ( F 1 , … , F m ) x ( t ) + blkdiag ( G 1 , … , G m ) w ( t ) , y ( t ) = [ C 1 ( t ) ⋯ C m ( t ) ] x ( t ) , \frac{\mathrm{d}x(t)}{\mathrm{d}t}=\operatorname{blkdiag}(\mathbf{F}_1,\ldots,\mathbf{F}_m)x(t)+\operatorname{blkdiag}(\mathbf{G}_1,\ldots,\mathbf{G}_m)w(t),\qquad y(t)=[\mathbf{C}_1(t)\ \cdots\ \mathbf{C}_m(t)]x(t), d t d x ( t ) = blkdiag ( F 1 , … , F m ) x ( t ) + blkdiag ( G 1 , … , G m ) w ( t ) , y ( t ) = [ C 1 ( t ) ⋯ C m ( t )] x ( t ) ,
where x ( t ) = ( x 1 ( t ) , … , x m ( t ) ) x(t)=(x_1(t),\ldots,x_m(t)) x ( t ) = ( x 1 ( t ) , … , x m ( t )) and w ( t ) = ( w 1 ( t ) , … , w m ( t ) ) w(t)=(w_1(t),\ldots,w_m(t)) w ( t ) = ( w 1 ( t ) , … , w m ( t )) . We note that the m m m state-space representations need not have the same state dimension, and the resulting SSS representation of K \mathbf{K} K has state dimension equal to the sum of the state dimensions of the individual SDEs. The SSS generators of K \mathbf{K} K can be obtained by concatenating the SSS generators of K 1 , … , K m \mathbf{K}_1,\ldots,\mathbf{K}_m K 1 , … , K m in block-diagonal and block-row form, respectively.
Linear-time SSS algorithms
We will now derive recursive algorithms for the primitives listed in Table 3, all of which have computational complexity linear in the number of data points. The recursions for the Cholesky and LDLT ^\mathsf{T} T factorizations, as well as triangular solves, are adaptations of existing SSS factorization results to the block notation adopted in this work. The main new algorithmic contribution is a recursion for tr ( K − 1 A ) \operatorname{tr}(\mathbf{K}^{-1}\mathbf{A}) tr ( K − 1 A ) that avoids forming intermediate SSS products, making it directly applicable to the evaluation of analytic log-marginal-likelihood gradients. We also derive an algorithm for computing the diagonal elements of K − 1 = L − T L − 1 \mathbf{K}^{-1}=\mathbf{L}^{-\mathsf{T}}\mathbf{L}^{-1} K − 1 = L − T L − 1 . This procedure can be interpreted as a modification of the SSS multiplication algorithm of [20 ] , specialized to compute and store only the diagonal blocks of the product. Several algorithms are presented in both Cholesky and LDLT ^\mathsf{T} T forms. The LDLT ^\mathsf{T} T formulation, in particular, admits a natural interpretation in terms of Kalman filtering, where L − 1 y \mathbf{L}^{-1}y L − 1 y corresponds to the innovation process and D \mathbf{D} D to its associated covariance (Appendix § 9 .§ 5 ). We will frequently make use of the identity
T i : j = T i : k + 1 T k T k − 1 : j , i ≥ k ≥ j , (27) \mathbf{T}_{i:j}=\mathbf{T}_{i:k+1}\mathbf{T}_{k}\mathbf{T}_{k-1:j},\qquad i\geq k\geq j, \tag*{(27)} T i : j = T i : k + 1 T k T k − 1 : j , i ≥ k ≥ j , (27)
which is a direct consequence of the definition of the descending-index chain product in (4) .
Table 3. SSS algorithms and their role in Gaussian process regression. The matrix K \mathbf{K} K is assumed to be symmetric positive definite and SSS, and A \mathbf{A} A is assumed to be square and SSS.
Cholesky factorization
Consider a symmetric positive definite SSS matrix K ∈ R n d × n d \mathbf{K} \in\mathbb{R}^{nd \times nd} K ∈ R n d × n d of the form (2), i.e.,
K = U ( I − N p T ) − 1 N p V T + V ( N p ) T ( I − N p T ) − T U T + D . \mathbf{K} = \mathbf{U}(\mathbf{I}-\mathbf{N}^{p}\mathbf{T})^{-1}\mathbf{N}^{p}\mathbf{V}^{\mathsf{T}} + \mathbf{V}(\mathbf{N}^{p})^{\mathsf{T}}(\mathbf{I}-\mathbf{N}^{p}\mathbf{T})^{-\mathsf{T}}\mathbf{U}^{\mathsf{T}} + \mathbf{D}. K = U ( I − N p T ) − 1 N p V T + V ( N p ) T ( I − N p T ) − T U T + D .
We will show that the Cholesky factorization K = L L T \mathbf{K} = \mathbf{L}\mathbf{L}^{\mathsf{T}} K = L L T yields an SSS Cholesky factor of the form
L = U ( I − N p T ) − 1 N p V ~ T + D ~ , (28) \mathbf{L} = \mathbf{U}(\mathbf{I}-\mathbf{N}^{p}\mathbf{T})^{-1}\mathbf{N}^{p}\widetilde{\mathbf{V}}^{\mathsf{T}} + \widetilde{\mathbf{D}}, \tag*{(28)} L = U ( I − N p T ) − 1 N p V T + D , (28)
where V ~ \widetilde{\mathbf{V}} V and D ~ \widetilde{\mathbf{D}} D are block-diagonal matrices, i.e.,
L i k = { U i T i − 1 : k + 1 V ~ k T , i > k , D ~ i , i = k , 0 , otherwise . (29) \mathbf{L}_{ik} =
\begin{cases}
\mathbf{U}_{i}\mathbf{T}_{i-1:k+1}\widetilde{\mathbf{V}}_{k}^{\mathsf{T}}, & i > k,\\
\widetilde{\mathbf{D}}_{i}, & i = k,\\
0, & \text{otherwise}.
\end{cases} \tag*{(29)} L ik = ⎩ ⎨ ⎧ U i T i − 1 : k + 1 V k T , D i , 0 , i > k , i = k , otherwise . (29)
For i > j i > j i > j , the block K i j = ( L L T ) i j \mathbf{K}_{ij} = (\mathbf{L}\mathbf{L}^{\mathsf{T}})_{ij} K ij = ( L L T ) ij is a sum of j j j terms, i.e.,
( L L T ) i j = ∑ k = 1 j − 1 L i k ( L j k ) T + L i j D ~ j T = ∑ k = 1 j − 1 U i T i − 1 : k + 1 V ~ k T V ~ k T j − 1 : k + 1 T U j T + U i T i − 1 : j + 1 V ~ j T D ~ j T . (\mathbf{L}\mathbf{L}^{\mathsf{T}})_{ij} = \sum_{k=1}^{j-1}\mathbf{L}_{ik}(\mathbf{L}_{jk})^{\mathsf{T}} + \mathbf{L}_{ij}\widetilde{\mathbf{D}}_{j}^{\mathsf{T}}
= \sum_{k=1}^{j-1}\mathbf{U}_{i}\mathbf{T}_{i-1:k+1}\widetilde{\mathbf{V}}_{k}^{\mathsf{T}}\widetilde{\mathbf{V}}_{k}\mathbf{T}_{j-1:k+1}^{\mathsf{T}}\mathbf{U}_{j}^{\mathsf{T}} + \mathbf{U}_{i}\mathbf{T}_{i-1:j+1}\widetilde{\mathbf{V}}_{j}^{\mathsf{T}}\widetilde{\mathbf{D}}_{j}^{\mathsf{T}}. ( L L T ) ij = k = 1 ∑ j − 1 L ik ( L j k ) T + L ij D j T = k = 1 ∑ j − 1 U i T i − 1 : k + 1 V k T V k T j − 1 : k + 1 T U j T + U i T i − 1 : j + 1 V j T D j T .
Using the identity (26), this simplifies to
( L L T ) i j = U i T i − 1 : j + 1 ( T j ( ∑ k = 1 j − 1 T j − 1 : k + 1 V ~ k T V ~ k T j − 1 : k + 1 T ) U j T + V ~ j T D ~ j T ) = U i T i − 1 : j + 1 ( T j Ψ j U j T + V ~ j T D ~ j T ) , (\mathbf{L}\mathbf{L}^{\mathsf{T}})_{ij} = \mathbf{U}_{i}\mathbf{T}_{i-1:j+1}\left(\mathbf{T}_{j}\left(\sum_{k=1}^{j-1}\mathbf{T}_{j-1:k+1}\widetilde{\mathbf{V}}_{k}^{\mathsf{T}}\widetilde{\mathbf{V}}_{k}\mathbf{T}_{j-1:k+1}^{\mathsf{T}}\right)\mathbf{U}_{j}^{\mathsf{T}} + \widetilde{\mathbf{V}}_{j}^{\mathsf{T}}\widetilde{\mathbf{D}}_{j}^{\mathsf{T}}\right)
= \mathbf{U}_{i}\mathbf{T}_{i-1:j+1}\left(\mathbf{T}_{j}\mathbf{\Psi}_{j}\mathbf{U}_{j}^{\mathsf{T}} + \widetilde{\mathbf{V}}_{j}^{\mathsf{T}}\widetilde{\mathbf{D}}_{j}^{\mathsf{T}}\right), ( L L T ) ij = U i T i − 1 : j + 1 ( T j ( k = 1 ∑ j − 1 T j − 1 : k + 1 V k T V k T j − 1 : k + 1 T ) U j T + V j T D j T ) = U i T i − 1 : j + 1 ( T j Ψ j U j T + V j T D j T ) ,
where Ψ j = ∑ k = 1 j − 1 T j − 1 : k + 1 V ~ k T V ~ k T j − 1 : k + 1 T \mathbf{\Psi}_{j} = \sum_{k=1}^{j-1}\mathbf{T}_{j-1:k+1}\widetilde{\mathbf{V}}_{k}^{\mathsf{T}}\widetilde{\mathbf{V}}_{k}\mathbf{T}_{j-1:k+1}^{\mathsf{T}} Ψ j = ∑ k = 1 j − 1 T j − 1 : k + 1 V k T V k T j − 1 : k + 1 T is defined recursively by
Ψ 1 = 0 , Ψ i + 1 = T i Ψ i T i T + V ~ i T V ~ i , i = 1 , … , n − 1. (30) \mathbf{\Psi}_{1} = 0,\qquad\mathbf{\Psi}_{i+1} = \mathbf{T}_{i}\mathbf{\Psi}_{i}\mathbf{T}_{i}^{\mathsf{T}} + \widetilde{\mathbf{V}}_{i}^{\mathsf{T}}\widetilde{\mathbf{V}}_{i},\qquad i = 1,\ldots,n-1. \tag*{(30)} Ψ 1 = 0 , Ψ i + 1 = T i Ψ i T i T + V i T V i , i = 1 , … , n − 1. (30)
Matching ( L L T ) i j (\mathbf{L}\mathbf{L}^{\mathsf{T}})_{ij} ( L L T ) ij with K i j = U i T i − 1 : j + 1 V j T \mathbf{K}_{ij} = \mathbf{U}_{i}\mathbf{T}_{i-1:j+1}\mathbf{V}_{j}^{\mathsf{T}} K ij = U i T i − 1 : j + 1 V j T yields V j T = T j Ψ j U j T + V ~ j T D ~ j T \mathbf{V}_{j}^{\mathsf{T}} = \mathbf{T}_{j}\mathbf{\Psi}_{j}\mathbf{U}_{j}^{\mathsf{T}} + \widetilde{\mathbf{V}}_{j}^{\mathsf{T}}\widetilde{\mathbf{D}}_{j}^{\mathsf{T}} V j T = T j Ψ j U j T + V j T D j T , which implies that
V ~ j T = ( V j T − T j Ψ j U j T ) D ~ j − T . (31) \widetilde{\mathbf{V}}_{j}^{\mathsf{T}} = (\mathbf{V}_{j}^{\mathsf{T}}-\mathbf{T}_{j}\mathbf{\Psi}_{j}\mathbf{U}_{j}^{\mathsf{T}})\widetilde{\mathbf{D}}_{j}^{-\mathsf{T}}. \tag*{(31)} V j T = ( V j T − T j Ψ j U j T ) D j − T . (31)
For the diagonal blocks K i i = ( L L T ) i i \mathbf{K}_{ii} = (\mathbf{L}\mathbf{L}^{\mathsf{T}})_{ii} K ii = ( L L T ) ii , we have
( L L T ) i i = ∑ k = 1 i − 1 L i k ( L i k ) T + D ~ i D ~ i T = U i Ψ i U i T + D ~ i D ~ i T , (\mathbf{L}\mathbf{L}^{\mathsf{T}})_{ii} = \sum_{k=1}^{i-1}\mathbf{L}_{ik}(\mathbf{L}_{ik})^{\mathsf{T}} + \widetilde{\mathbf{D}}_{i}\widetilde{\mathbf{D}}_{i}^{\mathsf{T}} = \mathbf{U}_{i}\mathbf{\Psi}_{i}\mathbf{U}_{i}^{\mathsf{T}} + \widetilde{\mathbf{D}}_{i}\widetilde{\mathbf{D}}_{i}^{\mathsf{T}}, ( L L T ) ii = k = 1 ∑ i − 1 L ik ( L ik ) T + D i D i T = U i Ψ i U i T + D i D i T ,
and matching ( L L T ) i i (\mathbf{L}\mathbf{L}^{\mathsf{T}})_{ii} ( L L T ) ii with K i i = D i \mathbf{K}_{ii} = \mathbf{D}_i K ii = D i yields U i Ψ i U i T + D ~ i D ~ i T = D i \mathbf{U}_i\mathbf{\Psi}_i\mathbf{U}_i^{\mathsf{T}} + \widetilde{\mathbf{D}}_i\widetilde{\mathbf{D}}_i^{\mathsf{T}} = \mathbf{D}_i U i Ψ i U i T + D i D i T = D i , which can be rearranged as
D ~ i D ~ i T = D i − U i Ψ i U i T , (32) \widetilde{\mathbf{D}}_i\widetilde{\mathbf{D}}_i^{\mathsf{T}} = \mathbf{D}_i - \mathbf{U}_i\mathbf{\Psi}_i\mathbf{U}_i^{\mathsf{T}}, \tag*{(32)} D i D i T = D i − U i Ψ i U i T , (32)
where we take D ~ i \widetilde{\mathbf{D}}_i D i to be the lower triangular Cholesky factor of the right-hand side. The relations (29), (30), and (31) form the basis of the SSS Cholesky factorization presented in Algorithm 1, which has computational complexity O ( n ( d 3 + p 3 ) ) O(n(d^3 + p^3)) O ( n ( d 3 + p 3 )) .
Algorithm 1: Cholesky factorization of symmetric positive definite SSS matrix K
Input: SSS matrix K of the form (2), defined by block-diagonal matrices (U, T, V, D).
Output: Block-diagonal matrices Ṽ and D̃ such that L = U(I − NᵀT)⁻¹NᵖṼᵀ + D̃ and K = LLᵀ.
Ψ ← 0_{p×p}
for i = 1 to n do
M ← T_iΨ
Ṽ_iᵀ ← V_iᵀ − MU_iᵀ
D̃_i ← chol(D_i − U_iΨU_iᵀ) // Lower triangular Cholesky factor
Ṽ_iᵀ ← Ṽ_iᵀD̃_i⁻ᵀ
Ψ ← MT_iᵀ + Ṽ_iᵀṼ_i
return (Ṽ_1, …, Ṽ_n), (D̃_1, …, D̃_n)
Remark. An SSS representation of L − 1 \mathbf{L}^{-1} L − 1 can be computed in linear time using Algorithm 7; the derivation and algorithm are provided in Appendix A. When C 1 , … , C n \mathbf{C}_1,\ldots,\mathbf{C}_n C 1 , … , C n are square and nonsingular, the inverse of L \mathbf{L} L is block bidiagonal, and K − 1 \mathbf{K}^{-1} K − 1 is therefore block tridiagonal. This is shown in Appendix A.3.
Diagonal blocks of K − 1 \mathbf{K}^{-1} K − 1
The diagonal blocks of K − 1 \mathbf{K}^{-1} K − 1 can, in principle, be obtained directly from the product L − T L − 1 \mathbf{L}^{-\mathsf{T}}\mathbf{L}^{-1} L − T L − 1 . In fact, the algorithm that we present may be viewed as a special case of the general multiplication of two SSS matrices algorithm from [20 ] . Given an SSS representation of L − 1 \mathbf{L}^{-1} L − 1 of the form
L − 1 = U ‾ ( I − N T T ‾ ) − 1 N V ‾ T + D ‾ , (33) \mathbf{L}^{-1} = \overline{\mathbf{U}}(\mathbf{I} - \mathbf{N}^{\mathsf{T}}\overline{\mathbf{T}})^{-1}\mathbf{N}\overline{\mathbf{V}}^{\mathsf{T}} + \overline{\mathbf{D}}, \tag*{(33)} L − 1 = U ( I − N T T ) − 1 N V T + D , (33)
which can be computed from the SSS representation of L \mathbf{L} L using Algorithm 7, we can express the diagonal blocks of K − 1 \mathbf{K}^{-1} K − 1 as
( K − 1 ) i i = ∑ k = i + 1 n ( L − 1 ) k i T ( L − 1 ) k i + D ‾ i T D ‾ i = ∑ k = i + 1 n V ‾ i T ‾ k − 1 : i + 1 T U ‾ k T U ‾ k T ‾ k − 1 : i + 1 V ‾ i T + D ‾ i T D ‾ i = V ‾ i Φ i V ‾ i T + D ‾ i T D ‾ i , (34) \begin{aligned}
(\mathbf{K}^{-1})_{ii} = \sum_{k=i+1}^{n}(\mathbf{L}^{-1})_{ki}^{\mathsf{T}}(\mathbf{L}^{-1})_{ki} + \overline{\mathbf{D}}_i^{\mathsf{T}}\overline{\mathbf{D}}_i \\
&= \sum_{k=i+1}^{n}\overline{\mathbf{V}}_i\overline{\mathbf{T}}_{k-1:i+1}^{\mathsf{T}}\overline{\mathbf{U}}_k^{\mathsf{T}}\overline{\mathbf{U}}_k\overline{\mathbf{T}}_{k-1:i+1}\overline{\mathbf{V}}_i^{\mathsf{T}} + \overline{\mathbf{D}}_i^{\mathsf{T}}\overline{\mathbf{D}}_i \\
&= \overline{\mathbf{V}}_i\mathbf{\Phi}_i\overline{\mathbf{V}}_i^{\mathsf{T}} + \overline{\mathbf{D}}_i^{\mathsf{T}}\overline{\mathbf{D}}_i, \tag*{(34)}
\end{aligned} ( K − 1 ) ii = k = i + 1 ∑ n ( L − 1 ) k i T ( L − 1 ) k i + D i T D i = k = i + 1 ∑ n V i T k − 1 : i + 1 T U k T U k T k − 1 : i + 1 V i T + D i T D i = V i Φ i V i T + D i T D i , (34)
where Φ i = ∑ k = i + 1 n T ‾ k − 1 : i + 1 T U ‾ k T U ‾ k T ‾ k − 1 : i + 1 \mathbf{\Phi}_i = \sum_{k=i+1}^{n}\overline{\mathbf{T}}_{k-1:i+1}^{\mathsf{T}}\overline{\mathbf{U}}_k^{\mathsf{T}}\overline{\mathbf{U}}_k\overline{\mathbf{T}}_{k-1:i+1} Φ i = ∑ k = i + 1 n T k − 1 : i + 1 T U k T U k T k − 1 : i + 1 can be computed recursively as
Φ n = 0 , Φ i − 1 = T ‾ i T Φ i T ‾ i + U ‾ i T U ‾ i , i = n , … , 2. (35) \mathbf{\Phi}_n = 0,\qquad\mathbf{\Phi}_{i-1} = \overline{\mathbf{T}}_i^{\mathsf{T}}\mathbf{\Phi}_i\overline{\mathbf{T}}_i + \overline{\mathbf{U}}_i^{\mathsf{T}}\overline{\mathbf{U}}_i,\qquad i = n,\ldots,2. \tag*{(35)} Φ n = 0 , Φ i − 1 = T i T Φ i T i + U i T U i , i = n , … , 2. (35)
The resulting procedure for computing the diagonal blocks of K − 1 \mathbf{K}^{-1} K − 1 is presented in Algorithm 2, which has computational complexity O ( n ( d 3 + p 3 ) ) O(n(d^3 + p^3)) O ( n ( d 3 + p 3 )) .
Algorithm 2: Diagonal blocks of inverse of symmetric positive definite SSS matrix K
Input: Inverse Cholesky factor L⁻¹ of K, defined by block-diagonal matrices (Ū, T̄, V̄, D̄).
Output: Ω_i = (K⁻¹)_{ii} for i ∈ {1, …, n}.
Φ ← 0_{p×p}
for i = n to 1 do
Ω_i ← V̄_iΦV̄_iᵀ + D̄_iᵀD̄_i
Φ ← T̄_iᵀΦT̄_i + Ū_iᵀŪ_i
return (Ω_1, …, Ω_n)
Trace of K^{-1}A
We now derive a novel algorithm for computing the trace of K − 1 A K^{-1}A K − 1 A , where K K K is once again assumed to be a symmetric positive definite SSS matrix of the form (2), and A A A is a general nonsymmetric SSS matrix of the form (5), i.e.,
A = U ~ ( I − N p T ~ ) − 1 N p V ~ T + P ~ ( N q ) T ( I − N q R ~ ) − 1 Q ~ T + D ~ . A = \tilde{U}(I-N^{p}\tilde{T})^{-1}N^{p}\tilde{V}^{\mathsf{T}}+\tilde{P}(N^{q})^{\mathsf{T}}(I-N^{q}\tilde{R})^{-1}\tilde{Q}^{\mathsf{T}}+\tilde{D}. A = U ~ ( I − N p T ~ ) − 1 N p V ~ T + P ~ ( N q ) T ( I − N q R ~ ) − 1 Q ~ T + D ~ .
where we use the accented letters T ~ \tilde{T} T ~ , U ~ \tilde{U} U ~ , V ~ \tilde{V} V ~ , P ~ \tilde{P} P ~ , Q ~ \tilde{Q} Q ~ , R ~ \tilde{R} R ~ , and D ~ \tilde{D} D ~ for the SSS generators of A A A to distinguish them from the SSS generators of K K K . Furthermore, we will assume that the inverse Cholesky factor of K K K has an SSS representation of the form (32), i.e.,
L − 1 = U ˉ ( I − N p T ˉ ) − 1 N p V ˉ T + D ˉ . L^{-1}=\bar{U}(I-N^{p}\bar{T})^{-1}N^{p}\bar{V}^{\mathsf{T}}+\bar{D}. L − 1 = U ˉ ( I − N p T ˉ ) − 1 N p V ˉ T + D ˉ .
Using the cyclic property of the trace, we then have
tr ( K − 1 A ) = tr ( L − 1 A L − T ) = ∑ i = 1 n tr ( Θ i ) . \operatorname{tr}(K^{-1}A)=\operatorname{tr}(L^{-1}AL^{-\mathsf{T}})=\sum_{i=1}^{n}\operatorname{tr}(\Theta_i). tr ( K − 1 A ) = tr ( L − 1 A L − T ) = i = 1 ∑ n tr ( Θ i ) .
where Θ i = ( L − 1 A L − T ) i i \Theta_i=(L^{-1}AL^{-\mathsf{T}})_{ii} Θ i = ( L − 1 A L − T ) ii denotes the i i i th diagonal block of L − 1 A L − T L^{-1}AL^{-\mathsf{T}} L − 1 A L − T . We note that Θ i \Theta_i Θ i is determined entirely by the i i i th block row of L − 1 L^{-1} L − 1 and the i d × i d id\times id i d × i d leading principal submatrices of A A A , which we will denote A ( i ) A_{(i)} A ( i ) , i.e., Θ 1 = D ˉ 1 D ˉ 1 D ˉ 1 T \Theta_1=\bar{D}_1\bar{D}_1\bar{D}_1^{\mathsf{T}} Θ 1 = D ˉ 1 D ˉ 1 D ˉ 1 T and for i ∈ { 2 , … , n } i\in\{2,\ldots,n\} i ∈ { 2 , … , n } , we have that Θ i \Theta_i Θ i is given by
Θ i = [ V ˉ 1 T ˉ i − 1 : 2 T U ˉ 1 T V ˉ 2 T ˉ i − 1 : 3 T U ˉ 2 T ⋮ ⋮ D ˉ i T ] T [ D ~ 1 P ~ 1 Q ~ 2 T ⋯ P ~ 1 R ~ i − 1 : 2 T Q ~ i T U ~ 2 V ~ 1 T D ~ 2 ⋯ P ~ 2 R ~ i − 1 : 3 T Q ~ i T ⋮ ⋮ ⋱ ⋮ U ~ i T ~ i − 1 : 2 T V ~ 1 T U ~ i T ~ i − 1 : 3 T V ~ 2 T ⋯ D ~ i ] [ V ˉ 1 T ˉ i − 1 : 2 T U ˉ 1 T V ˉ 2 T ˉ i − 1 : 3 T U ˉ 2 T ⋮ ⋮ D ˉ i T ] . \Theta_i=
\begin{bmatrix}
\bar{V}_1\bar{T}_{i-1:2}^{\mathsf{T}} & \bar{U}_1^{\mathsf{T}}\\
\bar{V}_2\bar{T}_{i-1:3}^{\mathsf{T}} & \bar{U}_2^{\mathsf{T}}\\
\vdots& \vdots\\
\bar{D}_i^{\mathsf{T}} &
\end{bmatrix}^{\mathsf{T}}
\begin{bmatrix}
\tilde{D}_1 & \tilde{P}_1\tilde{Q}_2^{\mathsf{T}} & \cdots& \tilde{P}_1\tilde{R}_{i-1:2}^{\mathsf{T}}\tilde{Q}_i^{\mathsf{T}}\\
\tilde{U}_2\tilde{V}_1^{\mathsf{T}} & \tilde{D}_2 & \cdots& \tilde{P}_2\tilde{R}_{i-1:3}^{\mathsf{T}}\tilde{Q}_i^{\mathsf{T}}\\
\vdots& \vdots& \ddots& \vdots\\
\tilde{U}_i\tilde{T}_{i-1:2}^{\mathsf{T}}\tilde{V}_1^{\mathsf{T}} & \tilde{U}_i\tilde{T}_{i-1:3}^{\mathsf{T}}\tilde{V}_2^{\mathsf{T}} & \cdots& \tilde{D}_i
\end{bmatrix}
\begin{bmatrix}
\bar{V}_1\bar{T}_{i-1:2}^{\mathsf{T}} & \bar{U}_1^{\mathsf{T}}\\
\bar{V}_2\bar{T}_{i-1:3}^{\mathsf{T}} & \bar{U}_2^{\mathsf{T}}\\
\vdots& \vdots\\
\bar{D}_i^{\mathsf{T}} &
\end{bmatrix}. Θ i = V ˉ 1 T ˉ i − 1 : 2 T V ˉ 2 T ˉ i − 1 : 3 T ⋮ D ˉ i T U ˉ 1 T U ˉ 2 T ⋮ T D ~ 1 U ~ 2 V ~ 1 T ⋮ U ~ i T ~ i − 1 : 2 T V ~ 1 T P ~ 1 Q ~ 2 T D ~ 2 ⋮ U ~ i T ~ i − 1 : 3 T V ~ 2 T ⋯ ⋯ ⋱ ⋯ P ~ 1 R ~ i − 1 : 2 T Q ~ i T P ~ 2 R ~ i − 1 : 3 T Q ~ i T ⋮ D ~ i V ˉ 1 T ˉ i − 1 : 2 T V ˉ 2 T ˉ i − 1 : 3 T ⋮ D ˉ i T U ˉ 1 T U ˉ 2 T ⋮ .
To simplify notation, we define
Y i = [ V ˉ 1 T ˉ i − 1 : 2 T V ˉ 2 T ˉ i − 1 : 3 T ⋮ V ˉ i − 1 ] , Ξ i = [ V ~ 1 T ~ i − 1 : 2 V ~ 2 T ~ i − 1 : 3 ⋮ V ~ i − 1 ] , Γ i = [ P ~ 1 R ~ i − 1 : 2 P ~ 2 R ~ i − 1 : 3 ⋮ P ~ i − 1 ] , i ∈ { 2 , … , n } , \mathcal{Y}_i=
\begin{bmatrix}
\bar{V}_1\bar{T}_{i-1:2}^{\mathsf{T}}\\
\bar{V}_2\bar{T}_{i-1:3}^{\mathsf{T}}\\
\vdots\\
\bar{V}_{i-1}
\end{bmatrix},
\qquad
\Xi_i=
\begin{bmatrix}
\tilde{V}_1\tilde{T}_{i-1:2}\\
\tilde{V}_2\tilde{T}_{i-1:3}\\
\vdots\\
\tilde{V}_{i-1}
\end{bmatrix},
\qquad
\Gamma_i=
\begin{bmatrix}
\tilde{P}_1\tilde{R}_{i-1:2}\\
\tilde{P}_2\tilde{R}_{i-1:3}\\
\vdots\\
\tilde{P}_{i-1}
\end{bmatrix},
\qquad i\in\{2,\ldots,n\}, Y i = V ˉ 1 T ˉ i − 1 : 2 T V ˉ 2 T ˉ i − 1 : 3 T ⋮ V ˉ i − 1 , Ξ i = V ~ 1 T ~ i − 1 : 2 V ~ 2 T ~ i − 1 : 3 ⋮ V ~ i − 1 , Γ i = P ~ 1 R ~ i − 1 : 2 P ~ 2 R ~ i − 1 : 3 ⋮ P ~ i − 1 , i ∈ { 2 , … , n } ,
such that for i ∈ { 2 , … , n } i\in\{2,\ldots,n\} i ∈ { 2 , … , n } , we can write
Θ i = [ Y i U ˉ i T D ˉ i ] T [ A ( i − 1 ) Γ i Q ~ i T U ~ i Ξ i D ~ i ] [ Y i U ˉ i T D ˉ i ] = D ˉ i D ~ i D ˉ i T ⏟ (I) + D ˉ i U ~ i Ξ i U ˉ i T ⏟ (II) + U ˉ i Y i T Γ i Q ~ i T D ˉ i ⏟ (III) + U ˉ i Y i T A ( i − 1 ) Y i U ˉ i T ⏟ (IV) . \begin{aligned}
\Theta_i=
\begin{bmatrix}
\mathcal{Y}_i\bar{U}_i^{\mathsf{T}}\\
\bar{D}_i
\end{bmatrix}^{\mathsf{T}}
\begin{bmatrix}
A_{(i-1)} & \Gamma_i\tilde{Q}_i^{\mathsf{T}}\\
\tilde{U}_i\Xi_i & \tilde{D}_i
\end{bmatrix}
\begin{bmatrix}
\mathcal{Y}_i\bar{U}_i^{\mathsf{T}}\\
\bar{D}_i
\end{bmatrix} \\
&=\underbrace{\bar{D}_i\tilde{D}_i\bar{D}_i^{\mathsf{T}}}_{\text{(I)}}+
\underbrace{\bar{D}_i\tilde{U}_i\Xi_i\bar{U}_i^{\mathsf{T}}}_{\text{(II)}}+
\underbrace{\bar{U}_i\mathcal{Y}_i^{\mathsf{T}}\Gamma_i\tilde{Q}_i^{\mathsf{T}}\bar{D}_i}_{\text{(III)}}+
\underbrace{\bar{U}_i\mathcal{Y}_i^{\mathsf{T}}A_{(i-1)}\mathcal{Y}_i\bar{U}_i^{\mathsf{T}}}_{\text{(IV)}}.
\end{aligned} Θ i = [ Y i U ˉ i T D ˉ i ] T [ A ( i − 1 ) U ~ i Ξ i Γ i Q ~ i T D ~ i ] [ Y i U ˉ i T D ˉ i ] = (I) D ˉ i D ~ i D ˉ i T + (II) D ˉ i U ~ i Ξ i U ˉ i T + (III) U ˉ i Y i T Γ i Q ~ i T D ˉ i + (IV) U ˉ i Y i T A ( i − 1 ) Y i U ˉ i T .
The first term can be computed directly, whereas the remaining three terms can be evaluated recursively. We now demonstrate this, beginning with the observation that Γ 2 = V ˉ 1 \Gamma_2=\bar{V}_1 Γ 2 = V ˉ 1 , Ξ 2 = V ~ 1 \Xi_2=\tilde{V}_1 Ξ 2 = V ~ 1 , and Γ 2 = P ~ 1 \Gamma_2=\tilde{P}_1 Γ 2 = P ~ 1 , and
Y i + 1 = [ Y i T ˉ i T V ˉ i ] , Ξ i + 1 = [ Ξ i T ~ i T V ~ i ] , Γ i + 1 = [ Γ i R ~ i T P ~ i ] , i ∈ { 2 , … , n − 1 } . \mathcal{Y}_{i+1}=
\begin{bmatrix}
\mathcal{Y}_i\bar{T}_i^{\mathsf{T}}\\
\bar{V}_i
\end{bmatrix},
\qquad
\Xi_{i+1}=
\begin{bmatrix}
\Xi_i\tilde{T}_i^{\mathsf{T}}\\
\tilde{V}_i
\end{bmatrix},
\qquad
\Gamma_{i+1}=
\begin{bmatrix}
\Gamma_i\tilde{R}_i^{\mathsf{T}}\\
\tilde{P}_i
\end{bmatrix},
\qquad i\in\{2,\ldots,n-1\}. Y i + 1 = [ Y i T ˉ i T V ˉ i ] , Ξ i + 1 = [ Ξ i T ~ i T V ~ i ] , Γ i + 1 = [ Γ i R ~ i T P ~ i ] , i ∈ { 2 , … , n − 1 } .
Using these recurrences, and defining W i = Ξ i T Y i W_i=\Xi_i^{\mathsf{T}}\mathcal{Y}_i W i = Ξ i T Y i and Z i = Y i T Γ i Z_i=\mathcal{Y}_i^{\mathsf{T}}\Gamma_i Z i = Y i T Γ i , we obtain the recurrences
W i + 1 = T ~ i W i T ˉ i T + V ~ i V ˉ i , Z i + 1 = T ˉ i Z i R ~ i T + V ˉ i P ~ i , (36) W_{i+1}=\tilde{T}_iW_i\bar{T}_i^{\mathsf{T}}+\tilde{V}_i\bar{V}_i,
\qquad
Z_{i+1}=\bar{T}_iZ_i\tilde{R}_i^{\mathsf{T}}+\bar{V}_i\tilde{P}_i, \tag*{(36)} W i + 1 = T ~ i W i T ˉ i T + V ~ i V ˉ i , Z i + 1 = T ˉ i Z i R ~ i T + V ˉ i P ~ i , (36)
for i ∈ { 1 , … , n − 1 } i\in\{1,\ldots,n-1\} i ∈ { 1 , … , n − 1 } , with W 1 = 0 W_1=0 W 1 = 0 and Z 1 = 0 Z_1=0 Z 1 = 0 . Similarly, in term (IV), the subexpression Π i = Y i T A ( i − 1 ) Y i \Pi_i=\mathcal{Y}_i^{\mathsf{T}}A_{(i-1)}\mathcal{Y}_i Π i = Y i T A ( i − 1 ) Y i satisfies the recurrence relation
Π i + 1 = [ Y i T ˉ i T V ˉ i ] T [ A ( i − 1 ) Γ i Q ~ i T U ~ i Ξ i D ~ i ] [ Y i T ˉ i T V ˉ i ] = T ˉ i Π i T ˉ i T + V ˉ i U ~ i W i T ˉ i T + T ˉ i Z i Q ~ i T V ˉ i + V ˉ i D ~ i V ˉ i , (37) \begin{aligned}
\Pi_{i+1}=
\begin{bmatrix}
\mathcal{Y}_i\bar{T}_i^{\mathsf{T}}\\
\bar{V}_i
\end{bmatrix}^{\mathsf{T}}
\begin{bmatrix}
A_{(i-1)} & \Gamma_i\tilde{Q}_i^{\mathsf{T}}\\
\tilde{U}_i\Xi_i & \tilde{D}_i
\end{bmatrix}
\begin{bmatrix}
\mathcal{Y}_i\bar{T}_i^{\mathsf{T}}\\
\bar{V}_i
\end{bmatrix} \\
&=\bar{T}_i\Pi_i\bar{T}_i^{\mathsf{T}}+\bar{V}_i\tilde{U}_iW_i\bar{T}_i^{\mathsf{T}}+\bar{T}_iZ_i\tilde{Q}_i^{\mathsf{T}}\bar{V}_i+\bar{V}_i\tilde{D}_i\bar{V}_i, \tag*{(37)}
\end{aligned} Π i + 1 = [ Y i T ˉ i T V ˉ i ] T [ A ( i − 1 ) U ~ i Ξ i Γ i Q ~ i T D ~ i ] [ Y i T ˉ i T V ˉ i ] = T ˉ i Π i T ˉ i T + V ˉ i U ~ i W i T ˉ i T + T ˉ i Z i Q ~ i T V ˉ i + V ˉ i D ~ i V ˉ i , (37)
for i ∈ { 1 , … , n − 1 } i \in\{1,\ldots,n-1\} i ∈ { 1 , … , n − 1 } where Π 1 = 0 \Pi_1=0 Π 1 = 0 . Algorithm 3 computes tr ( K − 1 A ) \operatorname{tr}(\mathbf{K}^{-1}\mathbf{A}) tr ( K − 1 A ) using the recurrence relations (35) and (36). We note that Algorithm 3 computes the diagonal blocks of L − 1 A L − T \mathbf{L}^{-1}\mathbf{A}\mathbf{L}^{-\mathsf{T}} L − 1 A L − T , which can be returned instead of the trace if desired. In either case, the algorithm has computational complexity O ( n ( d 3 + p 3 ) ) \mathcal{O}(n(d^3+p^3)) O ( n ( d 3 + p 3 )) .
Table 3 (PDF p. 14).
Gaussian process regression
The algorithms presented in § 4 and Appendix § 8 can be used to accelerate GP regression with kernels that admit a sequentially semiseparable representation. Table 3 summarizes these algorithms and their roles as GP primitives. We will assume that f : R → R d f:\mathbb{R}\to\mathbb{R}^d f : R → R d is a vector-valued function that we wish to learn from training data D = { ( t i , y i ) } i = 1 n \mathcal{D}=\{(t_i,y_i)\}_{i=1}^{n} D = {( t i , y i ) } i = 1 n where y i y_i y i are observations of f i = f ( t i ) f_i=f(t_i) f i = f ( t i ) , generated according to the model
y i = f i + ϵ i , ϵ i ∼ N ( 0 , Σ i ) , i ∈ { 1 , … , n } , (38) y_i=f_i+\epsilon_i,\qquad\epsilon_i\sim\mathcal{N}(0,\Sigma_i),\qquad i\in\{1,\ldots,n\}, \tag*{(38)} y i = f i + ϵ i , ϵ i ∼ N ( 0 , Σ i ) , i ∈ { 1 , … , n } , (38)
where we assume that ϵ 1 , … , ϵ n \epsilon_1,\ldots,\epsilon_n ϵ 1 , … , ϵ n are independent.
The GP regression model makes the a priori assumption that the joint distribution of f 1 , … , f n f_1,\ldots,f_n f 1 , … , f n is Gaussian with mean zero and covariance K \mathbf{K} K , which is a symmetric matrix of order n d nd n d with d × d d\times d d × d blocks given by
K i j = k ( t i , t j ; θ ) , i , j ∈ { 1 , … , n } , K_{ij}=k(t_i,t_j;\theta),\qquad i,j\in\{1,\ldots,n\}, K ij = k ( t i , t j ; θ ) , i , j ∈ { 1 , … , n } ,
where k : R × R → R d × d k:\mathbb{R}\times\mathbb{R}\to\mathbb{R}^{d\times d} k : R × R → R d × d is a positive definite kernel function parameterized by a vector of hyperparameters θ ∈ R n h \theta\in\mathbb{R}^{n_h} θ ∈ R n h . Here, we limit our attention to kernels that admit a sequentially semiseparable representation, which implies that K \mathbf{K} K is a positive semidefinite SSS matrix.
Given a nondecreasing sequence of n t n_t n t test inputs t ∗ = ( t ∗ 1 , … , t ∗ n t ) \mathbf{t}_*=(t_{*1},\ldots,t_{*n_t}) t ∗ = ( t ∗ 1 , … , t ∗ n t ) , the joint prior distribution of y = ( y 1 , … , y n ) \mathbf{y}=(y_1,\ldots,y_n) y = ( y 1 , … , y n ) and f ∗ = ( f ( t ∗ 1 ) , … , f ( t ∗ n t ) ) \mathbf{f}_*=(f(t_{*1}),\ldots,f(t_{*n_t})) f ∗ = ( f ( t ∗ 1 ) , … , f ( t ∗ n t )) is also Gaussian, i.e.,
\begin{bmatrix}\mathbf{y}\\\mathbf{f}_*\end{bmatrix}
\sim\mathcal{N}\left(0,\begin{bmatrix}\mathbf{K}+\mathbf{\Sigma}&\mathbf{K}_*^{\mathsf{T}}\\\mathbf{K}_*&\mathbf{K}_{**}\end{bmatrix}\right), \tag*{(39)}\end{bmatrix}
where Σ = blkdiag ( Σ 1 , … , Σ n ) \mathbf{\Sigma}=\operatorname{blkdiag}(\Sigma_1,\ldots,\Sigma_n) Σ = blkdiag ( Σ 1 , … , Σ n ) and where the ( i , j ) (i,j) ( i , j ) th blocks of K \mathbf{K} K , K ∗ \mathbf{K}_* K ∗ , and K ∗ ∗ \mathbf{K}_{**} K ∗∗ are given by
K i j = k ( t i , t j ; θ ) , [ K ∗ ] i j = k ( t ∗ i , t j ; θ ) , [ K ∗ ∗ ] i j = k ( t ∗ i , t ∗ j ; θ ) . K_{ij}=k(t_i,t_j;\theta),\qquad[\mathbf{K}_*]_{ij}=k(t_{*i},t_j;\theta),\qquad[\mathbf{K}_{**}]_{ij}=k(t_{*i},t_{*j};\theta). K ij = k ( t i , t j ; θ ) , [ K ∗ ] ij = k ( t ∗ i , t j ; θ ) , [ K ∗∗ ] ij = k ( t ∗ i , t ∗ j ; θ ) .
The posterior distribution of f ∗ \mathbf{f}_* f ∗ given y \mathbf{y} y , which is also commonly known as the posterior predictive distribution, is given by
f ∗ ∣ y ∼ N ( μ f ∗ ∣ y , Σ f ∗ ∣ y ) , (40) \mathbf{f}_*\mid\mathbf{y}\sim\mathcal{N}(\boldsymbol{\mu}_{\mathbf{f}_*\mid\mathbf{y}},\boldsymbol{\Sigma}_{\mathbf{f}_*\mid\mathbf{y}}), \tag*{(40)} f ∗ ∣ y ∼ N ( μ f ∗ ∣ y , Σ f ∗ ∣ y ) , (40)
where μ f ∗ ∣ y = K ∗ ( K + Σ ) − 1 y \boldsymbol{\mu}_{\mathbf{f}_*\mid\mathbf{y}}=\mathbf{K}_*(\mathbf{K}+\mathbf{\Sigma})^{-1}\mathbf{y} μ f ∗ ∣ y = K ∗ ( K + Σ ) − 1 y and Σ f ∗ ∣ y = K ∗ ∗ − K ∗ ( K + Σ ) − 1 K ∗ T \boldsymbol{\Sigma}_{\mathbf{f}_*\mid\mathbf{y}}=\mathbf{K}_{**}-\mathbf{K}_*(\mathbf{K}+\mathbf{\Sigma})^{-1}\mathbf{K}_*^{\mathsf{T}} Σ f ∗ ∣ y = K ∗∗ − K ∗ ( K + Σ ) − 1 K ∗ T .
To fit the GP model to the training data, we need to estimate the hyperparameters θ \theta θ of the kernel function. A common approach is to maximize the log marginal likelihood, log p ( y ∣ θ ) \log p(\mathbf{y}\mid\theta) log p ( y ∣ θ ) , which can be expressed as the optimization problem
θ ^ = argmax θ ∈ Θ ( − 1 2 y T ( K + Σ ) − 1 y − 1 2 log det ( K + Σ ) − n d 2 log ( 2 π ) ) , (41) \hat{\theta}=\underset{\theta\in\Theta}{\operatorname{argmax}}\left(-\frac{1}{2}\mathbf{y}^{\mathsf{T}}(\mathbf{K}+\mathbf{\Sigma})^{-1}\mathbf{y}-\frac{1}{2}\log\det(\mathbf{K}+\mathbf{\Sigma})-\frac{nd}{2}\log(2\pi)\right), \tag*{(41)} θ ^ = θ ∈ Θ argmax ( − 2 1 y T ( K + Σ ) − 1 y − 2 1 log det ( K + Σ ) − 2 n d log ( 2 π ) ) , (41)
where Θ ⊂ R n h \Theta\subset\mathbb{R}^{n_h} Θ ⊂ R n h denotes the set of admissible hyperparameters. A local gradient-based optimization method, such as L-BFGS-B [38 ] , is commonly used when Θ \Theta Θ is defined by simple lower and upper bounds on the hyperparameters.
The gradient evaluation amounts to computing the partial derivatives of the log marginal likelihood with respect to each hyperparameter θ k \theta_k θ k , which can be computed analytically as
∂ ∂ θ k log p ( y ∣ θ ) = 1 2 y T ( K + Σ ) − 1 ∂ ( K + Σ ) ∂ θ k ( K + Σ ) − 1 y − 1 2 tr ( ( K + Σ ) − 1 ∂ ( K + Σ ) ∂ θ k ) . (42) \frac{\partial}{\partial\theta_k}\log p(\mathbf{y}\mid\boldsymbol{\theta}) = \frac{1}{2}\mathbf{y}^{\mathsf{T}}(\mathbf{K}+\boldsymbol{\Sigma})^{-1}\frac{\partial(\mathbf{K}+\boldsymbol{\Sigma})}{\partial\theta_k}(\mathbf{K}+\boldsymbol{\Sigma})^{-1}\mathbf{y} - \frac{1}{2}\operatorname{tr}\left((\mathbf{K}+\boldsymbol{\Sigma})^{-1}\frac{\partial(\mathbf{K}+\boldsymbol{\Sigma})}{\partial\theta_k}\right). \tag*{(42)} ∂ θ k ∂ log p ( y ∣ θ ) = 2 1 y T ( K + Σ ) − 1 ∂ θ k ∂ ( K + Σ ) ( K + Σ ) − 1 y − 2 1 tr ( ( K + Σ ) − 1 ∂ θ k ∂ ( K + Σ ) ) . (42)
For a general kernel, the computational cost of forming and factorizing K + Σ \mathbf{K}+\boldsymbol{\Sigma} K + Σ scales as O ( n 3 d 3 ) O(n^3d^3) O ( n 3 d 3 ) , with a storage requirement of O ( n 2 d 2 ) O(n^2d^2) O ( n 2 d 2 ) . Once the Cholesky factorization K + Σ = L L T \mathbf{K}+\boldsymbol{\Sigma}=\mathbf{L}\mathbf{L}^{\mathsf{T}} K + Σ = L L T has been computed for a given θ \boldsymbol{\theta} θ , evaluation of the posterior mean and the diagonal of the posterior covariance scales as O ( n 2 d 2 + n t n d 2 ) O(n^2d^2+n_{\mathrm{t}}n d^2) O ( n 2 d 2 + n t n d 2 ) and O ( n t n 2 d 3 ) O(n_{\mathrm{t}}n^2d^3) O ( n t n 2 d 3 ) , respectively. Similarly, given L \mathbf{L} L , the evaluation of the log marginal likelihood scales as O ( n 2 d 2 ) O(n^2d^2) O ( n 2 d 2 ) and evaluation of its gradient scales as O ( n h n 3 d 3 ) O(n_{\mathrm{h}}n^3d^3) O ( n h n 3 d 3 ) . In contrast, when K + Σ \mathbf{K}+\boldsymbol{\Sigma} K + Σ admits an SSS representation, storage and computational cost scale linearly with the number n n n of input locations for fixed block size d d d and SSS orders. Given an SSS representation of K + Σ \mathbf{K}+\boldsymbol{\Sigma} K + Σ , the first step is to compute the Cholesky factorization K + Σ = L L T \mathbf{K}+\boldsymbol{\Sigma}=\mathbf{L}\mathbf{L}^{\mathsf{T}} K + Σ = L L T , which can be computed using Algorithm 1. This, in turn, makes it possible to evaluate the terms ( K + Σ ) − 1 y (\mathbf{K}+\boldsymbol{\Sigma})^{-1}\mathbf{y} ( K + Σ ) − 1 y and log det ( K + Σ ) \log\det(\mathbf{K}+\boldsymbol{\Sigma}) log det ( K + Σ ) in linear time for d d d and p p p fixed. In the remainder of this section, we focus on the log marginal likelihood and describe how to efficiently compute its partial derivatives and how to efficiently evaluate and draw samples from the posterior distribution.
Remark. An alternative to maximum likelihood estimation for hyperparameter selection is generalized cross validation (GCV) [39 ] , which does not require a probabilistic noise model. As shown in Appendix § 12 , the GCV score and its gradient can likewise be evaluated in linear time using the SSS representation of K + Σ \mathbf{K}+\boldsymbol{\Sigma} K + Σ .
Partial derivatives of the log marginal likelihood
In practice, the gradient of the log marginal likelihood is often approximated numerically using finite differences. Forward finite differences require n h + 1 n_{\mathrm{h}}+1 n h + 1 likelihood evaluations, while central differences require 2 n h + 1 2n_{\mathrm{h}}+1 2 n h + 1 , and hence the computational cost of this gradient approximation scales as O ( n h n ( d 3 + p 3 ) ) O(n_{\mathrm{h}}n(d^3+p^3)) O ( n h n ( d 3 + p 3 )) when the SSS structure is exploited. Another approach is to use reverse-mode derivative recursions [15 , 40 ] or, as we describe next, to compute the partial derivatives of the log marginal likelihood analytically by exploiting the SSS structure of K + Σ \mathbf{K}+\boldsymbol{\Sigma} K + Σ . Specifically, we will consider three cases for how the hyperparameter θ k \theta_k θ k enters the GP model:
Only the output model C ( t ; θ ) \mathbf{C}(t;\boldsymbol{\theta}) C ( t ; θ ) depends on θ k \theta_k θ k .
Only the state x ( t ; θ ) \mathbf{x}(t;\boldsymbol{\theta}) x ( t ; θ ) depends on θ k \theta_k θ k .
Time warping: y ~ ( t ) = y ( ϕ ( t ; θ k ) ) \tilde{\mathbf{y}}(t)=\mathbf{y}(\phi(t;\theta_k)) y ~ ( t ) = y ( ϕ ( t ; θ k )) , where ϕ ( t ; θ k ) \phi(t;\theta_k) ϕ ( t ; θ k ) is a time warp function.
In case 1, we will show that the partial derivative of K \mathbf{K} K with respect to θ k \theta_k θ k can be expressed as
∂ K ∂ θ k = A + A T , (43) \frac{\partial\mathbf{K}}{\partial\theta_k}=\mathbf{A}+\mathbf{A}^{\mathsf{T}}, \tag*{(43)} ∂ θ k ∂ K = A + A T , (43)
where A \mathbf{A} A is a nonsymmetric SSS matrix. This leads to the following expression for the partial derivative of the log marginal likelihood with respect to θ k \theta_k θ k :
∂ ∂ θ k log p ( y ∣ θ ) = y T ( K + Σ ) − 1 A ( K + Σ ) − 1 y − tr ( ( K + Σ ) − 1 A ) + 1 2 y T ( K + Σ ) − 1 ∂ Σ ∂ θ k ( K + Σ ) − 1 y − 1 2 tr ( ( K + Σ ) − 1 ∂ Σ ∂ θ k ) . \begin{aligned}
\frac{\partial}{\partial\theta_k}\log p(\mathbf{y}\mid\boldsymbol{\theta})={}&\mathbf{y}^{\mathsf{T}}(\mathbf{K}+\boldsymbol{\Sigma})^{-1}\mathbf{A}(\mathbf{K}+\boldsymbol{\Sigma})^{-1}\mathbf{y}-\operatorname{tr}\left((\mathbf{K}+\boldsymbol{\Sigma})^{-1}\mathbf{A}\right)\\
&+\frac{1}{2}\mathbf{y}^{\mathsf{T}}(\mathbf{K}+\boldsymbol{\Sigma})^{-1}\frac{\partial\boldsymbol{\Sigma}}{\partial\theta_k}(\mathbf{K}+\boldsymbol{\Sigma})^{-1}\mathbf{y}-\frac{1}{2}\operatorname{tr}\left((\mathbf{K}+\boldsymbol{\Sigma})^{-1}\frac{\partial\boldsymbol{\Sigma}}{\partial\theta_k}\right).
\end{aligned} ∂ θ k ∂ log p ( y ∣ θ ) = y T ( K + Σ ) − 1 A ( K + Σ ) − 1 y − tr ( ( K + Σ ) − 1 A ) + 2 1 y T ( K + Σ ) − 1 ∂ θ k ∂ Σ ( K + Σ ) − 1 y − 2 1 tr ( ( K + Σ ) − 1 ∂ θ k ∂ Σ ) .
Since matrix-vector products with A \mathbf{A} A are straightforward to compute and the term tr ( ( K + Σ ) − 1 A ) \operatorname{tr}((\mathbf{K}+\boldsymbol{\Sigma})^{-1}\mathbf{A}) tr (( K + Σ ) − 1 A ) can be evaluated using Algorithm 3, the first two terms can be computed in linear time. Similarly, using Algorithm 2 to compute the diagonal blocks of ( K + Σ ) − 1 (\mathbf{K}+\boldsymbol{\Sigma})^{-1} ( K + Σ ) − 1 and noting that ∂ Σ / ∂ θ k \partial\boldsymbol{\Sigma}/\partial\theta_k ∂ Σ / ∂ θ k is block diagonal, the last two terms can also be computed in linear time. The full gradient of the log marginal likelihood can therefore be computed in O ( n h n ( d 3 + p 3 ) ) O(n_{\mathrm{h}}n(d^3+p^3)) O ( n h n ( d 3 + p 3 )) time, which matches the cost of finite difference approximations.
Case 1: only the output model depends on the hyperparameter
We first consider the case where only the output model C ( t ; θ ) \mathbf{C}(t;\boldsymbol{\theta}) C ( t ; θ ) depends on the hyperparameter θ k \theta_k θ k . This is the case, for example, when the hyperparameter θ k \theta_k θ k is an output modulation parameter, such as in the DC kernel; see § 3.5 . Applying the product rule, we have
∂ k ( t , t ′ ) ∂ θ k = { ∂ C ( t ; θ ) ∂ θ k F ( t − t ′ ) P ( t ′ ) C ( t ′ ; θ ) T + C ( t ; θ ) F ( t − t ′ ) P ( t ′ ) ∂ C ( t ′ ; θ ) T ∂ θ k , t > t ′ , ∂ C ( t ; θ ) ∂ θ k P ( t ) F ( t ′ − t ) C ( t ′ ; θ ) T + C ( t ; θ ) P ( t ) F ( t ′ − t ) ∂ C ( t ′ ; θ ) T ∂ θ k , t < t ′ . \frac{\partial k(t,t')}{\partial\theta_k}=
\begin{cases}
\frac{\partial\mathbf{C}(t;\boldsymbol{\theta})}{\partial\theta_k}\mathbf{F}(t-t')\mathbf{P}(t')\mathbf{C}(t';\boldsymbol{\theta})^{\mathsf{T}}+\mathbf{C}(t;\boldsymbol{\theta})\mathbf{F}(t-t')\mathbf{P}(t')\frac{\partial\mathbf{C}(t';\boldsymbol{\theta})^{\mathsf{T}}}{\partial\theta_k}, & t>t',\\
\frac{\partial\mathbf{C}(t;\boldsymbol{\theta})}{\partial\theta_k}\mathbf{P}(t)\mathbf{F}(t'-t)\mathbf{C}(t';\boldsymbol{\theta})^{\mathsf{T}}+\mathbf{C}(t;\boldsymbol{\theta})\mathbf{P}(t)\mathbf{F}(t'-t)\frac{\partial\mathbf{C}(t';\boldsymbol{\theta})^{\mathsf{T}}}{\partial\theta_k}, & t<t'.
\end{cases} ∂ θ k ∂ k ( t , t ′ ) = { ∂ θ k ∂ C ( t ; θ ) F ( t − t ′ ) P ( t ′ ) C ( t ′ ; θ ) T + C ( t ; θ ) F ( t − t ′ ) P ( t ′ ) ∂ θ k ∂ C ( t ′ ; θ ) T , ∂ θ k ∂ C ( t ; θ ) P ( t ) F ( t ′ − t ) C ( t ′ ; θ ) T + C ( t ; θ ) P ( t ) F ( t ′ − t ) ∂ θ k ∂ C ( t ′ ; θ ) T , t > t ′ , t < t ′ .
Evaluating this expression at training-input pairs ( t i , t j ) (t_i,t_j) ( t i , t j ) yields a decomposition of the form (43) with the SSS representation of A \mathbf{A} A being
U i = ∂ C ( t i ; θ ) ∂ θ k , T i = e F Δ t i , V i = C ( t i ; θ ) P ( t i ) T i T , P i = ∂ C ( t i ; θ ) ∂ θ k P ( t i ) T i T , \mathbf{U}_i = \frac{\partial\mathbf{C}(t_i;\theta)}{\partial\theta_k}, \quad\mathbf{T}_i = e^{\mathbf{F}\Delta t_i}, \quad\mathbf{V}_i = \mathbf{C}(t_i;\theta)\mathbf{P}(t_i)\mathbf{T}_i^{\mathsf{T}}, \quad\mathbf{P}_i = \frac{\partial\mathbf{C}(t_i;\theta)}{\partial\theta_k}\mathbf{P}(t_i)\mathbf{T}_i^{\mathsf{T}}, U i = ∂ θ k ∂ C ( t i ; θ ) , T i = e F Δ t i , V i = C ( t i ; θ ) P ( t i ) T i T , P i = ∂ θ k ∂ C ( t i ; θ ) P ( t i ) T i T ,
Q i = C ( t i ; θ ) , R i = e F Δ t i , D i = ∂ C ( t i ; θ ) ∂ θ k P ( t i ) C ( t i ) T , i ∈ { 1 , … , n } . \mathbf{Q}_i = \mathbf{C}(t_i;\theta), \quad\mathbf{R}_i = e^{\mathbf{F}\Delta t_i}, \quad\mathbf{D}_i = \frac{\partial\mathbf{C}(t_i;\theta)}{\partial\theta_k}\mathbf{P}(t_i)\mathbf{C}(t_i)^{\mathsf{T}}, \quad i \in\{1,\ldots,n\}. Q i = C ( t i ; θ ) , R i = e F Δ t i , D i = ∂ θ k ∂ C ( t i ; θ ) P ( t i ) C ( t i ) T , i ∈ { 1 , … , n } .
Case 2: only the state depends on the hyperparameter
Next, we consider the case where only the state x ( t ; θ ) \mathbf{x}(t;\theta) x ( t ; θ ) depends on the hyperparameter θ k \theta_k θ k . This is the case, for example, when the hyperparameter θ k \theta_k θ k is a length scale in a Matérn kernel or an undamped angular frequency or quality factor in a celerite kernel. For a nonstationary kernel k k k of the form (10) , differentiating k k k directly yields
∂ k ( t , t ′ ) ∂ θ k = { C ( t ) ( ∂ e F ( θ ) ( t − t ′ ) ∂ θ k P ( t ′ ; θ ) + e F ( θ ) ( t − t ′ ) ∂ P ( t ′ ; θ ) ∂ θ k ) C ( t ′ ) T , t ≥ t ′ , C ( t ) ( ∂ P ( t ; θ ) ∂ θ k e F ( θ ) T ( t ′ − t ) + P ( t ; θ ) ∂ e F ( θ ) T ( t ′ − t ) ∂ θ k ) C ( t ′ ) T , t < t ′ . (44) \frac{\partial k(t,t')}{\partial\theta_k} =
\begin{cases}
\mathbf{C}(t)\left(\frac{\partial e^{\mathbf{F}(\theta)(t-t')}}{\partial\theta_k}\mathbf{P}(t';\theta)+e^{\mathbf{F}(\theta)(t-t')}\frac{\partial\mathbf{P}(t';\theta)}{\partial\theta_k}\right)\mathbf{C}(t')^{\mathsf{T}}, & t \ge t',\\
\mathbf{C}(t)\left(\frac{\partial\mathbf{P}(t;\theta)}{\partial\theta_k}e^{\mathbf{F}(\theta)^{\mathsf{T}}(t'-t)}+\mathbf{P}(t;\theta)\frac{\partial e^{\mathbf{F}(\theta)^{\mathsf{T}}(t'-t)}}{\partial\theta_k}\right)\mathbf{C}(t')^{\mathsf{T}}, & t < t'.
\end{cases} \tag*{(44)} ∂ θ k ∂ k ( t , t ′ ) = ⎩ ⎨ ⎧ C ( t ) ( ∂ θ k ∂ e F ( θ ) ( t − t ′ ) P ( t ′ ; θ ) + e F ( θ ) ( t − t ′ ) ∂ θ k ∂ P ( t ′ ; θ ) ) C ( t ′ ) T , C ( t ) ( ∂ θ k ∂ P ( t ; θ ) e F ( θ ) T ( t ′ − t ) + P ( t ; θ ) ∂ θ k ∂ e F ( θ ) T ( t ′ − t ) ) C ( t ′ ) T , t ≥ t ′ , t < t ′ . (44)
For a stationary kernel, we simply replace P ( t ; θ ) \mathbf{P}(t;\theta) P ( t ; θ ) with P ∞ \mathbf{P}_{\infty} P ∞ . The partial derivative of the matrix exponential e F ( θ ) ( t − t ′ ) e^{\mathbf{F}(\theta)(t-t')} e F ( θ ) ( t − t ′ ) with respect to θ k \theta_k θ k can be computed using the Fréchet derivative formula for the matrix exponential [41 , 42 ] , i.e., we have
e F ~ ( θ ) τ = [ e F ( θ ) τ 0 ∂ e F ( θ ) τ ∂ θ k e F ( θ ) τ ] , where τ = t − t ′ and F ~ ( θ ) = [ F ( θ ) 0 ∂ F ( θ ) ∂ θ k F ( θ ) ] . (45) e^{\widetilde{\mathbf{F}}(\theta)\tau} =
\begin{bmatrix}
e^{\mathbf{F}(\theta)\tau} & 0\\
\frac{\partial e^{\mathbf{F}(\theta)\tau}}{\partial\theta_k} & e^{\mathbf{F}(\theta)\tau}
\end{bmatrix},
\quad\text{where } \tau=t-t' \text{ and } \widetilde{\mathbf{F}}(\theta)=
\begin{bmatrix}
\mathbf{F}(\theta) & 0\\
\frac{\partial\mathbf{F}(\theta)}{\partial\theta_k} & \mathbf{F}(\theta)
\end{bmatrix}. \tag*{(45)} e F ( θ ) τ = [ e F ( θ ) τ ∂ θ k ∂ e F ( θ ) τ 0 e F ( θ ) τ ] , where τ = t − t ′ and F ( θ ) = [ F ( θ ) ∂ θ k ∂ F ( θ ) 0 F ( θ ) ] . (45)
We see that the ( 2 , 1 ) (2,1) ( 2 , 1 ) block of e F ~ ( θ ) ( t − t ′ ) e^{\widetilde{\mathbf{F}}(\theta)(t-t')} e F ( θ ) ( t − t ′ ) is the desired partial derivative of e F ( θ ) ( t − t ′ ) e^{\mathbf{F}(\theta)(t-t')} e F ( θ ) ( t − t ′ ) with respect to θ k \theta_k θ k , i.e.,
∂ ∂ θ k e F ( θ ) ( t − t ′ ) = [ 0 I ] e F ~ ( θ ) ( t − t ′ ) [ I 0 ] , \frac{\partial}{\partial\theta_k}e^{\mathbf{F}(\theta)(t-t')} =
\begin{bmatrix}0 & \mathbf{I}\end{bmatrix}
e^{\widetilde{\mathbf{F}}(\theta)(t-t')}
\begin{bmatrix}\mathbf{I}\\0\end{bmatrix}, ∂ θ k ∂ e F ( θ ) ( t − t ′ ) = [ 0 I ] e F ( θ ) ( t − t ′ ) [ I 0 ] ,
which leads to the symmetric SSS representation of ∂ K / ∂ θ k \partial\mathbf{K}/\partial\theta_k ∂ K / ∂ θ k ,
U i = [ 0 C ( t i ) ] , T i = e F ~ ( θ ) Δ t i , V i = C ( t i ) [ P ( t i ; θ ) ∂ P ( t i ; θ ) ∂ θ k ] T i T , D i = C ( t i ) ∂ P ( t i ; θ ) ∂ θ k C ( t i ) T , (46) \mathbf{U}_i = \begin{bmatrix}0 & \mathbf{C}(t_i)\end{bmatrix}, \quad
\mathbf{T}_i = e^{\widetilde{\mathbf{F}}(\theta)\Delta t_i}, \quad
\mathbf{V}_i = \mathbf{C}(t_i)\begin{bmatrix}\mathbf{P}(t_i;\theta) & \frac{\partial\mathbf{P}(t_i;\theta)}{\partial\theta_k}\end{bmatrix}\mathbf{T}_i^{\mathsf{T}}, \quad
\mathbf{D}_i = \mathbf{C}(t_i)\frac{\partial\mathbf{P}(t_i;\theta)}{\partial\theta_k}\mathbf{C}(t_i)^{\mathsf{T}}, \tag*{(46)} U i = [ 0 C ( t i ) ] , T i = e F ( θ ) Δ t i , V i = C ( t i ) [ P ( t i ; θ ) ∂ θ k ∂ P ( t i ; θ ) ] T i T , D i = C ( t i ) ∂ θ k ∂ P ( t i ; θ ) C ( t i ) T , (46)
for i ∈ { 1 , … , n } i \in\{1,\ldots,n\} i ∈ { 1 , … , n } . We note that the SSS order of this presentation of ∂ K / ∂ θ k \partial\mathbf{K}/\partial\theta_k ∂ K / ∂ θ k is twice that of K \mathbf{K} K .
For the Matérn and celerite kernels, where we have closed-form expressions for P ∞ ( θ ) \mathbf{P}_{\infty}(\theta) P ∞ ( θ ) , we can compute ∂ P ∞ ( θ ) / ∂ θ k \partial\mathbf{P}_{\infty}(\theta)/\partial\theta_k ∂ P ∞ ( θ ) / ∂ θ k analytically. Similarly, for the spline kernel, the state covariance P ( t ; θ ) \mathbf{P}(t;\theta) P ( t ; θ ) only depends on σ 2 \sigma^2 σ 2 , and ∂ P ( t ; θ ) / ∂ σ 2 \partial\mathbf{P}(t;\theta)/\partial\sigma^2 ∂ P ( t ; θ ) / ∂ σ 2 simplifies to P ( t ; θ ) / σ 2 \mathbf{P}(t;\theta)/\sigma^2 P ( t ; θ ) / σ 2 . More generally, for a stationary kernel, ∂ P ∞ ( θ ) / ∂ θ k \partial\mathbf{P}_{\infty}(\theta)/\partial\theta_k ∂ P ∞ ( θ ) / ∂ θ k can be computed by differentiating the Lyapunov equation F ( θ ) P ∞ ( θ ) + P ∞ ( θ ) F ( θ ) T + G ( θ ) Q w G ( θ ) T = 0 \mathbf{F}(\theta)\mathbf{P}_{\infty}(\theta)+\mathbf{P}_{\infty}(\theta)\mathbf{F}(\theta)^{\mathsf{T}}+\mathbf{G}(\theta)\mathbf{Q}_{w}\mathbf{G}(\theta)^{\mathsf{T}}=0 F ( θ ) P ∞ ( θ ) + P ∞ ( θ ) F ( θ ) T + G ( θ ) Q w G ( θ ) T = 0 with respect to θ k \theta_k θ k , which yields
0 = F ( θ ) ∂ P ∞ ( θ ) ∂ θ k + ∂ P ∞ ( θ ) ∂ θ k F ( θ ) T + ∂ F ( θ ) ∂ θ k P ∞ ( θ ) + P ∞ ( θ ) ∂ F ( θ ) T ∂ θ k + ∂ ( G ( θ ) Q w G ( θ ) T ) ∂ θ k . 0 = \mathbf{F}(\theta)\frac{\partial\mathbf{P}_{\infty}(\theta)}{\partial\theta_k}
+\frac{\partial\mathbf{P}_{\infty}(\theta)}{\partial\theta_k}\mathbf{F}(\theta)^{\mathsf{T}}
+\frac{\partial\mathbf{F}(\theta)}{\partial\theta_k}\mathbf{P}_{\infty}(\theta)
+\mathbf{P}_{\infty}(\theta)\frac{\partial\mathbf{F}(\theta)^{\mathsf{T}}}{\partial\theta_k}
+\frac{\partial\left(\mathbf{G}(\theta)\mathbf{Q}_{w}\mathbf{G}(\theta)^{\mathsf{T}}\right)}{\partial\theta_k}. 0 = F ( θ ) ∂ θ k ∂ P ∞ ( θ ) + ∂ θ k ∂ P ∞ ( θ ) F ( θ ) T + ∂ θ k ∂ F ( θ ) P ∞ ( θ ) + P ∞ ( θ ) ∂ θ k ∂ F ( θ ) T + ∂ θ k ∂ ( G ( θ ) Q w G ( θ ) T ) .
This is a Lyapunov equation in ∂ P ∞ / ∂ θ k \partial\mathbf{P}_{\infty}/\partial\theta_k ∂ P ∞ / ∂ θ k that can be solved numerically using the Bartels–Stewart algorithm [43 ] .
In the nonstationary case, ∂ P ( t ; θ ) / ∂ θ k \partial\mathbf{P}(t;\theta)/\partial\theta_k ∂ P ( t ; θ ) / ∂ θ k can be computed by differentiating the differential Lyapunov equation d d t P ( t ; θ ) = F ( θ ) P ( t ; θ ) + P ( t ; θ ) F ( θ ) T + G ( θ ) Q w G ( θ ) T \frac{\mathrm{d}}{\mathrm{d}t}\mathbf{P}(t;\theta)=\mathbf{F}(\theta)\mathbf{P}(t;\theta)+\mathbf{P}(t;\theta)\mathbf{F}(\theta)^{\mathsf{T}}+\mathbf{G}(\theta)\mathbf{Q}_{w}\mathbf{G}(\theta)^{\mathsf{T}} d t d P ( t ; θ ) = F ( θ ) P ( t ; θ ) + P ( t ; θ ) F ( θ ) T + G ( θ ) Q w G ( θ ) T with respect to θ k \theta_k θ k , which yields
d d t ∂ P ( t ; θ ) ∂ θ k = F ( θ ) ∂ P ( t ; θ ) ∂ θ k + ∂ P ( t ; θ ) ∂ θ k F ( θ ) T + ∂ F ( θ ) ∂ θ k P ( t ; θ ) + P ( t ; θ ) ∂ F ( θ ) T ∂ θ k + ∂ ( G ( θ ) Q w G ( θ ) T ) ∂ θ k . \frac{\mathrm{d}}{\mathrm{d}t}\frac{\partial\mathbf{P}(t;\theta)}{\partial\theta_k}
= \mathbf{F}(\theta)\frac{\partial\mathbf{P}(t;\theta)}{\partial\theta_k}
+\frac{\partial\mathbf{P}(t;\theta)}{\partial\theta_k}\mathbf{F}(\theta)^{\mathsf{T}}
+\frac{\partial\mathbf{F}(\theta)}{\partial\theta_k}\mathbf{P}(t;\theta)
+\mathbf{P}(t;\theta)\frac{\partial\mathbf{F}(\theta)^{\mathsf{T}}}{\partial\theta_k}
+\frac{\partial\left(\mathbf{G}(\theta)\mathbf{Q}_{w}\mathbf{G}(\theta)^{\mathsf{T}}\right)}{\partial\theta_k}. d t d ∂ θ k ∂ P ( t ; θ ) = F ( θ ) ∂ θ k ∂ P ( t ; θ ) + ∂ θ k ∂ P ( t ; θ ) F ( θ ) T + ∂ θ k ∂ F ( θ ) P ( t ; θ ) + P ( t ; θ ) ∂ θ k ∂ F ( θ ) T + ∂ θ k ∂ ( G ( θ ) Q w G ( θ ) T ) .
This is a linear ordinary differential equation (ODE) in ∂ P ( t ; θ ) / ∂ θ k \partial\mathbf{P}(t;\theta)/\partial\theta_k ∂ P ( t ; θ ) / ∂ θ k with initial condition ∂ P ( t 0 ; θ ) / ∂ θ k \partial\mathbf{P}(t_0;\theta)/\partial\theta_k ∂ P ( t 0 ; θ ) / ∂ θ k , and it can be solved numerically using standard ODE solvers.
Case 3: time warping
Our last case considers the situation where the hyperparameter θ k \theta_k θ k enters the model through a monotone time warp function ϕ ( t ; θ k ) \phi(t;\theta_k) ϕ ( t ; θ k ) . Specifically, we will assume that the kernel is given by k ~ ( t , t ′ ) = k ( ϕ ( t ; θ k ) , ϕ ( t ′ ; θ k ) ) \widetilde{k}(t,t')=k(\phi(t;\theta_k),\phi(t';\theta_k)) k ( t , t ′ ) = k ( ϕ ( t ; θ k ) , ϕ ( t ′ ; θ k )) , where k k k is an LTI-SDE kernel that does not depend on θ k \theta_k θ k . Assuming that C ( τ ) \mathbf{C}(\tau) C ( τ ) is continuously differentiable and letting τ = ϕ ( t ; θ k ) \tau=\phi(t;\theta_k) τ = ϕ ( t ; θ k ) and τ ′ = ϕ ( t ′ ; θ k ) \tau'=\phi(t';\theta_k) τ ′ = ϕ ( t ′ ; θ k ) , the chain rule yields
∂ ∂ θ k k ~ ( t , t ′ ; θ ) = a ( t ) ∂ k ( τ , τ ′ ) ∂ τ + a ( t ′ ) ∂ k ( τ , τ ′ ) ∂ τ ′ , (47) \frac{\partial}{\partial\theta_k}\tilde{k}(t,t';\theta)=a(t)\frac{\partial k(\tau,\tau')}{\partial\tau}+a(t')\frac{\partial k(\tau,\tau')}{\partial\tau'}, \tag*{(47)} ∂ θ k ∂ k ~ ( t , t ′ ; θ ) = a ( t ) ∂ τ ∂ k ( τ , τ ′ ) + a ( t ′ ) ∂ τ ′ ∂ k ( τ , τ ′ ) , (47)
where a ( t ) = ∂ ϕ ( t ; θ k ) / ∂ θ k = ∂ τ / ∂ θ k a(t)=\partial\phi(t;\theta_k)/\partial\theta_k=\partial\tau/\partial\theta_k a ( t ) = ∂ ϕ ( t ; θ k ) / ∂ θ k = ∂ τ / ∂ θ k . To derive an SSS representation of ∂ K / ∂ θ k \partial\mathbf{K}/\partial\theta_k ∂ K / ∂ θ k , it suffices to consider τ ≥ τ ′ \tau\ge\tau' τ ≥ τ ′ and apply the chain rule to the definition of k k k in (9), which leads to
∂ k ( τ , τ ′ ) ∂ τ = H ( τ ) e F ( τ − τ ′ ) P ( τ ′ ) C ( τ ′ ) T , (48) \frac{\partial k(\tau,\tau')}{\partial\tau}=\mathbf{H}(\tau)e^{\mathbf{F}(\tau-\tau')}\mathbf{P}(\tau')\mathbf{C}(\tau')^{\mathsf{T}}, \tag*{(48)} ∂ τ ∂ k ( τ , τ ′ ) = H ( τ ) e F ( τ − τ ′ ) P ( τ ′ ) C ( τ ′ ) T , (48)
where H ( τ ) = C ( τ ) F + ∂ C ( τ ) ∂ τ \mathbf{H}(\tau)=\mathbf{C}(\tau)\mathbf{F}+\frac{\partial\mathbf{C}(\tau)}{\partial\tau} H ( τ ) = C ( τ ) F + ∂ τ ∂ C ( τ ) . Similarly, using the differential Lyapunov equation ∂ P ( τ ′ ) / ∂ τ ′ = F P ( τ ′ ) + P ( τ ′ ) F T + G Q w G T \partial\mathbf{P}(\tau')/\partial\tau'=\mathbf{F}\mathbf{P}(\tau')+\mathbf{P}(\tau')\mathbf{F}^{\mathsf{T}}+\mathbf{G}\mathbf{Q}_{w}\mathbf{G}^{\mathsf{T}} ∂ P ( τ ′ ) / ∂ τ ′ = FP ( τ ′ ) + P ( τ ′ ) F T + G Q w G T , we have
∂ k ( τ , τ ′ ) ∂ τ ′ = C ( τ ) e F ( τ − τ ′ ) P ( τ ′ ) H ( τ ′ ) T + C ( τ ) e F ( τ − τ ′ ) G Q w G T C ( τ ′ ) T . (49) \frac{\partial k(\tau,\tau')}{\partial\tau'}=\mathbf{C}(\tau)e^{\mathbf{F}(\tau-\tau')}\mathbf{P}(\tau')\mathbf{H}(\tau')^{\mathsf{T}}+\mathbf{C}(\tau)e^{\mathbf{F}(\tau-\tau')}\mathbf{G}\mathbf{Q}_{w}\mathbf{G}^{\mathsf{T}}\mathbf{C}(\tau')^{\mathsf{T}}. \tag*{(49)} ∂ τ ′ ∂ k ( τ , τ ′ ) = C ( τ ) e F ( τ − τ ′ ) P ( τ ′ ) H ( τ ′ ) T + C ( τ ) e F ( τ − τ ′ ) G Q w G T C ( τ ′ ) T . (49)
Combining these two expressions with (46) yields
∂ ∂ θ k k ~ ( t , t ′ ; θ ) = [ a ( t ) H ( τ ) C ( τ ) ] ( I 2 ⊗ e F ( τ − τ ′ ) ) [ P ( τ ′ ) C ( τ ′ ) T a ( t ′ ) ( P ( τ ′ ) H ( τ ′ ) T + G Q w G T C ( τ ′ ) T ) ] . \frac{\partial}{\partial\theta_k}\tilde{k}(t,t';\theta)=\left[a(t)\mathbf{H}(\tau)\ \mathbf{C}(\tau)\right]\left(\mathbf{I}_2\otimes e^{\mathbf{F}(\tau-\tau')}\right)
\begin{bmatrix}
\mathbf{P}(\tau')\mathbf{C}(\tau')^{\mathsf{T}}\\
a(t')\left(\mathbf{P}(\tau')\mathbf{H}(\tau')^{\mathsf{T}}+\mathbf{G}\mathbf{Q}_{w}\mathbf{G}^{\mathsf{T}}\mathbf{C}(\tau')^{\mathsf{T}}\right)
\end{bmatrix}. ∂ θ k ∂ k ~ ( t , t ′ ; θ ) = [ a ( t ) H ( τ ) C ( τ ) ] ( I 2 ⊗ e F ( τ − τ ′ ) ) [ P ( τ ′ ) C ( τ ′ ) T a ( t ′ ) ( P ( τ ′ ) H ( τ ′ ) T + G Q w G T C ( τ ′ ) T ) ] .
from which we find an SSS representation of ∂ K / ∂ θ k \partial\mathbf{K}/\partial\theta_k ∂ K / ∂ θ k with generators
U i = [ a ( t i ) H ( τ i ) C ( τ i ) ] , T i = I 2 ⊗ e F Δ τ i , V i = U i B i T i T , D i = U i B i U i T , \mathbf{U}_i=\left[a(t_i)\mathbf{H}(\tau_i)\ \mathbf{C}(\tau_i)\right],\qquad
\mathbf{T}_i=\mathbf{I}_2\otimes e^{\mathbf{F}\Delta\tau_i},\qquad
\mathbf{V}_i=\mathbf{U}_i\mathbf{B}_i\mathbf{T}_i^{\mathsf{T}},\qquad
\mathbf{D}_i=\mathbf{U}_i\mathbf{B}_i\mathbf{U}_i^{\mathsf{T}}, U i = [ a ( t i ) H ( τ i ) C ( τ i ) ] , T i = I 2 ⊗ e F Δ τ i , V i = U i B i T i T , D i = U i B i U i T ,
for i ∈ { 1 , … , n } i\in\{1,\ldots,n\} i ∈ { 1 , … , n } , where
B i = [ 0 P ( τ i ) P ( τ i ) a ( t i ) G Q w G T ] . \mathbf{B}_i=
\begin{bmatrix}
\mathbf{0} & \mathbf{P}(\tau_i)\\
\mathbf{P}(\tau_i) & a(t_i)\mathbf{G}\mathbf{Q}_{w}\mathbf{G}^{\mathsf{T}}
\end{bmatrix}. B i = [ 0 P ( τ i ) P ( τ i ) a ( t i ) G Q w G T ] .
Like in case 2, the SSS order of this presentation of ∂ K / ∂ θ k \partial\mathbf{K}/\partial\theta_k ∂ K / ∂ θ k is twice that of K \mathbf{K} K .
The expression for ∂ K / ∂ θ k \partial\mathbf{K}/\partial\theta_k ∂ K / ∂ θ k can be simplified further if C ( τ ) \mathbf{C}(\tau) C ( τ ) is constant or if the process is stationary, in which case P ( τ ) \mathbf{P}(\tau) P ( τ ) can be replaced with P ∞ \mathbf{P}_{\infty} P ∞ .
Posterior mean and covariance
We now present methods for evaluating the posterior mean, matrix-vector products with the posterior covariance and precision, and the diagonal blocks of the posterior covariance. Recall that both the training inputs t = ( t 1 , … , t n ) \mathbf{t}=(t_1,\ldots,t_n) t = ( t 1 , … , t n ) and the test inputs t ∗ = ( t ∗ 1 , … , t ∗ n t ) \mathbf{t}_*=(t_{*1},\ldots,t_{*n_t}) t ∗ = ( t ∗ 1 , … , t ∗ n t ) are assumed to be nondecreasing, which implies that K \mathbf{K} K and K ∗ ∗ \mathbf{K}_{**} K ∗∗ are SSS matrices. However, the augmented input vector t ~ = ( t , t ∗ ) \tilde{\mathbf{t}}=(\mathbf{t},\mathbf{t}_*) t ~ = ( t , t ∗ ) is not necessarily nondecreasing, so K ∗ \mathbf{K}_* K ∗ is not SSS in general. To address this, we introduce a permutation matrix Π \mathbf{\Pi} Π of order N = n + n t N=n+n_t N = n + n t such that
t ^ = Π [ t t ∗ ] \hat{\mathbf{t}}=\mathbf{\Pi}
\begin{bmatrix}
\mathbf{t}\\
\mathbf{t}_*
\end{bmatrix} t ^ = Π [ t t ∗ ]
is a vector of nondecreasing inputs, i.e., t ^ 1 ≤ t ^ 2 ≤ ⋯ ≤ t ^ N \hat{t}_1\le\hat{t}_2\le\cdots\le\hat{t}_N t ^ 1 ≤ t ^ 2 ≤ ⋯ ≤ t ^ N . We also define an augmented kernel matrix K ^ \hat{\mathbf{K}} K ^ of order N d Nd N d with blocks K ^ i j = k ( t ^ i , t ^ j ) \hat{\mathbf{K}}_{ij}=k(\hat{t}_i,\hat{t}_j) K ^ ij = k ( t ^ i , t ^ j ) and an augmented noise covariance matrix Σ ^ ( γ ) \hat{\mathbf{\Sigma}}(\gamma) Σ ^ ( γ ) of order N d Nd N d with diagonal blocks
Σ ^ i ( γ ) = { Σ i , i ∈ I , γ I d , i ∈ I ∗ , \hat{\mathbf{\Sigma}}_i(\gamma)=
\begin{cases}
\mathbf{\Sigma}_i, & i\in\mathcal{I},\\
\gamma\mathbf{I}_d, & i\in\mathcal{I}_*,
\end{cases} Σ ^ i ( γ ) = { Σ i , γ I d , i ∈ I , i ∈ I ∗ ,
where the index sets I \mathcal{I} I and I ∗ \mathcal{I}_* I ∗ form a disjoint partition of { 1 , … , N } \{1,\ldots,N\} { 1 , … , N } , corresponding to training and test inputs, respectively. Thus, we have
K ^ = ( Π ⊗ I d ) [ K K ∗ T K ∗ K ∗ ∗ ] ( Π T ⊗ I d ) , Σ ^ ( γ ) = ( Π ⊗ I d ) [ Σ 0 0 Σ ∗ ( γ ) ] ( Π T ⊗ I d ) , (50) \hat{\mathbf{K}}=(\mathbf{\Pi}\otimes\mathbf{I}_d)
\begin{bmatrix}
\mathbf{K} & \mathbf{K}_*^{\mathsf{T}}\\
\mathbf{K}_* & \mathbf{K}_{**}
\end{bmatrix}
(\mathbf{\Pi}^{\mathsf{T}}\otimes\mathbf{I}_d),\qquad
\hat{\mathbf{\Sigma}}(\gamma)=(\mathbf{\Pi}\otimes\mathbf{I}_d)
\begin{bmatrix}
\mathbf{\Sigma} & \mathbf{0}\\
\mathbf{0} & \mathbf{\Sigma}_*(\gamma)
\end{bmatrix}
(\mathbf{\Pi}^{\mathsf{T}}\otimes\mathbf{I}_d), \tag*{(50)} K ^ = ( Π ⊗ I d ) [ K K ∗ K ∗ T K ∗∗ ] ( Π T ⊗ I d ) , Σ ^ ( γ ) = ( Π ⊗ I d ) [ Σ 0 0 Σ ∗ ( γ ) ] ( Π T ⊗ I d ) , (50)
where Σ ∗ ( γ ) = blkdiag ( γ I d , … , γ I d ) \mathbf{\Sigma}_*(\gamma)=\operatorname{blkdiag}(\gamma\mathbf{I}_d,\ldots,\gamma\mathbf{I}_d) Σ ∗ ( γ ) = blkdiag ( γ I d , … , γ I d ) . We also define selection operators
S = [ I n d 0 n t d ] ( Π T ⊗ I d ) , S ∗ = [ 0 n d I n t d ] ( Π T ⊗ I d ) , (51) \mathbf{S}=[\mathbf{I}_{nd}\ \mathbf{0}_{n_td}](\mathbf{\Pi}^{\mathsf{T}}\otimes\mathbf{I}_d),\qquad
\mathbf{S}_*=[\mathbf{0}_{nd}\ \mathbf{I}_{n_td}](\mathbf{\Pi}^{\mathsf{T}}\otimes\mathbf{I}_d), \tag*{(51)} S = [ I n d 0 n t d ] ( Π T ⊗ I d ) , S ∗ = [ 0 n d I n t d ] ( Π T ⊗ I d ) , (51)
such that K = S K ^ S T \mathbf{K}=\mathbf{S}\hat{\mathbf{K}}\mathbf{S}^{\mathsf{T}} K = S K ^ S T , K ∗ = S ∗ K ^ S T \mathbf{K}_*=\mathbf{S}_*\hat{\mathbf{K}}\mathbf{S}^{\mathsf{T}} K ∗ = S ∗ K ^ S T , K ∗ ∗ = S ∗ K ^ S ∗ T \mathbf{K}_{**}=\mathbf{S}_*\hat{\mathbf{K}}\mathbf{S}_*^{\mathsf{T}} K ∗∗ = S ∗ K ^ S ∗ T , Σ = S Σ ^ ( γ ) S T \mathbf{\Sigma}=\mathbf{S}\hat{\mathbf{\Sigma}}(\gamma)\mathbf{S}^{\mathsf{T}} Σ = S Σ ^ ( γ ) S T , and Σ ∗ ( γ ) = S ∗ Σ ^ ( γ ) S ∗ T \mathbf{\Sigma}_*(\gamma)=\mathbf{S}_*\hat{\mathbf{\Sigma}}(\gamma)\mathbf{S}_*^{\mathsf{T}} Σ ∗ ( γ ) = S ∗ Σ ^ ( γ ) S ∗ T . We note that the permutation guarantees that K ^ \hat{\mathbf{K}} K ^ and K ^ + Σ ^ ( γ ) \hat{\mathbf{K}}+\hat{\mathbf{\Sigma}}(\gamma) K ^ + Σ ^ ( γ ) are symmetric SSS matrices.
Posterior mean
The posterior mean can then be expressed as
μ f ∗ ∣ y = S ∗ K ^ S ⊤ α , α = ( K + Σ ) − 1 y , (52) \mu_{f_* \mid y} = S_* \widehat{K} S^{\top} \alpha,\qquad\alpha= (K+\Sigma)^{-1}y, \tag*{(52)} μ f ∗ ∣ y = S ∗ K S ⊤ α , α = ( K + Σ ) − 1 y , (52)
which can be evaluated in O ( N ( d 3 + p 3 ) ) O(N(d^3+p^3)) O ( N ( d 3 + p 3 )) time by first solving the linear system ( K + Σ ) α = y (K+\Sigma)\alpha=y ( K + Σ ) α = y using the SSS solver and then computing the matrix-vector product S ∗ K ^ S ⊤ α S_*\widehat{K}S^{\top}\alpha S ∗ K S ⊤ α using the SSS matrix-vector algorithm.
Matrix-vector products for posterior covariance and precision
Matrix-vector products with the posterior covariance Σ f ∗ ∣ y \Sigma_{f_* \mid y} Σ f ∗ ∣ y can be evaluated in O ( N ( d 3 + p 3 ) ) O(N(d^3+p^3)) O ( N ( d 3 + p 3 )) time using the expression
Σ f ∗ ∣ y v = K ∗ ∗ v − S ∗ K ^ S ⊤ ( K + Σ ) − 1 S K ^ S ∗ ⊤ v , (53) \Sigma_{f_* \mid y}v = K_{**}v - S_*\widehat{K}S^{\top}(K+\Sigma)^{-1}S\widehat{K}S_*^{\top}v, \tag*{(53)} Σ f ∗ ∣ y v = K ∗∗ v − S ∗ K S ⊤ ( K + Σ ) − 1 S K S ∗ ⊤ v , (53)
which uses the same SSS solver and matrix-vector product algorithms as in (52) . Similarly, if Σ f ∗ ∣ y \Sigma_{f_* \mid y} Σ f ∗ ∣ y is positive definite, then we can also compute matrix-vector products with the posterior precision Σ f ∗ ∣ y − 1 \Sigma_{f_* \mid y}^{-1} Σ f ∗ ∣ y − 1 in O ( N ( d 3 + p 3 ) ) O(N(d^3+p^3)) O ( N ( d 3 + p 3 )) time by noting that
Σ f ∗ ∣ y − 1 = S ∗ ( K ^ + Σ ^ ( 0 ) ) − 1 S ∗ ⊤ . (54) \Sigma_{f_* \mid y}^{-1}=S_*(\widehat{K}+\widehat{\Sigma}(0))^{-1}S_*^{\top}. \tag*{(54)} Σ f ∗ ∣ y − 1 = S ∗ ( K + Σ ( 0 ) ) − 1 S ∗ ⊤ . (54)
This expression follows from the block-matrix inversion formula, which can be derived from the block factorization
[ K + Σ K ∗ ⊤ K ∗ K ∗ ∗ ] = [ I 0 K ∗ ( K + Σ ) − 1 I ] [ K + Σ 0 0 Σ f ∗ ∣ y ] [ I ( K + Σ ) − 1 K ∗ ⊤ 0 I ] . \begin{bmatrix}
K+\Sigma& K_*^{\top}\\
K_* & K_{**}
\end{bmatrix}
=
\begin{bmatrix}
I & 0\\
K_*(K+\Sigma)^{-1} & I
\end{bmatrix}
\begin{bmatrix}
K+\Sigma& 0\\
0 & \Sigma_{f_* \mid y}
\end{bmatrix}
\begin{bmatrix}
I & (K+\Sigma)^{-1}K_*^{\top}\\
0 & I
\end{bmatrix}. [ K + Σ K ∗ K ∗ ⊤ K ∗∗ ] = [ I K ∗ ( K + Σ ) − 1 0 I ] [ K + Σ 0 0 Σ f ∗ ∣ y ] [ I 0 ( K + Σ ) − 1 K ∗ ⊤ I ] .
where Σ f ∗ ∣ y = K ∗ ∗ − K ∗ ( K + Σ ) − 1 K ∗ ⊤ \Sigma_{f_* \mid y}=K_{**}-K_*(K+\Sigma)^{-1}K_*^{\top} Σ f ∗ ∣ y = K ∗∗ − K ∗ ( K + Σ ) − 1 K ∗ ⊤ . If Σ f ∗ ∣ y \Sigma_{f_* \mid y} Σ f ∗ ∣ y is positive definite, then the above factorization is invertible and we have
Σ f ∗ ∣ y − 1 = [ 0 I ] [ K + Σ K ∗ ⊤ K ∗ K ∗ ∗ ] − 1 [ 0 I ] = S ∗ ( K ^ + Σ ^ ( 0 ) ) − 1 S ∗ ⊤ . \Sigma_{f_* \mid y}^{-1}
=
\begin{bmatrix}0 & I\end{bmatrix}
\begin{bmatrix}
K+\Sigma& K_*^{\top}\\
K_* & K_{**}
\end{bmatrix}^{-1}
\begin{bmatrix}0\\I\end{bmatrix}
=
S_*(\widehat{K}+\widehat{\Sigma}(0))^{-1}S_*^{\top}. Σ f ∗ ∣ y − 1 = [ 0 I ] [ K + Σ K ∗ K ∗ ⊤ K ∗∗ ] − 1 [ 0 I ] = S ∗ ( K + Σ ( 0 ) ) − 1 S ∗ ⊤ .
Diagonal blocks of posterior covariance
The diagonal blocks of Σ f ∗ ∣ y \Sigma_{f_* \mid y} Σ f ∗ ∣ y are often of particular interest but require a different approach, which we now describe. First, note that
lim γ → ∞ [ K + Σ K ∗ ⊤ K ∗ K ∗ ∗ + Σ ∗ ( γ ) ] − 1 = [ ( K + Σ ) − 1 0 0 0 ] . \lim_{\gamma\to\infty}
\begin{bmatrix}
K+\Sigma& K_*^{\top}\\
K_* & K_{**}+\Sigma_*(\gamma)
\end{bmatrix}^{-1}
=
\begin{bmatrix}
(K+\Sigma)^{-1} & 0\\
0 & 0
\end{bmatrix}. γ → ∞ lim [ K + Σ K ∗ K ∗ ⊤ K ∗∗ + Σ ∗ ( γ ) ] − 1 = [ ( K + Σ ) − 1 0 0 0 ] .
which leads to the following expression for the posterior covariance:
Σ f ∗ ∣ y = K ∗ ∗ − K ∗ ( K + Σ ) − 1 K ∗ ⊤ = lim γ → ∞ S ∗ ( K ^ − K ^ ( K ^ + Σ ^ ( γ ) ) − 1 K ^ ) S ∗ ⊤ . \Sigma_{f_* \mid y}
=
K_{**}-K_*(K+\Sigma)^{-1}K_*^{\top}
=
\lim_{\gamma\to\infty}
S_*\left(\widehat{K}-\widehat{K}(\widehat{K}+\widehat{\Sigma}(\gamma))^{-1}\widehat{K}\right)S_*^{\top}. Σ f ∗ ∣ y = K ∗∗ − K ∗ ( K + Σ ) − 1 K ∗ ⊤ = γ → ∞ lim S ∗ ( K − K ( K + Σ ( γ ) ) − 1 K ) S ∗ ⊤ .
Letting M ^ ( γ ) = K ^ + Σ ^ ( γ ) \widehat{M}(\gamma)=\widehat{K}+\widehat{\Sigma}(\gamma) M ( γ ) = K + Σ ( γ ) such that K ^ = M ^ ( γ ) − Σ ^ ( γ ) \widehat{K}=\widehat{M}(\gamma)-\widehat{\Sigma}(\gamma) K = M ( γ ) − Σ ( γ ) , we obtain
K ^ − K ^ ( K ^ + Σ ^ ( γ ) ) − 1 K ^ = Σ ^ ( γ ) − Σ ^ ( γ ) M ^ ( γ ) − 1 Σ ^ ( γ ) . (55) \widehat{K}-\widehat{K}(\widehat{K}+\widehat{\Sigma}(\gamma))^{-1}\widehat{K}
=
\widehat{\Sigma}(\gamma)-\widehat{\Sigma}(\gamma)\widehat{M}(\gamma)^{-1}\widehat{\Sigma}(\gamma). \tag*{(55)} K − K ( K + Σ ( γ ) ) − 1 K = Σ ( γ ) − Σ ( γ ) M ( γ ) − 1 Σ ( γ ) . (55)
The basic idea is to compute the diagonal blocks of the right-hand side of (55) recursively using the SSS structure of M ^ ( γ ) \widehat{M}(\gamma) M ( γ ) and then take the limit as γ → ∞ \gamma\to\infty γ → ∞ . Appendix D provides the details of this derivation, which combines the SSS Cholesky factorization algorithm in Algorithm 1 with the diagonal inverse algorithm in Algorithm 2, leading to Algorithm 4. The computational complexity of the algorithm is O ( N ( d 3 + p 3 ) ) O(N(d^3+p^3)) O ( N ( d 3 + p 3 )) .
Algorithm 4: Diagonal blocks of posterior covariance
Input: SSS matrix K ^ \widehat{\mathbf{K}} K of the form (50) with SSS generators ( U , T , V , D ) (\mathbf{U},\mathbf{T},\mathbf{V},\mathbf{D}) ( U , T , V , D ) , Σ ^ ( 0 ) \widehat{\boldsymbol{\Sigma}}(0) Σ ( 0 ) , and index set I \mathcal{I} I containing the indices of the training inputs.
Output: Diagonal blocks Ω ^ 1 , … , Ω ^ N \widehat{\boldsymbol{\Omega}}_1,\ldots,\widehat{\boldsymbol{\Omega}}_N Ω 1 , … , Ω N of lim γ → ∞ ( K ^ − K ^ ( K ^ + Σ ^ ( γ ) ) − 1 K ^ ) \lim_{\gamma\to\infty}\left(\widehat{\mathbf{K}}-\widehat{\mathbf{K}}\left(\widehat{\mathbf{K}}+\widehat{\boldsymbol{\Sigma}}(\gamma)\right)^{-1}\widehat{\mathbf{K}}\right) lim γ → ∞ ( K − K ( K + Σ ( γ ) ) − 1 K ) .
Ψ 1 ← 0 p × p \boldsymbol{\Psi}_1\leftarrow\mathbf{0}_{p\times p} Ψ 1 ← 0 p × p
for i = 1 i=1 i = 1 to N N N do
if i ∈ I i\in\mathcal{I} i ∈ I then
D ~ i ← chol ( D i − U i Ψ i U i ⊤ + Σ ^ i ) \widetilde{\mathbf{D}}_i\leftarrow\operatorname{chol}\left(\mathbf{D}_i-\mathbf{U}_i\boldsymbol{\Psi}_i\mathbf{U}_i^\top+\widehat{\boldsymbol{\Sigma}}_i\right) D i ← chol ( D i − U i Ψ i U i ⊤ + Σ i ) // Lower triangular Cholesky factor
V ~ i ⊤ ← ( V i ⊤ − T i Ψ i U i ⊤ ) D ~ i − ⊤ \widetilde{\mathbf{V}}_i^\top\leftarrow\left(\mathbf{V}_i^\top-\mathbf{T}_i\boldsymbol{\Psi}_i\mathbf{U}_i^\top\right)\widetilde{\mathbf{D}}_i^{-\top} V i ⊤ ← ( V i ⊤ − T i Ψ i U i ⊤ ) D i − ⊤
U ‾ i ← − D ~ i − 1 U i , T ‾ i ← T i + V ~ i ⊤ U ‾ i , A i ← D ~ i − ⊤ D ~ i − 1 Σ ^ i \overline{\mathbf{U}}_i\leftarrow-\widetilde{\mathbf{D}}_i^{-1}\mathbf{U}_i,\ \overline{\mathbf{T}}_i\leftarrow\mathbf{T}_i+\widetilde{\mathbf{V}}_i^\top\overline{\mathbf{U}}_i,\ \mathbf{A}_i\leftarrow\widetilde{\mathbf{D}}_i^{-\top}\widetilde{\mathbf{D}}_i^{-1}\widehat{\boldsymbol{\Sigma}}_i U i ← − D i − 1 U i , T i ← T i + V i ⊤ U i , A i ← D i − ⊤ D i − 1 Σ i
else
V ~ i ⊤ ← 0 , U ‾ i ← 0 , T ‾ i ← T i , A i ← I \widetilde{\mathbf{V}}_i^\top\leftarrow\mathbf{0},\ \overline{\mathbf{U}}_i\leftarrow\mathbf{0},\ \overline{\mathbf{T}}_i\leftarrow\mathbf{T}_i,\ \mathbf{A}_i\leftarrow\mathbf{I} V i ⊤ ← 0 , U i ← 0 , T i ← T i , A i ← I
Ψ i + 1 ← T i Ψ i T i ⊤ + V ~ i ⊤ V ~ i \boldsymbol{\Psi}_{i+1}\leftarrow\mathbf{T}_i\boldsymbol{\Psi}_i\mathbf{T}_i^\top+\widetilde{\mathbf{V}}_i^\top\widetilde{\mathbf{V}}_i Ψ i + 1 ← T i Ψ i T i ⊤ + V i ⊤ V i
Φ ← 0 p × p \boldsymbol{\Phi}\leftarrow\mathbf{0}_{p\times p} Φ ← 0 p × p
for i = N i=N i = N to 1 1 1 do
W i ⊤ ← ( V i ⊤ − T i Ψ i U i ⊤ ) A i \mathbf{W}_i^\top\leftarrow\left(\mathbf{V}_i^\top-\mathbf{T}_i\boldsymbol{\Psi}_i\mathbf{U}_i^\top\right)\mathbf{A}_i W i ⊤ ← ( V i ⊤ − T i Ψ i U i ⊤ ) A i
Ω ^ i ← ( D i − U i Ψ i U i ⊤ ) A i − W i Φ W i ⊤ \widehat{\boldsymbol{\Omega}}_i\leftarrow\left(\mathbf{D}_i-\mathbf{U}_i\boldsymbol{\Psi}_i\mathbf{U}_i^\top\right)\mathbf{A}_i-\mathbf{W}_i\boldsymbol{\Phi}\mathbf{W}_i^\top Ω i ← ( D i − U i Ψ i U i ⊤ ) A i − W i Φ W i ⊤
Φ ← T ‾ i ⊤ Φ T ‾ i + U ‾ i ⊤ U ‾ i \boldsymbol{\Phi}\leftarrow\overline{\mathbf{T}}_i^\top\boldsymbol{\Phi}\overline{\mathbf{T}}_i+\overline{\mathbf{U}}_i^\top\overline{\mathbf{U}}_i Φ ← T i ⊤ Φ T i + U i ⊤ U i
return ( Ω ^ 1 , … , Ω ^ N ) (\widehat{\boldsymbol{\Omega}}_1,\ldots,\widehat{\boldsymbol{\Omega}}_N) ( Ω 1 , … , Ω N )
Sampling from the posterior distribution
Samples from the posterior distribution (40) can be obtained by first sampling from the joint prior distribution of y \mathbf{y} y and f ∗ \mathbf{f}_* f ∗ in (39) and then conditioning on the observed data, which is a technique known as Matheron’s update rule [44 ] . First, we draw a sample from the joint prior distribution of y \mathbf{y} y and f ∗ \mathbf{f}_* f ∗ , i.e.,
N ( 0 , [ K + Σ K ∗ ⊤ K ∗ K ∗ ∗ ] ) (56) \mathcal{N}\left(\mathbf{0},\begin{bmatrix}\mathbf{K}+\boldsymbol{\Sigma} & \mathbf{K}_*^\top\\ \mathbf{K}_* & \mathbf{K}_{**}\end{bmatrix}\right) \tag*{(56)} N ( 0 , [ K + Σ K ∗ K ∗ ⊤ K ∗∗ ] ) (56)
Assuming that this is a nondegenerate distribution, we readily obtain a sample ( y ~ , f ~ ∗ ) (\widetilde{\mathbf{y}},\widetilde{\mathbf{f}}_*) ( y , f ∗ ) as
[ y ~ f ~ ∗ ] = ( Π ⊤ ⊗ I d ) L ^ ξ , ξ ∼ N ( 0 , I ) , \begin{bmatrix}\widetilde{\mathbf{y}}\\ \widetilde{\mathbf{f}}_*\end{bmatrix}=(\boldsymbol{\Pi}^\top\otimes\mathbf{I}_d)\widehat{\mathbf{L}}\boldsymbol{\xi},\quad\boldsymbol{\xi}\sim\mathcal{N}(\mathbf{0},\mathbf{I}), [ y f ∗ ] = ( Π ⊤ ⊗ I d ) L ξ , ξ ∼ N ( 0 , I ) ,
where L ^ \widehat{\mathbf{L}} L denotes the Cholesky factor of the SSS matrix K ^ + Σ ^ ( 0 ) \widehat{\mathbf{K}}+\widehat{\boldsymbol{\Sigma}}(0) K + Σ ( 0 ) . A sample z ~ \widetilde{\mathbf{z}} z from the desired posterior distribution may then be obtained by conditioning on the observations y \mathbf{y} y , i.e.,
z ~ = f ~ ∗ + K ∗ ( K + Σ ) − 1 ( y − y ~ ) = f ~ ∗ + S ∗ K ^ S ⊤ ( K + Σ ) − 1 ( y − y ~ ) . (57) \widetilde{\mathbf{z}}=\widetilde{\mathbf{f}}_*+\mathbf{K}_*(\mathbf{K}+\boldsymbol{\Sigma})^{-1}(\mathbf{y}-\widetilde{\mathbf{y}})=\widetilde{\mathbf{f}}_*+\mathbf{S}_*\widehat{\mathbf{K}}\mathbf{S}^\top(\mathbf{K}+\boldsymbol{\Sigma})^{-1}(\mathbf{y}-\widetilde{\mathbf{y}}). \tag*{(57)} z = f ∗ + K ∗ ( K + Σ ) − 1 ( y − y ) = f ∗ + S ∗ K S ⊤ ( K + Σ ) − 1 ( y − y ) . (57)
Given SSS Cholesky factors of K + Σ \mathbf{K}+\boldsymbol{\Sigma} K + Σ and K ^ + Σ ^ ( 0 ) \widehat{\mathbf{K}}+\widehat{\boldsymbol{\Sigma}}(0) K + Σ ( 0 ) , which can be computed once and reused for multiple samples, a sample z ~ \widetilde{\mathbf{z}} z can be computed in O ( N ( d 2 + p 2 ) ) O\left(N(d^2+p^2)\right) O ( N ( d 2 + p 2 ) ) time using the SSS solver and matrix-vector product algorithms.
Numerical experiments
To validate the proposed SSS representation of LTI-SDE-induced kernels, we perform a series of numerical experiments to assess the numerical accuracy of the proposed algorithms. The experiments are based on a Julia implementation of the SSS algorithms, which is available in the SSSMatrices.jl package.1 In the first two experiments, we consider the kernels described in § 3 , evaluated at n = 100 n=100 n = 100 training inputs drawn from the standard uniform distribution and subsequently sorted in ascending order. The kernels are scalar-valued (d = 1 d=1 d = 1 ), and hence K \mathbf{K} K is 100 × 100 100\times100 100 × 100 . Table 4 provides an overview of the kernels and the corresponding hyperparameter values that we use for the experiments. The third experiment illustrates the use of the SSS representation for computing posterior means and covariances in a GP regression setting with a matrix-valued kernel (d = 2 d=2 d = 2 ).
Table 4. Hyperparameters used for each kernel in the numerical experiments. We use σ n = 0.01 \sigma_n=0.01 σ n = 0.01 in all experiments. The condition numbers in columns 3–4 were computed using Float64.
Experiment 1: Accuracy
The accuracy of the SSS representation is assessed by comparing its Float64 matrix-vector products, linear-system solutions, and log determinants with dense reference computations based on Julia’s BigFloat type at 256-bit precision, corresponding to a machine epsilon of 2 − 255 ≈ 10 − 77 2^{-255}\approx10^{-77} 2 − 255 ≈ 1 0 − 77 .
To establish a baseline for the relative error expected from Float64 arithmetic, we also compare the same operations performed using dense Float64 matrices with the high-precision reference. The results are summarized in Table 5 , which shows that the SSS representation achieves relative errors on the same order of magnitude as the dense Float64 computations. The relative errors displayed in Table 5 are computed as ∥ g ( K ) − g ( K b i g ) ∥ 2 / ∥ g ( K b i g ) ∥ 2 \lVert g(\mathbf{K})-g(\mathbf{K}_{\mathrm{big}})\rVert_2/\lVert g(\mathbf{K}_{\mathrm{big}})\rVert_2 ∥ g ( K ) − g ( K big ) ∥ 2 / ∥ g ( K big ) ∥ 2 , where g ( ⋅ ) g(\cdot) g ( ⋅ ) denotes the matrix operation of interest, and g ( K ) g(\mathbf{K}) g ( K ) and g ( K b i g ) g(\mathbf{K}_{\mathrm{big}}) g ( K big ) are the results obtained using Float64 and BigFloat, respectively. For the matrix-vector product, g ( K ) = K x g(\mathbf{K})=\mathbf{K}\mathbf{x} g ( K ) = Kx , and for the linear solve, g ( K ) = K − 1 x g(\mathbf{K})=\mathbf{K}^{-1}\mathbf{x} g ( K ) = K − 1 x , we generate a random x \mathbf{x} x with independent standard normal entries. The results in Table 5 show that SSS computations and the dense Float64 computations have similar relative errors compared to the high-precision reference.
Table 5. Relative errors of matrix operations computed using dense and SSS representations, relative to results obtained with BigFloat at 256-bit precision. The hyperparameters are listed in Table 4 . The matrix-vector product and solve operations are K x \mathbf{K}\mathbf{x} Kx and K − 1 x \mathbf{K}^{-1}\mathbf{x} K − 1 x , respectively, whereas the log determinant is log det ( K + σ n 2 I ) \log\det(\mathbf{K}+\sigma_n^2\mathbf{I}) log det ( K + σ n 2 I ) .
Experiment 2: Gradient validation
To assess the accuracy of the SSS representations of the kernel derivative matrices, we compute the partial derivatives of the log marginal likelihood with respect to the hyperparameters. As in the previous experiment, we compare Float64 SSS computations with dense reference computations performed in both Float64 and BigFloat arithmetic. Table 6 presents the absolute and relative errors with respect to the BigFloat reference. We note that in each case, an SSS representation of the partial derivative of the kernel matrix is computed using one of the techniques presented in Section 5.1.
Table 6. Absolute and relative errors for partial derivatives of the log marginal likelihood, computed using dense and SSS representations, relative to results obtained with BigFloat at 256-bit precision. The hyperparameter values are listed in Table 4.
Experiment 3: Posterior distribution and sampling
We now demonstrate the use of the SSS representation for Gaussian process regression based on the Matérn-5/2 kernel with hyperparameters ( σ , α ) = ( 1.0 , 2.0 ) (\sigma,\alpha)=(1.0,2.0) ( σ , α ) = ( 1.0 , 2.0 ) . We will simulate observations of the first two entries of the state vector, corresponding to the function value and its derivative, i.e., C ( t ) = [ e 1 e 2 ] T ∈ R 2 × 3 \mathbf{C}(t)=\begin{bmatrix}\mathbf{e}_1&\mathbf{e}_2\end{bmatrix}^{\mathsf{T}}\in\mathbb{R}^{2\times3} C ( t ) = [ e 1 e 2 ] T ∈ R 2 × 3 . To generate a ground truth reference and training data, we first form a vector t ^ \hat{\mathbf{t}} t ^ of N = 135 N=135 N = 135 monotonically increasing and equidistant points in the interval [ 1 , 10 ] [1, 10] [ 1 , 10 ] . The training points t \mathbf{t} t are the subset of t ^ \hat{\mathbf{t}} t ^ lying in [ 1 , 3.5 ] ∪ [ 6.5 , 10 ] [1, 3.5] \cup[6.5, 10] [ 1 , 3.5 ] ∪ [ 6.5 , 10 ] , and the test points are the remaining points of t ^ \hat{\mathbf{t}} t ^ , lying in ( 3.5 , 6.5 ) (3.5, 6.5) ( 3.5 , 6.5 ) . We then simulate noisy observations by computing the Cholesky factorization K ^ = L ^ L ^ ⊤ \hat{K} = \hat{L}\hat{L}^{\top} K ^ = L ^ L ^ ⊤ and computing a sample f ^ \hat{\mathbf{f}} f ^ from N ( 0 , K ^ ) \mathcal{N}(0, \hat{K}) N ( 0 , K ^ ) as f ^ = L ^ ξ \hat{\mathbf{f}} = \hat{L}\boldsymbol{\xi} f ^ = L ^ ξ , where ξ ∼ N ( 0 , I ) \boldsymbol{\xi} \sim\mathcal{N}(0, I) ξ ∼ N ( 0 , I ) . Then, using the selection operators defined in (51) , we define f = S f ^ \mathbf{f} = S\hat{\mathbf{f}} f = S f ^ , f ∗ = S ∗ f ^ \mathbf{f}_* = S_*\hat{\mathbf{f}} f ∗ = S ∗ f ^ , and y = f + ϵ \mathbf{y} = \mathbf{f} + \boldsymbol{\epsilon} y = f + ϵ , where the noise term ϵ \boldsymbol{\epsilon} ϵ is sampled from N ( 0 , I n ⊗ diag ( 1.1 , 1.5 ) ) \mathcal{N}(0, I_n \otimes\operatorname{diag}(1.1, 1.5)) N ( 0 , I n ⊗ diag ( 1.1 , 1.5 )) . Finally, we use (52) to compute the posterior mean and Algorithm 4 to compute the posterior variance on the full grid t ^ \hat{\mathbf{t}} t ^ , and we draw 10 samples from the posterior distribution using the expression in (57) . Figure 1 shows the 95% credible interval, the samples, and the posterior mean for both the function value and the derivative.
Figure 1. The 95% credible interval, 10 samples, and posterior mean for a Matérn-5/2 GP with hyperparameters ( σ , α ) = ( 1.0 , 2.0 ) (\sigma, \alpha) = (1.0, 2.0) ( σ , α ) = ( 1.0 , 2.0 ) . Both function value and derivative are observed.
Conclusion
We have shown that kernels induced by LTI SDEs give rise to kernel matrices that naturally admit an SSS representation. Building on this representation, we have developed efficient recursive algorithms, with linear complexity in the number of data points, for all operations required for GP regression, including Cholesky and LDL⊤ ^{\top} ⊤ factorization, forward and backward substitution, computation of the diagonal of the inverse, and the computation of the trace of the product of the inverse with an SSS matrix. In contrast to previous applications of SSS representations to GP regression, we have also developed efficient methods for computing the analytic gradient of the log marginal likelihood. In particular, we derive a novel algorithm for tr ( L − 1 A L − ⊤ ) \operatorname{tr}(L^{-1} A L^{-\top}) tr ( L − 1 A L − ⊤ ) that operates directly on three SSS matrices, without forming intermediate SSS matrices. The resulting algorithms have been applied to several kernels, including the Matérn kernel with half-integer smoothness, the diagonal-correlated kernel, the spline kernel, and the stable spline kernel.
Importantly, our approach is not limited to any particular kernel family or estimation criterion. The algorithms apply to any kernel matrix that admits an SSS representation, including kernel matrices generated by both stationary and nonstationary processes, and the same recursions extend to analogous linear-algebra computations required in other kernel-based estimation problems. Moreover, the SSS structure naturally handles matrix-valued outputs through the block structure of the SSS generators, enabling joint observations of a function and its derivatives.
A natural direction for future work is to derive a corresponding trace algorithm for hierarchical semiseparable (HSS) matrices. This would extend the proposed framework to kernels that do not admit an SSS representation but can be efficiently approximated using the more general HSS structure.
Additional algorithms
In this appendix, we provide additional algorithms for forward and backward substitution and for computing an SSS representation of the inverse of a nonsingular, lower-triangular SSS matrix L L L . Moreover, we also state conditions under which L − 1 L^{-1} L − 1 is lower block bidiagonal.
Forward and backward substitution
Given a nonsingular, lower triangular SSS matrix L L L of the form (28) with entries L i j = U i T i − 1 : j + 1 V ~ j ⊤ L_{ij}=U_iT_{i-1:j+1}\widetilde{V}_j^{\top} L ij = U i T i − 1 : j + 1 V j ⊤ for i > j i>j i > j and L i i = D ~ i L_{ii}=\widetilde{D}_i L ii = D i , the solution of the linear system of equations L x = y Lx=y Lx = y can be computed efficiently using forward substitution. The algorithm is based on a standard state-space recursion with initial state h 1 = 0 h_1=0 h 1 = 0 and
{ x i = D ~ i − 1 ( y i − U i h i ) h i + 1 = T i h i + V ~ i ⊤ x i i ∈ { 1 , … , n } . (58) \left\{
\begin{aligned}
x_i &= \widetilde{D}_i^{-1}(y_i-U_i h_i) \\
h_{i+1} &= T_i h_i+\widetilde{V}_i^{\top}x_i
\end{aligned}
\right.
\qquad i\in\{1,\ldots,n\}. \tag*{(58)} { x i h i + 1 = D i − 1 ( y i − U i h i ) = T i h i + V i ⊤ x i i ∈ { 1 , … , n } . (58)
Algorithm 5 summarizes the forward substitution algorithm. Similarly, Algorithm 6 solves L ⊤ x = y L^{\top}x=y L ⊤ x = y via backsubstitution. Both algorithms have a computational complexity of O ( n ( d 2 + p 2 ) ) O(n(d^2+p^2)) O ( n ( d 2 + p 2 )) .
Algorithm 5: Solve L x = y Lx=y Lx = y via forward substitution
Input: y ∈ R n d y\in\mathbb{R}^{nd} y ∈ R n d and SSS representation of L L L of the form (28) .
Output: x = L − 1 y x=L^{-1}y x = L − 1 y .
h = 0 p h=0_p h = 0 p
for i = 1 i=1 i = 1 to n n n do
x i ← D ~ i − 1 ( y i − U i h ) x_i\leftarrow\widetilde{D}_i^{-1}(y_i-U_i h) x i ← D i − 1 ( y i − U i h )
h ← T i h + V ~ i ⊤ x i h\leftarrow T_i h+\widetilde{V}_i^{\top}x_i h ← T i h + V i ⊤ x i
Algorithm 6: Solve L ⊤ x = y L^{\top}x=y L ⊤ x = y via backward substitution
Input: y ∈ R n d y\in\mathbb{R}^{nd} y ∈ R n d and SSS representation of L L L of the form (28) .
Output: x = L − ⊤ y x=L^{-\top}y x = L − ⊤ y .
h = 0 p h=0_p h = 0 p
for i = n i=n i = n to 1 1 1 do
x i ← D ~ i − ⊤ ( y i − V ~ i h ) x_i\leftarrow\widetilde{D}_i^{-\top}(y_i-\widetilde{V}_i h) x i ← D i − ⊤ ( y i − V i h )
h ← T i ⊤ h + U i ⊤ x i h\leftarrow T_i^{\top}h+U_i^{\top}x_i h ← T i ⊤ h + U i ⊤ x i
Inverse of lower-triangular SSS matrix
Let L L L be a nonsingular, lower-triangular SSS matrix of the form (28) . The inverse L − 1 L^{-1} L − 1 is also lower-triangular and SSS representable. To see this, consider the state-space model defined by the forward substitution recursion (58) . Substituting x i = D ~ i − 1 ( y i − U i h i ) x_i=\widetilde{D}_i^{-1}(y_i-U_i h_i) x i = D i − 1 ( y i − U i h i ) into the state recursion h i + 1 = T i h i + V ~ i ⊤ x i h_{i+1}=T_i h_i+\widetilde{V}_i^{\top}x_i h i + 1 = T i h i + V i ⊤ x i eliminates x i x_i x i from the state equation, resulting in a state-space model with input y i y_i y i and output x i x_i x i , i.e.,
x i = − D ~ i − 1 U ~ i ⏟ U ‾ i h i + D ~ i − 1 ⏟ D ‾ i y i , h i + 1 = ( T ~ i − V ~ i T D ~ i − 1 U ~ i ) ⏟ T ‾ i h i + V ~ i T D ~ i − 1 ⏟ V ‾ i T y i (59) \begin{aligned}
x_i &= \underbrace{-\widetilde{D}_i^{-1}\widetilde{U}_i}_{\overline{U}_i}h_i+\underbrace{\widetilde{D}_i^{-1}}_{\overline{D}_i}y_i,\\
h_{i+1} &= \underbrace{(\widetilde{T}_i-\widetilde{V}_i^{\mathsf{T}}\widetilde{D}_i^{-1}\widetilde{U}_i)}_{\overline{T}_i}h_i+\underbrace{\widetilde{V}_i^{\mathsf{T}}\widetilde{D}_i^{-1}}_{\overline{V}_i^{\mathsf{T}}}y_i \tag*{(59)}
\end{aligned} x i h i + 1 = U i − D i − 1 U i h i + D i D i − 1 y i , = T i ( T i − V i T D i − 1 U i ) h i + V i T V i T D i − 1 y i (59)
i ∈ { 1 , … , n } i \in\{1,\ldots,n\} i ∈ { 1 , … , n } ,
with initial state h 1 = 0 h_1=0 h 1 = 0 . The output of this state-space model is x = L − 1 y x=L^{-1}y x = L − 1 y , and hence L − 1 L^{-1} L − 1 has block entries
L − 1 = { U ‾ i T ‾ i − 1 : j + 1 V ‾ j T , i > j , D ‾ i , i = j , 0 , i < j . L^{-1}=
\begin{cases}
\overline{U}_i\overline{T}_{i-1:j+1}\overline{V}_j^{\mathsf{T}}, & i>j,\\
\overline{D}_i, & i=j,\\
0, & i<j.
\end{cases} L − 1 = ⎩ ⎨ ⎧ U i T i − 1 : j + 1 V j T , D i , 0 , i > j , i = j , i < j .
An equivalent form of the inverse can be found in [20 ] .
Algorithm 7: Generators of inverse of lower-triangular SSS matrix
Input: Lower-triangular SSS matrix L L L of the form (27), defined by block-diagonal matrices ( U , T , V ~ , D ~ ) (U,T,\widetilde{V},\widetilde{D}) ( U , T , V , D ) .
Output: Block-diagonal matrices ( U ‾ , T ‾ , V ‾ , D ‾ ) (\overline{U},\overline{T},\overline{V},\overline{D}) ( U , T , V , D ) such that L − 1 = U ‾ ( I − N p T ) − 1 N p V ‾ + D ‾ L^{-1}=\overline{U}(I-N^{p}T)^{-1}N^{p}\overline{V}+\overline{D} L − 1 = U ( I − N p T ) − 1 N p V + D .
for i = 1 i=1 i = 1 to n n n do
D ‾ i ← D ~ i − 1 \overline{D}_i\leftarrow\widetilde{D}_i^{-1} D i ← D i − 1
V ‾ i T ← V ~ i T D ‾ i \overline{V}_i^{\mathsf{T}}\leftarrow\widetilde{V}_i^{\mathsf{T}}\overline{D}_i V i T ← V i T D i
U ‾ i ← − D ‾ i U i \overline{U}_i\leftarrow-\overline{D}_iU_i U i ← − D i U i
T ‾ i ← T i − V ‾ i T U i \overline{T}_i\leftarrow T_i-\overline{V}_i^{\mathsf{T}}U_i T i ← T i − V i T U i
Structure of inverse Cholesky factor
Consider a positive definite kernel matrix K K K of the form (2) with generators ( U , T , V , D ) (U,T,V,D) ( U , T , V , D ) defined by (10), i.e.,
U i = C i , T i = e F Δ t i , V i = C i P i T i T , D i = C i P i C i T , i ∈ { 1 , … , n } . U_i=C_i,\qquad T_i=e^{F\Delta t_i},\qquad V_i=C_iP_iT_i^{\mathsf{T}},\qquad D_i=C_iP_iC_i^{\mathsf{T}},\qquad i\in\{1,\ldots,n\}. U i = C i , T i = e F Δ t i , V i = C i P i T i T , D i = C i P i C i T , i ∈ { 1 , … , n } .
We will characterize when K − 1 K^{-1} K − 1 is block tridiagonal or, equivalently, when the Cholesky factorization K = L L T K=LL^{\mathsf{T}} K = L L T yields a Cholesky factor of the form (27) whose inverse is block bidiagonal. From (30) and the definition of V i V_i V i , we have
V ~ i T = ( V i T − T i Ψ i C i T ) D ~ i − T = ( T i P i C i T − T i Ψ i C i T ) D ~ i − T = T i ( P i − Ψ i ) C i T D ~ i − T , \widetilde{V}_i^{\mathsf{T}}=(V_i^{\mathsf{T}}-T_i\Psi_iC_i^{\mathsf{T}})\widetilde{D}_i^{-\mathsf{T}}=(T_iP_iC_i^{\mathsf{T}}-T_i\Psi_iC_i^{\mathsf{T}})\widetilde{D}_i^{-\mathsf{T}}=T_i(P_i-\Psi_i)C_i^{\mathsf{T}}\widetilde{D}_i^{-\mathsf{T}}, V i T = ( V i T − T i Ψ i C i T ) D i − T = ( T i P i C i T − T i Ψ i C i T ) D i − T = T i ( P i − Ψ i ) C i T D i − T ,
and from (31) and the definition of U i U_i U i , we have
D ~ i D ~ i T = C i P i C i T − C i Ψ i C i T = C i ( P i − Ψ i ) C i T . \widetilde{D}_i\widetilde{D}_i^{\mathsf{T}}=C_iP_iC_i^{\mathsf{T}}-C_i\Psi_iC_i^{\mathsf{T}}=C_i(P_i-\Psi_i)C_i^{\mathsf{T}}. D i D i T = C i P i C i T − C i Ψ i C i T = C i ( P i − Ψ i ) C i T .
Using these two expressions while defining
P = blkdiag ( P 1 , … , P n ) , Ψ = blkdiag ( Ψ 1 , … , Ψ n ) , P=\operatorname{blkdiag}(P_1,\ldots,P_n),\qquad\Psi=\operatorname{blkdiag}(\Psi_1,\ldots,\Psi_n), P = blkdiag ( P 1 , … , P n ) , Ψ = blkdiag ( Ψ 1 , … , Ψ n ) ,
we can rewrite L L L as
L = C ( I − N p T ) − 1 N p V ~ T + D ~ = C ( I − N p T ) − 1 N p T ( P − Ψ ) C T D ~ − T + D ~ = ( C ( I − N p T ) − 1 N p T ( P − Ψ ) C T + D ~ D ~ T ) D ~ − T = ( C ( I − N p T ) − 1 N p T ( P − Ψ ) C T + C ( P − Ψ ) C T ) D ~ − T = C ( ( I − N p T ) − 1 N p T + I ) ( P − Ψ ) C T D ~ − T . \begin{aligned}
L &= C(I-N^{p}T)^{-1}N^{p}\widetilde{V}^{\mathsf{T}}+\widetilde{D}\\
&= C(I-N^{p}T)^{-1}N^{p}T(P-\Psi)C^{\mathsf{T}}\widetilde{D}^{-\mathsf{T}}+\widetilde{D}\\
&=\left(C(I-N^{p}T)^{-1}N^{p}T(P-\Psi)C^{\mathsf{T}}+\widetilde{D}\widetilde{D}^{\mathsf{T}}\right)\widetilde{D}^{-\mathsf{T}}\\
&=\left(C(I-N^{p}T)^{-1}N^{p}T(P-\Psi)C^{\mathsf{T}}+C(P-\Psi)C^{\mathsf{T}}\right)\widetilde{D}^{-\mathsf{T}}\\
&=C\left((I-N^{p}T)^{-1}N^{p}T+I\right)(P-\Psi)C^{\mathsf{T}}\widetilde{D}^{-\mathsf{T}}.
\end{aligned} L = C ( I − N p T ) − 1 N p V T + D = C ( I − N p T ) − 1 N p T ( P − Ψ ) C T D − T + D = ( C ( I − N p T ) − 1 N p T ( P − Ψ ) C T + D D T ) D − T = ( C ( I − N p T ) − 1 N p T ( P − Ψ ) C T + C ( P − Ψ ) C T ) D − T = C ( ( I − N p T ) − 1 N p T + I ) ( P − Ψ ) C T D − T .
We then note that ( I − N p T ) − 1 N p T + I = ( I − N p T ) − 1 (I-N^{p}T)^{-1}N^{p}T+I=(I-N^{p}T)^{-1} ( I − N p T ) − 1 N p T + I = ( I − N p T ) − 1 , which can be verified using (4), leading to the simplified expression
L = C ( I − N p T ) − 1 ( P − Ψ ) C T D ~ − T . L=C(I-N^{p}T)^{-1}(P-\Psi)C^{\mathsf{T}}\widetilde{D}^{-\mathsf{T}}. L = C ( I − N p T ) − 1 ( P − Ψ ) C T D − T .
All the factors in this expression, except for the factor ( I − N p T ) − 1 (I-N^{p}T)^{-1} ( I − N p T ) − 1 , are block diagonal matrices. Thus, if C C C is nonsingular (i.e., the blocks C 1 , … , C n C_1,\ldots,C_n C 1 , … , C n are square and full rank), then
L − 1 = D ~ T C − T ( P − Ψ ) − 1 ( I − N p T ) C − 1 L^{-1}=\widetilde{D}^{\mathsf{T}}C^{-\mathsf{T}}(P-\Psi)^{-1}(I-N^{p}T)C^{-1} L − 1 = D T C − T ( P − Ψ ) − 1 ( I − N p T ) C − 1
is block bidiagonal and K − 1 K^{-1} K − 1 is block tridiagonal.
Remark. For LTI-SDE-induced kernels, the structure of L \mathbf{L} L highlights the correspondence between K \mathbf{K} K and the discrete-time model as
K = L L T = C ( I − N p T ) − 1 ( P − Ψ ) ( I − N p T ) − T C T . \mathbf{K} = \mathbf{L}\mathbf{L}^{\mathsf{T}} = \mathbf{C}(\mathbf{I} - \mathbf{N}^{p}\mathbf{T})^{-1}(\mathbf{P} - \mathbf{\Psi})(\mathbf{I} - \mathbf{N}^{p}\mathbf{T})^{-\mathsf{T}}\mathbf{C}^{\mathsf{T}}. K = L L T = C ( I − N p T ) − 1 ( P − Ψ ) ( I − N p T ) − T C T .
In other words, we can view K \mathbf{K} K as the covariance matrix for the output y k = C k x k \mathbf{y}_k = \mathbf{C}_k\mathbf{x}_k y k = C k x k of a discrete process x k + 1 = T k x k + ϵ k \mathbf{x}_{k+1} = \mathbf{T}_k\mathbf{x}_k + \boldsymbol{\epsilon}_k x k + 1 = T k x k + ϵ k with ϵ k ∼ N ( 0 , P k − Ψ k ) \boldsymbol{\epsilon}_k \sim\mathcal{N}(\mathbf{0}, \mathbf{P}_k - \mathbf{\Psi}_k) ϵ k ∼ N ( 0 , P k − Ψ k ) .
The LDL factorization
The algorithms in Sections 4 and 5 are based on the Cholesky factorization K = L L T \mathbf{K} = \mathbf{L}\mathbf{L}^{\mathsf{T}} K = L L T of a symmetric positive definite SSS matrix K \mathbf{K} K . Similar algorithms can be derived based on the LDLT ^{\mathsf{T}} T factorization K = L D ~ L T \mathbf{K} = \mathbf{L}\widetilde{\mathbf{D}}\mathbf{L}^{\mathsf{T}} K = L D L T , where L \mathbf{L} L is unit lower triangular and D ~ \widetilde{\mathbf{D}} D is block diagonal. This approach is similar to the innovation form of the Kalman filter, which is based on the LDLT ^{\mathsf{T}} T factorization of the covariance matrix of the innovations.
Given the SSS generators ( U , T , V , D ) (\mathbf{U}, \mathbf{T}, \mathbf{V}, \mathbf{D}) ( U , T , V , D ) of a symmetric positive definite matrix K \mathbf{K} K of the form (2), the LDLT ^{\mathsf{T}} T factorization K = L D ~ L T \mathbf{K} = \mathbf{L}\widetilde{\mathbf{D}}\mathbf{L}^{\mathsf{T}} K = L D L T yields a unit lower-triangular L \mathbf{L} L of the form
L = U ( I − N p T ) − 1 N p V ~ T + I , (60) \mathbf{L} = \mathbf{U}(\mathbf{I} - \mathbf{N}^{p}\mathbf{T})^{-1}\mathbf{N}^{p}\widetilde{\mathbf{V}}^{\mathsf{T}} + \mathbf{I}, \tag*{(60)} L = U ( I − N p T ) − 1 N p V T + I , (60)
with entries L i j = U i T i − 1 : j + 1 V ~ j T \mathbf{L}_{ij} = \mathbf{U}_i\mathbf{T}_{i-1:j+1}\widetilde{\mathbf{V}}_j^{\mathsf{T}} L ij = U i T i − 1 : j + 1 V j T for i > j i > j i > j and L i i = I d \mathbf{L}_{ii} = \mathbf{I}_d L ii = I d . Expanding ( L D ~ L T ) i j (\mathbf{L}\widetilde{\mathbf{D}}\mathbf{L}^{\mathsf{T}})_{ij} ( L D L T ) ij for i > j i > j i > j and using T i − 1 : k + 1 = T i − 1 : j + 1 T j T j − 1 : k + 1 \mathbf{T}_{i-1:k+1} = \mathbf{T}_{i-1:j+1}\mathbf{T}_j\mathbf{T}_{j-1:k+1} T i − 1 : k + 1 = T i − 1 : j + 1 T j T j − 1 : k + 1 gives
( L D ~ L T ) i j = ∑ k = 1 j − 1 U i T i − 1 : k + 1 V ~ k T D ~ k V ~ k T j − 1 : k + 1 T U j T + U i T i − 1 : j + 1 V ~ j T D ~ j = U i T i − 1 : j + 1 ( T j Ψ j U j T + V ~ j T D ~ j ) , \begin{aligned}
(\mathbf{L}\widetilde{\mathbf{D}}\mathbf{L}^{\mathsf{T}})_{ij}
&= \sum_{k=1}^{j-1}\mathbf{U}_i\mathbf{T}_{i-1:k+1}\widetilde{\mathbf{V}}_k^{\mathsf{T}}\widetilde{\mathbf{D}}_k\widetilde{\mathbf{V}}_k\mathbf{T}_{j-1:k+1}^{\mathsf{T}}\mathbf{U}_j^{\mathsf{T}} + \mathbf{U}_i\mathbf{T}_{i-1:j+1}\widetilde{\mathbf{V}}_j^{\mathsf{T}}\widetilde{\mathbf{D}}_j \\
&= \mathbf{U}_i\mathbf{T}_{i-1:j+1}\left(\mathbf{T}_j\mathbf{\Psi}_j\mathbf{U}_j^{\mathsf{T}} + \widetilde{\mathbf{V}}_j^{\mathsf{T}}\widetilde{\mathbf{D}}_j\right),
\end{aligned} ( L D L T ) ij = k = 1 ∑ j − 1 U i T i − 1 : k + 1 V k T D k V k T j − 1 : k + 1 T U j T + U i T i − 1 : j + 1 V j T D j = U i T i − 1 : j + 1 ( T j Ψ j U j T + V j T D j ) ,
where Ψ j = ∑ k = 1 j − 1 T j − 1 : k + 1 V ~ k T D ~ k V ~ k T j − 1 : k + 1 T \mathbf{\Psi}_j = \sum_{k=1}^{j-1}\mathbf{T}_{j-1:k+1}\widetilde{\mathbf{V}}_k^{\mathsf{T}}\widetilde{\mathbf{D}}_k\widetilde{\mathbf{V}}_k\mathbf{T}_{j-1:k+1}^{\mathsf{T}} Ψ j = ∑ k = 1 j − 1 T j − 1 : k + 1 V k T D k V k T j − 1 : k + 1 T . Matching with K i j = U i T i − 1 : j + 1 V j T \mathbf{K}_{ij} = \mathbf{U}_i\mathbf{T}_{i-1:j+1}\mathbf{V}_j^{\mathsf{T}} K ij = U i T i − 1 : j + 1 V j T and the diagonal ( L D ~ L T ) i i = U i Ψ i U i T + D ~ i = D i (\mathbf{L}\widetilde{\mathbf{D}}\mathbf{L}^{\mathsf{T}})_{ii} = \mathbf{U}_i\mathbf{\Psi}_i\mathbf{U}_i^{\mathsf{T}} + \widetilde{\mathbf{D}}_i = \mathbf{D}_i ( L D L T ) ii = U i Ψ i U i T + D i = D i yields the recursions
D ~ i = D i − U i Ψ i U i T , V ~ i T = ( V i T − T i Ψ i U i T ) D ~ i − 1 , Ψ i + 1 = T i Ψ i T i T + V ~ i T D ~ i V ~ i , Ψ 1 = 0. \begin{aligned}
\widetilde{\mathbf{D}}_i &= \mathbf{D}_i - \mathbf{U}_i\mathbf{\Psi}_i\mathbf{U}_i^{\mathsf{T}},\\
\widetilde{\mathbf{V}}_i^{\mathsf{T}} &= \left(\mathbf{V}_i^{\mathsf{T}} - \mathbf{T}_i\mathbf{\Psi}_i\mathbf{U}_i^{\mathsf{T}}\right)\widetilde{\mathbf{D}}_i^{-1},\\
\mathbf{\Psi}_{i+1} &= \mathbf{T}_i\mathbf{\Psi}_i\mathbf{T}_i^{\mathsf{T}} + \widetilde{\mathbf{V}}_i^{\mathsf{T}}\widetilde{\mathbf{D}}_i\widetilde{\mathbf{V}}_i,\qquad\mathbf{\Psi}_1 = 0.
\end{aligned} D i V i T Ψ i + 1 = D i − U i Ψ i U i T , = ( V i T − T i Ψ i U i T ) D i − 1 , = T i Ψ i T i T + V i T D i V i , Ψ 1 = 0.
Algorithm 8 summarizes the LDLT ^{\mathsf{T}} T factorization, which has a computational complexity of O ( n ( d 2 + p 2 ) ) \mathcal{O}(n(d^2 + p^2)) O ( n ( d 2 + p 2 )) .
Algorithm 8: LDLT ^{\mathsf{T}} T factorization of symmetric positive definite SSS matrix K \mathbf{K} K
Input: K \mathbf{K} K defined by block-diagonal matrices ( U , T , V , D ) (\mathbf{U}, \mathbf{T}, \mathbf{V}, \mathbf{D}) ( U , T , V , D ) .
Output: Block-diagonal matrices V ~ \widetilde{\mathbf{V}} V and D ~ \widetilde{\mathbf{D}} D such that L = U ( I − N p T ) − 1 N p V ~ T + I \mathbf{L} = \mathbf{U}(\mathbf{I} - \mathbf{N}^{p}\mathbf{T})^{-1}\mathbf{N}^{p}\widetilde{\mathbf{V}}^{\mathsf{T}} + \mathbf{I} L = U ( I − N p T ) − 1 N p V T + I and K = L D ~ L T \mathbf{K} = \mathbf{L}\widetilde{\mathbf{D}}\mathbf{L}^{\mathsf{T}} K = L D L T .
Ψ ← 0_{p×p}
for i = 1 to n do
M ← T_i Ψ
Ṽ_i^T ← V_i^T − M U_i^T
D̃_i ← D_i − U_i Ψ U_i^T
Ṽ_i^T ← Ṽ_i^T D̃_i^{-1}
Ψ ← M T_i^T + Ṽ_i^T D̃_i Ṽ_i
return (Ṽ_1, ..., Ṽ_n), (D̃_1, ..., D̃_n)
SSS representation of inverse of L
An SSS representation of L − 1 \mathbf{L}^{-1} L − 1 can be computed using Appendix A.2 by letting D ~ i = I \widetilde{\mathbf{D}}_i = \mathbf{I} D i = I , i.e.,
L − 1 = U ‾ ( I − N p T ‾ ) − 1 N p V ‾ T + D ‾ , (61) \mathbf{L}^{-1} = \overline{\mathbf{U}}(\mathbf{I} - \mathbf{N}^{p}\overline{\mathbf{T}})^{-1}\mathbf{N}^{p}\overline{\mathbf{V}}^{\mathsf{T}} + \overline{\mathbf{D}}, \tag*{(61)} L − 1 = U ( I − N p T ) − 1 N p V T + D , (61)
where V ‾ i = V ~ i \overline{\mathbf{V}}_i = \widetilde{\mathbf{V}}_i V i = V i , U ‾ i = − U i \overline{\mathbf{U}}_i = -\mathbf{U}_i U i = − U i , T ‾ i = T i − V ~ i T U i \overline{\mathbf{T}}_i = \mathbf{T}_i - \widetilde{\mathbf{V}}_i^{\mathsf{T}}\mathbf{U}_i T i = T i − V i T U i , and D ‾ i = I \overline{\mathbf{D}}_i = \mathbf{I} D i = I for i ∈ { 1 , … , n } i \in\{1,\ldots,n\} i ∈ { 1 , … , n } .
Diagonal blocks of K-1
The general SSS matrix-matrix multiplication algorithm of [20 ] cannot readily be applied for the computation of the diagonal blocks of K − 1 K^{-1} K − 1 based on the L D L T LDL^{\mathsf{T}} L D L T factorization of K K K . However, the idea behind Algorithm 2 can be used to derive a similar algorithm based on the L D L T LDL^{\mathsf{T}} L D L T factorization without forming any intermediate SSS matrices. Given the L D L T LDL^{\mathsf{T}} L D L T factorization K = L D ~ L ~ T \mathbf{K} = \mathbf{L}\widetilde{\mathbf{D}}\widetilde{\mathbf{L}}^{\mathsf{T}} K = L D L T with L \mathbf{L} L unit lower triangular, the inverse is given by K − 1 = L − T D ~ − 1 L − 1 K^{-1} = L^{-\mathsf{T}}\widetilde{D}^{-1}L^{-1} K − 1 = L − T D − 1 L − 1 , where L − 1 L^{-1} L − 1 is of the form (60). Using that ( L − 1 ) j i = U ˉ j T ˉ j − 1 : i + 1 V ˉ i T (L^{-1})_{ji} = \bar{U}_j\bar{T}_{j-1:i+1}\bar{V}_i^{\mathsf{T}} ( L − 1 ) j i = U ˉ j T ˉ j − 1 : i + 1 V ˉ i T for j > i j > i j > i (which follows by noting that V ˉ i T = V ˉ i T \bar{V}_i^{\mathsf{T}} = \bar{V}_i^{\mathsf{T}} V ˉ i T = V ˉ i T ), we have
( K − 1 ) i i = ∑ j = i n ( L − 1 ) j i T D ~ j − 1 ( L − 1 ) j i = D ~ i − 1 + V ˉ i Φ i V ˉ i T , (62) (K^{-1})_{ii} = \sum_{j=i}^{n}(L^{-1})_{ji}^{\mathsf{T}}\widetilde{D}_j^{-1}(L^{-1})_{ji} = \widetilde{D}_i^{-1} + \bar{V}_i\Phi_i\bar{V}_i^{\mathsf{T}}, \tag*{(62)} ( K − 1 ) ii = j = i ∑ n ( L − 1 ) j i T D j − 1 ( L − 1 ) j i = D i − 1 + V ˉ i Φ i V ˉ i T , (62)
where Φ i = ∑ j = i + 1 n T ˉ j − 1 : i + 1 T U ˉ j T D ~ j − 1 U ˉ j T ˉ j − 1 : i + 1 \Phi_i = \sum_{j=i+1}^{n}\bar{T}_{j-1:i+1}^{\mathsf{T}}\bar{U}_j^{\mathsf{T}}\widetilde{D}_j^{-1}\bar{U}_j\bar{T}_{j-1:i+1} Φ i = ∑ j = i + 1 n T ˉ j − 1 : i + 1 T U ˉ j T D j − 1 U ˉ j T ˉ j − 1 : i + 1 . Again, Φ i \Phi_i Φ i can be computed efficiently using a backward recursion
Φ n = 0 , Φ i − 1 = U ˉ i T D ~ i − 1 U ˉ i + T ˉ i T Φ i T ˉ i , i = n , … , 2. (63) \Phi_n = 0,\qquad\Phi_{i-1} = \bar{U}_i^{\mathsf{T}}\widetilde{D}_i^{-1}\bar{U}_i + \bar{T}_i^{\mathsf{T}}\Phi_i\bar{T}_i,\qquad i=n,\ldots,2. \tag*{(63)} Φ n = 0 , Φ i − 1 = U ˉ i T D i − 1 U ˉ i + T ˉ i T Φ i T ˉ i , i = n , … , 2. (63)
Compared to the Cholesky case, the term D ˉ i T D ˉ i \bar{D}_i^{\mathsf{T}}\bar{D}_i D ˉ i T D ˉ i is replaced by D ~ i − 1 \widetilde{D}_i^{-1} D i − 1 .
Trace of K-1A
Algorithm 3 can be adapted to compute the trace of K − 1 A K^{-1}A K − 1 A using the L D L T LDL^{\mathsf{T}} L D L T factorization of K K K . Indeed, if K = L D ~ L ~ T K = L\widetilde{D}\widetilde{L}^{\mathsf{T}} K = L D L T , then
tr ( K − 1 A ) = tr ( D ~ − 1 L − 1 A L − T ) = ∑ i = 1 n tr ( D ~ i − 1 Θ i ) , (64) \operatorname{tr}(K^{-1}A) = \operatorname{tr}\left(\widetilde{D}^{-1}L^{-1}AL^{-\mathsf{T}}\right) = \sum_{i=1}^{n}\operatorname{tr}\left(\widetilde{D}_i^{-1}\Theta_i\right), \tag*{(64)} tr ( K − 1 A ) = tr ( D − 1 L − 1 A L − T ) = i = 1 ∑ n tr ( D i − 1 Θ i ) , (64)
where L − 1 L^{-1} L − 1 is of the form (60) and Θ i \Theta_i Θ i is the i i i th diagonal block of L − 1 A L − T L^{-1}AL^{-\mathsf{T}} L − 1 A L − T . This can be computed efficiently using a minor modification of Algorithm 3.
Diagonal blocks of the posterior covariance
Algorithm 4 can be adapted to compute the diagonal blocks of the posterior covariance using the L D L T LDL^{\mathsf{T}} L D L T factorization of K ^ \hat{K} K ^ . First, we take the limit of the L D L T LDL^{\mathsf{T}} L D L T factorization as γ → ∞ \gamma\to\infty γ → ∞ , while storing the intermediate Ψ i \Psi_i Ψ i . The diagonal blocks of the posterior covariance are then computed by using a backward recursion from N N N to 1. Algorithm 9 summarizes the resulting algorithm.
Algorithm 9: Diagonal blocks of posterior covariance using the LDLT ^{\mathsf{T}} T factorization
Input: SSS matrix K ^ \hat{\mathbf{K}} K ^ of the form (49) with SSS generators ( U , T , V , D ) (\mathbf{U},\mathbf{T},\mathbf{V},\mathbf{D}) ( U , T , V , D ) , Σ ^ ( 0 ) \hat{\boldsymbol{\Sigma}}(0) Σ ^ ( 0 ) , and index set I \mathcal{I} I containing the indices of the training inputs.
Output: Diagonal blocks Ω ^ 1 , … , Ω ^ N \hat{\boldsymbol{\Omega}}_1,\ldots,\hat{\boldsymbol{\Omega}}_N Ω ^ 1 , … , Ω ^ N of lim γ → ∞ ( K ^ − K ^ ( K ^ + Σ ^ ( γ ) ) − 1 K ^ ) \lim_{\gamma\to\infty}(\hat{\mathbf{K}}-\hat{\mathbf{K}}(\hat{\mathbf{K}}+\hat{\boldsymbol{\Sigma}}(\gamma))^{-1}\hat{\mathbf{K}}) lim γ → ∞ ( K ^ − K ^ ( K ^ + Σ ^ ( γ ) ) − 1 K ^ ) .
Ψ 1 ← 0 p × p \mathbf{\Psi}_1\leftarrow\mathbf{0}_{p\times p} Ψ 1 ← 0 p × p
for i = 1 i=1 i = 1 to N N N do
if i ∈ I i\in\mathcal{I} i ∈ I then
D ~ i ← D i − U i Ψ i U i T + Σ ^ i \tilde{\mathbf{D}}_i\leftarrow\mathbf{D}_i-\mathbf{U}_i\mathbf{\Psi}_i\mathbf{U}_i^{\mathsf{T}}+\hat{\boldsymbol{\Sigma}}_i D ~ i ← D i − U i Ψ i U i T + Σ ^ i
V ~ i T ← ( V i T − T i Ψ i U i T ) D ~ i − 1 \tilde{\mathbf{V}}_i^{\mathsf{T}}\leftarrow(\mathbf{V}_i^{\mathsf{T}}-\mathbf{T}_i\mathbf{\Psi}_i\mathbf{U}_i^{\mathsf{T}})\tilde{\mathbf{D}}_i^{-1} V ~ i T ← ( V i T − T i Ψ i U i T ) D ~ i − 1
T ‾ i ← T i − V ~ i T U i \overline{\mathbf{T}}_i\leftarrow\mathbf{T}_i-\tilde{\mathbf{V}}_i^{\mathsf{T}}\mathbf{U}_i T i ← T i − V ~ i T U i
A i ← D ~ i − 1 Σ ^ i \mathbf{A}_i\leftarrow\tilde{\mathbf{D}}_i^{-1}\hat{\boldsymbol{\Sigma}}_i A i ← D ~ i − 1 Σ ^ i
E i ← D ~ i − 1 \mathbf{E}_i\leftarrow\tilde{\mathbf{D}}_i^{-1} E i ← D ~ i − 1
else
V ~ i T ← 0 \tilde{\mathbf{V}}_i^{\mathsf{T}}\leftarrow\mathbf{0} V ~ i T ← 0 , T ‾ i ← T i \overline{\mathbf{T}}_i\leftarrow\mathbf{T}_i T i ← T i , A i ← I \mathbf{A}_i\leftarrow\mathbf{I} A i ← I , E i ← 0 \mathbf{E}_i\leftarrow\mathbf{0} E i ← 0 , D ~ i ← 0 \tilde{\mathbf{D}}_i\leftarrow\mathbf{0} D ~ i ← 0
Ψ i + 1 ← T ‾ i Ψ i T ‾ i T + V ~ i T D ~ i V ~ i \mathbf{\Psi}_{i+1}\leftarrow\overline{\mathbf{T}}_i\mathbf{\Psi}_i\overline{\mathbf{T}}_i^{\mathsf{T}}+\tilde{\mathbf{V}}_i^{\mathsf{T}}\tilde{\mathbf{D}}_i\tilde{\mathbf{V}}_i Ψ i + 1 ← T i Ψ i T i T + V ~ i T D ~ i V ~ i
Φ ← 0 p × p \mathbf{\Phi}\leftarrow\mathbf{0}_{p\times p} Φ ← 0 p × p
for i = N i=N i = N to 1 1 1 do
W i T ← ( V i T − T i Ψ i U i T ) A i \mathbf{W}_i^{\mathsf{T}}\leftarrow(\mathbf{V}_i^{\mathsf{T}}-\mathbf{T}_i\mathbf{\Psi}_i\mathbf{U}_i^{\mathsf{T}})\mathbf{A}_i W i T ← ( V i T − T i Ψ i U i T ) A i
Ω ^ i ← ( D i − U i Ψ i U i T ) A i − W i Φ W i T \hat{\boldsymbol{\Omega}}_i\leftarrow(\mathbf{D}_i-\mathbf{U}_i\mathbf{\Psi}_i\mathbf{U}_i^{\mathsf{T}})\mathbf{A}_i-\mathbf{W}_i\mathbf{\Phi}\mathbf{W}_i^{\mathsf{T}} Ω ^ i ← ( D i − U i Ψ i U i T ) A i − W i Φ W i T
Φ ← T ‾ i T Φ T ‾ i + U i T E i U i \mathbf{\Phi}\leftarrow\overline{\mathbf{T}}_i^{\mathsf{T}}\mathbf{\Phi}\overline{\mathbf{T}}_i+\mathbf{U}_i^{\mathsf{T}}\mathbf{E}_i\mathbf{U}_i Φ ← T i T Φ T i + U i T E i U i
return ( Ω ^ 1 , … , Ω ^ N ) (\hat{\boldsymbol{\Omega}}_1,\ldots,\hat{\boldsymbol{\Omega}}_N) ( Ω ^ 1 , … , Ω ^ N )
Log marginal likelihood
Recall the log marginal likelihood function
log p ( y ) = − 1 2 y T ( K + Σ ) − 1 y − 1 2 log det ( K + Σ ) − n d 2 log ( 2 π ) . \log p(\mathbf{y})=-\frac{1}{2}\mathbf{y}^{\mathsf{T}}(\mathbf{K}+\boldsymbol{\Sigma})^{-1}\mathbf{y}-\frac{1}{2}\log\det(\mathbf{K}+\boldsymbol{\Sigma})-\frac{nd}{2}\log(2\pi). log p ( y ) = − 2 1 y T ( K + Σ ) − 1 y − 2 1 log det ( K + Σ ) − 2 n d log ( 2 π ) .
Letting K + Σ = L D ~ L T \mathbf{K}+\boldsymbol{\Sigma}=\mathbf{L}\tilde{\mathbf{D}}\mathbf{L}^{\mathsf{T}} K + Σ = L D ~ L T and z = L − 1 y \mathbf{z}=\mathbf{L}^{-1}\mathbf{y} z = L − 1 y , we can rewrite the log marginal likelihood as
log p ( y ) = − 1 2 ∑ i = 1 n z i T D ~ i − 1 z i − 1 2 ∑ i = 1 n log det ( D ~ i ) − n d 2 log ( 2 π ) . \log p(\mathbf{y})=-\frac{1}{2}\sum_{i=1}^{n}\mathbf{z}_i^{\mathsf{T}}\tilde{\mathbf{D}}_i^{-1}\mathbf{z}_i-\frac{1}{2}\sum_{i=1}^{n}\log\det(\tilde{\mathbf{D}}_i)-\frac{nd}{2}\log(2\pi). log p ( y ) = − 2 1 i = 1 ∑ n z i T D ~ i − 1 z i − 2 1 i = 1 ∑ n log det ( D ~ i ) − 2 n d log ( 2 π ) .
which coincides with the filtering marginal likelihood from [45 ] . The subvector z i \mathbf{z}_i z i may be viewed as the i i i th innovation with covariance D ~ i \tilde{\mathbf{D}}_i D ~ i .
Computing the stationary covariance
Consider the continuous-time state-space model in (1), and assume that F \mathbf{F} F is a Hurwitz matrix of order m + 1 m+1 m + 1 in companion form, i.e.,
F = [ 0 1 ⋱ ⋱ 0 1 − c 0 ⋯ − c m − 1 − c m ] = N T − e m + 1 c T \mathbf{F}=
\begin{bmatrix}
0 & 1 & & & \\
& \ddots& \ddots& & \\
& & 0 & 1 & \\
-c_0 & \cdots& -c_{m-1} & -c_m
\end{bmatrix}
=\mathbf{N}^{\mathsf{T}}-\mathbf{e}_{m+1}\mathbf{c}^{\mathsf{T}} F = 0 − c 0 1 ⋱ ⋯ ⋱ 0 − c m − 1 1 − c m = N T − e m + 1 c T
where c = ( c 0 , … , c m ) \mathbf{c}=(c_0,\ldots,c_m) c = ( c 0 , … , c m ) are the coefficients of the characteristic polynomial of F \mathbf{F} F , and N \mathbf{N} N is the lower shift matrix of order $m+1. Recall that the stationary state covariance P ∞ \mathbf{P}_{\infty} P ∞ is the solution to the Lyapunov equation
F P ∞ + P ∞ F T + G Q w G T = 0. \mathbf{F}\mathbf{P}_{\infty}+\mathbf{P}_{\infty}\mathbf{F}^{\mathsf{T}}+\mathbf{G}\mathbf{Q}_{\mathbf{w}}\mathbf{G}^{\mathsf{T}}=0. F P ∞ + P ∞ F T + G Q w G T = 0.
With our assumptions on F \mathbf{F} F , and letting P = P ∞ \mathbf{P}=\mathbf{P}_{\infty} P = P ∞ , this equation can be rewritten as
( N T − e m + 1 c T ) P + P ( N − c e m + 1 T ) + G Q w G T = 0 , (65) (\mathbf{N}^{\mathsf{T}}-\mathbf{e}_{m+1}\mathbf{c}^{\mathsf{T}})\mathbf{P}+\mathbf{P}(\mathbf{N}-\mathbf{c}\mathbf{e}_{m+1}^{\mathsf{T}})+\mathbf{G}\mathbf{Q}_{\mathbf{w}}\mathbf{G}^{\mathsf{T}}=0, \tag*{(65)} ( N T − e m + 1 c T ) P + P ( N − c e m + 1 T ) + G Q w G T = 0 , (65)
the ( i , j ) (i,j) ( i , j ) th element of which can be expressed as
e i T ( N T − e m + 1 c T ) P e j + e i T P ( N − c e m + 1 T ) e j + e i T G Q w G T e j = 0. \mathbf{e}_i^{\mathsf{T}}\left(\mathbf{N}^{\mathsf{T}}-\mathbf{e}_{m+1}\mathbf{c}^{\mathsf{T}}\right)\mathbf{P}\mathbf{e}_j+\mathbf{e}_i^{\mathsf{T}}\mathbf{P}\left(\mathbf{N}-\mathbf{c}\mathbf{e}_{m+1}^{\mathsf{T}}\right)\mathbf{e}_j+\mathbf{e}_i^{\mathsf{T}}\mathbf{G}\mathbf{Q}_{\mathrm{w}}\mathbf{G}^{\mathsf{T}}\mathbf{e}_j=0. e i T ( N T − e m + 1 c T ) P e j + e i T P ( N − c e m + 1 T ) e j + e i T G Q w G T e j = 0.
Noting that
N e i = { e i + 1 , 1 ≤ i ≤ m , 0 , i = m + 1 , and N T e i = { 0 , i = 1 , e i − 1 , 2 ≤ i ≤ m + 1 , \mathbf{N}\mathbf{e}_i=
\begin{cases}
\mathbf{e}_{i+1}, & 1\le i\le m,\\
0, & i=m+1,
\end{cases}
\qquad\text{and}\qquad
\mathbf{N}^{\mathsf{T}}\mathbf{e}_i=
\begin{cases}
0, & i=1,\\
\mathbf{e}_{i-1}, & 2\le i\le m+1,
\end{cases} N e i = { e i + 1 , 0 , 1 ≤ i ≤ m , i = m + 1 , and N T e i = { 0 , e i − 1 , i = 1 , 2 ≤ i ≤ m + 1 ,
we see that for i , j ∈ { 1 , … , m } i,j\in\{1,\ldots,m\} i , j ∈ { 1 , … , m } , the ( i , j ) (i,j) ( i , j ) th element of the Lyapunov equation reduces to
P i + 1 , j + P i , j + 1 = − e i T G Q w G T e j . (66) P_{i+1,j}+P_{i,j+1}=-\mathbf{e}_i^{\mathsf{T}}\mathbf{G}\mathbf{Q}_{\mathrm{w}}\mathbf{G}^{\mathsf{T}}\mathbf{e}_j. \tag*{(66)} P i + 1 , j + P i , j + 1 = − e i T G Q w G T e j . (66)
and similarly, for i = m + 1 i=m+1 i = m + 1 , we have
{ P m + 1 , j + 1 − c T P e j = − e m + 1 T G Q w G T e j , 1 ≤ j ≤ m , c T P e m + 1 + e m + 1 T P c = e m + 1 T G Q w G T e m + 1 , j = m + 1. \begin{cases}
P_{m+1,j+1}-\mathbf{c}^{\mathsf{T}}\mathbf{P}\mathbf{e}_j=-\mathbf{e}_{m+1}^{\mathsf{T}}\mathbf{G}\mathbf{Q}_{\mathrm{w}}\mathbf{G}^{\mathsf{T}}\mathbf{e}_j, & 1\le j\le m,\\
\mathbf{c}^{\mathsf{T}}\mathbf{P}\mathbf{e}_{m+1}+\mathbf{e}_{m+1}^{\mathsf{T}}\mathbf{P}\mathbf{c}=\mathbf{e}_{m+1}^{\mathsf{T}}\mathbf{G}\mathbf{Q}_{\mathrm{w}}\mathbf{G}^{\mathsf{T}}\mathbf{e}_{m+1}, & j=m+1.
\end{cases} { P m + 1 , j + 1 − c T P e j = − e m + 1 T G Q w G T e j , c T P e m + 1 + e m + 1 T Pc = e m + 1 T G Q w G T e m + 1 , 1 ≤ j ≤ m , j = m + 1.
For special cases of the input matrix G \mathbf{G} G and the spectral density Q w \mathbf{Q}_{\mathrm{w}} Q w , the Lyapunov equation simplifies further. For example, if G Q w G T = q w e m + 1 e m + 1 T \mathbf{G}\mathbf{Q}_{\mathrm{w}}\mathbf{G}^{\mathsf{T}}=q_{\mathrm{w}}\mathbf{e}_{m+1}\mathbf{e}_{m+1}^{\mathsf{T}} G Q w G T = q w e m + 1 e m + 1 T as in the Matérn process, the condition (66) reduces to
P i + 1 , j + P i , j + 1 = 0 , i , j ∈ { 1 , … , m } . P_{i+1,j}+P_{i,j+1}=0,\qquad i,j\in\{1,\ldots,m\}. P i + 1 , j + P i , j + 1 = 0 , i , j ∈ { 1 , … , m } .
This implies that the entries along the antidiagonals of P \mathbf{P} P have the same absolute value but alternating signs, and by symmetry, the entries of P \mathbf{P} P are fully determined by the diagonal entries { P i i } i = 1 m + 1 \{P_{ii}\}_{i=1}^{m+1} { P ii } i = 1 m + 1 . For example, when m = 4 m=4 m = 4 , P \mathbf{P} P takes the form
P = [ p 1 0 − p 2 0 p 3 0 p 2 0 − p 3 0 − p 2 0 p 3 0 − p 4 0 − p 3 0 p 4 0 p 3 0 − p 4 0 p 5 ] . \mathbf{P}=
\begin{bmatrix}
p_1 & 0 & -p_2 & 0 & p_3\\
0 & p_2 & 0 & -p_3 & 0\\
-p_2 & 0 & p_3 & 0 & -p_4\\
0 & -p_3 & 0 & p_4 & 0\\
p_3 & 0 & -p_4 & 0 & p_5
\end{bmatrix}. P = p 1 0 − p 2 0 p 3 0 p 2 0 − p 3 0 − p 2 0 p 3 0 − p 4 0 − p 3 0 p 4 0 p 3 0 − p 4 0 p 5 .
More generally, we can parameterize P \mathbf{P} P in terms of the shift matrix N \mathbf{N} N and a diagonal matrix D = diag ( p 1 , … , p m + 1 ) \mathbf{D}=\operatorname{diag}(p_1,\ldots,p_{m+1}) D = diag ( p 1 , … , p m + 1 ) such that
P = D + ∑ k = 1 ⌊ m / 2 ⌋ ( − 1 ) k [ N k D N k + ( N k D N k ) T ] . (67) \mathbf{P}=\mathbf{D}+\sum_{k=1}^{\lfloor m/2\rfloor}(-1)^k\left[\mathbf{N}^k\mathbf{D}\mathbf{N}^k+\left(\mathbf{N}^k\mathbf{D}\mathbf{N}^k\right)^{\mathsf{T}}\right]. \tag*{(67)} P = D + k = 1 ∑ ⌊ m /2 ⌋ ( − 1 ) k [ N k D N k + ( N k D N k ) T ] . (67)
and hence the Lyapunov equation reduces to a linear system of m + 1 m+1 m + 1 equations in the diagonal entries { p i } i = 1 m + 1 \{p_i\}_{i=1}^{m+1} { p i } i = 1 m + 1 ,
{ P m + 1 , j + 1 = c T P e j = 0 , 1 ≤ j ≤ m , c T P e m + 1 + e m + 1 T P c = q w , j = m + 1. \begin{cases}
P_{m+1,j+1}=\mathbf{c}^{\mathsf{T}}\mathbf{P}\mathbf{e}_j=0, & 1\le j\le m,\\
\mathbf{c}^{\mathsf{T}}\mathbf{P}\mathbf{e}_{m+1}+\mathbf{e}_{m+1}^{\mathsf{T}}\mathbf{P}\mathbf{c}=q_{\mathrm{w}}, & j=m+1.
\end{cases} { P m + 1 , j + 1 = c T P e j = 0 , c T P e m + 1 + e m + 1 T Pc = q w , 1 ≤ j ≤ m , j = m + 1.
Diagonal blocks of the posterior covariance
We now derive Algorithm 4, starting from the expression (55) , i.e.,
K ^ − K ^ ( K ^ + Σ ^ ( γ ) ) − 1 K ^ = Σ ^ ( γ ) − Σ ^ ( γ ) M ^ ( γ ) − 1 Σ ^ ( γ ) , \widehat{\mathbf{K}}-\widehat{\mathbf{K}}\left(\widehat{\mathbf{K}}+\widehat{\mathbf{\Sigma}}(\gamma)\right)^{-1}\widehat{\mathbf{K}}=\widehat{\mathbf{\Sigma}}(\gamma)-\widehat{\mathbf{\Sigma}}(\gamma)\widehat{\mathbf{M}}(\gamma)^{-1}\widehat{\mathbf{\Sigma}}(\gamma), K − K ( K + Σ ( γ ) ) − 1 K = Σ ( γ ) − Σ ( γ ) M ( γ ) − 1 Σ ( γ ) ,
with M ^ ( γ ) = K ^ + Σ ^ ( γ ) \widehat{\mathbf{M}}(\gamma)=\widehat{\mathbf{K}}+\widehat{\mathbf{\Sigma}}(\gamma) M ( γ ) = K + Σ ( γ ) , where the SSS matrices K ^ \widehat{\mathbf{K}} K and Σ ^ \widehat{\mathbf{\Sigma}} Σ are defined in § 5.4 . We are interested in the diagonal blocks of this expression in the limit as γ → ∞ \gamma\to\infty γ → ∞ . For γ \gamma γ positive and finite, M ^ ( γ ) \widehat{\mathbf{M}}(\gamma) M ( γ ) is positive definite, and we can compute its Cholesky factorization M ^ ( γ ) = L ^ ( γ ) L ^ ( γ ) T \widehat{\mathbf{M}}(\gamma)=\widehat{\mathbf{L}}(\gamma)\widehat{\mathbf{L}}(\gamma)^{\mathsf{T}} M ( γ ) = L ( γ ) L ( γ ) T and the corresponding SSS representation of L ^ ( γ ) − 1 \widehat{\mathbf{L}}(\gamma)^{-1} L ( γ ) − 1 using Algorithms 1 and 7, i.e.,
L ^ ( γ ) = U ( I − N T ) − 1 N V ~ T + D ~ , L ^ ( γ ) − 1 = U ‾ ( I − N T ) − 1 N V ‾ + D ‾ . \widehat{\mathbf{L}}(\gamma)=\mathbf{U}\left(\mathbf{I}-\mathbf{N}\mathbf{T}\right)^{-1}\mathbf{N}\widetilde{\mathbf{V}}^{\mathsf{T}}+\widetilde{\mathbf{D}},\qquad
\widehat{\mathbf{L}}(\gamma)^{-1}=\overline{\mathbf{U}}\left(\mathbf{I}-\mathbf{N}\mathbf{T}\right)^{-1}\mathbf{N}\overline{\mathbf{V}}+\overline{\mathbf{D}}. L ( γ ) = U ( I − NT ) − 1 N V T + D , L ( γ ) − 1 = U ( I − NT ) − 1 N V + D .
We note that the diagonal blocks of M ^ ( γ ) \widehat{\mathbf{M}}(\gamma) M ( γ ) are of the form D i ( γ ) = K ^ i i + Σ ^ i ( γ ) D_i(\gamma)=\widehat{\mathbf{K}}_{ii}+\widehat{\mathbf{\Sigma}}_i(\gamma) D i ( γ ) = K ii + Σ i ( γ ) , and hence the SSS generators V ~ \widetilde{\mathbf{V}} V and D ~ \widetilde{\mathbf{D}} D , as well as those of L ^ ( γ ) − 1 \widehat{\mathbf{L}}(\gamma)^{-1} L ( γ ) − 1 , implicitly depend on γ \gamma γ . The i i i th diagonal block of (54) can then be expressed as
Ω ^ i ( γ ) = Σ ^ i ( γ ) − Σ ^ i ( γ ) Ω i ( γ ) Σ ^ i ( γ ) . (68) \widehat{\mathbf{\Omega}}_i(\gamma)=\widehat{\mathbf{\Sigma}}_i(\gamma)-\widehat{\mathbf{\Sigma}}_i(\gamma)\mathbf{\Omega}_i(\gamma)\widehat{\mathbf{\Sigma}}_i(\gamma). \tag*{(68)} Ω i ( γ ) = Σ i ( γ ) − Σ i ( γ ) Ω i ( γ ) Σ i ( γ ) . (68)
where Ω i ( γ ) \Omega_i(\gamma) Ω i ( γ ) is the i i i th diagonal block of M ^ ( γ ) − 1 \widehat{\mathbf{M}}(\gamma)^{-1} M ( γ ) − 1 and Σ ^ i ( γ ) \widehat{\boldsymbol{\Sigma}}_i(\gamma) Σ i ( γ ) denotes the i i i th diagonal block of Σ ^ ( γ ) \widehat{\boldsymbol{\Sigma}}(\gamma) Σ ( γ ) . From (34) , we have
Ω i ( γ ) = V ‾ i ( γ ) Φ i ( γ ) V ‾ i ( γ ) T + D ‾ i ( γ ) T D ‾ i ( γ ) . \Omega_i(\gamma)=\overline{\mathbf{V}}_i(\gamma)\boldsymbol{\Phi}_i(\gamma)\overline{\mathbf{V}}_i(\gamma)^{\mathsf{T}}+\overline{\mathbf{D}}_i(\gamma)^{\mathsf{T}}\overline{\mathbf{D}}_i(\gamma). Ω i ( γ ) = V i ( γ ) Φ i ( γ ) V i ( γ ) T + D i ( γ ) T D i ( γ ) .
where we have made the dependence on γ \gamma γ explicit. Inserting this into (68) , and using the fact that D ‾ i ( γ ) = D ~ i ( γ ) − 1 \overline{\mathbf{D}}_i(\gamma)=\widetilde{\mathbf{D}}_i(\gamma)^{-1} D i ( γ ) = D i ( γ ) − 1 , we can express the i i i th diagonal block of (55) as
Ω ^ i ( γ ) = Σ ^ i ( γ ) − Σ ^ i ( γ ) Ω i ( γ ) Σ ^ i ( γ ) = Σ ^ i ( γ ) − Σ ^ i ( γ ) ( V ‾ i ( γ ) Φ i ( γ ) V ‾ i ( γ ) T + D ‾ i ( γ ) T D ‾ i ( γ ) ) Σ ^ i ( γ ) = ( D ~ i ( γ ) D ~ i ( γ ) T − Σ ^ i ( γ ) ) D ‾ i ( γ ) T D ‾ i ( γ ) Σ ^ i ( γ ) − Σ ^ i ( γ ) V ‾ i ( γ ) Φ i ( γ ) V ‾ i ( γ ) T Σ ^ i ( γ ) . (69) \begin{aligned}
\widehat{\boldsymbol{\Omega}}_i(\gamma)=\widehat{\boldsymbol{\Sigma}}_i(\gamma)-\widehat{\boldsymbol{\Sigma}}_i(\gamma)\Omega_i(\gamma)\widehat{\boldsymbol{\Sigma}}_i(\gamma) \\
&=\widehat{\boldsymbol{\Sigma}}_i(\gamma)-\widehat{\boldsymbol{\Sigma}}_i(\gamma)\left(\overline{\mathbf{V}}_i(\gamma)\boldsymbol{\Phi}_i(\gamma)\overline{\mathbf{V}}_i(\gamma)^{\mathsf{T}}+\overline{\mathbf{D}}_i(\gamma)^{\mathsf{T}}\overline{\mathbf{D}}_i(\gamma)\right)\widehat{\boldsymbol{\Sigma}}_i(\gamma) \\
&=\left(\widetilde{\mathbf{D}}_i(\gamma)\widetilde{\mathbf{D}}_i(\gamma)^{\mathsf{T}}-\widehat{\boldsymbol{\Sigma}}_i(\gamma)\right)\overline{\mathbf{D}}_i(\gamma)^{\mathsf{T}}\overline{\mathbf{D}}_i(\gamma)\widehat{\boldsymbol{\Sigma}}_i(\gamma)-\widehat{\boldsymbol{\Sigma}}_i(\gamma)\overline{\mathbf{V}}_i(\gamma)\boldsymbol{\Phi}_i(\gamma)\overline{\mathbf{V}}_i(\gamma)^{\mathsf{T}}\widehat{\boldsymbol{\Sigma}}_i(\gamma). \tag*{(69)}
\end{aligned} Ω i ( γ ) = Σ i ( γ ) − Σ i ( γ ) Ω i ( γ ) Σ i ( γ ) = Σ i ( γ ) − Σ i ( γ ) ( V i ( γ ) Φ i ( γ ) V i ( γ ) T + D i ( γ ) T D i ( γ ) ) Σ i ( γ ) = ( D i ( γ ) D i ( γ ) T − Σ i ( γ ) ) D i ( γ ) T D i ( γ ) Σ i ( γ ) − Σ i ( γ ) V i ( γ ) Φ i ( γ ) V i ( γ ) T Σ i ( γ ) . (69)
From (32) , we find that
D ~ i ( γ ) D ~ i ( γ ) T − Σ ^ i ( γ ) = D i ( γ ) − Σ ^ i ( γ ) − U i Ψ i ( γ ) U i T = K ^ i i − U i Ψ i ( γ ) U i T , \widetilde{\mathbf{D}}_i(\gamma)\widetilde{\mathbf{D}}_i(\gamma)^{\mathsf{T}}-\widehat{\boldsymbol{\Sigma}}_i(\gamma)=\mathbf{D}_i(\gamma)-\widehat{\boldsymbol{\Sigma}}_i(\gamma)-\mathbf{U}_i\boldsymbol{\Psi}_i(\gamma)\mathbf{U}_i^{\mathsf{T}}=\widehat{\mathbf{K}}_{ii}-\mathbf{U}_i\boldsymbol{\Psi}_i(\gamma)\mathbf{U}_i^{\mathsf{T}}, D i ( γ ) D i ( γ ) T − Σ i ( γ ) = D i ( γ ) − Σ i ( γ ) − U i Ψ i ( γ ) U i T = K ii − U i Ψ i ( γ ) U i T ,
and from the definition of V ‾ i T \overline{\mathbf{V}}_i^{\mathsf{T}} V i T in (59) and (31) , we have
V ‾ i ( γ ) T = ( V i T − T i Ψ i ( γ ) U i T ) D ‾ i ( γ ) T D ‾ i ( γ ) . \overline{\mathbf{V}}_i(\gamma)^{\mathsf{T}}=\left(\mathbf{V}_i^{\mathsf{T}}-\mathbf{T}_i\boldsymbol{\Psi}_i(\gamma)\mathbf{U}_i^{\mathsf{T}}\right)\overline{\mathbf{D}}_i(\gamma)^{\mathsf{T}}\overline{\mathbf{D}}_i(\gamma). V i ( γ ) T = ( V i T − T i Ψ i ( γ ) U i T ) D i ( γ ) T D i ( γ ) .
Using these expressions and letting A i ( γ ) = D ‾ i ( γ ) T D ‾ i ( γ ) Σ ^ i ( γ ) \mathbf{A}_i(\gamma)=\overline{\mathbf{D}}_i(\gamma)^{\mathsf{T}}\overline{\mathbf{D}}_i(\gamma)\widehat{\boldsymbol{\Sigma}}_i(\gamma) A i ( γ ) = D i ( γ ) T D i ( γ ) Σ i ( γ ) , we can express (68) as
Ω ^ i ( γ ) = ( K ^ i i − U i Ψ i ( γ ) U i T ) A i ( γ ) − A i ( γ ) T ( V i T − T i Ψ i ( γ ) U i T ) Φ i ( γ ) ( V i T − T i Ψ i ( γ ) U i T ) T A i ( γ ) . \widehat{\boldsymbol{\Omega}}_i(\gamma)=\left(\widehat{\mathbf{K}}_{ii}-\mathbf{U}_i\boldsymbol{\Psi}_i(\gamma)\mathbf{U}_i^{\mathsf{T}}\right)\mathbf{A}_i(\gamma)-\mathbf{A}_i(\gamma)^{\mathsf{T}}\left(\mathbf{V}_i^{\mathsf{T}}-\mathbf{T}_i\boldsymbol{\Psi}_i(\gamma)\mathbf{U}_i^{\mathsf{T}}\right)\boldsymbol{\Phi}_i(\gamma)\left(\mathbf{V}_i^{\mathsf{T}}-\mathbf{T}_i\boldsymbol{\Psi}_i(\gamma)\mathbf{U}_i^{\mathsf{T}}\right)^{\mathsf{T}}\mathbf{A}_i(\gamma). Ω i ( γ ) = ( K ii − U i Ψ i ( γ ) U i T ) A i ( γ ) − A i ( γ ) T ( V i T − T i Ψ i ( γ ) U i T ) Φ i ( γ ) ( V i T − T i Ψ i ( γ ) U i T ) T A i ( γ ) .
To find the limit as γ → ∞ \gamma\to\infty γ → ∞ , we first examine the asymptotic behavior for the SSS generators of L ^ ( γ ) \widehat{\mathbf{L}}(\gamma) L ( γ ) . From (32) , we have
D ~ i ( γ ) = { chol ( K ^ i i − U i Ψ i ( γ ) U i T + Σ ^ i ) , i ∈ I , chol ( K ^ i i − U i Ψ i ( γ ) U i T + γ I ) , i ∈ I ∗ , \widetilde{\mathbf{D}}_i(\gamma)=
\begin{cases}
\operatorname{chol}\left(\widehat{\mathbf{K}}_{ii}-\mathbf{U}_i\boldsymbol{\Psi}_i(\gamma)\mathbf{U}_i^{\mathsf{T}}+\widehat{\boldsymbol{\Sigma}}_i\right), & i\in\mathcal{I},\\
\operatorname{chol}\left(\widehat{\mathbf{K}}_{ii}-\mathbf{U}_i\boldsymbol{\Psi}_i(\gamma)\mathbf{U}_i^{\mathsf{T}}+\gamma\mathbf{I}\right), & i\in\mathcal{I}_*,
\end{cases} D i ( γ ) = ⎩ ⎨ ⎧ chol ( K ii − U i Ψ i ( γ ) U i T + Σ i ) , chol ( K ii − U i Ψ i ( γ ) U i T + γ I ) , i ∈ I , i ∈ I ∗ ,
and from (30) and (31) , we have Ψ i + 1 ( γ ) = T i Ψ i ( γ ) T i T + V ~ i ( γ ) T V ~ i ( γ ) \boldsymbol{\Psi}_{i+1}(\gamma)=\mathbf{T}_i\boldsymbol{\Psi}_i(\gamma)\mathbf{T}_i^{\mathsf{T}}+\widetilde{\mathbf{V}}_i(\gamma)^{\mathsf{T}}\widetilde{\mathbf{V}}_i(\gamma) Ψ i + 1 ( γ ) = T i Ψ i ( γ ) T i T + V i ( γ ) T V i ( γ ) and V ~ i T = ( V i T − T i Ψ i ( γ ) U i T ) D ~ i − T \widetilde{\mathbf{V}}_i^{\mathsf{T}}=\left(\mathbf{V}_i^{\mathsf{T}}-\mathbf{T}_i\boldsymbol{\Psi}_i(\gamma)\mathbf{U}_i^{\mathsf{T}}\right)\widetilde{\mathbf{D}}_i^{-\mathsf{T}} V i T = ( V i T − T i Ψ i ( γ ) U i T ) D i − T .
Thus, the SSS generators of L ^ ( γ ) \widehat{\mathbf{L}}(\gamma) L ( γ ) satisfy the asymptotic equivalences
D ~ i ( γ ) ∼ { chol ( K ^ i i − U i Ψ i ( γ ) U i T + Σ ^ i ) , i ∈ I , γ 1 / 2 I , i ∈ I ∗ , V ~ i ( γ ) T ∼ { ( V i T − T i Ψ i ( γ ) T i T ) D ~ i ( γ ) − T , i ∈ I , γ − 1 / 2 ( V i T − T i Ψ i ( γ ) U i T ) , i ∈ I ∗ , \widetilde{\mathbf{D}}_i(\gamma)\sim
\begin{cases}
\operatorname{chol}\left(\widehat{\mathbf{K}}_{ii}-\mathbf{U}_i\boldsymbol{\Psi}_i(\gamma)\mathbf{U}_i^{\mathsf{T}}+\widehat{\boldsymbol{\Sigma}}_i\right), & i\in\mathcal{I},\\
\gamma^{1/2}\mathbf{I}, & i\in\mathcal{I}_*,
\end{cases}
\qquad
\widetilde{\mathbf{V}}_i(\gamma)^{\mathsf{T}}\sim
\begin{cases}
\left(\mathbf{V}_i^{\mathsf{T}}-\mathbf{T}_i\boldsymbol{\Psi}_i(\gamma)\mathbf{T}_i^{\mathsf{T}}\right)\widetilde{\mathbf{D}}_i(\gamma)^{-\mathsf{T}}, & i\in\mathcal{I},\\
\gamma^{-1/2}\left(\mathbf{V}_i^{\mathsf{T}}-\mathbf{T}_i\boldsymbol{\Psi}_i(\gamma)\mathbf{U}_i^{\mathsf{T}}\right), & i\in\mathcal{I}_*,
\end{cases} D i ( γ ) ∼ { chol ( K ii − U i Ψ i ( γ ) U i T + Σ i ) , γ 1/2 I , i ∈ I , i ∈ I ∗ , V i ( γ ) T ∼ { ( V i T − T i Ψ i ( γ ) T i T ) D i ( γ ) − T , γ − 1/2 ( V i T − T i Ψ i ( γ ) U i T ) , i ∈ I , i ∈ I ∗ ,
and similarly, for i ∈ { 1 , … , n − 1 } i\in\{1,\ldots,n-1\} i ∈ { 1 , … , n − 1 } ,
Ψ i + 1 ( γ ) ∼ { T i Ψ i ( γ ) T i T + V ~ i ( γ ) T V ~ i ( γ ) , i ∈ I , T i Ψ i ( γ ) T i T + γ − 1 ( V i T − T i Ψ i ( γ ) U i T ) ( V i T − T i Ψ i ( γ ) U i T ) T , i ∈ I ∗ . \boldsymbol{\Psi}_{i+1}(\gamma)\sim
\begin{cases}
\mathbf{T}_i\boldsymbol{\Psi}_i(\gamma)\mathbf{T}_i^{\mathsf{T}}+\widetilde{\mathbf{V}}_i(\gamma)^{\mathsf{T}}\widetilde{\mathbf{V}}_i(\gamma), & i\in\mathcal{I},\\
\mathbf{T}_i\boldsymbol{\Psi}_i(\gamma)\mathbf{T}_i^{\mathsf{T}}+\gamma^{-1}\left(\mathbf{V}_i^{\mathsf{T}}-\mathbf{T}_i\boldsymbol{\Psi}_i(\gamma)\mathbf{U}_i^{\mathsf{T}}\right)\left(\mathbf{V}_i^{\mathsf{T}}-\mathbf{T}_i\boldsymbol{\Psi}_i(\gamma)\mathbf{U}_i^{\mathsf{T}}\right)^{\mathsf{T}}, & i\in\mathcal{I}_*.
\end{cases} Ψ i + 1 ( γ ) ∼ { T i Ψ i ( γ ) T i T + V i ( γ ) T V i ( γ ) , T i Ψ i ( γ ) T i T + γ − 1 ( V i T − T i Ψ i ( γ ) U i T ) ( V i T − T i Ψ i ( γ ) U i T ) T , i ∈ I , i ∈ I ∗ .
We note that Ψ i + 1 ( γ ) \boldsymbol{\Psi}_{i+1}(\gamma) Ψ i + 1 ( γ ) is symmetric positive semidefinite by construction, and its limit as γ → ∞ \gamma\to\infty γ → ∞ is well-defined and finite. This follows by induction on i i i . Suppose Ψ i ( γ ) \boldsymbol{\Psi}_i(\gamma) Ψ i ( γ ) is finite and positive semidefinite for all γ > 0 \gamma>0 γ > 0 . This is true for i = 1 i=1 i = 1 , since Ψ 1 ( γ ) = 0 \boldsymbol{\Psi}_1(\gamma)=0 Ψ 1 ( γ ) = 0 . Then, by continuity, the recursive definition of Ψ i + 1 ( γ ) \boldsymbol{\Psi}_{i+1}(\gamma) Ψ i + 1 ( γ ) implies that Ψ i + 1 ( γ ) \boldsymbol{\Psi}_{i+1}(\gamma) Ψ i + 1 ( γ ) is also finite and positive semidefinite for all γ > 0 \gamma>0 γ > 0 . We then define Ψ i ( ∞ ) = lim γ → ∞ Ψ i ( γ ) \boldsymbol{\Psi}_i(\infty)=\lim_{\gamma\to\infty}\boldsymbol{\Psi}_i(\gamma) Ψ i ( ∞ ) = lim γ → ∞ Ψ i ( γ ) and
D ‾ i ( ∞ ) = lim γ → ∞ D ~ i ( γ ) − 1 = { chol ( K ^ i i − U i Ψ i ( ∞ ) U i T + Σ ^ i ) − 1 , i ∈ I , 0 , i ∈ I ∗ , \overline{\mathbf{D}}_i(\infty)=\lim_{\gamma\to\infty}\widetilde{\mathbf{D}}_i(\gamma)^{-1}=
\begin{cases}
\operatorname{chol}\left(\widehat{\mathbf{K}}_{ii}-\mathbf{U}_i\boldsymbol{\Psi}_i(\infty)\mathbf{U}_i^{\mathsf{T}}+\widehat{\boldsymbol{\Sigma}}_i\right)^{-1}, & i\in\mathcal{I},\\
0, & i\in\mathcal{I}_*,
\end{cases} D i ( ∞ ) = γ → ∞ lim D i ( γ ) − 1 = ⎩ ⎨ ⎧ chol ( K ii − U i Ψ i ( ∞ ) U i T + Σ i ) − 1 , 0 , i ∈ I , i ∈ I ∗ ,
and
V ~ i ( ∞ ) T = lim γ → ∞ V ~ i ( γ ) T = ( V i T − T i Ψ i ( ∞ ) U i T ) D ‾ i ( ∞ ) T , i ∈ { 1 , … , N } . \widetilde{\mathbf{V}}_i(\infty)^{\mathsf{T}}=\lim_{\gamma\to\infty}\widetilde{\mathbf{V}}_i(\gamma)^{\mathsf{T}}=\left(\mathbf{V}_i^{\mathsf{T}}-\mathbf{T}_i\boldsymbol{\Psi}_i(\infty)\mathbf{U}_i^{\mathsf{T}}\right)\overline{\mathbf{D}}_i(\infty)^{\mathsf{T}},\qquad i\in\{1,\ldots,N\}. V i ( ∞ ) T = γ → ∞ lim V i ( γ ) T = ( V i T − T i Ψ i ( ∞ ) U i T ) D i ( ∞ ) T , i ∈ { 1 , … , N } .
This leads to
Ψ i + 1 ( ∞ ) = T i Ψ i ( ∞ ) T i T + V ~ i ( ∞ ) T V ~ i ( ∞ ) , i ∈ { 1 , … , N − 1 } , (70) \boldsymbol{\Psi}_{i+1}(\infty)=\mathbf{T}_i\boldsymbol{\Psi}_i(\infty)\mathbf{T}_i^{\mathsf{T}}+\widetilde{\mathbf{V}}_i(\infty)^{\mathsf{T}}\widetilde{\mathbf{V}}_i(\infty),\qquad i\in\{1,\ldots,N-1\}, \tag*{(70)} Ψ i + 1 ( ∞ ) = T i Ψ i ( ∞ ) T i T + V i ( ∞ ) T V i ( ∞ ) , i ∈ { 1 , … , N − 1 } , (70)
where Ψ 1 ( ∞ ) = 0 \boldsymbol{\Psi}_1(\infty)=0 Ψ 1 ( ∞ ) = 0 . Using (59) and (31) , we find that
T ‾ i ( ∞ ) = lim γ → ∞ T ‾ i ( γ ) = T i − V ‾ i ( ∞ ) T U i = T i + V ~ i ( ∞ ) T U ‾ i ( ∞ ) , \overline{\mathbf{T}}_i(\infty)=\lim_{\gamma\to\infty}\overline{\mathbf{T}}_i(\gamma)=\mathbf{T}_i-\overline{\mathbf{V}}_i(\infty)^{\mathsf{T}}\mathbf{U}_i=\mathbf{T}_i+\widetilde{\mathbf{V}}_i(\infty)^{\mathsf{T}}\overline{\mathbf{U}}_i(\infty), T i ( ∞ ) = γ → ∞ lim T i ( γ ) = T i − V i ( ∞ ) T U i = T i + V i ( ∞ ) T U i ( ∞ ) ,
and hence
Φ ˉ i − 1 ( ∞ ) = T ˉ i T ( ∞ ) Φ ˉ i ( ∞ ) T ˉ i ( ∞ ) + U i T D ˉ i ( ∞ ) T D ˉ i ( ∞ ) U i \bar{\Phi}_{i-1}(\infty)=\bar{T}_{i}^{\mathsf{T}}(\infty)\bar{\Phi}_{i}(\infty)\bar{T}_{i}(\infty)+U_{i}^{\mathsf{T}}\bar{D}_{i}(\infty)^{\mathsf{T}}\bar{D}_{i}(\infty)U_{i} Φ ˉ i − 1 ( ∞ ) = T ˉ i T ( ∞ ) Φ ˉ i ( ∞ ) T ˉ i ( ∞ ) + U i T D ˉ i ( ∞ ) T D ˉ i ( ∞ ) U i
Finally, we have
A i ( ∞ ) = lim γ → ∞ D ˉ i ( γ ) T D ˉ i ( γ ) Σ ^ i ( γ ) = { D ˉ i ( ∞ ) T D ˉ i ( ∞ ) Σ ^ i , i ∈ I , I , i ∈ I ∗ . A_i(\infty)=\lim_{\gamma\to\infty}\bar{D}_i(\gamma)^{\mathsf{T}}\bar{D}_i(\gamma)\hat{\Sigma}_i(\gamma)=
\begin{cases}
\bar{D}_i(\infty)^{\mathsf{T}}\bar{D}_i(\infty)\hat{\Sigma}_i, & i\in\mathcal{I},\\
I, & i\in\mathcal{I}_*.
\end{cases} A i ( ∞ ) = γ → ∞ lim D ˉ i ( γ ) T D ˉ i ( γ ) Σ ^ i ( γ ) = { D ˉ i ( ∞ ) T D ˉ i ( ∞ ) Σ ^ i , I , i ∈ I , i ∈ I ∗ .
Combining these results, we can compute the diagonal blocks of the posterior covariance as
Ω ^ i ( ∞ ) = lim γ → ∞ Ω ^ i ( γ ) = ( K ^ i i − U i Ψ i ( ∞ ) U i T ) A i ( ∞ ) − A i ( ∞ ) T ( V ˉ i T − T i Ψ i ( ∞ ) U i T ) T Φ i ( ∞ ) ( V ˉ i T − T i Ψ i ( ∞ ) U i T ) A i ( ∞ ) . \begin{aligned}
\hat{\Omega}_i(\infty)=\lim_{\gamma\to\infty}\hat{\Omega}_i(\gamma) \\
&=\left(\hat{K}_{ii}-U_i\Psi_i(\infty)U_i^{\mathsf{T}}\right)A_i(\infty)-A_i(\infty)^{\mathsf{T}}\left(\bar{V}_i^{\mathsf{T}}-T_i\Psi_i(\infty)U_i^{\mathsf{T}}\right)^{\mathsf{T}}\Phi_i(\infty)\left(\bar{V}_i^{\mathsf{T}}-T_i\Psi_i(\infty)U_i^{\mathsf{T}}\right)A_i(\infty).
\end{aligned} Ω ^ i ( ∞ ) = γ → ∞ lim Ω ^ i ( γ ) = ( K ^ ii − U i Ψ i ( ∞ ) U i T ) A i ( ∞ ) − A i ( ∞ ) T ( V ˉ i T − T i Ψ i ( ∞ ) U i T ) T Φ i ( ∞ ) ( V ˉ i T − T i Ψ i ( ∞ ) U i T ) A i ( ∞ ) .
where Ψ i ( ∞ ) \Psi_i(\infty) Ψ i ( ∞ ) , V ~ i ( ∞ ) \tilde{V}_i(\infty) V ~ i ( ∞ ) , D ˉ i ( ∞ ) \bar{D}_i(\infty) D ˉ i ( ∞ ) , Φ i ( ∞ ) \Phi_i(\infty) Φ i ( ∞ ) , and A i ( ∞ ) A_i(\infty) A i ( ∞ ) are computed using the above expressions. This leads to Algorithm 4.
Generalized Cross Validation
The GCV score can be expressed as
GCV ( θ ) = n d ∥ ( I − H ) y ∥ 2 2 ( 1 − tr ( H ) / ( n d ) ) 2 = n d ∥ ( I − H ) y ∥ 2 2 ( n d − tr ( H ) ) 2 , H = K ( K + Σ ) − 1 (71) \operatorname{GCV}(\theta)=\frac{nd\left\lVert(I-H)y\right\rVert_2^2}{\left(1-\operatorname{tr}(H)/(nd)\right)^2}=nd\frac{\left\lVert(I-H)y\right\rVert_2^2}{\left(nd-\operatorname{tr}(H)\right)^2},\qquad H=K(K+\Sigma)^{-1} \tag*{(71)} GCV ( θ ) = ( 1 − tr ( H ) / ( n d ) ) 2 n d ∥ ( I − H ) y ∥ 2 2 = n d ( n d − tr ( H ) ) 2 ∥ ( I − H ) y ∥ 2 2 , H = K ( K + Σ ) − 1 (71)
and its partial derivatives with respect to the hyperparameters can be computed analytically as
∂ ∂ θ k GCV ( θ ) = n d [ − 2 y T ( I − H ) T ∂ H ∂ θ k y ( n d − tr ( H ) ) 2 + 2 ∥ ( I − H ) y ∥ 2 2 tr ( ∂ H ∂ θ k ) ( n d − tr ( H ) ) 3 ] (72) \frac{\partial}{\partial\theta_k}\operatorname{GCV}(\theta)=nd\left[-\frac{2y^{\mathsf{T}}(I-H)^{\mathsf{T}}\frac{\partial H}{\partial\theta_k}y}{\left(nd-\operatorname{tr}(H)\right)^2}+\frac{2\left\lVert(I-H)y\right\rVert_2^2\operatorname{tr}\left(\frac{\partial H}{\partial\theta_k}\right)}{\left(nd-\operatorname{tr}(H)\right)^3}\right] \tag*{(72)} ∂ θ k ∂ GCV ( θ ) = n d − ( n d − tr ( H ) ) 2 2 y T ( I − H ) T ∂ θ k ∂ H y + ( n d − tr ( H ) ) 3 2 ∥ ( I − H ) y ∥ 2 2 tr ( ∂ θ k ∂ H ) (72)
where
∂ H ∂ θ k = ∂ K ∂ θ k ( K + Σ ) − 1 − K ( K + Σ ) − 1 ∂ ( K + Σ ) ∂ θ k ( K + Σ ) − 1 . (73) \frac{\partial H}{\partial\theta_k}=\frac{\partial K}{\partial\theta_k}(K+\Sigma)^{-1}-K(K+\Sigma)^{-1}\frac{\partial(K+\Sigma)}{\partial\theta_k}(K+\Sigma)^{-1}. \tag*{(73)} ∂ θ k ∂ H = ∂ θ k ∂ K ( K + Σ ) − 1 − K ( K + Σ ) − 1 ∂ θ k ∂ ( K + Σ ) ( K + Σ ) − 1 . (73)
The GCV score is readily evaluated in linear time using Algorithms 1 and 3. The partial derivatives of the GCV score can also be evaluated in linear time using Algorithms 1–3, where we note that the last term on the right-hand side of (72) is the product of SSS matrices, which can be computed in linear time using the algorithm from [20 ] .