Basics · Raw Logits, Temperature Calibration & Register Comparison · 110.72 MB WASM q8 · CC-BY-NC-SA-4.0

Inside FinBERT: Logits, Softmax Calibration & Headline vs SEC Prose

Look past argmax labels on ProsusAI/finbert (CC-BY-NC-SA-4.0): inspect unnormalized raw logits (0: positive, 1: negative, 2: neutral), sweep softmax temperature (T = 0.50–2.50) without re-running ONNX inference, and measure register drift between terse Financial PhraseBank headlines and verbose SEC / earnings-call prose.

Educational NLP & Non-Commercial License Notice: ProsusAI/finbert is licensed under CC-BY-NC-SA-4.0. Temperature scaling and register-drift diagnostics are for model interpretability only — NOT financial or investment advice.

1. Raw Logit Extraction, Softmax Temperature & Lexicon Drift

Logit Margin (z₁ − z₂)–
Raw Logits (P/Ng/Nu)–
Raw Entropy (T=1)–
Scaled Entropy (T)–
Lexicon Drift–
NaN Score Check–

Raw Model Softmax (T = 1.00)

Initialize the model above to inspect raw FinBERT logits.

Temperature-Scaled Calibration (T = 1.00)

Drag the temperature slider after inspection to recalibrate probabilities live.

2. Financial PhraseBank Headline vs SEC / Earnings-Call Prose

Same underlying financial event written as a concise newswire headline versus formal 10-Q/earnings prose. Run all 3 register pairs live to measure how verbosity and hedging compress FinBERT’s logit margin.

Live comparison between Financial PhraseBank headlines and formal SEC or earnings-call prose
Scenario PhraseBank Headline Headline Verdict / Margin SEC / Earnings Prose Prose Verdict / Margin Register Drift Δ
Click "Score All 3 Register Pairs Live" once the model is ready.

3. Inspect Temperature Scaling & Lexicon Drift Math

Show the code · finbert-core.mjs — softmaxLogits() (temperature calibration)
Show the code · finbert-core.mjs — computeFinancialLexiconDrift()