Skip to content

05. Parameter layout of the network model

Download the notebook (executed for this page) · source

What this tutorial shows. Which parameters the network model fits, in which order they sit in the optimizer vector θ, where their bounds come from (the sampling design, KNOWN_ISSUES N22), which coordinate the optimizer works in (softplus or log), how start values are chosen, and the prior that priors_lognormal.toml puts on them. Every step uses the same functions the runner uses (phoskintime.networkmodel.params.init_raw_params, phoskintime.networkmodel.utils.calculate_bio_bounds, phoskintime.networkmodel.priors).

Place in the series. Tutorial 04 built the fixed weight matrices W and TF from the KinOpt and TFOpt workbooks. This tutorial covers the parameters fitted on top of them. Tutorial 06 simulates the model and evaluates the objective.

Data. The synthetic example (phoskintime.networkmodel.example), written to a temporary folder. The numbers are invented.

Contrast with KinOpt and TFOpt

KinOpt and TFOpt fit weights. Their optimizer vector is α (one block per phosphosite or per target mRNA, each on a simplex: non-negative, summing to 1) followed by β (one block per kinase or TF, signed, summing to 1). Neither tool has dynamics. See KinOpt 04. Parameter layout: alpha and beta and TFOpt 04. Parameter layout: alpha and beta.

PhosKinTime fits rates. Its θ contains no α and no β. init_raw_params raises an error if either appears. The weights are fixed inputs (tutorial 04), and θ holds the rate constants and gains of a coupled ODE system, each bounded in a box and mapped to an unconstrained-looking coordinate. KinOpt's kinase-level β appears only once more, as the start value and prior centre of the kinase gain c_k (section 5). See also External tools and the network model.

# Setup. Find the repository root (the folder with configs/config.toml and phoskintime/), put it on sys.path and work
# from there. A Jupyter kernel started outside pixi does not get pixi's PYTHONPATH, hence the sys.path line.
import logging
import os
import sys
import tempfile
from pathlib import Path

REPO_ROOT = Path.cwd().resolve()
while not ((REPO_ROOT / "configs" / "config.toml").is_file() and (REPO_ROOT / "phoskintime").is_dir()):
    if REPO_ROOT.parent == REPO_ROOT:
        raise RuntimeError("Start this notebook inside the PhosKinTime repository.")
    REPO_ROOT = REPO_ROOT.parent
if str(REPO_ROOT) not in sys.path:
    sys.path.insert(0, str(REPO_ROOT))
os.chdir(REPO_ROOT)

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt

pd.set_option("display.width", 140)
pd.set_option("display.max_columns", 20)
logging.disable(logging.INFO)  # hide PhosKinTime's INFO log lines; warnings are still shown

# Everything this tutorial writes goes into a new temporary folder, never into the repository.
WORK = Path(tempfile.mkdtemp(prefix="phoskintime-tutorial-04-"))
from phoskintime.networkmodel.example import write_example_project

CONF = write_example_project(WORK / "project", n_starts=2, cores=1)  # synthetic inputs + config.toml
DATA = WORK / "project" / "data"
# networkmodel reads its settings when it is first imported, from the file named here.
os.environ["PHOSKINTIME_NETWORKMODEL_CONFIG"] = str(CONF)
print("example project:", CONF.parent)
print(sorted(p.name for p in DATA.iterdir()))
example project: /tmp/phoskintime-tutorial-04-rkkgesiw/project
['kinase_net.csv', 'kinopt_results.xlsx', 'ms.csv', 'rna.csv', 'tf_net.csv', 'tfopt_results.xlsx']
from phoskintime.networkmodel.runner import parse_runtime_args
from phoskintime.networkmodel.PosteriorObjective import build_run_system, live_settings


