/ Модель

Характеристики

Контекст
512 токенов
Параметры
137 млн
Лицензия
Apache 2.0
Архитектура
bert · dense
Базовая модель
finbert
Библиотека
transformers
Опубликована
1 авг 2025

finbert-finetune

Классификация текстаТекст → label3 профессии

Дообученная FinBERT классифицирует тональность англоязычных финансовых новостей, заголовков и комментариев как положительную, отрицательную или нейтральную.

1 758скачиваний за 30 дней9лайковвеса обновлены1 авг 2025

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

project-aps/finbert-finetune — дообученная командой project-aps модель ProsusAI/finbert для определения тональности финансовых текстов и заголовков. Это классификатор на архитектуре BERT с 136,7 млн параметров, который относит входной текст к положительной, отрицательной или нейтральной тональности. Модель обучена на финансовых новостях, рыночных комментариях и отчётных формулировках; карточка указывает набор FinGPT/fingpt-sentiment-train примерно из 60 тысяч примеров и оценку на нескольких финансовых бенчмарках.

Модель предназначена для анализа финансовых новостей и других англоязычных финансовых текстов. Она принимает текст и выдаёт метку тональности; заявлены улучшения относительно базовой FinBERT на приведённых авторами тестах, однако результаты зависят от наборов данных и требуют независимой проверки. Длина контекста — до 512 токенов. Доступны веса PyTorch и Safetensors; лицензия — Apache-2.0.

Ограничение, отмеченное авторами: модели бывает трудно корректно интерпретировать тонкие числовые сравнения, например изменение прибыли или убытка между периодами. Высокая уверенность классификатора сама по себе не гарантирует правильность прогноза.

Сценарии применения

  • Определение тональности финансовых новостей
  • Классификация заголовков о рынках и компаниях
  • Анализ тональности рыночных комментариев
  • Разметка тональности финансовой отчётности
  • Мониторинг позитивных и негативных упоминаний компаний

Ограничения

Модель может ошибаться при интерпретации тонких числовых сравнений, например при оценке изменения прибыли между периодами. Заявленные улучшения качества приведены авторами карточки и могут не воспроизводиться на других данных.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

📊 FinBERT Fine-Tuned on Financial News/Texts

A fine-tuned version of ProsusAI/finbert trained for financial sentiment analysis on financial news texts and headlines. This fine-tuned model achieves a significant improvement over the original finbert, outperforming it by over 38% in accuracy on financial sentiment classification tasks.


🔧 Model Objective

The goal of this model is to detect positive, neutral, or negative sentiment on financial texts and headlines.


🗂️ Training Dataset

Primary Dataset: fingpt-sentiment-train (~60,000 examples)

  • Labeled financial text samples (positive / neutral / negative)
  • Includes earnings statements, market commentary, and financial news headlines
  • Only included neutral, positive and negative texts.

🧪 Benchmark Evaluation

The model was evaluated against three benchmark datasets:

Metrics used:

  • Accuracy
  • F1 Score
  • Precision
  • Recall

We benchmarked this model against the original ProsusAI/finbert on multiple financial datasets:

DatasetSamplesModelAccuracyF1 (Macro)F1 (Weighted)Precision (Macro)Precision (Weighted)Recall (Macro)Recall (Weighted)
fingpt-sentiment-train Eval12511FinBERT0.71310.700.710.710.720.700.71
FinBERT-Finetuned (Ours)0.9894 (+38.8%)0.99 (+41.4%)0.99 (+39.4%)0.99 (+39.4%)0.99 (+37.5%)0.99 (+41.4%)0.99 (+39.4%)
Financial Phrasebank (Agree)2264FinBERT0.97170.960.970.950.970.980.97
FinBERT-Finetuned (Ours)0.9912 (+2.0%)0.99 (+3.1%)0.99 (+2.1%)0.99 (+4.2%)0.99 (+2.1%)0.99 (+1.0%)0.99 (+2.1%)
Financial Phrasebank (Combined)14780FinBERT0.92380.910.920.890.930.940.92
FinBERT-Finetuned (Ours)0.9792 (+6.0%)0.98 (+7.7%)0.98 (+6.5%)0.98 (+10.1%)0.98 (+5.4%)0.98 (+4.3%)0.98 (+6.5%)
FiQA + PhraseBank (Kaggle)5842FinBERT0.75810.740.770.730.790.770.76
FinBERT-Finetuned (Ours)0.8879 (+17.1%)0.87 (+17.6%)0.89 (+15.6%)0.85 (+16.4%)0.92 (+16.5%)0.92 (+19.5%)0.89 (+17.1%)

Note: All metrics represent classification performance improvements after fine-tuning FinBERT on respective financial sentiment datasets. Metrics in parentheses represent relative improvement over base FinBERT performance.


🧠 Text-Level Comparison: FinBERT vs FinBERT-Finetuned (Ours)

🔴 FinBERT Failed Texts (as per discussed in its Paper) (Correctly Predicted by Ours)

TextExpectedFinBERTOurs
Pre-tax loss totaled euro 0.3 million, compared to a loss of euro 2.2 million in the first quarter of 2005.Positive❌ Negative (0.7223)✅ Positive (0.9997)
This implementation is very important to the operator, since it is about to launch its Fixed to Mobile convergence serviceNeutral❌ Positive (0.7204)✅ Neutral (0.9998)
The situation of coated magazine printing paper will continue to be weak.Negative✅ Negative (0.8811)✅ Negative (0.9996)

