tat-llm-eval
TAT-LLM: A Specialized Language Model for Discrete Reasoning over Tabular and Textual Data — Fengbin Zhu et al. (2024) (arXiv:2401.13223, 2024)
What this evaluates
Evaluates discrete reasoning capabilities over hybrid tabular and textual data, specifically focusing on financial question answering tasks that require arithmetic operations, counting, and span extraction.
Datasets
- FinQA — total ?; splits: train (-1), val (-1), test (-1)
- TAT-QA — total ?; splits: train (-1), val (-1), test (-1)
- TAT-DQA — total ?; splits: train (-1), val (-1), test (-1)
Metrics
EM (primary) — range: [0, 1]
- Exact match between the predicted answer and the ground truth answer. For FinQA, this corresponds to Execution Accuracy.
F1 — range: [0, 1]
- Numeracy-focused macro-averaged F1 score measuring bag-of-words overlap between predicted and gold answers. It is forced to 0 if the predicted number does not exactly equal the ground truth number.
Input / output format
Input: A question accompanied by tabular data and textual paragraphs extracted from financial reports.
Output: A predicted numerical answer (and scale for TAT-LLM); zero-shot LLM evaluations omit scale prediction.
Scoring recipe
def score(predictions, golds):
em = sum(1 for p, g in zip(predictions, golds) if p == g) / len(golds)
f1s = []
for p, g in zip(predictions, golds):
p_num = extract_number(p)
g_num = extract_number(g)
if p_num != g_num:
f1s.append(0.0)
else:
p_tok, g_tok = set(p.lower().split()), set(g.lower().split())
inter = len(p_tok & g_tok)
union = len(p_tok | g_tok)
f1s.append(2 * inter / union if union > 0 else 0.0)
return em, sum(f1s) / len(f1s)
Common pitfalls
- Scale prediction is omitted for zero-shot LLM evaluations but included for TAT-LLM, leading to inconsistent comparison if not handled uniformly.
- The F1 score is numeracy-focused: it drops to 0 if the predicted number does not exactly match the ground truth, regardless of textual overlap.
- FinQA uses EM (Execution Accuracy) as its primary metric, while TAT-QA and TAT-DQA report both EM and F1, requiring dataset-specific metric tracking.
Evidence (verbatim from paper)
For TAT-QA and TAT-DQA datasets, we adopt the Exact Match (EM) and the numeracy-focused (macro-averaged) F1 score Zhu et al. ([2021], [2022]). Both two metrics measure the overlap between a bag-of-words representation of the gold and predicted answers. The numeracy-focused F1 score is set to 0 unless the predicted number is exactly equal to the ground truth. We use EM for FinQA, which is the same as the metric of Execution Accuracy originally used in FinQA Chen et al. ([2021]).
Citation
@misc{zhu2024tatllm,
title={TAT-LLM: A Specialized Language Model for Discrete Reasoning over Tabular and Textual Data},
author={Fengbin Zhu et al. (2024)},
year={2024},
note={arXiv:2401.13223}
}
1---2name: tat-llm-eval3description: Evaluates discrete reasoning capabilities over hybrid tabular and textual data, specifically focusing on financial question answering tasks that require arithmetic operations, counting, and span extraction. Use when the user wants to benchmark on FinQA, TAT-QA, TAT-DQA, or asks about evaluating this task. Reports EM.4---56# tat-llm-eval78> TAT-LLM: A Specialized Language Model for Discrete Reasoning over Tabular and Textual Data — Fengbin Zhu et al. (2024) (arXiv:2401.13223, 2024)910## What this evaluates1112Evaluates discrete reasoning capabilities over hybrid tabular and textual data, specifically focusing on financial question answering tasks that require arithmetic operations, counting, and span extraction.1314## Datasets1516- **FinQA** — total ?; splits: train (-1), val (-1), test (-1)17- **TAT-QA** — total ?; splits: train (-1), val (-1), test (-1)18- **TAT-DQA** — total ?; splits: train (-1), val (-1), test (-1)1920## Metrics2122- `EM` **(primary)** — range: [0, 1]23 - Exact match between the predicted answer and the ground truth answer. For FinQA, this corresponds to Execution Accuracy.24- `F1` — range: [0, 1]25 - Numeracy-focused macro-averaged F1 score measuring bag-of-words overlap between predicted and gold answers. It is forced to 0 if the predicted number does not exactly equal the ground truth number.2627## Input / output format2829**Input**: A question accompanied by tabular data and textual paragraphs extracted from financial reports.3031**Output**: A predicted numerical answer (and scale for TAT-LLM); zero-shot LLM evaluations omit scale prediction.3233## Scoring recipe3435```python36def score(predictions, golds):37 em = sum(1 for p, g in zip(predictions, golds) if p == g) / len(golds)38 f1s = []39 for p, g in zip(predictions, golds):40 p_num = extract_number(p)41 g_num = extract_number(g)42 if p_num != g_num:43 f1s.append(0.0)44 else:45 p_tok, g_tok = set(p.lower().split()), set(g.lower().split())46 inter = len(p_tok & g_tok)47 union = len(p_tok | g_tok)48 f1s.append(2 * inter / union if union > 0 else 0.0)49 return em, sum(f1s) / len(f1s)50```5152## Common pitfalls5354- Scale prediction is omitted for zero-shot LLM evaluations but included for TAT-LLM, leading to inconsistent comparison if not handled uniformly.55- The F1 score is numeracy-focused: it drops to 0 if the predicted number does not exactly match the ground truth, regardless of textual overlap.56- FinQA uses EM (Execution Accuracy) as its primary metric, while TAT-QA and TAT-DQA report both EM and F1, requiring dataset-specific metric tracking.5758## Evidence (verbatim from paper)5960> For TAT-QA and TAT-DQA datasets, we adopt the Exact Match (EM) and the numeracy-focused (macro-averaged) F1 score Zhu et al. ([2021], [2022]). Both two metrics measure the overlap between a bag-of-words representation of the gold and predicted answers. The numeracy-focused F1 score is set to 0 unless the predicted number is exactly equal to the ground truth. We use EM for FinQA, which is the same as the metric of Execution Accuracy originally used in FinQA Chen et al. ([2021]).6162## Citation6364```bibtex65@misc{zhu2024tatllm,66 title={TAT-LLM: A Specialized Language Model for Discrete Reasoning over Tabular and Textual Data},67 author={Fengbin Zhu et al. (2024)},68 year={2024},69 note={arXiv:2401.13223}70}71```7273- arXiv: 2401.13223