Binary sentence classifier that flags governance ESG content in corporate reports of firms listed on the Nairobi Securities Exchange (NSE). It is one of three independent pillar classifiers (env, soc, gov), fine-tuned from roberta-base on the KenyaESG dataset.
1 if the sentence addresses governance matters, 0 otherwise (threshold 0.5 on the class-1 probability). Aggregated over a report, the share of positive sentences gives a firm-year governance disclosure-intensity score.The model was retrained on revised training labels: all Kenyan training sentences were re-read against an explicit, meaning-based annotation guideline (124 labels changed for this pillar), and it is now evaluated on an extended 300-sentence evaluation set with an adjudicated reference label. The first-release model (DOI 10.57967/hf/9128) reported F1 0.916 on a 100-sentence benchmark drawn from the same pool as the training data; that benchmark overstated performance on the wider corpus (a model trained with the same procedure on the first-release labels scores F1 0.791 on the 300-sentence set against the adjudicated label). See the dataset card for details.
import torch
from transformers import AutoTokenizer, AutoModelForSequenceClassification
repo = "josephagossa/KenyaESG-RoBERTa-gov"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForSequenceClassification.from_pretrained(repo).eval()
sentences = ["The Board held eight meetings during the year.",
"Revenue grew by 12% compared with the prior year."]
enc = tok(sentences, truncation=True, max_length=256, padding=True, return_tensors="pt")
with torch.no_grad():
prob = torch.softmax(model(**enc).logits, dim=-1)[:, 1]
labels = (prob >= 0.5).int().tolist() # 1 = governance content
300 held-out sentences from NSE reports, labelled by two annotators (A, B); scored against the adjudicated label (headline) and, as an independent check, against the sentences on which A and B agree. 95% percentile bootstrap intervals (10,000 resamples).
| Reference | n | Precision | Recall | F1 [95% CI] | TN / FP / FN / TP |
|---|---|---|---|---|---|
| Adjudicated | 300 | 0.952 | 0.887 | 0.918 [0.882, 0.951] | 161 / 6 / 15 / 118 |
| A = B | 287 | 0.951 | 0.784 | 0.859 [0.812, 0.901] | 133 / 6 / 32 / 116 |
The training labels and the adjudicated evaluation labels were revised with the same guideline, so the adjudicated score may be slightly favourable; the A = B score does not depend on the adjudication.
Internal validation (585 sentences, measures agreement with the training labels): F1 0.888 overall, 0.969 on Kenyan sentences, 0.718 on Schimanski et al. (2024) sentences.
[COMPANY] / [PERSON]; apply the same masking for best results.Agossa, J. (2026). Pricing the Cost of Compliance: Equity Reactions to Mandatory ESG Disclosure in Kenya. Working paper. SSRN.
Dataset: KenyaESG, Zenodo, https://doi.org/10.5281/zenodo.20608236 · Hugging Face, https://doi.org/10.57967/hf/9193
Labelling schema adapted from: Schimanski, T., Reding, A., Reding, N., Bingler, J., Kraus, M., & Leippold, M. (2024). Bridging the gap in ESG measurement: Using NLP to quantify environmental, social, and governance communication. Finance Research Letters, 61, 104979.
License: Apache-2.0.
FacebookAI/roberta-base