Skip to content

Record the issue 572 evaluation: the gate passes, and two things it turned up - #670

Merged
wshlavacek merged 1 commit into
mainfrom
572-linear-profiling-evaluation
Aug 25, 2026
Merged

Record the issue 572 evaluation: the gate passes, and two things it turned up#670
wshlavacek merged 1 commit into
mainfrom
572-linear-profiling-evaluation

Conversation

@wshlavacek

@wshlavacek wshlavacek commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Closes the evaluation that issue #572 asked for and that ADR-0123 narrowed to two named
measurements. Both have now been taken. This is documentation only. No code change and no new
configuration key.

What the issue asked

Issue #572 proposes solving an observable's scale and offset analytically instead of searching for
them, and asks for an evaluation first, because there is a real argument on the other side. If
every candidate gets the best flat line for free, the objective might stop telling a global search
which candidates are any good.

What the measurements say

The ordering, not just the width. Earlier work on this had already shown that profiling does
not delete the landscape on a Gaussian family the way it does on a log one. It had not shown
whether the ordering that survives is any good, which is the thing a global search actually uses.
On the synthetic fixture the searched ordering is slightly worse than random and the profiled
ordering is positive. Narrow the two rate boxes from six decades to two, so that sampled points are
actual candidates, and the profiled ordering becomes strong while the searched one does not move.

A fit gets there sooner. Running the same optimizer on both sides with the same number of
simulations, the profiled side reaches the optimum in about half the simulations with the noise
scale also profiled, and in well under half without. That is the head to head the issue asked for.

How often the profile returns a flat line is a fact about the box. Narrowing those same rate
boxes takes it from 18 sampled points in 81 down to 3, with everything else unchanged. Over six
decades of rate constant most points give a trajectory that is flat or instantaneous, and for those
the flat line really is the best the observation model can do. Saying so is the profile being
right, and it does not touch the ranking of the rest. That is the answer to the issue's
counter argument.

Both benchmark models agree. On Smith the spread across the sampled box drops from nine orders
of magnitude to a factor of 3.4, and the worst sampled point still scores five times better than
having no model at all, so what was removed is noise rather than signal.

Two things nobody had spotted

The rule for which noise families can do this is that the loss has to be a sum of squares, not that
the residual has to be on a linear scale. Gaussian and Laplace noise have the same residual scale,
so no rule read off that attribute can tell them apart, and that attribute is exactly what
ADR-0123's table invites an implementer to read. Under Laplace the least squares answer is not the
best one, and it loses even at the point the data was generated from. PyBNF already has a predicate
that separates the two correctly. It was added for unrelated work and gives the right answer for
both confs.

The closed form in the issue is the unconstrained answer, and a profiled parameter still has
declared bounds. Left inert, the way a profiled noise scale is today, the solve returns a negative
scale for a parameter the user declared positive at a third of the sampled points, and scores
better for doing it. Clamping, refusing, or accepting the sign flip is a decision to make on
purpose rather than to fall into.

The question the issue said had to be decided

Which weighting the solve should use. The measurements answer it. The solve has to be the
objective's own best answer over the coefficients, which is option (a) in the issue. That is what
makes the closed form agree with a numerical minimum, and what lets the gradient stay simple. It
leaves the existing analytic scale normalization alone.

About ADR-0123

It becomes superseded in part. Its census and its refusals stand. Its family table and its reading
of the Laske slug are corrected here.

It also recorded two tools as having landed in the benchmark corpus. They were committed to a
branch that was never merged, so it has been pointing at files that are not on main. The companion
pull request merges that branch, along with the additions these measurements needed.

Reproducing

Everything is in wshlavacek/BNGL-Models, branch 572-linear-profiling-race, under
pybnf-jobs/. Each script records the failure modes that produced a plausible wrong answer while
it was being written.

What happens next

The gate is met, so building this is worth doing. ADR-0129 lists the scope, ordered as an
implementation would take it and modelled on the existing noise profiling switch. That is a
separate change and a separate decision, and a follow-up issue will track it.

@wshlavacek
wshlavacek marked this pull request as draft August 25, 2026 12:03
…uilding it would mean

ADR-0123 narrowed issue 572 to the linear scale case and named two
measurements as its gate. Both have now been taken and they come out in
favour of the feature. No code changes.

The ordering, not just the width. Earlier work showed that profiling an
observable's scale and offset does not delete the landscape on a Gaussian
family the way it does on a log one. It did not show whether the ordering
that survives is any good, which is what a global search actually uses.
On the synthetic fixture the searched ordering is slightly worse than
random and the profiled ordering is positive, and once the rate boxes are
narrowed to a range where draws are actual candidates it is strong.

A fit gets there sooner. Running the same optimizer on both sides with
the same number of simulations, the profiled side reaches the optimum in
about half the simulations with the noise scale profiled, and in well
under half without. That is the head to head the issue asked for.

How often the profile returns a flat line is a fact about the box, not
about the method. Narrowing the two rate boxes from six decades to two
takes it from 18 draws in 81 to 3, on the same problem with everything
else unchanged. Over six decades most draws are a trajectory that is flat
or instantaneous, and for those the flat line really is the best the
observation model can do.

Two things the earlier work did not anticipate.

The rule for which noise families can do this is that the loss has to be
a sum of squares, not that the residual has to be on a linear scale.
Gaussian and Laplace noise have the same residual scale, so no rule read
off that attribute can separate them, and the attribute is what ADR-0123's
table invites an implementer to read. PyBNF already has the predicate
that does separate them, added for other work, and it gives the right
answer for both.

The closed form is the unconstrained answer, and a profiled parameter
still has declared bounds. Left inert, the solve returns a negative scale
for a parameter declared positive at a third of the sampled points, and
scores better for doing it. Clamp, refuse, or accept the sign flip is a
decision to make on purpose.

ADR-0123 is now superseded in part. Its census and its refusals stand,
its family table and its reading of one slug are corrected here, and the
tools it said had landed in the benchmark corpus were committed to a
branch that was never merged. That branch is what the companion pull
request merges.
@wshlavacek
wshlavacek force-pushed the 572-linear-profiling-evaluation branch from 11b24d2 to e63a233 Compare August 25, 2026 13:04
@wshlavacek wshlavacek changed the title Record the issue 572 evaluation: the gate passes, and three things it turned up Record the issue 572 evaluation: the gate passes, and two things it turned up Aug 25, 2026
@wshlavacek
wshlavacek marked this pull request as ready for review August 25, 2026 13:05
@wshlavacek
wshlavacek merged commit f4c46b9 into main Aug 25, 2026
9 checks passed
@wshlavacek
wshlavacek deleted the 572-linear-profiling-evaluation branch August 25, 2026 13:17
wshlavacek added a commit that referenced this pull request Aug 25, 2026
…rpus work that has since merged (#672)

Two pull requests landed close together and both took the number 0129.
The design of experiments record (#668) merged first, so the issue 572
evaluation (#670) moves to 0130 and the references in ADR-0123 follow it.

The evaluation also said the tools it used had been committed to a branch
in the benchmark corpus and never merged. That was true when it was
written and is not now. They merged as BNGL-Models PR 47, so both records
now say where the files are rather than where they were missing from.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant