Skip to content

release(uncertainty): publish coordinate-bound diagonal Laplace quantities #662

Open

Description

@seonghobae

Finding

Draft #639 currently records only posterior_approximation = diagonal_laplace in tepp.trsl_topic_lineage.v2. The numerical owner already retains ReferenceTopicModel::document_coordinate_variances, but the digest-bound release artifact discards those quantities. A downstream scientific consumer can therefore learn which approximation family was used without reconstructing or checking any actual uncertainty quantity.

That is insufficient for #638: a label is a claim boundary, not posterior evidence. At the same time, copying the variance matrix into the artifact without document/ALR coordinates would be equally unsafe because rows/columns could be rebound or reordered without an interpretable owner coordinate.

Required contract / RED

On the Analysis/topic-lineage owner path, define the smallest versioned uncertainty projection that binds each retained diagonal-Laplace quantity to its exact model coordinates. The source RED must prove at least:

  • every modeled document has exactly one uncertainty row;
  • each row is bound to the canonical opaque document UUID and exactly topic_count - 1 ALR coordinates;
  • coordinate j is explicitly defined as numerator topic index j against the reference topic index topic_count - 1, or an equivalently explicit owner-defined basis;
  • rows have one canonical order independent of caller input order;
  • every variance is finite and strictly positive; malformed, negative, zero, non-finite, wrong-length, duplicate-document, reordered/noncanonical, or detached-coordinate payloads fail closed;
  • artifact serialization/digest covers the uncertainty projection so changing a variance or its coordinate changes result identity;
  • no independent plausible-value semantics, joint covariance, interval coverage, or stronger posterior claim is inferred from diagonal quantities.

A positive fixture must use quantities emitted by an actual converged reference fit, not arbitrary caller-authored values. A mismatch fixture must show that uncertainty rows from fit B cannot be rebound to otherwise-matching artifact A.

Minimal owner direction

Keep numerical curvature/variance arithmetic in topic_measurement. Analysis may add only the read-only coordinate access needed to project the already-computed fit output and must not recalculate Laplace curvature. Prefer a dedicated uncertainty row/value object inside the unreleased v2 artifact over parallel detached arrays.

Canonical ordering must be owner-defined before hashing; do not silently normalize an already serialized consumer payload. Keep JointGaussNewtonLaplace and plausible-value generation out of this slice unless their full coordinate precision and recovery evidence are actually retained.

Dependency boundary

This issue does not replace #658 Evidence provenance or #605 Membership reconstruction. If the final released uncertainty coordinate needs provenance/membership identities from those owners, keep the dependent projection Draft and bind them only after normal protected-main landing; do not copy mutable owner source.

Acceptance

Refs #638 #639 #658 #605 ADR 0012.

