Downloads · 30 days
13
8% of all-time downloads
Wonseong/FinBERT-FOMC-aspects
FinBERT-FOMC-aspects is a text classification model from Wonseong. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as apache-2.0.
This is a single aspect-aware sentiment model fine-tuned from ZiweiChen/FinBERT-FOMC on FOMCsentencesexpandedzeroshotlabeled.xlsx.
Downloads · 30 days
13
8% of all-time downloads
All-time downloads
170
Public
Parameters
110M
439 MB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors439 MB · 100%
From the Hugging Face model README
This is a single aspect-aware sentiment model fine-tuned from ZiweiChen/FinBERT-FOMC on FOMC_sentences_expanded_zeroshot_labeled.xlsx.
ZiweiChen/FinBERT-FOMCall283773123Negative (0)Neutral (1)Positive (2)Use one model for all targets:
text = modetext_pair = FOMC sentenceValid mode values:
growthemploymentinflationfrom transformers import BertForSequenceClassification, BertTokenizer, pipeline
model_id = "Wonseong/FinBERT-FOMC-aspects"
tokenizer = BertTokenizer.from_pretrained(model_id)
model = BertForSequenceClassification.from_pretrained(model_id)
clf = pipeline("text-classification", model=model, tokenizer=tokenizer)
sentence = "Spending on cars and light trucks increased somewhat in July."
mode = "growth" # growth | employment | inflation
result = clf({"text": mode, "text_pair": sentence})
print(result)
from predict_aspect import FinBERTFOMCModeClassifier
clf = FinBERTFOMCModeClassifier("Wonseong/FinBERT-FOMC-aspects")
print(clf.predict("Spending on cars and light trucks increased somewhat in July.", mode="growth"))
Holdout evaluation:
0.87896253602305470.57313722372055050.79806148744051570.77085342133830980.83219414983028320.13992955491514570.17771373679154668.09051126054008Full training data fit:
0.93488888888888890.89772823499784990.86210192676179390.94246423368529360.068476190476190480.075206349206349213.6275132275132274Expected spreadsheet columns in sheet expanded_10500:
sentencegrowth_sentiment_finalemployment_sentiment_finalinflation_sentiment_finalLabel values are normalized from negative, neutral, and positive.
The training file FOMC_sentences_expanded_zeroshot_labeled.xlsx contains sentence-level labels for the expanded_10500 sheet. These aspect labels were generated through zero-shot annotation with oss-20b using the prompt template stored in zeroshot_fomc_sentiment_prompt.txt.
The labeled dataset can be provided upon reasonable request.
The zero-shot prompt asks for one label per aspect:
growth_sentiment_finalemployment_sentiment_finalinflation_sentiment_finalEach aspect is restricted to:
positiveneutralnegativeThe prompt design is derived from the human-labeling framework described in:
Kim, W., Sporer, J., Lee, C. L., & Handschuh, S. (2024, November). Is small really beautiful for central Bank communication? Evaluating language models for finance: Llama-3-70B, GPT-4, FinBERT-FOMC, FinBERT, and VADER. In Proceedings of the 5th ACM International Conference on AI in Finance (pp. 626-633).
This model is intended for aspect-conditioned sentiment classification on FOMC-related sentences. The caller supplies the target aspect through mode and the sentence through text_pair.
Negative, Neutral, Positive.Tesla T4truetruefalseAdditional artifacts in this repo:
training_metadata.jsonmetric_history.csvmae_mse_curve.png@article{kim2023analyzing,
title={Analyzing FOMC minutes: Accuracy and constraints of language models},
author={Kim, Wonseong and Sp{\~A}{\c{k}}rer, Jan Frederic and Handschuh, Siegfried},
journal={arXiv preprint arXiv:2304.10164},
year={2023}
}
@inproceedings{kim2024small,
author = {Kim, W. and Sporer, J. and Lee, C. L. and Handschuh, S.},
title = {Is small really beautiful for central Bank communication? Evaluating language models for finance: Llama-3-70B, GPT-4, FinBERT-FOMC, FinBERT, and VADER},
booktitle = {Proceedings of the 5th ACM International Conference on AI in Finance},
pages = {626--633},
year = {2024}
}