Skip to content

ltm: three ranking surfaces are dominated by groups of size one (dominant_periods, link ranking, lone pins) #998

Closed

Description

@bpowers

Summary

One root cause in three places. LTM's relative measures are shares within a group, and every surface that ranks them globally is systematically dominated by groups of size one — where the share is ±1 by construction and carries no information.

Found while driving LTM through pysimlin on C-LEARN. #994 documented all three on the Python surface as hazards; none is fixed.

1. Analysis.dominant_periods / Run.dominant_periods — partition-blind

layout/metadata.rs::calculate_dominant_periods takes a flat &[FeedbackLoop] with no partition field and ranks by abs(importance) across the whole model. But that series is a loop's share of its own cycle partition, so cross-partition values are not comparable. A loop alone in its partition reads exactly 1.0 at every active step.

On C-LEARN this makes the surface worthless: it reports the isolated trace-gas decay loops (n2o -> n2o_uptake, hfc[hfc125] -> hfc_uptake[hfc125]) as the model's dominant loops for the entire 1850–2100 run, and never names a single climate loop. Those same twelve loops are ranked 141st–153rd of 153 by Analysis.loops in the same object, whose "competitive-first" ordering deliberately demotes them. The two surfaces contradict each other.

Verified: every singleton-partition loop has |score| identically 1.0 while active.

Not a tuning problem — a flat cross-partition ranking is not well-defined. The surface must either report per partition or say which partition it means. The call site (analysis.rs:427) already has both found_loops and partitions in scope; DominantPeriod would need a partition field, which reaches the FFI struct, pysimlin, TS and the MCP LoopDominanceSummary.

2. Link.average_relative_score() — per-target normalisation ranked globally

The relative link score is normalised per target into [-1, 1], which fixed raw scores' incomparability (#652) and inherited a new degeneracy: a link into a target with exactly one scored input reads ±1 regardless of whether the target matters. On C-LEARN, 143 of 949 scored links have a single-input target, and 58 of the global top 100 by this metric are such links. Restricting to multi-input targets helps but does not fix it — a two-input target whose second input is inert still reads 1.0.

A genuinely global ranking has to weight each target by that target's own importance, which the relative score deliberately divides out.

3. Lone pinned loops

A pinned loop occupies its own single-slot partition, so its relative score degenerates to ±1 (already documented). The documented workaround — read the raw loop_score series via get_series — is element 0 only on an arrayed loop, while the bare get_relative_loop_score and Loop.behavior_time_series report an argmax-abs aggregate across slots. Verified on test/arrayed_population_ltm/arrayed_population.stmx: for one loop the aggregate tracks Boston while the raw read tracks NYC, with nothing signalling the mismatch. Per-element raw loop scores are unreachable today.

Suggested direction

Make within-group normalisation structural rather than advisory: ranking APIs should either take the group as a parameter or return grouped results, so a cross-group comparison is not expressible. That closes all three rather than patching each.

Related

#670 is a different dominant_periods defect (flicker on data-driven models from instantaneous shares inheriting input noise) and is not this. #652 introduced the relative link score. #672 covers arrayed pins' aggregate confusing share-based analysis.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions