This model is a federated version of FinBERT fine-tuned for financial sentiment classification (Positive / Negative / Neutral).
Training is performed across three clients:
Unlike standard FedAvg, this model uses an Adaptive Aggregation strategy, where client contributions are weighted dynamically based on validation performance, allowing stronger clients to influence the global model more.
This model is part of a research project comparing:
for federated financial NLP.
Designed for:
Not intended for automated trading without expert oversight.
Base Model:
ProsusAI/finbert
Task:
Sequence classification — 3 classes
Training Setup:
3 federation clients
10 global rounds
3 local epochs
Adaptive weighted aggregation
| Client | Data Type |
|---|---|
| Client-1 | Financial Twitter |
| Client-2 | Financial News |
| Client-3 | Financial Reports |
No raw data is shared between clients.
Only model updates are exchanged — not text data. This supports data governance and privacy-aware ML.
| Method | Final Avg F1-Score |
|---|---|
| Adaptive FedAvg | 0.823 |
Adaptive aggregation showed smooth convergence and stable performance while preserving privacy.
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
model = AutoModelForSequenceClassification.from_pretrained(
"harshprasad03/FinBERT-Adaptive"
)
tokenizer = AutoTokenizer.from_pretrained(
"harshprasad03/FinBERT-Adaptive"
)
text = "Global markets improved after positive earnings reports."
inputs = tokenizer(text, return_tensors="pt")
outputs = model(**inputs)
prob = torch.softmax(outputs.logits, dim=1)
print(prob)
Harsh Prasad, Sai Dhole (2025).
Adaptive Federated FinBERT for Financial Sentiment Analysis.
Harsh Prasad AI and ML Research
Sai Dhole AI and ML Research