I am using tinygp to implement quasiseparable Gaussian-process models for AGN reverberation mapping. These models can have finite-dimensional state-space representations while being non-reversible.
tinygp’s current quasiseparable construction implicitly relies on
$$F P_\infty = P_\infty F^{\mathsf T},$$
where $F$ is the physical forward state transition and $P_\infty$ is the stationary covariance. This identity holds for reversible stationary processes, including tinygp’s existing quasiseparable kernels, but not for general causal state-space models.
Minimal example
A minimal two-state non-reversible kernel and regression test are included in PR #276, in tests/kernels/test_quasisep_nonreversible.py.
The test constructs the covariance in three ways:
- directly from the state-space transition;
- using
QuasisepSolver;
- using
KalmanSolver.
On the current main branch, the quasiseparable covariance has incorrectly oriented cross-covariances and disagrees with the direct and Kalman formulations.
The discrepancy arises because tinygp’s transition_matrix(t1, t2) returns the adjoint of the physical forward transition. If
$$x(t_2) = F_{21}x(t_1),$$
then transition_matrix(t1, t2) returns
$$A_{21} = F_{21}^{\mathsf T}.$$
The current QSM construction effectively uses
$$P_\infty F^{\mathsf T},$$
while forward state propagation requires
$$F P_\infty.$$
These expressions are equal for reversible processes but differ for the test kernel.
Expected behavior
For (t_i > t_j), the quasiseparable representation should produce
$$K_{ij}
=
h_i F_i F_{i-1}\cdots F_{j+1}
P_\infty h_j^{\mathsf T}.$$
The quasiseparable covariance and likelihood should agree with the direct state-space and Kalman formulations for both reversible and non-reversible kernels.
Proposed fix
The quasiseparable generators should use the physical forward-transition orientation. The corresponding changes need to cover:
- symmetric QSM construction;
- scalar kernel evaluation;
- generalized QSM construction used for cross-coordinate matrix multiplication and prediction;
- documentation of the
transition_matrix convention.
I implemented the proposed change and regression tests in PR #276. Existing reversible kernels retain their current covariance and likelihood behavior.
I am using tinygp to implement quasiseparable Gaussian-process models for AGN reverberation mapping. These models can have finite-dimensional state-space representations while being non-reversible.
tinygp’s current quasiseparable construction implicitly relies on
where$F$ is the physical forward state transition and $P_\infty$ is the stationary covariance. This identity holds for reversible stationary processes, including tinygp’s existing quasiseparable kernels, but not for general causal state-space models.
Minimal example
A minimal two-state non-reversible kernel and regression test are included in PR #276, in
tests/kernels/test_quasisep_nonreversible.py.The test constructs the covariance in three ways:
QuasisepSolver;KalmanSolver.On the current
mainbranch, the quasiseparable covariance has incorrectly oriented cross-covariances and disagrees with the direct and Kalman formulations.The discrepancy arises because tinygp’s
transition_matrix(t1, t2)returns the adjoint of the physical forward transition. Ifthen
transition_matrix(t1, t2)returnsThe current QSM construction effectively uses
while forward state propagation requires
These expressions are equal for reversible processes but differ for the test kernel.
Expected behavior
For (t_i > t_j), the quasiseparable representation should produce
The quasiseparable covariance and likelihood should agree with the direct state-space and Kalman formulations for both reversible and non-reversible kernels.
Proposed fix
The quasiseparable generators should use the physical forward-transition orientation. The corresponding changes need to cover:
transition_matrixconvention.I implemented the proposed change and regression tests in PR #276. Existing reversible kernels retain their current covariance and likelihood behavior.