def build(extra_args=(), quiet=False, **options):
    """Build the network exactly as a run would: parse the runner's options for the example config, then call
    build_run_system. ``options`` override [networkmodel] options (e.g. tf_sign_source="none")."""
    args, _ = parse_runtime_args(["--conf", str(CONF), "--output-dir", str(WORK / "scratch-run"),
                                  *map(str, extra_args)])
    settings = live_settings(args)
    settings["options"] = {**settings["options"], **options}
    if quiet:
        logging.disable(logging.WARNING)
    try:
        net = build_run_system(args, {}, settings)
    finally:
        logging.disable(logging.INFO)
    net.args = args  # kept for later cells
    return net
net = build(quiet=True)  # the network of tutorial 04 (default options)
idx, args = net.idx, net.args
print("proteins:", idx.proteins, "| kinases:", idx.kinases, "| sites:", idx.total_sites)
proteins: ['A', 'B', 'K1', 'T1', 'T2', 'T3'] | kinases: ['K1', 'K2'] | sites: 4

1. The parameter groups

The network model (default model = "distributive") has, for every protein i with sites j, an mRNA state R_i, an unphosphorylated protein state P_i and one state P_ij per phosphosite. The fitted groups and their roles in the reactions of the model (models/distributive.toml, tutorial 01) are:

group size role in the ODE symbol on the model page
A_i one per protein basal mRNA synthesis; modulated by the TF input s_g
B_i one per protein mRNA decay rate (1/min) d_g
C_i one per protein translation rate k_g
D_i one per protein protein degradation, applied to every protein state (1/min) ρ_g, part of γ
E_i one per protein dephosphorylation, one rate per protein shared by its sites (N8) δ_g,s
Dp_i one per site extra loss of the phosphorylated form of that site γ_g,s − ρ_g
c_k one per kinase kinase gain: the drive of kinase k is c_k · K_k(t) β_k
tf_scale one global gain of the TF modulation of mRNA synthesis α_tf

Two names clash between the tools. The model page writes the kinase gain as β_k, which is PhosKinTime's c_k and not KinOpt's β. It writes the TF gain as α_tf, which is tf_scale and not TFOpt's α. The equations themselves are in tutorial 06.

2. Bounds from the sampling design (N22)

A first-order rate k is only resolvable by the sampling if its process completes at least a fraction δ of its course over the observed span T, and at most 1 − δ within the shortest sampling interval dt_min:

k_min = −ln(1 − δ) / T, k_max = −ln(δ) / dt_min.

δ = 0.1 is an assumption (DESIGN_DELTA_ASSUMED), because the inputs carry no replicates. Each rate group uses the time grid of the modality that sees it (DESIGN_RATE_GRIDS).

from phoskintime.networkmodel.utils import DESIGN_RATE_GRIDS, calculate_bio_bounds, design_rate_bounds

time_points = {"protein": args.time_points_protein, "rna": args.time_points_rna, "phospho": args.time_points_phospho}
design = design_rate_bounds(time_points)
print("delta =", design["delta"], "|", design["delta_source"])
print("grid per group:", DESIGN_RATE_GRIDS)
pd.DataFrame(design["groups"]).T.round(5)
delta = 0.1 | assumption: no replicate data in the networkmodel inputs
grid per group: {'B_i': 'rna', 'D_i': 'protein', 'E_i': 'phospho', 'Dp_i': 'phospho', 'c_k': 'phospho'}
grid k_min k_max half_life_max_min half_life_min_min
B_i rna 0.00011 0.575646 6289.345686 1.20412
D_i protein 0.00011 9.21034 6315.66094 0.075257
E_i phospho 0.00011 9.21034 6315.66094 0.075257
Dp_i phospho 0.00011 9.21034 6315.66094 0.075257
c_k phospho 0.00011 9.21034 6315.66094 0.075257

The remaining groups are not first-order rates and get their own rules in calculate_bio_bounds. A_i and C_i are coupled to the rate bounds and to the range of the data, so that the steady-state mRNA and protein levels can reach the observed fold changes. The upper bound of c_k is clip(0.1 / var(K), 5, 15), where K is the kinase drive. tf_scale lies in [0.5, 5] for sparse networks (fewer than 2 TF edges per protein) and in [0.1, 2.5] for dense ones.

