Skip to content

release(topic): bind topic-index coordinates to the fitted topic basis #663

Open

Description

@seonghobae

Finding

Draft #639 now retains coordinate-bound diagonal-Laplace variances, but the released tepp.trsl_topic_lineage.v2 coordinates are still identified only by artifact-local integer topic indexes. ReferenceTopicModel retains the fitted topic_term_probabilities and document_topic_proportions, while TopicLineageArtifact projects neither a fitted topic-basis identity nor a reconstructable topic basis. As a result, sequence_edges[*].topic_index and diagonal_laplace_uncertainty[*].coordinates[*].{numerator_topic_index,reference_topic_index} are not bound to the fitted topic content that gives those coordinates scientific meaning.

This leaves two distinct release risks:

  • two fits with different topic-term bases can in principle project the same currently retained counts/edges/variances/configuration coordinates and therefore lack an explicit mismatch signal for the omitted topic basis; and
  • topic-model label permutation means a bare integer index is not a stable scientific identity across equivalent fitted-topic orderings.

This is not a request to infer semantic labels with an LLM. It is a deterministic fit-coordinate/release-identity problem.

Required RED / contract

Before changing the unreleased v2 projection, prove at least:

  1. two otherwise compatible fitted results whose topic-term basis differs cannot produce the same released topic coordinate identity;
  2. every sequence-edge topic coordinate and every ALR numerator/reference coordinate is bound to an owner-derived topic identity, not a caller-authored label or detached integer alone;
  3. a topic-basis mismatch fails closed before a result is promoted/consumed;
  4. the contract remains deterministic under ordinary input ordering that does not change the admitted fitted topic basis;
  5. no semantic-topic naming, LLM interpretation, or stronger posterior claim is introduced.

The RED should exercise an actual fitted/reference-model projection where practical. Synthetic hand-authored rows may cover serialization edge cases but are not sufficient scientific acceptance by themselves.

Minimal owner direction

Prefer a content-bound opaque topic coordinate derived from the numerical owner output (for example a versioned digest over the exact fitted topic-term probability row and its admitted vocabulary coordinate), then project that identity alongside the current local index. Do not reorder topics post hoc merely to canonicalize labels: the current diagonal ALR variances are expressed relative to a fitted reference-topic basis, and arbitrary topic permutation would require a mathematically correct covariance/basis transformation that the standalone diagonal result does not retain.

If the topic identity requires vocabulary/source coordinates not yet immutably bound, keep this lane dependent on #658 Evidence/source provenance rather than hashing an unbound caller vocabulary and calling it authoritative. A digest alone is identity binding, not semantic reconstruction.

Scientific basis

The scientific concern is twofold. Finite mixture-family likelihoods are symmetric to component-label permutations unless an identification/alignment rule is supplied, so a local component number alone is not a durable scientific identity (Stephens, 2000). Separately, log-ratio coordinates on the simplex have meaning relative to a chosen coordinate/reference basis; changing that basis is a transformation of the represented coordinates rather than a string relabeling operation (Aitchison, 1982; Egozcue et al., 2003). These sources support the fail-closed basis-binding requirement; they do not define TEPP's wire format or authorize semantic topic labels.

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
  • Stephens, M. (2000). Dealing with label switching in mixture models. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 62(4), 795–809. https://doi.org/10.1111/1467-9868.00265

Boundary

topic_measurement owns numerical fitted quantities. Analysis owns the digest-bound consumer projection. #662's diagonal-Laplace quantity work remains valid and must not be rewritten as joint covariance. #658 remains the source-population/vocabulary provenance path, and #605 remains the Membership reconstruction path.

Keep #639 Draft. No source copy, mutable dependency, caller-authored topic labels, LLM topic naming, force push, destructive rebase, or gate weakening.

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

