Repository navigation
release(uncertainty): bind diagonal-Laplace variance to its fitted ALR location #664
Description
Finding
Draft #639 now publishes per-document diagonal-Laplace variances with explicit ALR numerator/reference indexes (#662), but the release contract still omits the fitted ALR location that those variances approximate. topic_measurement::ReferenceTopicModel retains both document_topic_proportions and document_coordinate_variances; ReferenceTopicInput::build_joint_coordinate_precision already derives document-major ALR coordinate means from the fitted topic proportions. tepp.trsl_topic_lineage.v2 currently projects the variances only.
A variance without its fitted coordinate location is not a reconstructable posterior/Laplace coordinate. Two fits can share the same positive diagonal variance while having materially different document topic proportions and therefore different ALR locations. The current artifact cannot distinguish those states from the uncertainty payload alone, cannot reconstruct the local Gaussian approximation it names, and gives a downstream consumer no owner-issued location to pair with the released variance.
This is narrower than #663: #663 binds topic indexes to the fitted topic-term basis. This issue binds each document/ALR uncertainty quantity to the fitted location in that basis. It is also narrower than #658: source/vocabulary provenance remains Evidence-owned and must still be bound separately.
Required RED / contract
Before changing the unreleased v2 wire, prove at least:
- an actual converged CPU reference fit yields one owner-issued document-coordinate row per admitted modeled document and exactly
K-1ALR coordinates per row; - every coordinate carries the fitted ALR location and the existing diagonal-Laplace variance under the same numerator/reference topic coordinate;
- two otherwise compatible fitted states with equal variance but different topic proportions cannot share the same coordinate posterior state;
- malformed document count, topic width, non-finite ALR location, missing/reordered coordinate, or non-positive/non-finite variance fails closed;
- the projection does not manufacture joint covariance, independent plausible values, interval coverage, calibration, or source provenance.
Use an actual fitted/reference-model fixture for the positive path. Hand-authored model states may be used only for malformed-edge coverage.
Minimal owner direction
topic_measurement should first expose a read-only fit-owned document-coordinate posterior summary derived from the admitted ReferenceTopicInput plus converged ReferenceTopicModel: canonical document identity, ALR numerator/reference indexes, fitted ALR location, and the already-retained diagonal variance. Analysis should later project that owner output rather than recomputing ALR coordinates or curvature itself.
The summary is fit-local numerical evidence, not immutable Evidence provenance or semantic topic identity. #658/#527 must still bind source/vocabulary authority, and #663 must still bind topic coordinates to the fitted topic basis before external release authority is complete.
Scientific basis
A Laplace approximation is centered at an estimated posterior location/mode and uses local curvature to approximate uncertainty; retaining curvature/variance while dropping the location does not retain the approximation being claimed. Tierney and Kadane (1986) treat posterior location/moments and local Laplace curvature together, while Aitchison (1982) and Egozcue et al. (2003) establish that log-ratio coordinates are basis/reference dependent.
APA 7th:
- Aitchison, J. (1982). The statistical analysis of compositional data. Journal of the Royal Statistical Society: Series B (Methodological), 44(2), 139–160. https://doi.org/10.1111/j.2517-6161.1982.tb01195.x
- Egozcue, J. J., Pawlowsky-Glahn, V., Mateu-Figueras, G., & Barceló-Vidal, C. (2003). Isometric logratio transformations for compositional data analysis. Mathematical Geology, 35(3), 279–300. https://doi.org/10.1023/A:1023818214614
- Tierney, L., & Kadane, J. B. (1986). Accurate approximations for posterior moments and marginal densities. Journal of the American Statistical Association, 81(393), 82–86. https://doi.org/10.1080/01621459.1986.10478240
Boundary
topic_measurement owns the fitted numerical location/variance pair. Analysis owns the digest-bound consumer projection. No LLM inference, semantic topic naming, posterior sampling, tolerance-based repair, or source/vocabulary provenance substitution is authorized.
Activity
test(topic): require fit-owned ALR location with diagonal variance (#664
feat(topic): bind fitted ALR location to diagonal variance (#664)
feat(topic): export fit-owned document coordinates (#664)
test(topic): cover document-coordinate refusal branches (#664)
test(topic): exercise document-coordinate contract version (#664)
docs(changelog): record fit-owned ALR location boundary (#664)
fix(topic): validate fitted basis before coordinate projection (#664)
test(topic): cover malformed fitted basis in coordinate summary (#664)
seonghobae commentedon Sep 22, 2026
Source-level owner progress on #639 is ordinary-forward and deliberately stops before release projection.
Lineage:
2ece0643c7dcaac2cddcdda0652a710a57ee6426: the actual CPU-reference-fit contract requires a fit-owned document-coordinate summary that does not yet exist. This is a source-level compile RED; no hosted RED is claimed.f48981a8906458dbac1ac04ca447066a94f5de78: addstepp.fitted_document_coordinate_summary.v1, pairing each admitted document's fitted ALR location with the already-retained diagonal-Laplace variance under explicit numerator/reference topic indexes.259a28913bda8f0b52ede986bb65bf6cfd7908b3.e350d7804809a4c9d6b3abe9f362d0a7cd51062cand contract-version coverage4ca872859b37e05401d0f15745cfa6d89bc8038f.c819e1bc6d36ada143d6936151cdc85b6b473ecd.ad4fcd46731937f92447070584fe01320b031054, with the corresponding malformed-basis contract at current headc582997602daa1f9e05f6c8a3be248f50c8e9c82.The positive fixture uses an actual converged CPU reference fit. It verifies exact-bit equality between the summary location and
additive_log_ratio(document_topic_proportions), and between the summary variance and the fit-owneddocument_coordinate_variances. A controlled equal-variance/different-topic-proportion case proves that a changed fitted location cannot disappear behind the same diagonal variance.Boundary remains strict:
tepp.trsl_topic_lineage.v2is unchanged and does not yet project the location. #664 therefore remains open. Release projection should wait until #663 topic-basis binding and #658/#527 source/vocabulary provenance can be bound without detached caller authority. The new summary is not joint covariance, posterior sampling, interval coverage/calibration, semantic topic identity, or Evidence provenance.Current-head workflows were just created and are still non-terminal; no hosted GREEN, Ready transition, or merge is claimed.
seonghobae commentedon Sep 22, 2026
#667 ordinary-forwards the #664 numerical-owner prerequisite without changing the release wire: RED
f362857c62d303e9f8b49d18c2193a7e57496d53→ef3ead546f8daa0914488a9a1d93fd94d9178fe2now retains the same fit'sFittedTopicBasisIdentityinsideFittedDocumentCoordinateSummary→ CHANGELOGa8bc63ad6fc8ef5c1da2c5a2e4dbb9f924268e7a. ALR location + diagonal variance are therefore not only fit/input-bound (#665) but also explicitly basis-bound at the fit-local summary boundary. Release projection still waits on #663 and #658/#527; no stronger posterior/provenance claim.seonghobae commentedon Sep 22, 2026
#669 repairs the numerical curvature under this fitted-location/variance owner view. Before the repair,
FittedDocumentCoordinateSummarycorrectly paired location and variance from one bound fit, but the variance itself used adegree * relation_strengthshortcut inconsistent with the owner joint-GGN relation Jacobian blocks. Canonical #639 now carries real-fit RED16e1a637...→ shared-curvature repair0620a9bb...→ formatting14fba5c4...→ CHANGELOGba63e287....#664's location/basis binding remains valid. The repaired variance is a reciprocal precision-diagonal approximation only; this does not introduce joint covariance, posterior sampling, calibration, or Evidence/source authority. Release-level #664 remains dependent on #658/#663 and current-head scientific gates.