bounds = calculate_bio_bounds(idx, net.df_prot, net.df_rna, net.tf_mat, net.kin_in, time_points=time_points)
pd.DataFrame(bounds, index=["lower", "upper"]).T
lower upper
c_k 0.000110 5.000000
A_i 0.000016 7.523976
B_i 0.000110 0.575646
C_i 0.000027 80.362571
D_i 0.000110 9.210340
Dp_i 0.000110 9.210340
E_i 0.000110 9.210340
tf_scale 0.500000 5.000000

A fitted value at one of these bounds is not an estimate. It is where the box stopped the optimizer. Such values are labelled "below / above resolvable rate" in parameter_status.csv.

3. The optimizer vector θ

init_raw_params stacks the groups in a fixed order: A_i, B_i, C_i, D_i, E_i, c_k, tf_scale, Dp_i (then lambda_kin, lambda_tf when the weight smoothing is fitted). Inside a group the order is the model's protein order, kinase order or site order. Each group gets one box, the same for all its members.

from phoskintime.networkmodel import parameterisation as P
from phoskintime.networkmodel.params import init_raw_params, unpack_params

theta0, slices, xl, xu = init_raw_params(net.defaults, custom_bounds=bounds)


def parameter_names(slices, idx):
    """Names in θ order, as the runner writes them (c_k[kinase], Dp_i[protein_site], tf_scale, <group>[protein])."""
    names = []
    for group, sl in slices.items():
        if group == "c_k":
            names += [f"c_k[{k}]" for k in idx.kinases]
        elif group == "Dp_i":
            names += [f"Dp_i[{p}_{s}]" for p, ss in zip(idx.proteins, idx.sites) for s in ss]
        elif group in ("tf_scale", "lambda_kin", "lambda_tf"):
            names += [group]
        else:
            names += [f"{group}[{p}]" for p in idx.proteins]
    return names


names = parameter_names(slices, idx)
print("groups and slices:", {g: (s.start, s.stop) for g, s in slices.items()})
print("coordinate:", P.get_mode())
layout = pd.DataFrame({"parameter": names, "raw θ0": theta0, "start (physical)": P.to_physical_np(theta0),
                       "lower": P.to_physical_np(xl), "upper": P.to_physical_np(xu)})
layout
groups and slices: {'A_i': (0, 6), 'B_i': (6, 12), 'C_i': (12, 18), 'D_i': (18, 24), 'E_i': (24, 30), 'c_k': (30, 32), 'tf_scale': (32, 33), 'Dp_i': (33, 37)}
coordinate: softplus
parameter raw θ0 start (physical) lower upper
0 A_i[A] 0.541325 1.00 0.000016 7.523976
1 A_i[B] 0.541325 1.00 0.000016 7.523976
2 A_i[K1] 0.541325 1.00 0.000016 7.523976
3 A_i[T1] 0.541325 1.00 0.000016 7.523976
4 A_i[T2] 0.541325 1.00 0.000016 7.523976
5 A_i[T3] 0.541325 1.00 0.000016 7.523976
6 B_i[A] -2.970628 0.05 0.000110 0.575646
7 B_i[B] -2.970628 0.05 0.000110 0.575646
8 B_i[K1] -2.970628 0.05 0.000110 0.575646
9 B_i[T1] -2.970628 0.05 0.000110 0.575646
10 B_i[T2] -2.970628 0.05 0.000110 0.575646
11 B_i[T3] -2.970628 0.05 0.000110 0.575646
12 C_i[A] -0.432752 0.50 0.000027 80.362571
13 C_i[B] -0.432752 0.50 0.000027 80.362571
14 C_i[K1] -0.432752 0.50 0.000027 80.362571
15 C_i[T1] -0.432752 0.50 0.000027 80.362571
16 C_i[T2] -0.432752 0.50 0.000027 80.362571
17 C_i[T3] -0.432752 0.50 0.000027 80.362571
18 D_i[A] -2.970628 0.05 0.000110 9.210340
19 D_i[B] -2.970628 0.05 0.000110 9.210340
20 D_i[K1] -2.970628 0.05 0.000110 9.210340
21 D_i[T1] -2.970628 0.05 0.000110 9.210340
22 D_i[T2] -2.970628 0.05 0.000110 9.210340
23 D_i[T3] -2.970628 0.05 0.000110 9.210340
24 E_i[A] 0.541325 1.00 0.000110 9.210340
25 E_i[B] 0.541325 1.00 0.000110 9.210340
26 E_i[K1] 0.541325 1.00 0.000110 9.210340
27 E_i[T1] 0.541325 1.00 0.000110 9.210340
28 E_i[T2] 0.541325 1.00 0.000110 9.210340
29 E_i[T3] 0.541325 1.00 0.000110 9.210340
30 c_k[K1] -4.600166 0.01 0.000110 5.000000
31 c_k[K2] 0.541325 1.00 0.000110 5.000000
32 tf_scale 0.541325 1.00 0.500000 5.000000
33 Dp_i[A_S_1] -2.252168 0.10 0.000110 9.210340
34 Dp_i[A_S_2] -2.252168 0.10 0.000110 9.210340
35 Dp_i[B_Y_4] -2.252168 0.10 0.000110 9.210340
36 Dp_i[K1_T_3] -2.252168 0.10 0.000110 9.210340

