Source-linked AI summary

Table Meets LLM: Can Large Language Models Understand Structured Table Data? A Benchmark and Empirical Study

Yuan Sui, Mengyu Zhou, Mingjie Zhou, Shi Han, Dongmei Zhang

arXiv:2305.13062v5cs.CLcs.AIcs.IR

TL;DR

LLMs’ ability to understand structured tables remains insufficiently studied despite their success in language reasoning. The paper introduces the SUC benchmark to evaluate structural understanding across tasks and input designs, then proposes self-augmented prompting. Results show basic but imperfect understanding, strong sensitivity to input choices, and improved downstream tabular performance with the proposed prompting method.

  • Problem

    Comprehensive evidence is lacking on whether LLMs genuinely understand tabular structure and which serialization and input designs best support that understanding.

  • Method

    The paper develops the SUC benchmark across seven structural tasks, evaluates varied input choices on LLMs, and proposes model-agnostic self-augmented prompting.

  • Results

    LLMs have basic but imperfect structural understanding; HTML with format explanations and role prompts reaches 65.43% overall accuracy across seven tasks.

  • Takeaways & Limitations

    Combining suitable structural input choices with self-augmented prompting improves tabular reasoning and offers guidance for future table-based research.

  • Takeaways & Limitations

    The method is primarily designed for languages with limited morphology, such as English, and metadata interpretation is left for future exploration.

Abstract

from arXiv · show

Large language models (LLMs) are becoming attractive as few-shot reasoners to solve Natural Language (NL)-related tasks. However, the understanding of their capability to process structured data like tables remains an under-explored area. While tables can be serialized as input for LLMs, there is a lack of comprehensive studies on whether LLMs genuinely comprehend this data. In this paper, we try to understand this by designing a benchmark to evaluate the structural understanding capabilities of LLMs through seven distinct tasks, e.g., cell lookup, row retrieval and size detection. Specially, we perform a series of evaluations on the recent most advanced LLM models, GPT-3.5 and GPT-4 and observe that performance varied with different input choices, including table input format, content order, role prompting, and partition marks. Drawing from the insights gained through the benchmark evaluations, we propose $\textit{self-augmentation}$ for effective structural prompting, such as critical value / range identification using internal knowledge of LLMs. When combined with carefully chosen input choices, these structural prompting methods lead to promising improvements in LLM performance on a variety of tabular tasks, e.g., TabFact($\uparrow2.31\%$), HybridQA($\uparrow2.13\%$), SQA($\uparrow2.72\%$), Feverous($\uparrow0.84\%$), and ToTTo($\uparrow5.68\%$). We believe that our open source benchmark and proposed prompting methods can serve as a simple yet generic selection for future research. The code and data of this paper will be temporality released at https://anonymous.4open.science/r/StructuredLLM-76F3/README.md and will be replaced with an official one at https://github.com/microsoft/TableProvider later.

1 INTRODUCTION

The paper studies whether LLMs genuinely understand table structure and which input designs best support that understanding. It introduces the SUC benchmark and self-augmented prompting to evaluate and improve structural reasoning on tables.

  • Tables support many applications, including question answering, fact verification, table-to-text generation, and column type or relation classification.
  • Previous work lacks comprehensive evidence about LLMs’ structural understanding of tables and consensus on effective table serialization and input design.Existing approaches use varied designs, including special tokens, row- and column-wise serialization, and templates.
  • The SUC benchmark evaluates multiple structural understanding capabilities through specific tasks and compares input format, explanations, role prompts, partition marks, and zero-shot or one-shot settings.
  • LLMs show basic structural understanding but remain imperfect even on trivial tasks such as table size detection.
  • Self-augmented prompting leverages LLMs’ internal knowledge to enhance structural understanding and downstream tabular reasoning.The paper proposes combining structural input choices with self-augmentation as a model-agnostic approach.

2 PRELIMINARIES