Activity

  1. seonghobae commented on Sep 22, 2026

    @seonghobae
    ContributorAuthor

    Source RED is now on #639 ordinary-forward history. Initial commit fb8e817e009ae3bbd1aae68acc831d517736f0b5 exposed the missing public field at compile time; follow-up fd6e2f475c2b07dec2674eb91bd69e2fd33616fb removes that confound and leaves a runtime-causal RED: an otherwise-valid v2 artifact carrying diagonal_laplace_uncertainty is rejected solely because the current owner schema does not admit coordinate-bound quantities.

    The same contract file already fixes the intended fail-closed surface for empty/missing rows, duplicate documents, noncanonical document order, detached document UUIDs, wrong ALR numerator/reference coordinate, zero/negative variance, and digest sensitivity. Those negative cases are not claimed as predecessor REDs by themselves because the unknown-field rejection currently masks them; the positive case is the causal RED.

    Minimal production direction remains unchanged: expose only read-only modeled document identities from ReferenceTopicInput, zip those owner identities with ReferenceTopicModel::document_coordinate_variances, canonical-sort by UUID before serialization, validate exactly evidence_count rows and topic_count - 1 coordinates per row, and bind each coordinate to numerator j / reference topic_count - 1. Do not call build_joint_coordinate_precision merely to recover document IDs; that would recompute stronger curvature in the Analysis projection and violate this issue's owner boundary. A GREEN claim still requires a converged-fit producer fixture and a terminal-result digest mismatch fixture for fit-A/artifact-B uncertainty rebinding.

  2. seonghobae commented on Sep 22, 2026

    @seonghobae
    ContributorAuthor

    #662 implementation is now ordinary-forward on #639.

    Exact lineage in this slice:

    • runtime-causal source RED: fd6e2f475c2b07dec2674eb91bd69e2fd33616fb
    • owner-safe modeled-document coordinate accessor: e0a295cc14bf2c8cdcca7d561b7eb6f398990d65
    • production projection/validation: 159d5c5472c6e1f6b56886a5ff3989678d9d77e2
    • existing v2 fixture repairs retain the new required quantity field without making it optional
    • focused GREEN contract strengthening: a3dd7727f9dcc74c2184737b356a97081d375155
    • actual converged-fit projection plus fit-A/fit-B terminal-digest mismatch fixture: 388037ffceb6c08af39228d2e67b1078855ab34c
    • CHANGELOG: ada916717265d9d486d67e0d6f4c845c4ade1caf
    • release-contract doctoring/current head: ce919d0c1c4c25b4fa9e30b1ddc43dfed6244e94

    The implementation projects ReferenceTopicModel::document_coordinate_variances directly; Analysis does not recompute curvature or call the joint-precision path. Each row is bound to a canonical modeled document UUID and exactly K-1 ALR coordinates with numerator j and reference topic K-1, sorted canonically. Missing/duplicate/reordered rows, wrong basis, non-finite/non-positive variance, and edge-detached document support fail closed. The projection is inside canonical artifact bytes before SHA-256, so replacing fit-A uncertainty with fit-B uncertainty cannot preserve fit-A terminal-result identity.

    Boundary remains explicit: this is diagonal-Laplace marginal curvature only. It does not create joint covariance, independent plausible-value, interval coverage/calibration, or source-snapshot provenance authority. #658/Evidence remains the owner path for immutable source-population provenance.

    Current exact-head hosted checks are non-terminal, so I am not claiming hosted GREEN yet. #662 should stay open until the exact head completes the required test/security/documentation generation and any failure is RCA'd rather than bypassed.

  3. seonghobae commented on Sep 22, 2026

    @seonghobae
    ContributorAuthor

    Current source implementation is now complete ordinary-forward through ce919d0c1c4c25b4fa9e30b1ddc43dfed6244e94; #639 body has been currentized from the stale RED head. Fresh compare against protected main@a243f18da4a4ca8a8d068c39922537f1f8ed6ad0 is ahead 97 / behind 0 with protected main as merge base. Exact-head Rust Foundation 35680791247, Security 35680791181, Semgrep 35680791231, CodeQL PR 35680791209, and Documentation 35680791290 remain non-terminal, and there is still no submitted review or inline review thread, so this issue remains open and no hosted GREEN/merge/release claim is made.

    Post-#662 review identified the next separate release-coordinate gap as #663: the newly retained ALR uncertainty quantities are bound to document UUID + integer ALR positions, but those positions are not yet bound to the fitted topic basis itself. #663 is not folded into this issue; the #662 diagonal-Laplace projection remains the correct owner-safe quantity boundary.

  4. seonghobae commented on Sep 22, 2026

    @seonghobae
    ContributorAuthor

    #669 found a source-level arithmetic inconsistency underneath this already-published Draft projection. The retained document_coordinate_variances were using degree * relation_strength, while the owner joint-GGN path uses softmax-Jacobian J'J relation curvature. #639 now carries real-fit RED 16e1a637... → shared-curvature repair 0620a9bb... → formatting 14fba5c4... → CHANGELOG ba63e287....

    This strengthens #662 rather than expanding its claim: the projected variance is now intended to be the reciprocal of the same fit's exact owner GGN precision diagonal. It is still not a marginal variance from the inverse joint precision, plausible values, or calibrated interval evidence. Keep #662/release acceptance open through exact-head GREEN, calibration/recovery, backend parity, provenance/topic-basis binding, and immutable release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions