schema-to-json-eval
Schema-Driven Information Extraction from Heterogeneous Tables — Bai et al. (2023) (arXiv:2305.14336, 2023)
What this evaluates
Evaluates the ability of language models to extract structured information from heterogeneous tables (text, LaTeX, HTML, CSV, XML) using only a human-authored JSON schema as supervision. It probes schema-driven information extraction, testing attribute prediction accuracy across diverse domains and input formats without domain-specific labeled data.
Datasets
- MlTables — total ?; splits: train (-1), test (-1)
- ChemTables — total ?; splits: train (-1), test (-1)
- DisCoMat — total ?; splits: train (-1), test (-1)
- SWDE — total ?; splits: train (-1), test (-1)
Metrics
Table-F1 (primary) — range: [0, 1]
- Harmonic mean of attribute-level precision and recall. Precision is the ratio of correctly predicted attributes to total predicted attributes. Reported as macro-averaged across tables.
Token-level F1 — range: [0, 1]
- Token-level F1 score for attribute value matching. A prediction is correct if the score exceeds a dataset-specific threshold tuned on the dev set to maximize alignment with human judgments.
Exact Match (EM) — range: [0, 1]
- Exact match of predicted attribute values against gold values.
Tuple-F1 — range: [0, 1]
- Exact match of a predicted 4-element tuple against the gold tuple.
Page-F1 — range: [0, 1]
- Fraction of pages where all attributes are accurately predicted.
Input / output format
Input: Heterogeneous table data (text, LaTeX, HTML, CSV, XML) paired with a human-authored JSON schema template. Optional supplementary text (headers, captions) may be included.
Output: A JSON object conforming to the provided schema, containing extracted attribute values for each table.
Scoring recipe
def compute_table_f1(preds, golds):
correct = 0
total_pred = 0
total_gold = 0
for p, g in zip(preds, golds):
matched = [k for k in p if k in g and token_f1(p[k], g[k]) > THRESHOLD]
correct += len(matched)
total_pred += len(p)
total_gold += len(g)
prec = correct / total_pred if total_pred else 0
rec = correct / total_gold if total_gold else 0
return 2 * prec * rec / (prec + rec) if (prec + rec) else 0
Common pitfalls
- Removing table captions surprisingly improves performance because low-quality or non-specific captions confuse the model.
- SWDE evaluation focuses on identifying the correct HTML node containing the attribute value rather than exact text span matching, requiring token-level F1 for node selection.
- The threshold for token-level F1 is dataset-specific and must be tuned on the development set to maximize alignment with human judgments.
Evidence (verbatim from paper)
We introduce Table-F1, a new metric gauging overall attribute prediction performance within a table, for our two proposed datasets. Table-F1 represents the harmonic mean of precision and recall, with precision being the ratio of correctly predicted attributes to total predicted attributes. At the attribute level, we consider two metrics: token-level F1 and exact match (EM). For DisCoMat and SWDE, we use the metrics specified in the original papers. In the case of DisCoMat, we report Tuple-F1, where a predicted 4-element tuple is considered correct only if it exactly matches with the gold tuple. For SWDE, we report Page-F1, which measures the number of pages where the attributes are accurately predicted.
Citation
@misc{bai2023schema,
title={Schema-Driven Information Extraction from Heterogeneous Tables},
author={Bai et al. (2023)},
year={2023},
note={arXiv:2305.14336}
}
1---2name: schema-to-json-eval3description: Evaluates the ability of language models to extract structured information from heterogeneous tables (text, LaTeX, HTML, CSV, XML) using only a human-authored JSON schema as supervision. It probes schema-driven information extraction, testing attribute prediction accuracy across diverse domains and input formats without domain-specific labeled data. Use when the user wants to benchmark on MlTables, ChemTables, DisCoMat, SWDE, or asks about evaluating this task. Reports Table-F1.4metadata:5 source: https://skillmd.com/skills/qhjqhj00/schema-to-json-eval6 skill_kind: dataset_eval7 source_arxiv: 2305.143368 bibtex_key: bai2023schema9 confidence: high10---1112# schema-to-json-eval1314> Schema-Driven Information Extraction from Heterogeneous Tables — Bai et al. (2023) (arXiv:2305.14336, 2023)1516## What this evaluates1718Evaluates the ability of language models to extract structured information from heterogeneous tables (text, LaTeX, HTML, CSV, XML) using only a human-authored JSON schema as supervision. It probes schema-driven information extraction, testing attribute prediction accuracy across diverse domains and input formats without domain-specific labeled data.1920## Datasets2122- **MlTables** — total ?; splits: train (-1), test (-1)23- **ChemTables** — total ?; splits: train (-1), test (-1)24- **DisCoMat** — total ?; splits: train (-1), test (-1)25- **SWDE** — total ?; splits: train (-1), test (-1)2627## Metrics2829- `Table-F1` **(primary)** — range: [0, 1]30 - Harmonic mean of attribute-level precision and recall. Precision is the ratio of correctly predicted attributes to total predicted attributes. Reported as macro-averaged across tables.31- `Token-level F1` — range: [0, 1]32 - Token-level F1 score for attribute value matching. A prediction is correct if the score exceeds a dataset-specific threshold tuned on the dev set to maximize alignment with human judgments.33- `Exact Match (EM)` — range: [0, 1]34 - Exact match of predicted attribute values against gold values.35- `Tuple-F1` — range: [0, 1]36 - Exact match of a predicted 4-element tuple against the gold tuple.37- `Page-F1` — range: [0, 1]38 - Fraction of pages where all attributes are accurately predicted.3940## Input / output format4142**Input**: Heterogeneous table data (text, LaTeX, HTML, CSV, XML) paired with a human-authored JSON schema template. Optional supplementary text (headers, captions) may be included.4344**Output**: A JSON object conforming to the provided schema, containing extracted attribute values for each table.4546## Scoring recipe4748```python49def compute_table_f1(preds, golds):50 correct = 051 total_pred = 052 total_gold = 053 for p, g in zip(preds, golds):54 matched = [k for k in p if k in g and token_f1(p[k], g[k]) > THRESHOLD]55 correct += len(matched)56 total_pred += len(p)57 total_gold += len(g)58 prec = correct / total_pred if total_pred else 059 rec = correct / total_gold if total_gold else 060 return 2 * prec * rec / (prec + rec) if (prec + rec) else 061```6263## Common pitfalls6465- Removing table captions surprisingly improves performance because low-quality or non-specific captions confuse the model.66- SWDE evaluation focuses on identifying the correct HTML node containing the attribute value rather than exact text span matching, requiring token-level F1 for node selection.67- The threshold for token-level F1 is dataset-specific and must be tuned on the development set to maximize alignment with human judgments.6869## Evidence (verbatim from paper)7071> We introduce Table-F1, a new metric gauging overall attribute prediction performance within a table, for our two proposed datasets. Table-F1 represents the harmonic mean of precision and recall, with precision being the ratio of correctly predicted attributes to total predicted attributes. At the attribute level, we consider two metrics: token-level F1 and exact match (EM). For DisCoMat and SWDE, we use the metrics specified in the original papers. In the case of DisCoMat, we report Tuple-F1, where a predicted 4-element tuple is considered correct only if it exactly matches with the gold tuple. For SWDE, we report Page-F1, which measures the number of pages where the attributes are accurately predicted.7273## Citation7475```bibtex76@misc{bai2023schema,77 title={Schema-Driven Information Extraction from Heterogeneous Tables},78 author={Bai et al. (2023)},79 year={2023},80 note={arXiv:2305.14336}81}82```8384- arXiv: 2305.14336