The paper frames tables as flexible structured data that must be serialized into sequential text for LLM processing. This creates efficiency and information-preservation challenges because table structures and metadata vary widely.

  • Tables can use relational, entity, matrix, or layout structures, with orientations ranging from horizontal to vertical and formats from flat to hierarchical.The paper mainly focuses on flat relational tables, while also discussing hierarchical tables such as ToTTo.
  • Tabular values include text, numbers, dates, formulas, metadata, arithmetic relationships, distributions, and trends.
  • Table serialization converts tabular data into a linear sequential text format for training and using LLMs.Row-by-row serialization is a common approach used by several prior systems.
  • Prior systems serialize tables with special header and row tokens, row- and column-wise representations, or attribute-value templates.
  • Long serialized inputs challenge memory and computational efficiency, while naive truncation can remove critical information and disrupt table structure.

3 SUC BENCHMARK

SUC benchmarks LLM structural understanding through tasks covering table partitioning, parsing, search, and retrieval under varied input designs. It uses public Wikipedia-derived tables and one-shot evaluation, while self-augmentation provides a two-stage prompting strategy.

  • Benchmark purpose: The benchmark compares input designs and investigates structural understanding, including trade-offs among multiple design combinations.
  • Structural capabilities: SUC organizes table understanding into partitioning and parsing, plus search and retrieval capabilities.These capabilities support separating tables from supplementary information and locating information within structured data.
  • Input designs: SUC compares CSV, JSON, XML, markdown, HTML, XLSX, and separator-token input designs, each presenting different compression and structural challenges.
  • Task design: The benchmark evaluates progressively difficult tasks including table partition, size detection, merged-cell detection, cell lookup, reverse lookup, and row or column retrieval.
  • Data collection: The dataset collection draws structural portions of public Wikipedia-based datasets including TabFact, FEVEROUS, SQA, HybridQA, and ToTTo.Samples are paired with unique questions to identify specific values in the structured data.
  • Evaluation setting: SUC is designed as a one-shot in-context learning benchmark, with zero-shot experiments used for comparison.
  • Structural prompting: Self-augmented prompting first elicits important values or ranges, then incorporates that intermediate knowledge into a second prompt for the downstream answer.

4 STRUCTURAL PROMPTING

The section presents self-augmented prompting as a two-stage strategy for supplying structural information before solving tabular tasks. It combines internal structural knowledge with carefully selected input designs to improve LLM performance.

  • Self-augmented prompting generates intermediate structural knowledge from an LLM’s internal knowledge before solving the target table task.The method can identify crucial values, patterns, formats, or ranges relevant to the downstream process.
  • Self-augmented prompting is model-agnostic and can integrate with other prompting methods such as self-consistency.It uses standard structural data reasoning tasks as the backbone rather than requiring a model-specific procedure.
  • The method invokes the LLM twice: first to extract relevant data points or ranges, then to answer the original question using those results.The second prompt incorporates the first stage’s extracted information to focus attention on critical table details.
  • 65.43% overall accuracy is achieved across seven benchmark tasks with HTML, format explanations, role prompts, and preserved input order.The result corresponds to the highest average performance reported for the input-design ablation.
  • Adding structural features such as table size and merged-cell positions improves downstream task performance in the reported ablation study.These additions provide extra knowledge and constraints after poor performance on table size detection motivated their inclusion.

5 EXPERIMENTS

