Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For
IntegratedMatern52(scale=1, sigma=1), the generic process covariance atdt=300is finite but inaccurate: the integral variance is 114020.673294, while independent quadrature of the physical impulse response gives 711.341753. This patch brings the result into agreement with quadrature. A finiteness check alone does not detect the discrepancy.The following reproduces the result on smolgp 0.3.2 at
22bc8c19232140aca4f7903a37b687e073a70e5e, with JAX x64 on CPU:dt=300, integral variancedt=700, integral variancedt=1000, integral varianceThe new regression integrates
exp(F*t) L Qc L.T exp(F.T*t)directly with SciPy quadrature, so its reference calculation does not reuse a Van Loan block.Change
The generic integral covariance previously extracted
F3/H2/K1from a full-gap auxiliary exponential containing bothFand-F. Those auxiliary blocks can overflow or lose accuracy even when the physical covariance remains representable.The replacement changes both discretization and assembly: append one integral state to the base system, compute its short-step transition and covariance, then compose the physical pairs with the classical identities
A(2h)=A(h)@A(h)andQ(2h)=Q(h)+A(h)@Q(h)@A(h).T. Extract the cross-covariance and integral variance from this augmented covariance. The existingprocess_noisemethod replicates those blocks across instruments.The appended state integrates base coordinate 0, matching the existing integrated model's design, observation and transition conventions. The public
VanLoanhelper,Phibar_from_VanLoan, and the analytic SHO path are unchanged.Validation and limits
python -m pytest tests/test_long_gap_noise.py tests/test_proofs.py tests/test_integrated.py -qpasses 23 tests. The one warning is the existing instrument-count reinitialization test. New coverage includes the finite-but-inaccurate Matérn case, independent physical quadrature for Exp/Matérn32/Matérn52, analytic OU values and parameter gradients, JIT/vmap, zero-time behavior and derivative, semigroup composition, multiple integral states, and a full two-instrument likelihood.These regressions use x64 reference calculations. The CI test workflow at the base revision also sets
JAX_ENABLE_X64=1.Test environment: Python 3.12.14, JAX/jaxlib 0.11.1, NumPy 2.5.3, SciPy 1.18.1, Equinox 0.13.8; tinygp pinned at
bea3c43e47c339cb20bc14b91cbd0e55a592f7e6.The helper permits at most 32 doublings by default; negative/nonfinite elapsed time or a required scaling beyond that budget returns NaN matrices. A static loop preserves reverse-mode differentiation, and the norm-based scaling decision is stopped from differentiation. This is an explicit numerical policy, not a guarantee for arbitrary ill-conditioned or physically overflowing systems.