Team Ai
Modelpublic

yseop/distilbert-base-financial-relation-extraction

sourceHugging Faceupdated 5y agoView on Hugging Face
7likes15downloads
Model Card

<div style="clear: both;"> <div style="float: left; margin-right 1em;"> <h1><strong>FReE (Financial Relation Extraction)</strong></h1> </div> <div> <h2><img src="https://pbs.twimg.com/profileimages/1333760924914753538/fQL4zLUw400x400.png" alt="" width="25" height="25"></h2> </div> </div>

We present FReE, a DistilBERT base model fine-tuned on a custom financial dataset for financial relation type detection and classification.

Process

Detecting the presence of a relationship between financial terms and qualifying the relationship in case of its presence. Example use cases:

  • —An A-B trust is a joint trust created by a married couple for the purpose of minimizing estate taxes. (<em>Relationship exists, type: is</em>)
  • —There are no withdrawal penalties. (<em>Relationship does not exist, type: x</em>)

Data

The data consists of financial definitions collected from different sources (Wikimedia, IFRS, Investopedia) for financial indicators. Each definition has been split up into sentences, and term relationships in a sentence have been extracted using the Stanford Open Information Extraction module. A typical row in the dataset consists of a definition sentence and its corresponding relationship label. The labels were restricted to the 5 most-widely identified relationships, namely: x (no relationship), has, is in, is and are.

Model

The model used is a standard DistilBERT-base transformer model from the Hugging Face library. See HUGGING FACE DistilBERT base model for more details about the model. In addition, the model has been pretrained to initializa weigths that would otherwise be unused if loaded from an existing pretrained stock model.

Metrics

The evaluation metrics used are: Precision, Recall and F1-score. The following is the classification report on the test set.

relationprecisionrecallf1-scoresupport
has0.74160.96740.83962362
is in0.78130.79250.78692362
is0.86500.68630.76532362
are0.83650.84930.84292362
x0.95150.83020.88672362
macro avg0.83520.82510.824311810
weighted avg0.83520.82510.824311810