4. Coordinates: softplus or log

PhosKinTime holds θ in a raw coordinate, which is mapped to k > 0. [networkmodel] parameterisation selects the map:

  • "softplus" (default, as in v0.6.0): k = softplus(θ) = ln(1 + e^θ), so θ = ln(e^k − 1). For small k this is close to ln k, and for large k it is close to k itself.
  • "log": k = e^θ, θ = ln k: the same relative resolution at every scale.

Bounds, start values and priors are stated in physical units and mapped to the chosen coordinate. The run records the choice (metadata.json effective_settings), and a rebuild uses the run's own coordinate.

The fit engines do not search in this coordinate: the PEtab problem estimates ℓ = ln k for every parameter (tutorial 07), and the result is mapped back to the raw coordinate for the run's tables (optimization/multistart_parameters.csv, best_fit.csv).

k = np.array([1e-4, 1e-2, 1.0, 10.0])
raw_softplus = P.to_raw_np(k)  # current mode: softplus
P.set_mode("log")  # module-wide switch, as a run with parameterisation = "log" sets it
raw_log = P.to_raw_np(k)
P.set_mode("softplus")  # back to the default for the rest of this notebook
pd.DataFrame({"k (physical)": k, "θ under softplus": raw_softplus, "θ under log": raw_log})
k (physical) θ under softplus θ under log
0 0.0001 -9.210290 -9.210340
1 0.0100 -4.600166 -4.605170
2 1.0000 0.541325 0.000000
3 10.0000 9.999955 2.302585

5. Start values, and where KinOpt's β enters

build_run_system sets the default start values: A_i = 1, B_i = 0.05, C_i = 0.5, D_i = 0.05, E_i = 1, Dp_i = 0.1, tf_scale = 1. For c_k the start depends on ck_prior_centre:

  • "kinopt_beta" (default until the v0.7.0 freeze): c_k = max(0.01, KinOpt kinase-level β). K1's β is −0.4, so its c_k starts at the floor 0.01. KinOpt's β is a signed share inside KinOpt's activity model and not a rate, so using it as a gain is an assumption, and KNOWN_ISSUES N38 makes β from KinOpt workbooks before 0.11.0 unusable.
  • "design": c_k starts at the geometric middle of its design box, and N38 recommends this setting.

These defaults are the nominal values of the run's PEtab problem, where the export checks its objective against PhosKinTime's. The multistart draws every start log-uniformly inside the bounds (a Latin hypercube in ln θ; tutorial 07).

