bayesmith.diagnose.structure
Source-derived signatures and contracts. See the reference index for coverage and conventions.
Module contract
Conservative primal certificates for conditional Gaussian flatness. This is a compile-time check, never part of a sampled update. It certifies an affine mean and a block-independent covariance in model coordinates, holding the complement at the supplied values. Fisher rank is assessed separately. Neither user annotations nor vanishing automatic derivatives are proofs. The supported algebra is interpreted over real arithmetic; the preflight report retains its numerical rank, roundoff and contradictory-probe checks. Unknown operations, control flow and custom derivative rules are refused.
derivative_semantics_evidence
Defined in bayesmith.diagnose.structure, line 267.
derivative_semantics_evidence(function, *arguments)Check primal derivative semantics without certifying any distribution. Numerical non-Gaussian information can use this same conservative walk. Known nonlinear primitives remain eligible for ordinary automatic differentiation; custom/unknown operations and control flow do not.
conditional_affinity_certificate
Defined in bayesmith.diagnose.structure, line 292.
conditional_affinity_certificate(graph, names, values)Certify affine predictions with *symbolic* complementary latents. Unlike ``gaussian_flatness_certificate``, every latent is an abstract Jaxpr input. Degree zero means independent of this block, NOT frozen at an initial value. Thus an outside zero, branch or nonlinear coefficient cannot specialize the program used to justify a persistent partition. This is a sufficient real-arithmetic proof for the traced shapes/static configuration, wherever the pure program defines valid distributions. It neither proves domain validity nor finite-precision accuracy. Failure to certify is unknown, not proof of nonlinearity. Priors are assessed separately and do not change the prediction's structural verdict.
gaussian_flatness_certificate
Defined in bayesmith.diagnose.structure, line 384.
gaussian_flatness_certificate(graph, names, values)Return serializable structural evidence, with full rank left to the caller. A positive result concerns every block value for which this traced, pure program defines a valid Gaussian likelihood, conditional on the supplied complement. It says nothing about a prior, posterior propriety or marginal information. Unsupported programs return explicit negative evidence.