Multi-FinQA / README.md
fesposito-villanova's picture
Update README.md
e85662d verified
|
Raw History Blame Contribute Delete
7.91 kB
---
license: mit
dataset_info:
- config_name: de
features:
- name: item_id
dtype: string
- name: id_hash
dtype: string
- name: pre_text
dtype: string
- name: post_text
dtype: string
- name: table
list:
list: string
- name: images
list: image
- name: images_roles
list: string
- name: question
dtype: string
- name: answer
dtype: string
splits:
- name: train
num_bytes: 1232550828
num_examples: 1239
download_size: 1187742792
dataset_size: 1232550828
- config_name: en
features:
- name: item_id
dtype: string
- name: id_hash
dtype: string
- name: pre_text
dtype: string
- name: post_text
dtype: string
- name: table
list:
list: string
- name: images
list: image
- name: images_roles
list: string
- name: question
dtype: string
- name: answer
dtype: string
splits:
- name: train
num_bytes: 2638340272
num_examples: 3313
download_size: 2614792468
dataset_size: 2638340272
- config_name: es
features:
- name: item_id
dtype: string
- name: id_hash
dtype: string
- name: pre_text
dtype: string
- name: post_text
dtype: string
- name: table
list:
list: string
- name: images
list: image
- name: images_roles
list: string
- name: question
dtype: string
- name: answer
dtype: string
splits:
- name: train
num_bytes: 1219399524
num_examples: 1238
download_size: 1114127869
dataset_size: 1219399524
- config_name: fr
features:
- name: item_id
dtype: string
- name: id_hash
dtype: string
- name: pre_text
dtype: string
- name: post_text
dtype: string
- name: table
list:
list: string
- name: images
list: image
- name: images_roles
list: string
- name: question
dtype: string
- name: answer
dtype: string
splits:
- name: train
num_bytes: 1105747447
num_examples: 1239
download_size: 1090202705
dataset_size: 1105747447
- config_name: it
features:
- name: item_id
dtype: string
- name: id_hash
dtype: string
- name: pre_text
dtype: string
- name: post_text
dtype: string
- name: table
list:
list: string
- name: images
list: image
- name: images_roles
list: string
- name: question
dtype: string
- name: answer
dtype: string
splits:
- name: train
num_bytes: 1087071034
num_examples: 1238
download_size: 1055442857
dataset_size: 1087071034
configs:
- config_name: de
data_files:
- split: train
path: de/train-*
- config_name: en
data_files:
- split: train
path: en/train-*
- config_name: es
data_files:
- split: train
path: es/train-*
- config_name: fr
data_files:
- split: train
path: fr/train-*
- config_name: it
data_files:
- split: train
path: it/train-*
---
# Multi-FinQA
**Multi-FinQA** is a **multilingual** extension of the original [**FinQA**](https://finqasite.github.io) dataset.
FinQA is a large-scale expert-annotated dataset with 2.8k financial reports for 8k Question-Answering pairs over financial reports to study numerical reasoning with structured and unstructured evidence.
The dataset was introduced in the 2021 EMNLP paper [FinQA: A Dataset of Numerical Reasoning over Financial Data](https://aclanthology.org/2021.emnlp-main.300/), where details about its implementation can be found.
The FinQA dataset version used in **Multi-FinQA** is the one available at [The Cauldron](https://huggingface.co/datasets/HuggingFaceM4/the_cauldron), a massive collection of 50 vision-language datasets (training sets only) that were used for the fine-tuning of the vision-language model Idefics2.
### Dataset Description
**Multi-FinQA** extends the support to four languages, i.e. French, German, Italian, and Spanish, using a **permissively licensed** model: [**RedHatAI gemma-4-31B-it-FP8-dynamic**](https://huggingface.co/RedHatAI/gemma-4-31B-it-FP8-dynamic).
Each financial report consists of a financial table preceded and followed by text, as shown in the following dataset entry excerpt:
```json
"pre_text": the texts before the table;
"post_text": the text after the table;
"table": the table;
...
"qa": {
"question": the question;
"answer": the answer;
...
}
```
`"pre_text"`, `"post_text"`, and `"table"` represent the fields of the financial report itself.
For each entry in the dataset, the model was prompted to translate the above-mentioned JSON fields to the desired target language. Once having the financial reports translated, they were rendered back as .png images.
Images were built as plain HTML/CSS and rendered using randomized styling (fonts, colors, spacing) for visual diversity. According to the length of the `"pre_text"` and `"post_text"` fields, the images were split into separate images or combined into a single one.
Information about the splitting policy per each dataset entry is to be found in the .parquet `image_roles` column: `combined` refers to a single .png image, otherwise a list shows the order in which the images are shown in column (e.g. `"table"`, `"pre_text"`, `"post_text"`).
## Dataset Structure
Each entry in every language subset is structured as follows:
| Field | Type | Description |
| ----- | ---- | ----------- |
| `item_id` | string | unique example id. composed by the original report name plus example index for this report |
| `id_hash` | string | hash of the dataset entry |
| `pre_text` | string | the text(s) before the table |
| `post_text` | string | the text(s) after the table |
| `table` | list | the financial table |
| `images` | list | the image(s) of the financial table |
| `image_roles` | list | the role of the image: `combined` if a single image, otherwise the ordered image role is shown |
| `question` | string | the question |
| `answer` | string | the answer |
## Language distribution
The dataset is composed of five subsets, one per language, distributed as follows:
| Language | Subset Name | Percentage | Number of Examples |
| -------- | ----------- | ---------- | ------------------ |
| English | en | 40% | 3313 |
| French | fr | 15% | 1239 |
| German | de | 15% | 1239 |
| Italian | it | 15% | 1238 |
| Spanish | es | 15% | 1238 |
English constitutes 40% of the dataset. French, German, Italian, and Spanish collectively account for the remaining 60%, distributed evenly.
## Loading the dataset
To load a specific subset:
```python
from datasets import load_dataset
dataset = load_dataset("VillanovaAI/Multi-FinQA", "fr")
```
### Dataset Sources
- **Repository:** [The Cauldron](https://huggingface.co/datasets/HuggingFaceM4/the_cauldron)
- **Paper:** [https://aclanthology.org/2021.emnlp-main.300.pdf](https://aclanthology.org/2021.emnlp-main.300.pdf)
```
@article{chen2021finqa,
title={FinQA: A Dataset of Numerical Reasoning over Financial Data},
author={Chen, Zhiyu and Chen, Wenhu and Smiley, Charese and Shah, Sameena and Borova, Iana and Langdon, Dylan and Moussa, Reema and Beane, Matt and Huang, Ting-Hao and Routledge, Bryan and Wang, William Yang},
journal={Proceedings of EMNLP 2021},
year={2021}
}
```
## Licensing Information
The FinQA dataset is distributed under a **dual-layered licensing structure** based on its components:
1. **Dataset Annotations & Code:** The annotations created by the authors and the evaluation code are licensed under the **MIT License** (as per the [official FinQA GitHub repository](https://github.com)).
2. **Underlying Financial Data:** The raw financial reports are derived from IBM's *FinTabNet* dataset, which is distributed under the **CDLA-Permissive-1.0** (Community Data License Agreement) license.
This combination allows for free usage, modification, and redistribution, including commercial applications, provided that the respective license notices and copyright attributions are preserved.