design_net = build(quiet=True, ck_prior_centre="design")
pd.DataFrame({"KinOpt β": [net.kin_beta_map.get(k) for k in idx.kinases],
              "c_k start (kinopt_beta)": net.defaults["c_k"],
              "c_k start (design)": design_net.defaults["c_k"]}, index=pd.Index(idx.kinases, name="kinase"))
KinOpt β c_k start (kinopt_beta) c_k start (design)
kinase
K1 -0.4 0.01 0.023425
K2 1.0 1.00 0.023425

6. Parameters fixed for lack of data influence (N24)

A parameter that cannot affect the data is fixed at its start value and labelled "not identifiable: no data influence". This applies to a c_k whose W edges are all about 0 (a vertex solution of KinOpt, N32) and to an E_i of a protein without sites. The runner applies this mask before the prior is resolved. In the example every kinase has a non-zero edge, so nothing is fixed.

from phoskintime.networkmodel.utils import apply_zero_influence_mask, zero_influence_parameters

zi = zero_influence_parameters(idx, net.W_global, net.tf_mat, edge_kinases=set(net.df_kin["kinase"]))
xl_fit, xu_fit, fixed_mask, fixed_names = apply_zero_influence_mask(zi, idx, slices, theta0, xl, xu)
print("fixed parameters:", fixed_names or "none")
print("sites without kinase inflow:", zi["sites_without_kinase_inflow"] or "none")
fixed parameters: ['E_i[T1]', 'E_i[T2]', 'E_i[T3]']
sites without kinase inflow: none

7. The prior: priors_lognormal.toml

The objective adds a prior term declared in a priors file ([networkmodel] prior_file, default priors_lognormal.toml):

  • Rates and scales: ln θ ~ N(ln c, s²), with c the geometric middle of the parameter's design box and s = (ln max − ln min)/4, which puts the design bounds at ±2 sd.
  • c_k: centred on KinOpt's β when β > 0, otherwise on the design middle (with ck_prior_centre = "design", always on the design middle).
  • tf_scale: flat.
  • In penalty mode the term is strength · Σ r², with r = (ln θ − ln c)/s. The strength κ₁ is the weight of one pseudo-observation, κ₁ = mean over modalities of λ_m · noise_var_m / N_m. With the default noise_var = "design_delta", noise_var_m = δ² = 0.01. N_m is the number of observations of modality m.

The cells below repeat the runner's steps: count the observations, compute κ₁, resolve the spec per parameter.

from phoskintime.networkmodel.backend import detect_data_mode
from phoskintime.networkmodel.baselines import baseline_index
from phoskintime.networkmodel.cache import prepare_fast_loss_data
from phoskintime.networkmodel.priors import (load_spec, pseudo_observation_weight, resolve, resolve_noise_var,
                                 resolve_prior_path, with_ck_centre)

# Observation arrays on the solver grid (tutorial 06 looks at them); here only their counts N_m are needed.
solver_times = np.unique(np.concatenate([args.time_points_protein, args.time_points_rna, args.time_points_phospho]))
loss_data = prepare_fast_loss_data(idx, net.df_prot, net.df_rna, net.df_pho, solver_times)
n_obs = {"protein": int(loss_data["w_prot"].sum()), "mrna": int(loss_data["w_rna"].sum()),
         "phospho": int(loss_data["w_pho"].sum())}
lambdas = {"protein": args.lambda_protein, "mrna": args.lambda_rna, "phospho": args.lambda_phospho}

