Network model options added in v0.7.0
Every option below is declared once in phoskintime/networkmodel/options.py (config key in [networkmodel], command-line flag
--<key-with-dashes>, recorded in metadata.json effective_settings.options, read back by every rebuild of a run).
Every default is the behaviour before v0.7.0; which defaults change is decided in the v0.7.0 contract freeze.
Inputs (phoskintime/networkmodel/io.py)
One loader per input: kinase network (input2), TF network (input4), MS (input1: protein rows have an empty Psite,
phosphosite rows a site), RNA (input3, optional), the KinOpt and TFOpt workbooks, and CollecTRI (only for
tf_sign_source = "network"). The fit, every rebuild (profiles, posterior, multistart workers) and the analysis and
export scripts build the network through one function, phoskintime.networkmodel.PosteriorObjective.build_run_system. Counts of
what was read, dropped or defaulted are in metadata.json inputs_report; a wide file with more time columns than its
time grid stops the run. The former phospho input key was never read and is ignored with a warning.
| key | values | meaning |
|---|---|---|
missing_alpha_policy |
one (default) | row_mean | drop |
an edge the KinOpt/TFOpt "Alpha Values" sheet does not list gets α = 1.0, the mean α of its row's covered edges, or is removed (KNOWN_ISSUES N35) |
tf_sign_source |
beta (default) | network | none |
sign of a TF edge: the sign of TFOpt's TF-level β (weight α·β), CollecTRI's mode of regulation (weight sign·α·|β|), or every edge activating (α·|β|) |
tf_sign_policy_missing |
activating (default) | drop | error |
network: an edge CollecTRI gives no sign |
collectri |
path | CollecTRI file (source_genesymbol, target_genesymbol, is_stimulation, is_inhibition); its sha256 is recorded |
ck_prior_centre |
kinopt_beta (default) | design |
centre of the c_k prior and c_k's start: KinOpt's kinase-level β, or the geometric middle of the c_k design box (KinOpt's β is a share inside its activity mixture, not a scale; N38) |
kinopt_alpha_source |
workbook (default) | ensemble_mean | ensemble_member |
KinOpt α/β from the workbook (the selected start), the mean over the accepted starts within kinopt_ensemble_tol of the best, or one start (kinopt_ensemble_member); per-start results from kinopt_run_dir (General/multistart_params.npz), checked against the workbook |
Regulators and weights (phoskintime/networkmodel/tf_orphans.py)
tf_orphan_policy, tf_data_drive_measurement, data_drive_fallback, weight_smoothing_kin, weight_smoothing_tf
are unchanged (see the External tools page). New:
| key | values | meaning |
|---|---|---|
weight_smoothing_signed |
exclude (default) | magnitude |
a row with a negative weight is left unsmoothed, or smoothed on |w| with each edge keeping its sign (target sign·Σ|w|/n) |
weight_smoothing_estimate |
false (default) | true |
λ_kin and λ_tf become two fitted parameters (lambda_kin, lambda_tf; box [1e-6, 1], flat prior); the model uses W(λ) = (1 − λ)·W + λ·W₁ at every evaluation; they can be profiled |
Fit engine and multistart
| key | values | meaning |
|---|---|---|
fit_engine |
sbmlsim (default) | pypesto |
sbmlsim's least-squares fit (trust-region reflective) on the run's PEtab problem (phoskintime/networkmodel/fit_sbmlsim.py), or AMICI forward/adjoint sensitivities with pyPESTO's fides optimizer (phoskintime/networkmodel/fit_pypesto.py; the amici environment) |
fit_tolerance |
1e-12 (default) |
ftol, xtol, gtol of sbmlsim's least squares in every fit; runs made before the option used sbmlsim's default, max(relative_tolerance, 1e-8) (KNOWN_ISSUES V40) |
tf_kinase_input |
drive (default) | activity |
a TF that is a kinase enters its targets' TF input with its dimensionless drive K, or (activity, the former default) with its activity c_k·K on a 1-min time scale (KNOWN_ISSUES V33) |
mechanism |
path (default empty) | the mechanism file of the model's reactions (Mechanism files); empty: models/<default_model>.toml |
n_starts repeats run on cores processes, with start values drawn log-uniformly in the bounds (a Latin hypercube in
ln θ, seeded with seed). Each repeat is scored again with PhosKinTime's objective; the repeat with the lowest objective
among those the engine reports as successful is kept (optimization/multistart_summary.csv, metadata.json
multistart). A rerun into the same folder runs only the missing repeats. The former JAX optimizers and their keys
(optimizer, lbfgsb_*, slsqp_*, kkt_stationarity_tol, multistart_parallel) were removed in v0.7.0 and are
refused (Configuration).
Likelihood (LK-1)
| key | values | meaning |
|---|---|---|
observation_model |
linear_fc_mse (default) | log_fc_gaussian |
data term: Σ_m λ_m·MSE_m of the fold changes, or the −log likelihood of ln fold changes |
noise_sigma |
estimated (default) | fixed |
log_fc_gaussian: σ_m is a parameter of the problem with the prior ln σ_m ~ N(ln δ_m, sigma_prior_sd), or σ_m = noise_delta_<m> (replaces the former profiled) |
noise_delta_protein, noise_delta_mrna, noise_delta_phospho |
0.1 | per-modality δ (sd of ln FC): the fixed σ and the centre of the σ prior |
observable_reference |
baseline_time (default) | control |
data scaled to their first time and the model divided by its value there, or data as fold changes against the control as given (scaling_method = "none") and the model divided by its pre-stimulus steady state (initial_condition_policy = "steady_state_all") |
n_eff_rule |
rows (default) | autocorrelation |
effective sample size behind the profile threshold; autocorrelation: n·(1 − ρ)/(1 + ρ) per modality from the lag-1 autocorrelation of the residuals (GP-smoothed MS means, N36) |
With log_fc_gaussian the observations are z_r = ln obs_r ~ N(ln pred_r, σ_m² / w_r) per modality m (protein, mRNA,
phospho), over the rows with weight > 0 except baseline rows whose observed fold change is exactly 1:
NLL = Σ_m [n_m ln σ_m + RSS_m/(2σ_m²) + (n_m/2) ln 2π − ½ Σ ln w_r]. The λ_m only select modalities (0 = left out). The
priors file must be in mode likelihood (priors_likelihood.toml: the PRIOR-B centres and widths as log-normal
densities) or none; a penalty-mode file is refused (units). Profile thresholds: the exact likelihood-ratio value
χ²(1, 0.95)/2 = 1.92 nats (× n/n_eff under autocorrelation).
Noise, one treatment per observation model (phoskintime/networkmodel/noise.py; owner decision 2026-12-02). linear_fc_mse
has no noise parameter (fixed weights λ_m; PEtab states it as the fixed σ_m = sqrt(N_m / (2 λ_m))). log_fc_gaussian
with noise_sigma = "estimated": σ_m (one per modality with likelihood rows) is a parameter of the problem, appended to
θ after the model parameters (and any prior hyperparameters) as sigma[<modality>], in the same raw coordinate as the
other positive parameters (softplus, or ln under parameterisation = "log"), start δ_m (multistart start 0; the
other starts draw σ_m log-uniformly in its bounds), bounds δ_m·e^(∓5·sd). Its
prior is LK-2's ln σ_m ~ N(ln δ_m, sd) (sd = sigma_prior_sd; the normal density on ln σ_m) and is part of the
prior term. The fit and the profiles optimise σ_m jointly with θ; PEtab estimates σ_m with that prior; LK-2 samples
it. The profiles use the data-only objective (no prior term, so no σ prior): at each profile point σ_m are nuisance
parameters optimised with the other parameters, and their minimum is the closed-form profiled likelihood
(σ̂_m² = RSS_m/n_m, the former profiled value), so the exact χ² threshold above is unchanged.
Posterior ([networkmodel.posterior])
Allowed only with observation_model = "log_fc_gaussian" and a priors file in mode likelihood or none. The density is
the fit's objective on ln θ (normal prior on ln θ, no Jacobian; KNOWN_ISSUES V28), so the MAP, the Laplace approximation
and MCMC agree by construction.
method = "laplace": sbmlsim's Laplace approximation at the MAP (phoskintime/networkmodel/posterior_sbmlsim.py), withlaplace_drawsindependent draws. Outputs inposterior/: the draws, a summary with the contraction of ln θ_j (1 − Var_post/Var_prior) and its band (> 0.9 data-determined, 0.5–0.9 partly, 0.2–0.5 weakly, < 0.2 prior-dominated), andposterior_diagnostics.json.method = "mcmc": the Laplace step, then the zeus ensemble slice sampler started from it (phoskintime/networkmodel/posterior_zeus.py; settings in[networkmodel.posterior.mcmc]). Outputs inmcmc/<protein>/: the summary with ESS, autocorrelation time and split-R̂,laplace_vs_mcmc.csv,diagnostics.jsonand a corner plot.
The NUTS sampler of v0.7.0a1 and its keys (posterior_sampling, bayes_*, posterior_num_*) were removed;
hierarchical pooling has no Laplace form and went with it.
Analyses and validation
- Experiment design (T1.6):
phoskintime analyze design --runs <run> --out <dir>: the sensitivity matrix of the standardised observables (∂/∂ln θ through the ODE solve), its near-null combinations, predicted labels, and designs D1–D6 scored by rank, Δ log det F and the smallest eigenvalue on the flat subspace. - Milestone profiles:
phoskintime analyze profiles --runs <run> ... --out <dir>: data-only profiles of every free parameter with the run's own profile settings; labels, intervals, fit-inside-interval verdict. - Summary table:
phoskintime analyze summary --runs B4=<run> ... --out <stem>: one row per run (objective, convergence, accepted starts, KKT, wall time, labels). - KinOpt ensemble:
phoskintime analyze kinopt-ensemble: one fit per accepted KinOpt start and the spread. - Posterior ensemble:
phoskintime analyze ensemble --run <run>: posterior draws simulated on a dense grid (bands, phase portraits, flux, smoothing, the fitted equations); settings in[analysis.ensemble]. - PEtab / AMICI (VAL):
phoskintime export petab --run <run> --out <dir>(every model family; the written SBML is checked against its reaction plan and every observable formula against PhosKinTime's own prediction), thenpixi run --manifest-path validation/petab/pixi.toml compare --problem <dir>/problem.yaml(seevalidation/petab/README.md).
Every run writes its model specification model_spec/ (written once; θ̂ and fit.json after the fit), from which
these tools rebuild the run's problem (phoskintime.networkmodel.problem.load_problem; it checks the inputs' sha256 and that the
rebuilt objective at θ̂ equals the fit's within 1e-8 relative, else the step fails).