🟡 FinBERT Incorrect, Ours Corrected It

TextExpectedFinBERTOurs
The debt-to-equity ratio was 1.15, flat quarter-over-quarter.Neutral❌ Negative (0.6239)✅ Neutral (0.9998)
Earnings smashed expectations $AAPL posts $0.89 EPS vs $0.78 est. Bullish momentum incoming!Positive❌ Neutral (0.4237)✅ Positive (0.9998)
$TSLA growth is slowing — but hey, at least Elon tweeted something funny today. #Tesla #marketsNegative❌ Neutral (0.5884)✅ Negative (0.7084)

⚪ Out-of-Context Texts (FinBERT Misclassified, Ours Handled Properly)

TextExpectedFinBERTOurs
Unexpected Snowstorm Hits Sahara Desert, Blanketing Sand DunesNeutral❌ Negative (0.8675)✅ Neutral (0.9993)
Virtual Reality Therapy Shows Promise for Treating PTSDNeutral❌ Positive (0.8522)✅ Neutral (0.9997)

Note: These examples demonstrate improvements in real-world understanding, context handling, and sentiment differentiation with our FinBERT-finetuned model. Values in parentheses (e.g., 0.9485) indicate the model’s confidence score for its predicted sentiment.


⚠️ Limitations & Failure Cases

While the model outperformed the base FinBERT across benchmarks, some failure cases were observed in statements involving fine-grained numerical reasoning, particularly when numerical comparison semantics are complex or subtle.

TextExpectedFinBERTOurs
Net profit to euro 203 million from euro 172 million in the previous year.Positive✅ Positive (0.9485)✅ Positive (0.9995)
Net profit to euro 103 million from euro 172 million in the previous year.Negative❌ Positive (0.9486)❌ Positive (0.9994)
Pre-tax loss totaled euro 0.3 million, compared to a loss of euro 2.2 million in Q1 2005.Positive❌ Negative (0.7223)✅ Positive (0.9997)
Pre-tax loss totaled euro 5.3 million, compared to a loss of euro 2.2 million in Q1 2005.Negative✅ Negative (0.7205)❌ Positive (0.9997)
Net profit totaled euro 5.3 million, compared to euro 2.2 million in the previous quarter of 2005.Positive❌ Negative (0.6347)❌ Negative (0.9996)
Net profit totaled euro 0.3 million, compared to euro 2.2 million in the previous quarter of 2005.Negative✅ Negative (0.6320)✅ Negative (0.9996)

Note: Values in parentheses (e.g., 0.9485) indicate the model’s confidence score for its predicted sentiment.

This suggests that explicit numerical comparison reasoning still remains challenging without targeted pretraining or numerical reasoning augmentation.


Hyperparameters

During fine-tuning, the following hyperparameters were used to optimize model performance:

  • Learning Rate: 2e-5
  • Batch Size: 32
  • Number of Epochs: 3
  • Max Sequence Length: 128 tokens
  • Optimizer: AdamW
  • Weight Decay: 0.01
  • Evaluation Strategy: Evaluation performed after each epoch

Note: These settings were chosen to balance training efficiency and accuracy for financial news sentiment classification.


💡 Summary

✅ Better generalization than FinBERT on both benchmark and noisy real-world samples
✅ Strong accuracy and F1 scores
⚠️ Room to improve on numerical reasoning comparisons — potential for integration with numerical-aware transformers or contrastive fine-tuning


Usage

Pipeline Approach

from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline
import torch

model_name = "project-aps/finbert-finetune"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)

# Override the config's id2label and label2id
label_map = {0: "neutral", 1: "negative", 2: "positive"}
model.config.id2label = label_map
model.config.label2id = {v: k for k, v in label_map.items()}

pipe = pipeline("text-classification", model=model, tokenizer=tokenizer)

text = "Earnings smashed expectations AAPL posts $0.89 EPS vs $0.78 est. Bullish momentum incoming! #EarningsSeason"
print(pipe(text)) #Output: [{'label': 'positive', 'score': 0.9997484087944031}]

Simple Approach

from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch

model_name = "project-aps/finbert-finetune"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)

text = "Earnings smashed expectations AAPL posts $0.89 EPS vs $0.78 est. Bullish momentum incoming! #EarningsSeason"
inputs = tokenizer(text, return_tensors="pt", truncation=True)
outputs = model(**inputs)
predicted_class = torch.argmax(outputs.logits, dim=1).item()

label_map = {0: "neutral", 1: "negative", 2: "positive"}
print(f"Text : {text}")
print(f"Sentiment: {label_map[predicted_class]}")


Acknowledgements

We gratefully acknowledge the creators and maintainers of the resources used in this project:

  • ProsusAI/FinBERT – A pre-trained BERT model specifically designed for financial sentiment analysis, which served as the foundation for our fine-tuning efforts.

  • FinGPT Sentiment Train Dataset – The dataset used for fine-tuning, containing a large collection of finance-related news headlines and sentiment annotations.

  • Financial PhraseBank Dataset – A widely used benchmark dataset for financial sentiment classification, including the All Agree and All Combined subsets.

  • FiQA + PhraseBank Kaggle Merged Dataset – A merged dataset combining FiQA and Financial PhraseBank entries, used for broader benchmarking of sentiment performance.

We thank these contributors for making their models and datasets publicly available, enabling high-quality research and development in financial NLP.


Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers · text-classification

Можно запустить

Подбираем GPU…

Класс архитектуры
BertForSequenceClassification
Ревизия весов
2db55b5

0 моделей