Skip to content

fix(virality): classify alert levels on percentile ranks of both indicators#77

Merged
Naroh091 merged 3 commits into
mainfrom
feat/percentile-alert-levels
Jul 14, 2026
Merged

fix(virality): classify alert levels on percentile ranks of both indicators#77
Naroh091 merged 3 commits into
mainfrom
feat/percentile-alert-levels

Conversation

@PabloPerezBenavente

Copy link
Copy Markdown
Contributor

The alert levels compared composite_virality and acceleration_rate against absolute cuts, as if the two ran 0..1 on comparable footing. They do not.

composite_virality is a blend of PERCENT_RANKs: bounded and bell-shaped. In production it reaches only 0.904, with a 99th percentile of 0.805 — so the composite > 0.85 cut selected the top 0.14% of scored narratives, not the "top ~15%" its comment claimed. acceleration_rate is a raw ratio capped at 5.0, with a median of 0; acceleration > 1.2 selected the top 0.064%, and 13 of the 14 narratives that reached it had change_views pinned at exactly the cap. Of 21,913 narratives, three were classified — all via the plateau fallback.

Both indicators are now ranked by PERCENT_RANK within the run's cohort, so each threshold means a knowable fraction of that cohort, and a saturating raw value cannot buy a top rank when the whole tail saturates together.

The levels become a partition of the percentile plane:

VIRAL        composite >= 0.95                          (any acceleration)
EARLY_SURGE  composite <= 0.50  and acceleration >= 0.95
ALERT        0.50 < composite < 0.95 and acceleration >= 0.95
WATCH        0.70 <= composite < 0.95 and 0.70 <= acceleration < 0.95
NONE         otherwise

Every pair of regions differs on at least one axis, so the branches are disjoint as written and their order cannot decide the answer — a test asserts this over the whole grid rather than trusting the chain. VIRAL now reads the composite axis alone: a narrative that large is viral whether or not it is still climbing, which is what the old "plateaued-but-popular" branch was reaching for when it emitted WATCH for exactly that condition, badging the corpus's biggest narratives with its weakest label.

A narrative is classified only when it has both indicators. A missing composite used to be read as 0.0, which satisfies composite < 0.65 and made an unscored narrative eligible for EARLY_SURGE on acceleration alone — absence of data masquerading as a signal, for the 90% of narratives that have no composite. Narratives that cannot be scored now have their alert_level cleared rather than keeping a stale badge.

This changes only how the indicators are compared, not how they are computed.

PabloPerezBenavente and others added 3 commits July 9, 2026 17:15
…cators

The alert levels compared composite_virality and acceleration_rate against
absolute cuts, as if the two ran 0..1 on comparable footing. They do not.

composite_virality is a blend of PERCENT_RANKs: bounded and bell-shaped. In
production it reaches only 0.904, with a 99th percentile of 0.805 — so the
`composite > 0.85` cut selected the top 0.14% of scored narratives, not the
"top ~15%" its comment claimed. acceleration_rate is a raw ratio capped at 5.0,
with a median of 0; `acceleration > 1.2` selected the top 0.064%, and 13 of the
14 narratives that reached it had change_views pinned at exactly the cap. Of
21,913 narratives, three were classified — all via the plateau fallback.

Both indicators are now ranked by PERCENT_RANK within the run's cohort, so each
threshold means a knowable fraction of that cohort, and a saturating raw value
cannot buy a top rank when the whole tail saturates together.

The levels become a partition of the percentile plane:

    VIRAL        composite >= 0.95                          (any acceleration)
    EARLY_SURGE  composite <= 0.50  and acceleration >= 0.95
    ALERT        0.50 < composite < 0.95 and acceleration >= 0.95
    WATCH        0.70 <= composite < 0.95 and 0.70 <= acceleration < 0.95
    NONE         otherwise

Every pair of regions differs on at least one axis, so the branches are disjoint
as written and their order cannot decide the answer — a test asserts this over
the whole grid rather than trusting the chain. VIRAL now reads the composite axis
alone: a narrative that large is viral whether or not it is still climbing, which
is what the old "plateaued-but-popular" branch was reaching for when it emitted
WATCH for exactly that condition, badging the corpus's biggest narratives with
its weakest label.

A narrative is classified only when it has both indicators. A missing composite
used to be read as 0.0, which satisfies `composite < 0.65` and made an unscored
narrative eligible for EARLY_SURGE on acceleration alone — absence of data
masquerading as a signal, for the 90% of narratives that have no composite.
Narratives that cannot be scored now have their alert_level cleared rather than
keeping a stale badge.

This changes only how the indicators are compared, not how they are computed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Naroh091 Naroh091 self-requested a review July 14, 2026 14:00
@Naroh091 Naroh091 merged commit 3aecb59 into main Jul 14, 2026
3 checks passed
@Naroh091 Naroh091 deleted the feat/percentile-alert-levels branch July 14, 2026 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants