A bert-base-cased token classifier for PER / ORG / LOC entities, fine-tuned on the FIN corpus of SEC filings. It is the encoder baseline from the paper:
Reliable Financial Named Entity Recognition under Domain Shift: Confidence Estimation and Selective Prediction (MCAIT 2026) — Zihao Zheng, Baichuan Li, Junyi Yao, Jiayu Long. arXiv:2608.19558
The paper studies which predictions stay safe to automate when a financial extractor trained on filings is deployed on financial news and social media. This model is released so the encoder results can be reproduced and so others can test confidence signals on it. It is a research baseline, not a production NER system.
from transformers import pipeline
ner = pipeline(
"token-classification",
model="youkijiudai/financial-ner-bert-base-cased",
aggregation_strategy="first", # training labeled only the first sub-word of each word
)
ner("Evergreen Solar Inc. signed a loan agreement with Silicium de Provence SAS in Paris.")
The repository root holds seed 42. The other two seeds from the paper are in sub-folders:
from transformers import AutoModelForTokenClassification, AutoTokenizer
repo = "youkijiudai/financial-ner-bert-base-cased"
for sub in ["", "seed13", "seed2026"]: # "" = seed 42
model = AutoModelForTokenClassification.from_pretrained(repo, subfolder=sub)
tokenizer = AutoTokenizer.from_pretrained(repo, subfolder=sub)
Labels: O, B-PER, I-PER, B-ORG, I-ORG, B-LOC, I-LOC (BIO).
Entity-level precision / recall / F1 from the paper's saved evaluation (metrics_summary.csv). Out-of-domain test sets are capped at 300 sentences.
| Seed | FIN test (in-domain, SEC filings) | FiNER-ORD test (financial news) | TweetNER7 test (social media) |
|---|---|---|---|
| 13 | 0.694 / 0.745 / 0.718 | 0.387 / 0.389 / 0.388 | 0.342 / 0.170 / 0.227 |
| 42 (root) | 0.655 / 0.755 / 0.701 | 0.392 / 0.389 / 0.391 | 0.305 / 0.179 / 0.226 |
| 2026 | 0.654 / 0.727 / 0.689 | 0.393 / 0.349 / 0.370 | 0.408 / 0.202 / 0.270 |
F1 roughly halves on financial news and drops by about two thirds on tweets. That gap is the point of the paper: plain F1 does not tell you which predictions are still safe when the input distribution changes. See the paper for confidence signals (entity-span probability, temperature scaling, etc.), calibration, and selective-prediction curves.
| Base model | bert-base-cased |
| Training data | FIN train split (Salinas Alvarado et al., 2015), via tner/fin |
| Epochs | 5 |
| Learning rate | 3e-5, linear warmup 10% |
| Batch size | 16 |
| Max length | 256 tokens |
| Weight decay | 0.01 |
| Label alignment | first sub-word of each word carries the label; others are ignored (-100) |
| Hardware | Apple M1 Pro (MPS), ~53 min per seed |
| Seeds | 13, 42, 2026 |
The evaluation sets are FiNER-ORD (Shah et al., 2023; gtfintechlab/finer-ord) and TweetNER7 (Ushio et al., 2022; tner/tweetner7), with TweetNER7 types mapped to PER/ORG/LOC (corporation→ORG, person→PER, location→LOC) and tweets with other entity types dropped.
@misc{zheng2026reliablefinancialnamedentity,
title = {Reliable Financial Named Entity Recognition under Domain Shift},
author = {Zihao Zheng and Baichuan Li and Junyi Yao and Jiayu Long},
year = {2026},
eprint = {2608.19558},
archivePrefix = {arXiv},
primaryClass = {cs.CL},
url = {https://arxiv.org/abs/2608.19558}
}
model.safetensors 431 MBseed13/model.safetensors 431 MBseed2026/model.safetensors 431 MB