The experiments evaluate GPT-3.5 and GPT-4 on structural-understanding tasks and downstream tabular datasets under varied input designs. Results show substantial sensitivity to serialization, prompting, ordering, and structural annotations, while self-augmentation improves downstream performance.

  • Experiment Settings: GPT-3.5 and GPT-4 are evaluated on SUC structural-understanding tasks and five typical tabular downstream tasks.The experiments compare multiple input designs and self-augmented prompting variants.
  • Benchmark Results: 65.43% overall accuracy is achieved across seven SUC tasks with HTML, format explanations, role prompts, and unchanged order.Removing certain features, especially the prompt example, reduces performance.
  • Benchmark Highlights: 6.76% improvement is obtained by using HTML markup instead of natural language with separators.The authors attribute this result to LLM familiarity with HTML and XML formats.
  • Benchmark Highlights: 30.38% overall accuracy is lost in zero-shot HTML evaluation across all tasks compared with one-shot prompting.The decline is especially relevant to size detection and merged-cell detection.
  • Benchmark Highlights: 6.81% overall performance decreases when external questions or statements are placed after the table.The experiments therefore favor placing external information before tables.
  • Benchmark Highlights: Partition marks and format explanations reduce Cell Lookup performance but improve some tasks, including merged-cell detection and downstream results.The authors suggest that added structural information can bias search and retrieval while benefiting other capabilities.
  • Self-Augmented Prompting: 3.26% overall improvement over one-shot prompting comes from self-generated key-range and value identification across the evaluated tasks.Self-augmented rows also achieve higher accuracy and BLEU scores than one-shot rows.
  • Downstream Ablation: Manual format explanations can hurt FEVEROUS because its irregular segments and subtables create structural complexity that general annotations cannot fully cover.This comparison concerns one-shot prompting without format explanation versus self-generated format explanation.

6 RELATED WORK

Related work presents LLMs as few-shot reasoners and develops intermediate prompting methods for improving complex reasoning. These methods include chain-of-thought, zero-shot chain-of-thought, self-consistency, and approaches that generate useful intermediate information.

  • In-context Learning with LLMs: LLMs such as GPT-3, Instruct-GPT, and Codex have demonstrated few-shot reasoning capabilities on natural-language tasks.Their effectiveness is influenced by model size, training data, and computing power.
  • Intermediate Prompt Engineering: Chain-of-thought prompting supplies reasoning-chain exemplars so LLMs can follow a step-by-step template for difficult tasks.The cited work reports that gains depend strongly on model scale.
  • Intermediate Prompt Engineering: Self-consistency generates multiple reasoning chains and selects the majority answer through voting.The passage describes improvements in arithmetic and commonsense reasoning.
  • Intermediate Prompt Engineering: The paper’s prompting approach asks an LLM to generate potentially useful information about a question before producing the response.This intermediate-information strategy is connected to self-augmented prompting.

7 CONCLUSION

The paper introduces a benchmark for comparing table-input designs, finds basic but imperfect structural understanding, and proposes self-augmented prompting using LLM-generated knowledge. It also offers guidance for applying these findings to downstream structured-data research.

  • Conclusion: The SUC benchmark compares input designs to study LLM structural understanding of tables.The benchmark is intended to support table-based and broader structured-data research.
  • Conclusion: LLMs show basic capabilities for understanding table structure, but the comparison does not indicate complete structural comprehension.The conclusion characterizes the capability as present but limited.
  • Conclusion: Self-augmented prompting generates additional knowledge from LLM self-knowledge as a simple, generic, and effective method.The paper connects this method to improved understanding of structured data.

ETHICAL CONSIDERATIONS

The paper leaves metadata understanding for future exploration and states that its method is primarily designed for limited-morphology languages such as English. Scalability to longer texts is also left for further study.

  • Scope Boundaries: Metadata interpretation, including column names and data types, is left for future exploration because of space limitations.The passage identifies metadata-related capabilities such as column type and dimension/measure classification.
  • Scope Boundaries: The method is primarily designed for languages with limited morphology, such as English.Its scalability to longer texts remains a topic for future investigation.

A APPENDIX

The appendix includes the paper’s full downstream-task results and full benchmark results.

  • The paper is titled “Table Meets LLM: Can Large Language Models Understand Structured Table Data? A Benchmark and Empirical Study.”
  • Table 8 reports the full results of the downstream tasks.
  • Table 9 reports the full results of the benchmark.
Loading 2305.13062v5…