Activity

  1. seonghobae commented on Sep 22, 2026

    @seonghobae
    ContributorAuthor

    Fresh owner-lane progress on #639 adds the numerical-owner prerequisite without claiming #663 release completion.

    Ordinary-forward lineage on fix/analysis-result-validation-status-638:

    • contract-first compile RED d42a37352ea704f3f6ce75fd8984da36fb3286c2: adds an actual-reference-fit fixture that requires a fit-owned basis identity API. This is an API-absence RED, not yet the required release-artifact mismatch RED.
    • owner implementation 6ce7874d2d8de86e7e92245b9f742b8e7fc1d22e: adds FittedTopicBasisIdentity / FittedTopicCoordinateIdentity in topic_measurement.
    • public export d8ee71c6a9e1187f8a59a7ebda71b80e11a8524d.
    • warning/deprecation-safe cleanup 2d61914fafc9f855359c7b8811182548699d3d93.
    • boundary CHANGELOG/current head 7997dc478cb24e8e3423847e5e791b6b0862120d.

    The implementation hashes exact finite-positive fitted topic-term f64 bits with SHA-256. Per-topic identities exclude the local index, so the content identity follows a fitted row under label permutation; the enclosing basis digest includes ordered local indexes, so ALR/lineage basis order remains explicit. Duplicate topic rows fail closed because content-derived coordinates would otherwise be ambiguous. The positive fixture uses the real CPU reference fit rather than only hand-authored rows; malformed width, NaN, and duplicate-row states are negative fixtures.

    Boundary remains strict: this identity is fit-local numerical evidence only. It does not authenticate the Evidence snapshot or the lexical vocabulary column coordinate, and tepp.trsl_topic_lineage.v2 does not project it yet. Therefore #663 is still open and still depends on #658/#527 before the required release-level A/B basis mismatch RED and artifact binding can be completed. No caller-authored labels, LLM topic naming, post-hoc reordering, source copy, or detached vocabulary digest was introduced.

  2. seonghobae commented on Sep 22, 2026

    @seonghobae
    ContributorAuthor

    Adjacent owner finding #664 is now source-progressed on the same ordinary-forward #639 lane. topic_measurement has a fit-local FittedDocumentCoordinateSummary at current head c582997602daa1f9e05f6c8a3be248f50c8e9c82: it pairs the fitted ALR location with the existing diagonal variance for each admitted document/coordinate. This does not close #663 or change its owner boundary. #663 still owns topic-coordinate identity/basis binding; #664 owns location+variance pairing. Neither becomes release authority until #658/#527 source/vocabulary provenance is available and Analysis adds release-level mismatch/projection evidence. No post-hoc topic sorting or detached vocabulary digest was introduced.

  3. seonghobae commented on Sep 22, 2026

    @seonghobae
    ContributorAuthor

    Numerical-owner prerequisite tightened after #665: #666 found that FittedTopicBasisIdentity::from_model(model, vocabulary_size) was still public, so a detached/hand-mutated ReferenceTopicModel plus caller width could mint fit-local basis identity. Source-level repair is now ordinary-forward: compile/API RED 0cee03261b6672bab84cf7cf5014ca308b98aa30 → FittedTopicBasisIdentity::from_bound_fit(&ReferenceTopicFit) public authority and crate-private detached validator 62d80186c2b5da404171ba64ac504d6a3b95a63d → external contract uses only bound fit 5984ac0959886558ee6b2966cda2d87b3dd664ee → CHANGELOG 40004fe38d39996cc404d3177bce40829498b6b7.

    #663 itself remains open. This strengthens fit-local ownership only; it still does not authenticate the Evidence-owned vocabulary/source coordinate. Release-level basis identity and A/B mismatch projection should still wait for #658/#527 rather than treating the fit-local digest as source-proven authority. Hosted exact-head runs are queued; no GREEN or release claim.

  4. seonghobae commented on Sep 22, 2026

    @seonghobae
    ContributorAuthor

    Follow-up owner prerequisite #667 is now source-complete on the same lane: RED f362857c62d303e9f8b49d18c2193a7e57496d53 → repair ef3ead546f8daa0914488a9a1d93fd94d9178fe2 → CHANGELOG a8bc63ad6fc8ef5c1da2c5a2e4dbb9f924268e7a. FittedDocumentCoordinateSummary retains one FittedTopicBasisIdentity, so its ALR numerator/reference indexes resolve through the exact fit-local basis instead of discarding that basis after validation.

    This still does not satisfy #663 release authority: the fit-local basis does not authenticate Evidence-owned vocabulary/source coordinates. Keep #663 open and wait for #658/#527 before adding source-proven basis identity to tepp.trsl_topic_lineage.v2.

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