Skip to content

BUG: False positive sentiment for high-impact negative events (oil surge, war, recession) #1

@AION-Analytics

Description

@AION-Analytics

Problem

The unified model's sentiment head incorrectly classifies certain high-impact negative events as POSITIVE. Example:

Headline: "Global Market | Oil surge, inflation risks and war jitters set stage for volatile week"
Model output: sentiment=POSITIVE (87.6%), event=global_crude_surge, macro=-0.49
Expected: sentiment=NEGATIVE

Root Cause

  • The word "surge" is strongly associated with positive corporate outcomes (earnings beat, profit surge, stock rally) in the training data
  • global_crude_surge had only 9 training examples — grossly underrepresented
  • The event head and macro head correctly identify the event as negative, but the sentiment head fires on the word "surge" alone
  • 93% of training data is neutral, making the sentiment head prone to default to neutral when uncertain

Temporary Fix

Apply this override at inference time in your crawler/application:

NEGATIVE_EVENTS = {
    "global_crude_surge",
    "global_war_escalation",
    "macro_cpi_spike",
    "global_recession_fear",
    "sector_oil_inventory_build",
    "global_sanctions",
    "macro_inr_depreciation",
    "macro_rbi_repo_hike",
    "global_shipping_disruption",
    "global_vix_spike",
    "macro_gdp_downside"
}

if (macro_signal < -0.2) and (event_id in NEGATIVE_EVENTS):
    sentiment = "negative"
    sentiment_confidence = max(0.7, sentiment_confidence)

This override is:

  • Deterministic — no model retraining needed
  • Explainable — uses the model's own correct macro signal and event classification
  • Safe — only triggers when both macro is clearly negative AND event is known-negative

Permanent Fix

We are retraining with:

  1. Balanced sentiment dataset (~30K rows: 10K each negative/neutral/positive)
  2. 2,000+ synthetic examples per underrepresented negative event
  3. Full-data training (no batching) for 10 epochs

This will be released as v2.0.

Workaround for Users

Until v2.0 is released, apply the inference-time override above in your own code. The model card on HuggingFace has been updated with these instructions.

Affected Files

  • models/aion_sentiment_unified_v1/README.md — Updated with override instructions
  • src/zerodha/crawlers/gift_nifty_gap.py — Override applied in production crawler

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions