Repository navigation
Floor the noise estimate at the rounding error of the function values - #87
Merged
Merged
Conversation
dweindl
force-pushed
the
noise-floor-rounding
branch
from
October 21, 2026 13:44
4968729 to
bd3908d
Compare
The difference-table noise estimate scatters by tens of percent, and near the rounding level it also depends on the platform's floating-point behaviour. For an AMICI log-likelihood of ~-303 (`eps * |f| = 6.7e-14`), the estimate was 2.7e-14 on one platform and 7.3e-14 on another; the low estimate made the kink check flag both directions of a smooth model as `discontinuity_suspected`. The noise floor is now at least `eps * median|f|` over the probe points (about two ulps), per output component, ignoring non-finite probe values. A user-supplied `noise_floor` is not affected. Also report the function value at the point as `diagnostics["f0"]`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dweindl
force-pushed
the
noise-floor-rounding
branch
from
October 21, 2026 13:56
bd3908d to
9ccd1dd
Compare
dweindl
marked this pull request as ready for review
October 21, 2026 17:06
This was referenced Oct 21, 2026
dilpath
approved these changes
Oct 26, 2026
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.
The difference-table noise estimate scatters by tens of percent, and near the rounding level it also depends on the platform's floating-point behaviour. The noise floor is now at least
eps * median|f|over the probe points (about two ulps of the function values), per output component; non-finite probe values are ignored and exactly-zero outputs get no floor. A user-suppliednoise_flooris not affected. This conservative floor covers rounding errors accumulated in typical computations and the sampling error of the estimate, which would otherwise make the noise floor, and every step size and tolerance derived from it, platform-dependent at the rounding level.Found via the AMICI SBML semantic test suite, case 00206 (plain mass action, no events): on Ubuntu 26.04 CI, both adjoint directions came out
discontinuity_suspected. The log-likelihood there is ~-303 (eps * |f| = 6.7e-14), but the estimated noise floor was 2.7e-14 (0.40eps * |f|), versus 7.3e-14 (1.09eps * |f|) on Ubuntu 24.04, where the case passes. With the low estimate, the kink check's noise budget (5.3e-9) fell just below the residual between ladder rungs (8.0e-9).Also reports the function value at the point as
diagnostics["f0"], so the noise floor can be related to the function's magnitude when analyzing results.Validated on AMICI CI (SBML semantic suite and benchmark collection, Ubuntu 24.04 and 26.04, on top of #86); compared to #86 alone:
convergedand passing. All SBML and benchmark tests pass on both runners; no direction fails its check.discontinuity_suspectedtoconverged.discontinuity_suspecteddirections in SBML 01010 on 24.04 (previously converged and passing). Inestimate_jacobian, the ladder is shared across outputs and sized by the largest output noise floor; the floor raised it slightly (1.6e-15 -> 2.2e-15), and outputs with a much smaller own noise floor (7.8e-17) have a correspondingly tight discontinuity budget at those step sizes. The residual was already ~1.4x the budget before this change, so this is a pre-existing sensitivity of the per-output budget with a shared ladder, to be looked at separately.An earlier version of this change used
max|f|instead ofmedian|f|; the numbers above are for the final version, which differs from themax|f|one only in 62 SBML forward directions (outputs with an exactly-zero derivative whose shared Jacobian ladder shifted by ~2%;converged->noise_dominated, none failing).🤖 Generated with Claude Code