Update README.md
Browse files
README.md
CHANGED
|
@@ -33,7 +33,6 @@ The model performs **binary classification**:
|
|
| 33 |
|
| 34 |
**Intended use:** **CBDC-BERT** is intended for research on CBDC discourse across time and jurisdictions, for pre-filtering or flagging CBDC-related sentences in large central-bank speech corpora, and as an input to dashboards, indices, or downstream NLP pipelines used in central banking and finance.
|
| 35 |
|
| 36 |
-
---
|
| 37 |
## Training Details
|
| 38 |
- **Base checkpoint:** [`bilalzafar/CentralBank-BERT`](https://huggingface.co/bilalzafar/CentralBank-BERT)
|
| 39 |
- **Architecture:** `BertForSequenceClassification` (binary head randomly initialized)
|
|
@@ -47,23 +46,31 @@ The model performs **binary classification**:
|
|
| 47 |
- **Evaluation:** per epoch; best model by F1
|
| 48 |
- **Hardware:** Google Colab GPU
|
| 49 |
|
| 50 |
-
---
|
| 51 |
-
|
| 52 |
## Performance & Robustness
|
| 53 |
On the full test split (n=2,200), the model achieves **Accuracy = 0.9950** and **F1 (binary) = 0.9949**. In a separate confusion-matrix run on valid rows (n=2,175), it records **TP=1,065**, **FP=4**, **FN=1**, **TN=1,105**, yielding **Accuracy = 0.9977**, **Precision (CBDC) = 0.9963**, **Recall (CBDC) = 0.9991**, **ROC-AUC = 1.0000**, and a **Brier score = 0.0024**; the class balance is **Non-CBDC = 1,109** and **CBDC = 1,066**. Compared to TF-IDF baselines—**Logistic Regression (0.97)**, **Naive Bayes (0.92)**, **Random Forest (0.98)**, and **XGBoost (0.99)**, CBDC-BERT **matches or exceeds** these results while delivering **near-perfect ROC-AUC** with **well-calibrated probabilities** (low Brier). Robustness checks across **edge cases**, **noise-injected**, **syntactically altered**, and **paraphrased (“translated-like”)** inputs each show **8/10 correct (80%)**, and sentence-length bias is low (**ρ ≈ 0.1222**).
|
| 54 |
|
| 55 |
---
|
| 56 |
|
| 57 |
-
##
|
| 58 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
|
| 60 |
-
|
| 61 |
-
> *Paper under write-up*
|
| 62 |
-
>
|
| 63 |
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
|
| 68 |
---
|
| 69 |
|
|
@@ -86,4 +93,21 @@ result = classifier(text)[0]
|
|
| 86 |
print(f"Prediction: {label_map[result['label']]} | Confidence: {result['score']:.4f}")
|
| 87 |
|
| 88 |
# Output example:
|
| 89 |
-
# [{Prediction: CBDC | Confidence: 0.9993}]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
|
| 34 |
**Intended use:** **CBDC-BERT** is intended for research on CBDC discourse across time and jurisdictions, for pre-filtering or flagging CBDC-related sentences in large central-bank speech corpora, and as an input to dashboards, indices, or downstream NLP pipelines used in central banking and finance.
|
| 35 |
|
|
|
|
| 36 |
## Training Details
|
| 37 |
- **Base checkpoint:** [`bilalzafar/CentralBank-BERT`](https://huggingface.co/bilalzafar/CentralBank-BERT)
|
| 38 |
- **Architecture:** `BertForSequenceClassification` (binary head randomly initialized)
|
|
|
|
| 46 |
- **Evaluation:** per epoch; best model by F1
|
| 47 |
- **Hardware:** Google Colab GPU
|
| 48 |
|
|
|
|
|
|
|
| 49 |
## Performance & Robustness
|
| 50 |
On the full test split (n=2,200), the model achieves **Accuracy = 0.9950** and **F1 (binary) = 0.9949**. In a separate confusion-matrix run on valid rows (n=2,175), it records **TP=1,065**, **FP=4**, **FN=1**, **TN=1,105**, yielding **Accuracy = 0.9977**, **Precision (CBDC) = 0.9963**, **Recall (CBDC) = 0.9991**, **ROC-AUC = 1.0000**, and a **Brier score = 0.0024**; the class balance is **Non-CBDC = 1,109** and **CBDC = 1,066**. Compared to TF-IDF baselines—**Logistic Regression (0.97)**, **Naive Bayes (0.92)**, **Random Forest (0.98)**, and **XGBoost (0.99)**, CBDC-BERT **matches or exceeds** these results while delivering **near-perfect ROC-AUC** with **well-calibrated probabilities** (low Brier). Robustness checks across **edge cases**, **noise-injected**, **syntactically altered**, and **paraphrased (“translated-like”)** inputs each show **8/10 correct (80%)**, and sentence-length bias is low (**ρ ≈ 0.1222**).
|
| 51 |
|
| 52 |
---
|
| 53 |
|
| 54 |
+
## Other CBDC Models
|
| 55 |
+
|
| 56 |
+
This model is part of the **CentralBank-BERT / CBDC model family**, a suite of domain-adapted classifiers for analyzing central-bank communication.
|
| 57 |
+
|
| 58 |
+
| **Model** | **Purpose** | **Intended Use** | **Link** |
|
| 59 |
+
| ------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ---------------------------------------------------------------------- |
|
| 60 |
+
| **bilalzafar/CentralBank-BERT** | Domain-adaptive masked LM trained on BIS speeches (1996–2024). | Base encoder for CBDC downstream tasks; fill-mask tasks. | [CentralBank-BERT](https://huggingface.co/bilalzafar/CentralBank-BERT) |
|
| 61 |
+
| **bilalzafar/CBDC-BERT** | Binary classifier: CBDC vs. Non-CBDC. | Flagging CBDC-related discourse in large corpora. | [CBDC-BERT](https://huggingface.co/bilalzafar/CBDC-BERT) |
|
| 62 |
+
| **bilalzafar/CBDC-Stance** | 3-class stance model (Pro, Wait-and-See, Anti). | Research on policy stances and discourse monitoring. | [CBDC-Stance](https://huggingface.co/bilalzafar/CBDC-Stance) |
|
| 63 |
+
| **bilalzafar/CBDC-Sentiment** | 3-class sentiment model (Positive, Neutral, Negative). | Tone analysis in central bank communications. | [CBDC-Sentiment](https://huggingface.co/bilalzafar/CBDC-Sentiment) |
|
| 64 |
+
| **bilalzafar/CBDC-Type** | Classifies Retail, Wholesale, General CBDC mentions. | Distinguishing policy focus (retail vs wholesale). | [CBDC-Type](https://huggingface.co/bilalzafar/CBDC-Type) |
|
| 65 |
+
| **bilalzafar/CBDC-Discourse** | 3-class discourse classifier (Feature, Process, Risk-Benefit). | Structured categorization of CBDC communications. | [CBDC-Discourse](https://huggingface.co/bilalzafar/CBDC-Discourse) |
|
| 66 |
+
| **bilalzafar/CentralBank-NER** | Named Entity Recognition (NER) model for central banking discourse. | Identifying institutions, persons, and policy entities in speeches. | [CentralBank-NER](https://huggingface.co/bilalzafar/CentralBank-NER) |
|
| 67 |
+
|
| 68 |
|
| 69 |
+
## Repository and Replication Package
|
|
|
|
|
|
|
| 70 |
|
| 71 |
+
All **training pipelines, preprocessing scripts, evaluation notebooks, and result outputs** are available in the companion GitHub repository:
|
| 72 |
+
|
| 73 |
+
🔗 **[https://github.com/bilalezafar/CentralBank-BERT](https://github.com/bilalezafar/CentralBank-BERT)**
|
| 74 |
|
| 75 |
---
|
| 76 |
|
|
|
|
| 93 |
print(f"Prediction: {label_map[result['label']]} | Confidence: {result['score']:.4f}")
|
| 94 |
|
| 95 |
# Output example:
|
| 96 |
+
# [{Prediction: CBDC | Confidence: 0.9993}]
|
| 97 |
+
```
|
| 98 |
+
---
|
| 99 |
+
|
| 100 |
+
## Citation
|
| 101 |
+
|
| 102 |
+
If you use this model, please cite as:
|
| 103 |
+
|
| 104 |
+
**Zafar, M. B. (2025). *CentralBank-BERT: Machine Learning Evidence on Central Bank Digital Currency Discourse*. SSRN. [https://papers.ssrn.com/abstract=5404456](https://papers.ssrn.com/abstract=5404456)**
|
| 105 |
+
|
| 106 |
+
```bibtex
|
| 107 |
+
@article{zafar2025centralbankbert,
|
| 108 |
+
title={CentralBank-BERT: Machine Learning Evidence on Central Bank Digital Currency Discourse},
|
| 109 |
+
author={Zafar, Muhammad Bilal},
|
| 110 |
+
year={2025},
|
| 111 |
+
journal={SSRN Electronic Journal},
|
| 112 |
+
url={https://papers.ssrn.com/abstract=5404456}
|
| 113 |
+
}
|