File size: 3,504 Bytes
b59037f f163ad9 b59037f f868c50 0b3622d f868c50 9f1e7f3 74100d7 f868c50 9f1e7f3 b54df64 74100d7 97d6359 9f1e7f3 74100d7 f868c50 74100d7 9f1e7f3 5e8fce8 f868c50 74100d7 f868c50 74100d7 f868c50 74100d7 97d6359 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
---
license: apache-2.0
language:
- de
---
# German FinBERT (Further Pre-trained Version)
<img src="https://github.com/mscherrmann/mscherrmann.github.io/blob/master/assets/img/publication_preview/germanBert.png?raw=true" alt="Alt text for the image" width="500" height="300"/>
German FinBERT is a BERT language model focusing on the financial domain within the German language. In my [paper](https://arxiv.org/pdf/2311.08793.pdf), I describe in more detail the steps taken to train the model and show that it outperforms its generic benchmarks for finance specific downstream tasks.
This version of German FinBERT starts with the [gbert-base](https://huggingface.co/deepset/gbert-base) model and continues pre-training on finance specific textual data.
## Overview
**Author** Moritz Scherrmann
**Paper:** [here](https://arxiv.org/pdf/2311.08793.pdf)
**Architecture:** BERT base
**Language:** German
**Specialization:** Financial textual data
**Original Model:** [gbert-base (deepset)](https://huggingface.co/deepset/gbert-base)
**Framework:** [MosaicML](https://github.com/mosaicml/examples/tree/main/examples/benchmarks/bert)
## Pre-training
German FinBERT's pre-training corpus includes a diverse range of financial documents, such as Bundesanzeiger reports, Handelsblatt articles, MarketScreener data, and additional sources including FAZ, ad-hoc announcements, LexisNexis & Event Registry content, Zeit Online articles, Wikipedia entries, and Gabler Wirtschaftslexikon. In total, the corpus spans from 1996 to 2023, consisting of 12.15 million documents with 10.12 billion tokens over 53.19 GB.
I further pre-train the model for 10,400 steps with a batch size of 4096, which is one epoch. I use an Adam optimizer with decoupled weight decay regularization, with Adam parameters 0.9, 0.98, 1e − 6, a weight
decay of 1e − 5 and a maximal learning of 1e − 4. I train the model using a Nvidia DGX A100 node consisting of 8 A100 GPUs with 80 GB of memory each.
## Performance
### Fine-tune Datasets
To fine-tune the model, I use several datasets, including:
- A manually labeled [multi-label database of German ad-hoc announcements](https://arxiv.org/pdf/2311.07598.pdf) containing 31,771 sentences, each associated with up to 20 possible topics.
- An extractive question-answering dataset based on the SQuAD format, which was created using 3,044 ad-hoc announcements processed by OpenAI's ChatGPT to generate and answer questions (see [here](https://huggingface.co/datasets/scherrmann/adhoc_quad)).
- The [financial phrase bank](https://arxiv.org/abs/1307.5336) of Malo et al. (2013) for sentiment classification, translated to German using [DeepL](https://www.deepl.com/translator) (see [here](https://huggingface.co/datasets/scherrmann/financial_phrasebank_75agree_german)).
### Benchmark Results
The further pre-trained German FinBERT model demonstrated the following performances on finance-specific downstream tasks:
Ad-Hoc Multi-Label Database:
- Macro F1: 86.08%
- Micro F1: 85.65%
Ad-Hoc QuAD (Question Answering):
- Exact Match (EM): 52.50%
- F1 Score: 74.61%
Translated Financial Phrase Bank:
- Accuracy: 95.41%
- Macro F1: 91.49%
## Authors
Moritz Scherrmann: `scherrmann [at] lmu.de`
For additional details regarding the performance on fine-tune datasets and benchmark results, please refer to the full documentation provided in the study.
See also:
- scherrmann/GermanFinBERT_SC
- scherrmann/GermanFinBERT_FP_QuAD
- scherrmann/GermanFinBERT_SC_Sentiment |