You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Part of #385 (cut 1, step 2 of A→B→C). Depends on #447. Pure mapping — no objective math.
What
Given an edition-2 fit, compute, per experiment, the bngsim sensitivity request and the
per-free-parameter chain-rule factor that converts a native sensitivity column into the derivative
w.r.t. the free parameter.
The mapping (edition-2)
Bind by id (ADR-0034). A parameter: free parameter (ADR-0043) binds to the model entity of
the same id, the same contract set_param already uses (net_model.py:203-218). A free parameter
that matches no model id (e.g. a free σ) is not a sensitivity request — it carries no model
column (its gradient is assembled in C — Gradient plumbing: Gaussian gradient + residual-Jacobian assembly, convention pin, native→sampling transform, FD-check #449 / layer D). This is the existing unmatched-param path
(warning, not error — ADR-0034).
Param vs IC. Route a free parameter that binds to a kinetic/global parameter to sensitivity_params; one that binds to a species initial value (_parse_net_species_initializers, net_model.py:159) to sensitivity_ic. Cut-1 must-have is sensitivity_params; IC routing is the
secondary branch.
Per-condition perturbation = local derivative. A condition: is a MutationSet on the base
model (ADR-0028, config.py:1198); each Mutation carries operation ∈ {=,+,-,*,/}
(pset.py:1714, ops at pset.py:1741-1749). For free parameter p perturbed in an experiment's
condition:
p = c → p is pinned to a constant in that experiment ⇒ factor 0 (drop p's column).
p * c → factor c; p / c → factor 1/c; p + c / p - c → factor 1.
Unit tests (no simulation needed): correct request lists and per-condition factors for
wildtype, =-pinned, *//-scaled, and unmatched (σ-style) free parameters; IC vs param routing.
Out of scope
Consuming the factors / building the objective Jacobian → #449. Pre-equilibration conditions
(layer J). Comparison-difference constraints (layer I).
Part of #385 (cut 1, step 2 of A→B→C). Depends on #447. Pure mapping — no objective math.
What
Given an edition-2 fit, compute, per experiment, the bngsim sensitivity request and the
per-free-parameter chain-rule factor that converts a native sensitivity column into the derivative
w.r.t. the free parameter.
The mapping (edition-2)
Bind by id (ADR-0034). A
parameter:free parameter (ADR-0043) binds to the model entity ofthe same id, the same contract
set_paramalready uses (net_model.py:203-218). A free parameterthat matches no model id (e.g. a free σ) is not a sensitivity request — it carries no model
column (its gradient is assembled in C — Gradient plumbing: Gaussian gradient + residual-Jacobian assembly, convention pin, native→sampling transform, FD-check #449 / layer D). This is the existing unmatched-param path
(warning, not error — ADR-0034).
Param vs IC. Route a free parameter that binds to a kinetic/global parameter to
sensitivity_params; one that binds to a species initial value (_parse_net_species_initializers,net_model.py:159) tosensitivity_ic. Cut-1 must-have issensitivity_params; IC routing is thesecondary branch.
Per-condition perturbation = local derivative. A
condition:is aMutationSeton the basemodel (ADR-0028,
config.py:1198); eachMutationcarriesoperation∈{=,+,-,*,/}(
pset.py:1714, ops atpset.py:1741-1749). For free parameterpperturbed in an experiment'scondition:
p = c→pis pinned to a constant in that experiment ⇒ factor 0 (dropp's column).p * c→ factorc;p / c→ factor1/c;p + c/p - c→ factor1.An unperturbed free parameter has factor 1. The factor multiplies that parameter's native
sensitivity column when C — Gradient plumbing: Gaussian gradient + residual-Jacobian assembly, convention pin, native→sampling transform, FD-check #449 assembles the per-experiment Jacobian.
Deliverables
{free_param → (request_target ∈ {param, ic} | none, factor)}.sensitivity_params/sensitivity_iclists handed to A — Gradient plumbing: capability gate + preserve the output-sensitivity tensor through net execution #447's request at each experiment's Simulator.wildtype,
=-pinned,*//-scaled, and unmatched (σ-style) free parameters; IC vs param routing.Out of scope
Consuming the factors / building the objective Jacobian → #449. Pre-equilibration conditions
(layer J). Comparison-difference constraints (layer I).