TuringLang / TuringLang/SSMProblems.jl
Mooncake extension silently loses gradients and rejects valid inputs
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 11
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
MooncakeExt has several tangent-handling failures. Here, ll(μ) wraps kf_loglikelihood with fixed parameters:
ll(μ) + sum(μ): gradient0.00486532; finite differences give1.00486532.ll(μ) + ll(μ): loses one gradient contribution.- Differentiating observations returns zero instead of
−0.86780778. - Constant
jitter=0.01throwsincrement!!(::Float64, ::NoRData). - Plain-matrix priors,
ScalMat, Float32 models, and mixed dense/static covariance storage also fail.
Accumulate existing tangents, handle forward/reverse components independently, and explicitly reject unsupported derivatives.
Verified with Julia 1.12.7, Mooncake 0.5.57, and PDMats 0.11.41.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating MooncakeExt and the kf_loglikelihood wrapper, then reproduce the listed gradient and input failures on the stated Julia, Mooncake, and PDMats versions. Trace tangent accumulation and forward/reverse handling, and verify that supported derivatives preserve all contributions while unsupported derivatives are rejected explicitly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100