prior_path = resolve_prior_path(args.prior_file, args.resolved_config_path)
spec = with_ck_centre(load_spec(prior_path), args.ck_prior_centre)
noise = resolve_noise_var(spec)
kappa_1 = pseudo_observation_weight(noise["values"], n_obs, lambdas)
print("priors file:", prior_path.name, "| mode:", spec["global"]["mode"], "| noise_var:", noise["rule"], noise["values"])
print("N_m:", n_obs, "| λ_m:", lambdas, "| κ₁ =", kappa_1)
priors file: priors_lognormal.toml | mode: penalty | noise_var: design_delta {'protein': 0.010000000000000002, 'mrna': 0.010000000000000002, 'phospho': 0.010000000000000002}
N_m: {'protein': 56, 'mrna': 27, 'phospho': 56} | λ_m: {'protein': 1.0, 'mrna': 1.0, 'phospho': 1.0} | κ₁ = 0.00024250440917107587
prior = resolve(spec, names, P.to_physical_np(xl), P.to_physical_np(xu), fixed=fixed_mask,
                kinopt_beta=net.kin_beta_map, regularization_lambda=float(args.lambda_prior),
                pseudo_observation_weight=kappa_1, spec_path=prior_path,
                calibration={"noise_var_rule": noise["rule"], "noise_var": noise["values"], "kappa_1": kappa_1})
