Global analysis#

A locally identifiable model can still have several parameter values with the same output, such as two rate constants that enter only through their sum and product. The global analysis counts these values at a generic point, the fiber, and returns the maps between them, the discrete symmetries. Global analysis states the mathematics.

Calling the global analysis#

detect(model, mode="global") runs the local analysis, reduces the directions it finds (Reduction) and then analyzes the reduced model globally; res.discrete() does the second step on a result of a local detection. global_options passes the arguments of discrete(): order, the highest Taylor coefficient of the observables, points, the number of random points of the count in the domain, memory, the address space of one call of msolve, experiments, the count of several experiments, and the work limits msolve_entries (nonzero entries of the F4 matrices of one msolve call, 4e8), msolve_terms (terms of one system given to msolve, 1e5), search_entries (entries of the matrices over \(\mathbb{F}_p\) the exact search reduces, 5e8) and elimination_terms (terms of a polynomial of the elimination, 3e6). There are no time limits: a stage that reaches a work limit ends with a result that names it. The analysis needs msolve (Installation).

Linear compartment models are the classical case of structural identifiability [1]. A two-compartment model with an input \(u\) into the first compartment, observed in the second:

import symident as si

m = si.Model({"x1": "-(k21 + k01)*x1 + k12*x2 + u", "x2": "k21*x1 - k12*x2"},
             {"y": "x2"}, known_inputs=["u"])
res = si.detect(m, mode="global")
print(res)
Result:  structurally locally identifiable (rank 5 / 5)

Global: values with the output of a generic one, counted at random points
  2 over the algebraic closure, 1 or 2 in the domain (order 5, stable)
  exactly 2 values at a generic point, proven
  sigma1 (exact): k01 -> k12, x1 -> (k01*x2 - k12*x2 + k21*x1)/k21, k12 ->
  k01; in the domain where (k01*x2 - k12*x2 + k21*x1)/k21 > 0
  fundamental domain: k01 < k12

The map exchanges the elimination rate \(k_{01}\) and the return rate \(k_{12}\) and moves the initial value of \(x_1\), so the model is locally but not globally identifiable. The count of two is proven: the fiber at a generic point is the orbit of the exact map. The image lies in the domain where the image of \(x_1(0)\) is positive, so a random point of the domain has one or two values in it. The fundamental domain keeps one point of each orbit; reduce() lists it in Reduction.discrete.

s, = res.discrete_symmetries
s["map"], s["level"], s["fixed_set"]
res.info["discrete"]["certificate"]["complete"]
({'k01': 'k12', 'x1': '(k01*x2 - k12*x2 + k21*x1)/k21', 'k12': 'k01'}, 'exact', ['k01 - k12'])
'exact'

The result#

res.discrete_symmetries lists the maps \(\sigma\), each a dict with

map, changes

the images of the coordinates that \(\sigma\) moves;

level

exact, proven by a map of the states (state_maps) over \(\mathbb{Q}\), or checked, the output coefficients agree at random points;

found_by

candidates (permutations of coordinates with the same dependence of the output) or fiber (reconstructed from the points of the fiber);

preserves_domain, domain_conditions

True, False, or None with the conditions under which \(\sigma(\theta)\) lies in the domain; a map that never meets the domain, such as \(\theta \mapsto -\theta\) where only \(\theta^2\) enters, is no symmetry of the model on the domain;

fixed_set

the factors on which \(\sigma\) fixes \(\theta\).

res.info["discrete"] holds the count:

count, count_bound

the points of the fiber over the algebraic closure at a random point modulo a prime, and the probability that a generic point has more (None where the count is exact or has no bound);

counts, count_domain

per random point of the domain the points over the complex numbers, over the reals and in the domain; the number in the domain can differ between regions. count_domain is the number at a generic point of the domain where the count is final and each map keeps the domain or leaves it entirely;

count_final

every point of the count is the image of a proven map;

fundamental_domain

inequalities that keep one point of each orbit;

certificate

what the count rests on, summed up in complete;

reduced, rewrites, relaxed, start_powers, experiments

the reduction the analysis ran on, and the rewrites into rational form;

eliminated

for a result detected with reduce_cq, the species solved through the conserved totals: the count is on the level sets of the totals, which are coordinates or set by the trafo;

limits

the work limits and premises that stopped or qualify part of the analysis.

The certificate#

complete takes one of five values:

"exact"

the fiber at a generic point is the orbit of the exact maps, proven over \(\mathbb{Q}\) without random points; certificate["exact"] lists the functions of the coordinates shown to be rational in the output coefficients.

"verified"

a count over \(\mathbb{Q}\) at a random integer point equals the orbit; count_bound is the probability that a generic point has more points, count_bits and bezout the numbers it rests on.

"axiom"

the count holds under the named axiom that the count modulo a prime at a random point is the count at a generic point, or under a premise in certificate["premise"]; count_bound_why says why no bound applies.

"no"

the count exceeds the orbit of the exact maps: there are further values whose maps are not proven.

"open"

no count or no orbit was reached.

Unsupported models and open results#

A model that the global analysis does not handle gets the reason in info["discrete"]["unsupported"] and a warning; the local result stays valid. Typical reasons:

  • a direction that the reduction does not remove, so the reduced model keeps a continuous symmetry;

  • unknown inputs together with events, switches or more than one condition;

  • switches together with events, under equilibrate or on the parameters alone, and root events;

  • under equilibrate, a resting state without one rational closed form in the coordinates, or resting balances of a Bezout number past 4 or with more than 8 states coupled;

  • a term the rewrites do not bring into rational form, such as a root of a state.

A result is open or axiom where the count over the algebraic closure or over \(\mathbb{Q}\) exceeds the work limits of msolve, where the maps are not rational functions of the coordinates, or where the search of the exact count does not reach every coordinate. limits names the step. The counts in the domain hold at the sample points only, since the number of points in the domain changes across the hypersurfaces where two points meet or a point leaves the domain. res.solution_count() gives the count over the algebraic closure at one random point, without the maps.