CoolFace
Modelpublic

arunabhachanda/supplychain-finbert

sourceHugging Faceapache-2.0updated 6mo agoView on Hugging Face
0likes10downloads
Model Card

supplychain-finbert

Fine-tuned ProsusAI/finbert for supply chain geopolitical risk sentiment analysis.

Built for SupplyGuard AI — a production-grade supply chain risk intelligence platform.

Model Details

PropertyValue
Base modelProsusAI/finbert (BERT-base fine-tuned on Reuters/Bloomberg)
Task3-class sentiment: negative / neutral / positive
Fine-tuning strategyFrozen layers 0–9, trainable layers 10–11 + pooler + head
Training data~40,600 samples (FinGPT financial sentiment + Twitter Financial News + ~70 synthetic geopolitical headlines)
Class balancingUndersampling + weighted CrossEntropyLoss (neg=1.459, neu=1.060, pos=0.729)
Test accuracy0.6393
Best val accuracy0.6454

Performance

ClassPrecisionRecallF1
negative0.730.860.79
neutral0.520.750.62
positive0.740.450.56
overall0.670.640.63

Labels

IDLabelMeaning
0negativeRisk increasing — conflict, sanctions, disaster, supplier failure
1neutralRoutine updates, mixed signals, uncertainty
2positiveRisk decreasing — stability, trade agreements, recovery

Usage

python
from transformers import pipeline

classifier = pipeline(
    "text-classification",
    model="arunabhachanda/supplychain-finbert",
    return_all_scores=True,
)

result = classifier("Ceasefire in the region reopens key supply corridors")
# → [{'label': 'negative', 'score': 0.04},
#    {'label': 'neutral',  'score': 0.11},
#    {'label': 'positive', 'score': 0.85}]

# Polarity score used by SupplyGuard AI:
polarity = result[2]['score'] - result[0]['score']   # P(positive) - P(negative)
# → float in [-1.0, +1.0]  used as region_news_sentiment feature

Transfer Learning Architecture

ProsusAI/finbert (pre-trained on financial news corpus)
├── BERT Embeddings          [FROZEN]      ← vocabulary + positional encoding
├── Transformer Layer 0–9    [FROZEN]      ← general language + financial knowledge
├── Transformer Layer 10–11  [TRAINABLE]   ← adapted to supply-chain language
├── Pooler                   [TRAINABLE]   ← [CLS] token representation
└── Classifier Head (768→3)  [TRAINABLE]   ← new head for 3-class sentiment

Trainable parameters: 14,768,643 (13.5% of total) Frozen parameters: 94,715,904 (86.5% of total)

Training Details

  • Optimizer: AdamW (lr=2e-5, weight_decay=0.01)
  • Scheduler: Linear warmup (10% steps) + linear decay
  • Epochs: 4
  • Batch size: 16
  • Gradient clipping: max_norm=1.0
  • Class weights: neg=1.459, neu=1.060, pos=0.729 (weighted CrossEntropyLoss)
  • Split: 80% train / 10% val / 10% test (stratified)

Built By

Arunabha Kumar Chanda — M.Sc. Business Intelligence & Data Science, ISM Munich GitHub: arunabhachanda