print("mode:", prior.mode, "| strength:", prior.strength, "| aggregation:", prior.aggregation)
print("c_k centres from the design middle (KinOpt β <= 0 or not used):", prior.fallback_entities() or "none")
rows = pd.DataFrame(prior.rows)
rows[["parameter", "family", "center", "width", "scale", "mass_inside_bounds", "source"]]
mode: penalty | strength: 0.00024250440917107587 | aggregation: sum
c_k centres from the design middle (KinOpt β <= 0 or not used): ['c_k[K1]']
parameter family center width scale mass_inside_bounds source
0 A_i[A] lognormal 0.011054 3.261532 log 0.954500 design bounds (N22; coupled A_i box): geometri...
1 A_i[B] lognormal 0.011054 3.261532 log 0.954500 design bounds (N22; coupled A_i box): geometri...
2 A_i[K1] lognormal 0.011054 3.261532 log 0.954500 design bounds (N22; coupled A_i box): geometri...
3 A_i[T1] lognormal 0.011054 3.261532 log 0.954500 design bounds (N22; coupled A_i box): geometri...
4 A_i[T2] lognormal 0.011054 3.261532 log 0.954500 design bounds (N22; coupled A_i box): geometri...
5 A_i[T3] lognormal 0.011054 3.261532 log 0.954500 design bounds (N22; coupled A_i box): geometri...
6 B_i[A] lognormal 0.007965 2.140216 log 0.954500 design bounds (N22): geometric middle, sd_log ...
7 B_i[B] lognormal 0.007965 2.140216 log 0.954500 design bounds (N22): geometric middle, sd_log ...
8 B_i[K1] lognormal 0.007965 2.140216 log 0.954500 design bounds (N22): geometric middle, sd_log ...
9 B_i[T1] lognormal 0.007965 2.140216 log 0.954500 design bounds (N22): geometric middle, sd_log ...
10 B_i[T2] lognormal 0.007965 2.140216 log 0.954500 design bounds (N22): geometric middle, sd_log ...
11 B_i[T3] lognormal 0.007965 2.140216 log 0.954500 design bounds (N22): geometric middle, sd_log ...
12 C_i[A] lognormal 0.046469 3.727764 log 0.954500 design bounds (N22; coupled C_i box): geometri...
13 C_i[B] lognormal 0.046469 3.727764 log 0.954500 design bounds (N22; coupled C_i box): geometri...
14 C_i[K1] lognormal 0.046469 3.727764 log 0.954500 design bounds (N22; coupled C_i box): geometri...
15 C_i[T1] lognormal 0.046469 3.727764 log 0.954500 design bounds (N22; coupled C_i box): geometri...
16 C_i[T2] lognormal 0.046469 3.727764 log 0.954500 design bounds (N22; coupled C_i box): geometri...
17 C_i[T3] lognormal 0.046469 3.727764 log 0.954500 design bounds (N22; coupled C_i box): geometri...
18 D_i[A] lognormal 0.031794 2.834407 log 0.954500 design bounds (N22): geometric middle, sd_log ...
19 D_i[B] lognormal 0.031794 2.834407 log 0.954500 design bounds (N22): geometric middle, sd_log ...
20 D_i[K1] lognormal 0.031794 2.834407 log 0.954500 design bounds (N22): geometric middle, sd_log ...
21 D_i[T1] lognormal 0.031794 2.834407 log 0.954500 design bounds (N22): geometric middle, sd_log ...
22 D_i[T2] lognormal 0.031794 2.834407 log 0.954500 design bounds (N22): geometric middle, sd_log ...
23 D_i[T3] lognormal 0.031794 2.834407 log 0.954500 design bounds (N22): geometric middle, sd_log ...
24 E_i[A] lognormal 0.031794 2.834407 log 0.954500 design bounds (N22): geometric middle, sd_log ...
25 E_i[B] lognormal 0.031794 2.834407 log 0.954500 design bounds (N22): geometric middle, sd_log ...
26 E_i[K1] lognormal 0.031794 2.834407 log 0.954500 design bounds (N22): geometric middle, sd_log ...
27 E_i[T1] lognormal 0.031794 2.834407 log NaN design bounds (N22): geometric middle, sd_log ...
28 E_i[T2] lognormal 0.031794 2.834407 log NaN design bounds (N22): geometric middle, sd_log ...
29 E_i[T3] lognormal 0.031794 2.834407 log NaN design bounds (N22): geometric middle, sd_log ...
30 c_k[K1] lognormal 0.023425 2.681685 log 0.954500 KinOpt β ≤ 0: not usable as centre; design-ran...
31 c_k[K2] lognormal 1.000000 2.681685 log 0.725463 KinOpt β = 1; KinOpt β per kinase (kinopt_resu...
32 tf_scale flat NaN NaN linear 1.000000 flat unless justified (DECISIONS_M2 1)
33 Dp_i[A_S_1] lognormal 0.031794 2.834407 log 0.954500 design bounds (N22): geometric middle, sd_log ...
34 Dp_i[A_S_2] lognormal 0.031794 2.834407 log 0.954500 design bounds (N22): geometric middle, sd_log ...
35 Dp_i[B_Y_4] lognormal 0.031794 2.834407 log 0.954500 design bounds (N22): geometric middle, sd_log ...
36 Dp_i[K1_T_3] lognormal 0.031794 2.834407 log 0.954500 design bounds (N22): geometric middle, sd_log ...

center is c in physical units, and width is s on the ln scale. c_k[K1] has β ≤ 0, so its prior falls back to the design middle. c_k[K2] is centred on its KinOpt β = 1, far from the design middle (about 0.023), so only about 73 % of its prior mass lies inside the box. The [group.c_k] entry of the file allows this with a waiver. Every other log-normal prior has 95.4 % of its mass inside (±2 sd).

A run writes this table as priors_resolved.csv, with its sha256 in metadata.json. Rebuilds of a finished run read that file and never the current priors file. The prior is a regulariser. It is weak by construction (one pseudo-observation per parameter), but a parameter the data do not constrain ends up close to its prior centre. That is why reported values are labelled from data-only profile likelihoods, and those labels are provisional (N30).

priors_likelihood.toml declares the prior in likelihood mode (nats), which is the mode that matches observation_model = "log_fc_gaussian" (tutorial 06).

Summary

  • θ = [A_i, B_i, C_i, D_i, E_i, c_k, tf_scale, Dp_i], here 22 numbers for 3 proteins, 2 kinases and 4 sites. α and β are not in θ.
  • The bounds come from the sampling design (rates) and from coupling rules (A_i, C_i, c_k, tf_scale). δ = 0.1 is an assumption.
  • θ is held in a softplus or log coordinate, the fit estimates ln θ, and bounds, starts and priors are stated in physical units.
  • The prior is log-normal around the design middle. KinOpt β is used only for c_k, and only when it is positive and ck_prior_centre = "kinopt_beta".

Next

06. Simulation, observables and the objective: the ODE solved at these start values, its fold-change observables, and the data and prior terms of the objective.